This project provides an API for voice cloning using text and voice input files. It leverages a deep learning model for text-to-speech (TTS) synthesis to generate cloned voice from the provided text and voice samples.
Before getting started, make sure you have the following installed:
- Python >= 3.9, < 3.12..
- A GPU with CUDA (version > 2) support for optimal performance.
- CUDA-enabled PyTorch installation.
- The required Python packages (listed in
requirements.txt).
Follow these steps to set up the project on your local machine:
-
Clone the repository or download the project files to your local machine.
-
Navigate to the project directory where the
requirements.txtis located. -
Install the required dependencies by running:
pip install -r requirements.txt
-
Start the Flask app on port 8888 by running:
flask --app main.py run --port 8888
The application will start running at
http://127.0.0.1:8888.
curl --location 'http://127.0.0.1:8888'curl --location 'http://127.0.0.1:8888/tts/voice-cloning' \
--form 'text=@"/home/arjun/Desktop/tts-api/text/test.txt"' \
--form 'voice=@"/home/arjun/Desktop/tts-api/audio/test.wav"'