Last active
September 28, 2024 00:47
-
-
Save Olshansk/888533614765cd13139515d55573d676 to your computer and use it in GitHub Desktop.
A bash wrapper around python's mlx_whisper to leverage the GPU on a mac for transcription
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A one liner to leverage the GPU on a mac to transcribe audio files | |
# Inspired by https://simonwillison.net/2024/Aug/13/mlx-whisper/ | |
llm_transcribe_recording () { | |
local file_path="$1" | |
python3 -c " | |
import mlx_whisper | |
result = mlx_whisper.transcribe('$file_path', path_or_hf_repo='mlx-community/distil-whisper-large-v3') | |
print(result['text']) | |
" | |
} |
Amazing. Really appreciate the simple, but super powerful script!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@scottoreilly Indeed. Fixed!