Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice Clone App (Qwen3-TTS on MLX)

A powerful voice cloning application running locally on macOS (Apple Silicon) using the Qwen3-TTS model and the MLX framework.

Features

  • 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-audio for efficient inference on M1/M2/M3 chips.

Installation

  1. Prerequisites:

    • macOS with Apple Silicon.
    • Python 3.10+ (recommend 3.11 or later).
    • ffmpeg (for audio conversion):
      brew install ffmpeg
  2. Clone/Setup:

    # Create virtual environment
    python -m venv venv
    source venv/bin/activate
    
    # Install dependencies
    pip install -r requirements.txt

Usage

Web Interface

Run the application:

python app.py

Open 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).

Command Line Interface (CLI)

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.wav

Optional: 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_voice

5. List Profiles

python cli.py list-profiles

About

Voice clone based on Qwen3 TTS model

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages