espnet/owls_9B_180K_intermediates
047
Usage
import librosa
from espnet2.bin.s2t_inference import Speech2Text
s2t = Speech2Text.from_pretrained(
model_tag="espnet/owls_9B_180K_intermediates", lang_sym="<eng>", task_sym="<asr>", beam_size=5
)
# OWSM is trained on 16 kHz; each call decodes 30 s, padded or trimmed
speech, rate = librosa.load("audio.wav", sr=16000, mono=True)
text, token, token_int, text_nospecial, hyp = s2t(speech)[0]
print(text_nospecial) # `text` keeps OWSM's own <eng><asr> markers
# for a recording longer than 30 s: s2t.decode_long(speech) -> (start, end, text)