mlx_transcribe_tools.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your OpenAI API key
4
Install an MLX backend
On macOS, the dependency step installs the standard MLX package. On Linux, install exactly one backend for your hardware before running:
uv pip install -U "mlx[cpu]", uv pip install -U "mlx[cuda12]", or uv pip install -U "mlx[cuda13]".5
Install ffmpeg
Install
ffmpeg using the macOS or Ubuntu command in the source header.6
Add an audio file
For a standalone file, replace the
agno_root_dir assignment with agno_root_dir = Path(__file__).parent.resolve(). Save the code as mlx_transcribe_tools.py, then add the audio file to storage/audio beside the script.7
Run the example
Save the code above as
mlx_transcribe_tools.py, then run: