A powerful voice cloning application running locally on macOS (Apple Silicon) using the Qwen3-TTS model and the MLX framework.
- Voice Cloning: Clone voices from short audio clips (wav, mp3, m4a, etc.).
- Long Text Support: Automatically splits long input text into sentences for sequential generation, enabling unlimited length synthesis.
- Auto-Trimming: Automatically removes silence from reference audio to improve generation quality and prevent errors.
- Multi-Language: Enhanced support for English and Mandarin Chinese (including punctuation handling).
- Dual Interfaces:
- Web UI: Easy-to-use Gradio interface for recording, cloning, and managing profiles.
- CLI: Command-line interface for automation and batch processing.
- Model Selection: Switch between:
1.7B(High Quality, default)0.6B(Fast, lightweight)
- Profile System: Save successfully cloned voices as profiles for quick reuse.
- Optimized for Mac: Built on
mlx-audiofor efficient inference on M1/M2/M3 chips.
-
Prerequisites:
- macOS with Apple Silicon.
- Python 3.10+ (recommend 3.11 or later).
ffmpeg(for audio conversion):brew install ffmpeg
-
Clone/Setup:
# Create virtual environment python -m venv venv source venv/bin/activate # Install dependencies pip install -r requirements.txt
Run the application:
python app.pyOpen the provided URL (usually http://127.0.0.1:7860) in your browser.
- New Clone Tab: Upload or record a reference audio, provide the transcript, and generate speech.
- Use Profile Tab: Select a saved voice profile to synthesize new text.
- Reference Audio: Supports
.wav,.mp3,.m4a, etc. (Converted automatically).
Use cli.py for terminal operations.
1. Clone a Voice Generate audio from a reference file directly.
python cli.py clone --ref-audio data/ref.m4a --ref-text "Original transcript" --text "Hello world" --output result.wavOptional: Add --model 0.6B for faster generation.
2. Save a Profile Save a voice for later use.
python cli.py save-profile --name my_voice --ref-audio data/ref.m4a --ref-text "Original transcript"3. Use a Saved Profile Generate audio using a stored profile.
python cli.py use-profile --name my_voice --text "This is a new sentence."4. Delete a Profile
python cli.py delete-profile --name my_voice5. List Profiles
python cli.py list-profiles