Add files using upload-large-folder tool
Browse files- .ipynb_checkpoints/README-checkpoint.md +0 -0
- README.md +14 -0
.ipynb_checkpoints/README-checkpoint.md
ADDED
File without changes
|
README.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
```python
|
2 |
+
from datasets import load_dataset
|
3 |
+
from huggingface_hub import hf_hub_download
|
4 |
+
import whisper
|
5 |
+
|
6 |
+
model_path = hf_hub_download(repo_id="distil-whisper/distil-large-v3.5-openai", filename="model.bin")
|
7 |
+
model = whisper.load_model(model_path)
|
8 |
+
|
9 |
+
dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
10 |
+
sample = dataset[0]["audio"]["path"]
|
11 |
+
|
12 |
+
result = model.transcribe(sample, language="en")
|
13 |
+
print(result["text"])
|
14 |
+
```
|