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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View File

@ -8,10 +8,6 @@ dataset.
## Pre-requisites ## Pre-requisites
Follow the [installation
instructions](https://ml-explore.github.io/mlx-data/build/html/install.html)
for MLX Data.
Install the remaining python requirements: Install the remaining python requirements:
``` ```

View File

@ -1 +1,2 @@
mlx>=0.0.5 mlx
mlx-data

View File

@ -52,13 +52,13 @@ import whisper
text = whisper.transcribe(speech_file)["text"] 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 ```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 can also point to an MLX-style Whisper model on the Hugging Face Hub. In this
case, the model will be automatically downloaded. case, the model will be automatically downloaded.