🗣️ Speech Server – TTS API with Chatterbox & Kokoro
This project provides a FastAPI-based HTTP server for generating speech audio using Chatterbox TTS or Kokoro ONNX.
🚀 Quick Start
1. Clone the Repo
git clone https://github.com/Ladvien/speech_server.git
cd speech_server
2. Install Dependencies
We use Poetry for managing dependencies.
poetry install
3. Run the Server
poetry run speech-server
Or:
poetry run uvicorn speech_server.server.app:app --host 0.0.0.0 --port 8000
Access:
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
🧪 Example Usage
Generate Audio from Text
curl -X POST http://localhost:8000/tts \
-H "Content-Type: application/json" \
-d '{"text": "Hello, world!", "voice": "default"}' \
--output hello.wav
List Voices
curl http://localhost:8000/voices
⚙️ Configuration
Use config.yaml, environment variables, or Python config classes like TTSServerConfig.
tts_service: chatterbox # or 'kokoro'
voice: default
log_level: info
sample_rate: 24000
🧠 Features
- ✅ Chatterbox TTS (PyTorch)
- ✅ Kokoro ONNX (lightweight, GPU-ready)
- ✅ Voice cloning support
- ✅ Streaming endpoint
- ✅
/voicesAPI - ✅ YAML config support
- ✅ Ready for Docker or cloud deployment
🧩 Extend It
To add a new TTS engine, subclass:
speech_server.common.base_tts_service.TTSService
Then register it via your config loader.
🛠 Dev Tools
Lint, Format, Test
poetry run black .
poetry run isort .
poetry run pytest
Type Check
poetry run mypy src/
📚 Documentation
Build local docs:
cd docs
make html
Docs live in /docs/source/ and are rendered via ReadTheDocs.
📄 License
MIT © C. Thomas Brittain
Metadata
Release files for speech-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| speech_server-0.1.1.tar.gz | 11.4 kB | Without provenance | Details for speech_server-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| speech_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for speech_server-0.1.1-py3-none-any.whl |
Total release size: 25.6 kB
Release files / speech_server-0.1.1.tar.gz
| Download URL | speech_server-0.1.1.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
772232d17f6c2336662dfe3365b2dec2e630dd8d46ff22168fba0e83028700e6
|
|
BLAKE2b-256 checksum How to use checksums |
5559c11b6c9bc0ade421e29e8381665551d6a6d3085203e8ae0106ea4b77e309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.10 Darwin/24.5.0
|
Release files / speech_server-0.1.1-py3-none-any.whl
| Download URL | speech_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03add7def24a43155f0fc3055d9576a8fc211c4719b0e04bc31ee594a758c15a
|
|
BLAKE2b-256 checksum How to use checksums |
748525cb31a952ae8303873f9d76ee220f2f857f2d9816349b3e5f7712e29d8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.10 Darwin/24.5.0
|
Security for speech-server 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.