Production-ready FastAPI wrapper for Zonos TTS models with GPU acceleration, voice cloning, and emotion control. Supports both Transformer and Hybrid variants. ⚠️ UNSTABLE API - INITIAL RELEASE
41
stars
35
commits
Python
primary language
Feb 25, 2025
updated
⚠️ WARNING: UNSTABLE API - INITIAL RELEASE ⚠️
This API is currently in its initial release phase (v1.0.0) and is considered unstable. Breaking changes may occur without notice. Use in production at your own risk. For development and testing purposes only.
A production-grade FastAPI implementation of the Zonos Text-to-Speech model.
This API is built on top of the Zonos-v0.1-hybrid and Zonos-v0.1-transformer models created by Zyphra. The models feature:
For more information, visit the model cards on Hugging Face: Hybrid | Transformer.
The fastest way to get started is using our pre-built Docker image:
docker pull ghcr.io/manascb1344/zonos-api-gpu:v1.0.0
docker run -d \
--name zonos-api-gpu \
--gpus all \
-p 8000:8000 \
-e CUDA_VISIBLE_DEVICES=0 \
zonos-api-gpu
git clone --recursive https://github.com/manascb1344/zonos-api
cd zonos-api
The API will be available at http://localhost:8000
docker build -t zonos-api .
docker run -d \
--name zonos-api \
--gpus all \
-p 8000:8000 \
-e CUDA_VISIBLE_DEVICES=0 \
zonos-api
CUDA_VISIBLE_DEVICES: Specify which GPU(s) to use (default: 0)USE_GPU: Enable/disable GPU usage (default: true)Check if the API is running:
curl http://localhost:8000/health
Root endpoint that returns basic API information
Returns a list of available TTS models
Returns a list of supported languages
Returns available conditioners for a specific model
Generate speech from text. Example request:
{
"model_choice": "Zyphra/Zonos-v0.1-transformer",
"text": "Hello, this is a test.",
"language": "en-us",
"emotion_values": [1.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.2],
"vq_score": 0.78,
"cfg_scale": 2.0,
"min_p": 0.15
}
USE_GPU: Set to "true" to enable GPU acceleration (default: true)PYTHONPATH: Set to the application root directoryThe API uses NVIDIA GPU acceleration by default. Make sure you have:
# Start in development mode
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# Or with docker-compose
docker-compose up --build
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
35 commits
Python
88.1%
Dockerfile
11.9%
Production-ready FastAPI wrapper for Zonos TTS models with GPU acceleration, voice cloning, and emotion control. Supports both Transformer and Hybrid variants. ⚠️ UNSTABLE API - INITIAL RELEASE
41
stars
35
commits
Python
primary language
Feb 25, 2025
updated
⚠️ WARNING: UNSTABLE API - INITIAL RELEASE ⚠️
This API is currently in its initial release phase (v1.0.0) and is considered unstable. Breaking changes may occur without notice. Use in production at your own risk. For development and testing purposes only.
A production-grade FastAPI implementation of the Zonos Text-to-Speech model.
This API is built on top of the Zonos-v0.1-hybrid and Zonos-v0.1-transformer models created by Zyphra. The models feature:
For more information, visit the model cards on Hugging Face: Hybrid | Transformer.
The fastest way to get started is using our pre-built Docker image:
docker pull ghcr.io/manascb1344/zonos-api-gpu:v1.0.0
docker run -d \
--name zonos-api-gpu \
--gpus all \
-p 8000:8000 \
-e CUDA_VISIBLE_DEVICES=0 \
zonos-api-gpu
git clone --recursive https://github.com/manascb1344/zonos-api
cd zonos-api
The API will be available at http://localhost:8000
docker build -t zonos-api .
docker run -d \
--name zonos-api \
--gpus all \
-p 8000:8000 \
-e CUDA_VISIBLE_DEVICES=0 \
zonos-api
CUDA_VISIBLE_DEVICES: Specify which GPU(s) to use (default: 0)USE_GPU: Enable/disable GPU usage (default: true)Check if the API is running:
curl http://localhost:8000/health
Root endpoint that returns basic API information
Returns a list of available TTS models
Returns a list of supported languages
Returns available conditioners for a specific model
Generate speech from text. Example request:
{
"model_choice": "Zyphra/Zonos-v0.1-transformer",
"text": "Hello, this is a test.",
"language": "en-us",
"emotion_values": [1.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.2],
"vq_score": 0.78,
"cfg_scale": 2.0,
"min_p": 0.15
}
USE_GPU: Set to "true" to enable GPU acceleration (default: true)PYTHONPATH: Set to the application root directoryThe API uses NVIDIA GPU acceleration by default. Make sure you have:
# Start in development mode
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# Or with docker-compose
docker-compose up --build
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
35 commits
Python
88.1%
Dockerfile
11.9%