Instructions to use espnet/owsm_v4_medium_1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use espnet/owsm_v4_medium_1B with ESPnet:
import soundfile from espnet2.bin.asr_inference import Speech2Text model = Speech2Text.from_pretrained( "espnet/owsm_v4_medium_1B" ) speech, rate = soundfile.read("speech.wav") text, *_ = model(speech)[0] - Notebooks
- Google Colab
- Kaggle
Add a usage example to the model card
Browse files
README.md
CHANGED
|
@@ -13,6 +13,22 @@ library_name: espnet
|
|
| 13 |
pipeline_tag: automatic-speech-recognition
|
| 14 |
---
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
🏆 **News:** Our [OWSM v4 paper](https://www.isca-archive.org/interspeech_2025/peng25c_interspeech.html) won the [Best Student Paper Award](https://isca-speech.org/ISCA-Awards) at INTERSPEECH 2025!
|
| 17 |
|
| 18 |
|
|
|
|
| 13 |
pipeline_tag: automatic-speech-recognition
|
| 14 |
---
|
| 15 |
|
| 16 |
+
## Usage
|
| 17 |
+
|
| 18 |
+
```python
|
| 19 |
+
import librosa
|
| 20 |
+
from espnet2.bin.s2t_inference import Speech2Text
|
| 21 |
+
|
| 22 |
+
s2t = Speech2Text.from_pretrained(
|
| 23 |
+
model_tag="espnet/owsm_v4_medium_1B", lang_sym="<eng>", task_sym="<asr>", beam_size=5
|
| 24 |
+
)
|
| 25 |
+
# OWSM is trained on 16 kHz; each call decodes 30 s, padded or trimmed
|
| 26 |
+
speech, rate = librosa.load("audio.wav", sr=16000, mono=True)
|
| 27 |
+
text, token, token_int, text_nospecial, hyp = s2t(speech)[0]
|
| 28 |
+
print(text_nospecial) # `text` keeps OWSM's own <eng><asr> markers
|
| 29 |
+
# for a recording longer than 30 s: s2t.decode_long(speech) -> (start, end, text)
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
🏆 **News:** Our [OWSM v4 paper](https://www.isca-archive.org/interspeech_2025/peng25c_interspeech.html) won the [Best Student Paper Award](https://isca-speech.org/ISCA-Awards) at INTERSPEECH 2025!
|
| 33 |
|
| 34 |
|