--- 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