Instructions to use espnet/UniverSLU-17-Task-Specifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use espnet/UniverSLU-17-Task-Specifier with ESPnet:
import soundfile from espnet2.bin.asr_inference import Speech2Text model = Speech2Text.from_pretrained( "espnet/UniverSLU-17-Task-Specifier" ) 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
|
@@ -12,6 +12,21 @@ language:
|
|
| 12 |
pipeline_tag: automatic-speech-recognition
|
| 13 |
---
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
## UniverSLU-17 Task Specifier
|
| 16 |
|
| 17 |
UniverSLU-17 Task Specifier is a Multi-task Spoken Language Understanding model from CMU WAVLab.
|
|
|
|
| 12 |
pipeline_tag: automatic-speech-recognition
|
| 13 |
---
|
| 14 |
|
| 15 |
+
## Usage
|
| 16 |
+
|
| 17 |
+
```python
|
| 18 |
+
import librosa
|
| 19 |
+
from espnet2.bin.asr_inference import Speech2Text
|
| 20 |
+
|
| 21 |
+
speech2text = Speech2Text.from_pretrained(model_tag="espnet/UniverSLU-17-Task-Specifier")
|
| 22 |
+
# librosa resamples and mixes to one channel, so any file works; 16000 is
|
| 23 |
+
# what nearly every espnet recogniser is trained on - check this model's
|
| 24 |
+
# config if its audio is not 16 kHz
|
| 25 |
+
speech, rate = librosa.load("audio.wav", sr=16000, mono=True)
|
| 26 |
+
text, *_ = speech2text(speech)[0]
|
| 27 |
+
print(text)
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
## UniverSLU-17 Task Specifier
|
| 31 |
|
| 32 |
UniverSLU-17 Task Specifier is a Multi-task Spoken Language Understanding model from CMU WAVLab.
|