MLX Audio Server
Local 24x7 OpenAI-compatible API server for STT/TTS, powered by MLX on your Mac.
mlx-audio: The best audio processing library built on Apple's MLX framework, providing fast and efficient text-to-speech (TTS), speech-to-text (STT), and speech-to-speech (STS) on Apple Silicon.
guoqiao/tap/mlx-audio-server: Homebrew Formula to install mlx-audio with brew, and run mlx_audio.server as a LaunchAgent service on macOS.
Requirements
- -
mlx: macOS with Apple Silicon - INLINECODE4 : used to install deps if not available
Installation
CODEBLOCK0
This script will:
- - install ffmpeg/jq with brew if missing.
- install homebrew formula
mlx-audio-server from INLINECODE6 - start brew service for INLINECODE7
Usage
STT/Speech-To-Text(default model: mlx-community/glm-asr-nano-2512-8bit):
CODEBLOCK1
TTS/Text-To-Speech(default model: mlx-community/Qwen3-TTS-12Hz-1.7B-VoiceDesign-bf16):
# audio will be saved into a tmp dir, with default name `speech.wav`, and print to stdout.
bash ${baseDir}/run_tts.sh "Hello, Human!"
# or you can specify a output dir
bash ${baseDir}/run_tts.sh "Hello, Human!" ./output
# output will be audio path only.
You can use both scripts directly, or as example/reference.
MLX 音频服务器
本地24x7全天候运行、兼容OpenAI的STT/TTS API服务器,由Mac上的MLX驱动。
mlx-audio:基于Apple MLX框架构建的最佳音频处理库,在Apple Silicon上提供快速高效的文本转语音(TTS)、语音转文本(STT)和语音转语音(STS)功能。
guoqiao/tap/mlx-audio-server:Homebrew配方,可通过brew安装mlx-audio,并将mlxaudio.server作为macOS上的LaunchAgent服务运行。
系统要求
- - mlx:搭载Apple Silicon的macOS
- brew:用于安装依赖项(如缺失)
安装
bash
bash ${baseDir}/install.sh
此脚本将:
- - 若缺失则通过brew安装ffmpeg/jq。
- 从guoqiao/tap安装homebrew配方mlx-audio-server
- 为mlx-audio-server启动brew服务
使用方法
STT/语音转文本(默认模型:mlx-community/glm-asr-nano-2512-8bit):
bash
若输入非wav格式,将通过ffmpeg转换为wav。
输出仅为转录文本。
bash ${baseDir}/run_stt.sh <音频或视频路径>
TTS/文本转语音(默认模型:mlx-community/Qwen3-TTS-12Hz-1.7B-VoiceDesign-bf16):
bash
音频将保存至临时目录,默认文件名为speech.wav,并输出到标准输出。
bash ${baseDir}/run_tts.sh 你好,人类!
或可指定输出目录
bash ${baseDir}/run_tts.sh 你好,人类! ./output
输出仅为音频路径。
你可以直接使用这两个脚本,或将其作为示例/参考。