AmartyaC/polyglotpodcaster
0
๐๏ธ Polyglot Podcaster
A Streamlit-based web application for zero-shot multilingual voice cloning using the Chatterbox TTS model.
๐ Features
- Zero-Shot Voice Cloning: Record your voice or upload a short voice sample and generate speech in any supported language
- Browser-Based Recording: Record audio directly in your browser - no need to upload files!
- File Upload Support: Alternative option to upload pre-recorded .wav files
- 23 Languages Supported: English, Spanish, French, German, Italian, Portuguese, Polish, Turkish, Russian, Dutch, Arabic, Swedish, Danish, Greek, Finnish, Hebrew, Hindi, Japanese, Korean, Malay, Norwegian, Swahili, and Chinese
- Simple Web Interface: Easy-to-use Streamlit interface with tabbed input options
- GPU Acceleration: Automatically uses GPU if available for faster generation
๐ Installation
Prerequisites
โ ๏ธ Important: PyTorch currently requires Python 3.8-3.12. Python 3.13 is not yet supported.
If you have Python 3.13, you'll need to install Python 3.11 or 3.12:
# Using Homebrew on macOS
brew install python@3.11Installation Steps
- Navigate to the project directory:
cd "/Users/rajrup/Desktop/polyglot podcaster"- Create a virtual environment with Python 3.11 or 3.12:
# If you have Python 3.11
python3.11 -m venv venv
# OR if you have Python 3.12
python3.12 -m venv venv
# OR use the default python3 if it's 3.8-3.12
python3 -m venv venv- Activate the virtual environment:
source venv/bin/activate- Install PyTorch first:
# For CPU-only (smaller download)
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
# OR for GPU support (if you have CUDA)
pip install torch torchaudio- Install remaining dependencies:
pip install streamlit chatterbox-tts๐ Usage
- Run the Streamlit app:
streamlit run app.py- Use the application:
Option A: Record Audio (Recommended)
- Click the "๐ค Record Audio" tab
- Click "๐๏ธ Click to Record" button to start recording
- Speak for 10-15 seconds
- Click "โน๏ธ Click to Stop" to finish recording
- Your recorded audio will be displayed
Option B: Upload File
- Click the "๐ค Upload File" tab
- Upload a 10-15 second
.wavfile of the target voice
Then:
- Enter the text you want to generate
- Select the language of your text
- Click "๐ต Generate Speech"
- Listen to the generated audio!
๐ Requirements
- Python 3.10+
- streamlit
- streamlit-audiorecorder
- chatterbox-tts
- torch
- torchaudio
๐ฏ How It Works
- The app loads the Chatterbox Multilingual TTS model (cached for performance)
- You provide a voice sample as a reference
- The model generates new speech in your chosen language using the voice characteristics from the sample
- The generated audio is saved and played back in the browser
โ ๏ธ Notes
- The first run will download the Chatterbox model (may take some time)
- GPU is recommended for faster generation
- Input audio should be in
.wavformat - Best results with clear, 10-15 second voice samples
๐ License
This project uses the Chatterbox TTS library. Please refer to the Chatterbox TTS license for usage terms.
