mirror of
				https://github.com/ml-explore/mlx-examples.git
				synced 2025-10-31 02:48:07 +08:00 
			
		
		
		
	Whisper: Support command line (#746)
* Whisper: Add CLI command * Whisper: Prevent precision loss when converting to words dictionary * Whisper: disable json ensure_ascii * Whisper: add cli setup config * Whisper: pre-commit * Whisper: Adjust the _ in the command line arguments to - * nits * version + readme * nit --------- Co-authored-by: Awni Hannun <awni@apple.com>
This commit is contained in:
		| @@ -21,6 +21,22 @@ pip install mlx-whisper | ||||
|  | ||||
| ### Run | ||||
|  | ||||
| #### CLI | ||||
|  | ||||
| At its simplest: | ||||
|  | ||||
| ``` | ||||
| mlx_whisper audio_file.mp3 | ||||
| ``` | ||||
|  | ||||
| This will make a text file `audio_file.txt` with the results. | ||||
|  | ||||
| Use `-f` to specify the output format and `--model` to specify the model. There | ||||
| are many other supported command line options. To see them all, run | ||||
| `mlx_whisper -h`. | ||||
|  | ||||
| #### API | ||||
|  | ||||
| Transcribe audio with: | ||||
|  | ||||
| ```python | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 madroid
					madroid