Skip to content

my-ai-stack/ai-voice-clone

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐ŸŽ™๏ธ AI Voice Clone

Clone any voice with AI โ€” Create personalized voice synthesis from just 10-30 seconds of audio. Powered by Coqui XTTS.

Python License Stars

๐Ÿค— HuggingFace ๐Ÿš€ Try Live Demo

๐ŸŽฏ What It Does

Step 1: Upload 10s of audio  โ†’  "This is my voice"
Step 2: AI clones the voice
Step 3: Generate anything   โ†’  "Hello, I am cloned!"

Voice AI is exploding โ€” from content creation to accessibility, voice cloning is revolutionizing communication.

โœจ Features

Feature Description
๐ŸŽฏ Voice Cloning Clone from 10-30 seconds of audio
๐ŸŒ Multi-language English, Arabic, Spanish, French, German
โšก Fast Generate speech in seconds
๐Ÿ”Š High Quality 44.1kHz output
๐ŸŽ›๏ธ Gradio UI Beautiful web interface
๐Ÿณ Docker One-command deployment

๐Ÿš€ Quick Start

Install

git clone https://github.com/walidsobhie-code/ai-voice-clone.git
cd ai-voice-clone
pip install -r requirements.txt

Clone a Voice

# Upload 10-30 seconds of clear audio
python clone_voice.py --input my_voice.wav --output my_cloned_voice

# Output:
# ๐ŸŽค Loading audio: my_voice.wav
# ๐Ÿ”„ Cloning voice...
# โœ… Voice cloned successfully!

Generate Speech

python synthesize.py --model my_cloned_voice.wav \
    --text "Hello everyone, this is my cloned voice!" \
    --output hello.wav

Use Web UI

python gradio_app.py
# Opens: http://localhost:7860

๐ŸŽจ Web UI Demo

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐ŸŽ™๏ธ AI Voice Clone                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                          โ”‚
โ”‚  [๐ŸŽค Clone Voice]        [๐ŸŽค Generate Speech]        โ”‚
โ”‚                                                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚
โ”‚  โ”‚ Upload Audio:   โ”‚     โ”‚ Text Input:    โ”‚          โ”‚
โ”‚  โ”‚ [my_voice.wav]  โ”‚     โ”‚ Hello world!   โ”‚          โ”‚
โ”‚  โ”‚ Duration: 15s   โ”‚     โ”‚ Speed: [1.0x]  โ”‚          โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚
โ”‚                                                          โ”‚
โ”‚  [๐Ÿ”„ Clone Voice]          [๐ŸŽค Generate]              โ”‚
โ”‚                                                          โ”‚
โ”‚  Status:                                               โ”‚
โ”‚  โœ… Voice cloned successfully!                          โ”‚
โ”‚  ๐Ÿ“Š Model: my_cloned_voice                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ป Python API

from clone_voice import clone_voice
from synthesize import synthesize

# Step 1: Clone voice
result = clone_voice(
    input_file="my_voice.wav",
    output_name="my_model"
)
print(result)
# {'status': 'success', 'output': 'my_model.wav'}

# Step 2: Generate speech
result = synthesize(
    model_path="my_model.wav",
    text="Hello, I sound exactly like the original!",
    output="output.wav"
)
print(result)
# {'status': 'success', 'output': 'output.wav'}

๐ŸŽฏ Use Cases

Industry Use Case
๐ŸŽฌ Content Create videos with any voice
๐ŸŽง Podcast Clone voices for narration
โ™ฟ Accessibility Read text in any voice
๐Ÿข Brand Consistent brand voice across content
๐Ÿ“š Education Localize content in local voices
๐ŸŽฎ Gaming Character voices for games

๐Ÿ”ฌ How It Works

Original Audio (10-30s)
         โ†“
 XTTS Encoder (extracts voiceprint)
         โ†“
 Latent Space Representation
         โ†“
 XTTS Decoder (generates new audio)
         โ†“
 Your Cloned Voice Saying Anything!

๐Ÿณ Docker

# Build
docker build -t voice-clone .

# Run
docker run -p 7860:7860 voice-clone

๐Ÿ“ Project Structure

ai-voice-clone/
โ”œโ”€โ”€ clone_voice.py      # Voice cloning
โ”œโ”€โ”€ synthesize.py       # Speech synthesis
โ”œโ”€โ”€ gradio_app.py       # Web UI
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ Dockerfile
โ””โ”€โ”€ examples/
    โ”œโ”€โ”€ basic_clone.py
    โ””โ”€โ”€ multi_language.py

โš ๏ธ Ethical Use

This tool should only be used ethically:

  • โœ… With consent of the voice owner
  • โœ… For legitimate purposes (accessibility, entertainment)
  • โŒ NOT for fraud, impersonation, or deception

๐Ÿค Contributing

See CONTRIBUTING.md

โญ Support

If this helped you, please star the repo!


Built with โค๏ธ by walidsobhie-code

๐Ÿ—บ๏ธ Roadmap

  • [Planned] Web version / hosted demo
  • [Planned] API endpoint for production use
  • [Planned] Support for more languages
  • [In Progress] Performance optimizations
  • [Done] Gradio web interface
  • [Done] Docker deployment

๐Ÿข Used By

Have a project using this? Send a PR to add your company!

  • (coming soon โ€” be the first to list your project!)

๐Ÿค Contributors

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

GitHub Contributors

Packages

 
 
 

Contributors

Languages

  • Python 96.2%
  • Dockerfile 2.0%
  • Shell 1.8%