Ichika065/Esp32Ai-docker-test
0
๐ค Kokoro TTS API
A fast Text-to-Speech API using Kokoro running on Hugging Face Docker Spaces.
๐ Live API
After deployment, your API will be available at:
- Base URL:
/ - Docs:
/docs - Health:
/health - TTS Endpoint:
/v1/audio/speech
๐ Example Space URL
https://YOUR_SPACE.hf.space
๐ก TTS API Usage
POST /v1/audio/speech
Request:
{
"input": "Hello world",
"voice": "af_heart"
}
---
## โก CPU Speed Tips (Hugging Face Free)
- Request text is normalized and trimmed for faster generation.
- Responses are cached in-memory for repeated `(input, voice)` calls.
- WAV encoding uses lightweight stdlib encoding for lower overhead.
- Runtime threads are limited to avoid CPU oversubscription.
Optional environment variable:
- `MAX_CHARS=350` (lower this to make responses faster on tiny CPU)