File size: 1,105 Bytes
dbd1243 35bb6f4 dbd1243 | 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 | ---
title: Neuapi
emoji: 👀
colorFrom: blue
colorTo: pink
sdk: docker
pinned: false
---
# NeuTTS API on Hugging Face Spaces
OpenAI-compatible Text-to-Speech API powered by NeuTTS.
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `NEUTTS_DEFAULT_MODELS` | `neutts-nano-q4-gguf` | Comma-separated model IDs |
| `NEUTTS_DEFAULT_CODEC` | `neuphonic/neucodec-onnx-decoder` | Codec model |
| `NEUTTS_DEFAULT_VOICE` | `jo` | Default voice name |
| `NEUTTS_DEFAULT_BACKBONE_DEVICE` | `cpu` | Device for backbone |
| `NEUTTS_DEFAULT_CODEC_DEVICE` | `cpu` | Device for codec |
| `NEUTTS_LOG_LEVEL` | `INFO` | Log level |
| `NEUTTS_CORS_ENABLED` | `true` | Enable CORS |
## API Usage
The API is OpenAI-compatible:
```bash
curl -X POST "https://{your-space}.hf.space/v1/audio/speech" \
-H "Content-Type: application/json" \
-d '{
"model": "neutts-nano-q4-gguf",
"input": "Hello, world!",
"voice": "jo",
"response_format": "mp3"
}' \
--output speech.mp3
```
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|