Send a basic TTS request with just text:
curl -X POST "https://tts.sahildash.dev/api" -H "Content-Type: application/json" -d "{\"text\": \"Hello world\"}"The response will be JSON containing a downloadUrl. Wait until the job is finished, then download the audio:
curl "https://tts.sahildash.dev/download/<jobId>" --output output.mp3- Install NodeJS and Python 3.12+
- Clone the repository
git clone https://github.com/rip-super/tts-service.git
cd tts-service- Install dependencies:
npm install
pip install -r requirements.txt- Install voices:
cd worker
python download_voices.pyNote: If you have a HuggingFace account, obtain an access token and enter it into the download_voices.py script for faster download speeds.
- Start the servers:
# In one terminal
node server.js
# In another terminal
uvicorn worker:app --host 0.0.0.0 --port 5001- API Docs are available here!