Use pip for mlx data with speech commands (#307)

* update to use pypi mlx data

* nit in readme
This commit is contained in:
Awni Hannun
2024-01-12 11:06:33 -08:00
committed by GitHub
parent c6440416a2
commit c1342b8e89
3 changed files with 5 additions and 8 deletions

View File

@@ -52,13 +52,13 @@ import whisper
text = whisper.transcribe(speech_file)["text"]
```
Choose the model by setting `hf_path_or_repo`. For example:
Choose the model by setting `path_or_hf_repo`. For example:
```python
result = whisper.transcribe(speech_file, hf_path_or_repo="models/large")
result = whisper.transcribe(speech_file, path_or_hf_repo="models/large")
```
This will load the model contained in `models/large`. The `hf_path_or_repo`
This will load the model contained in `models/large`. The `path_or_hf_repo`
can also point to an MLX-style Whisper model on the Hugging Face Hub. In this
case, the model will be automatically downloaded.