Fix example usage
Browse filesFor the `librispeech_long` example, as it is longer than 30 s, there is the following error:
```
ValueError: You have passed more than 3000 mel input features (> 30 seconds) which automatically enables long-form generation which requires the model to predict timestamp tokens. Please either pass `return_timestamps=True` or make sure to pass no more than 3000 mel input features.
```
README.md
CHANGED
|
@@ -178,10 +178,15 @@ pipe = pipeline(
|
|
| 178 |
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
| 179 |
sample = dataset[0]["audio"]
|
| 180 |
|
| 181 |
-
result = pipe(sample)
|
| 182 |
print(result["text"])
|
| 183 |
```
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
To transcribe a local audio file, simply pass the path to your audio file when you call the pipeline:
|
| 186 |
|
| 187 |
```python
|
|
|
|
| 178 |
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
| 179 |
sample = dataset[0]["audio"]
|
| 180 |
|
| 181 |
+
result = pipe(sample, return_timestamps=True)
|
| 182 |
print(result["text"])
|
| 183 |
```
|
| 184 |
|
| 185 |
+
It is also possible to transcribe a link to an audio file:
|
| 186 |
+
```python
|
| 187 |
+
result = pipe("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac")
|
| 188 |
+
```
|
| 189 |
+
|
| 190 |
To transcribe a local audio file, simply pass the path to your audio file when you call the pipeline:
|
| 191 |
|
| 192 |
```python
|