File size: 1,153 Bytes
1068b6c 1574efa 54fb220 2d85dce f20a8ad 1574efa 54fb220 1574efa f20a8ad 1574efa f20a8ad 54fb220 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
---
title: Tts
emoji: ⚡
colorFrom: blue
colorTo: gray
sdk: docker
pinned: false
short_description: openai api style tts engine
---
# tts-proxy
A simple openai api style tts server based on supertonic.
- https://huggingface.co/spaces/Supertone/supertonic
- https://github.com/supertone-inc/supertonic/tree/main/py
## install dependencies
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
```bash
uv venv -p 3.10
source .venv/bin/activate
uv pip install -r ./requirements.txt
```
## run server
```bash
export API_KEY=yourapi
export MODELS='{"tts-1": "kokoro", "tts-2": "supertonic"}'
python app.py
```
## run client
```bash
curl http://localhost:8000/v1/audio/speech -H "Content-Type: application/json" -H "Authorization: Bearer yourapi" -d '{
"model": "tts-1",
"input": "Hello World! Come Here!",
"voice": "F1",
"format": "wav"
}' --output ./test.wav
curl http://localhost:8000/v1/audio/speech -H "Content-Type: application/json" -H "Authorization: Bearer yourapi" -d '{
"model": "tts-1",
"input": "Hello World! Come Here!",
"voice": "F1",
"format": "mp3"
}' --output ./test.mp3
```
|