{"id":24050,"library":"mlx-audio","title":"MLX-Audio","description":"MLX-Audio enables inference of text-to-speech (TTS) and speech-to-speech (STS) models locally on Apple Silicon Macs using MLX. Current version 0.4.3, with active development and frequent releases.","status":"active","version":"0.4.3","language":"python","source_language":"en","source_url":"https://github.com/Blaizzy/mlx-audio","tags":["mlx","audio","tts","stt","apple-silicon","text-to-speech"],"install":[{"cmd":"pip install mlx-audio","lang":"bash","label":"Core install"}],"dependencies":[{"reason":"Required for all MLX operations","package":"mlx","optional":false},{"reason":"Used for audio format handling (replaced soundfile in v0.3.0)","package":"ffmpeg","optional":false},{"reason":"Pinned to avoid webrtcvad import failure (see v0.4.2 fix)","package":"setuptools<81","optional":true}],"imports":[{"note":"Audio is a top-level class, not in a submodule.","wrong":"from mlx_audio.audio import Audio","symbol":"Audio","correct":"from mlx_audio import Audio"},{"note":"TTS is in the tts module.","wrong":"from mlx_audio import TTS","symbol":"TTS","correct":"from mlx_audio.tts import TTS"},{"note":"STS is in the sts module.","wrong":"from mlx_audio import STS","symbol":"STS","correct":"from mlx_audio.sts import STS"}],"quickstart":{"code":"from mlx_audio import Audio\n\n# Load and play an audio file\naudio = Audio(\"path/to/audio.wav\")\nprint(audio.shape)\naudio.play()","lang":"python","description":"Basic usage of the Audio class to load and play audio."},"warnings":[{"fix":"Install ffmpeg (e.g., brew install ffmpeg) and update any soundfile-dependent code.","message":"In v0.3.0, soundfile was replaced with miniaudio + ffmpeg. Audio format handling changed; ensure ffmpeg is installed.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use from mlx_audio.tts import TTS or from mlx_audio.sts import STS.","message":"TTS and STS classes are not directly importable from mlx_audio; they are in submodules.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the docs for the updated load() signature; use Audio() directly.","message":"The old load() API was refactored in v0.3.0rc1; using it without the new pattern may fail.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"pip install 'setuptools<81' or use pinned dependencies from requirements.","message":"In v0.4.2, setuptools was pinned to <81 to avoid webrtcvad import error. If you have setuptools>=81, install may break.","severity":"breaking","affected_versions":">=0.4.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from mlx_audio import Audio'.","cause":"Audio is a top-level class, not in mlx_audio.audio submodule.","error":"ImportError: cannot import name 'Audio' from 'mlx_audio.audio'"},{"fix":"Install ffmpeg and update code: audio = Audio('file.wav').","cause":"soundfile was removed in favor of miniaudio+ffmpeg in v0.3.0.","error":"ModuleNotFoundError: No module named 'soundfile'"},{"fix":"Install ffmpeg (e.g., brew install ffmpeg on macOS).","cause":"ffmpeg is required but not installed on the system.","error":"OSError: [Errno 2] No such file or directory: 'ffmpeg'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}