CoolFace
Apppublic

AmartyaC/polyglotpodcaster

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes
App README

๐ŸŽ™๏ธ 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:

bash
# Using Homebrew on macOS
brew install python@3.11

Installation Steps

  1. 1.Navigate to the project directory:
bash
   cd "/Users/rajrup/Desktop/polyglot podcaster"
  1. 1.Create a virtual environment with Python 3.11 or 3.12:
bash
   # 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
  1. 1.Activate the virtual environment:
bash
   source venv/bin/activate
  1. 1.Install PyTorch first:
bash
   # 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
  1. 1.Install remaining dependencies:
bash
   pip install streamlit chatterbox-tts

๐Ÿ“– Usage

  1. 1.Run the Streamlit app:
bash
   streamlit run app.py
  1. 1.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 .wav file 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

  1. 1.The app loads the Chatterbox Multilingual TTS model (cached for performance)
  2. 2.You provide a voice sample as a reference
  3. 3.The model generates new speech in your chosen language using the voice characteristics from the sample
  4. 4.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 .wav format
  • โ€”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.