A local HTTP service that accepts text via POST and speaks it through system speakers using Piper TTS neural voice synthesis. Features: - POST /notify - Queue text for TTS playback - GET /health - Health check with TTS/audio/queue status - GET /voices - List installed voice models - Async queue processing (no overlapping audio) - Non-blocking audio via sounddevice - 73 tests covering API contract Tech stack: - FastAPI + Uvicorn - Piper TTS (neural voices, offline) - sounddevice (PortAudio) - Pydantic for validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
841 B
Markdown
42 lines
841 B
Markdown
# Voice Server
|
|
|
|
Local HTTP service for text-to-speech playback using Piper TTS.
|
|
|
|
## Features
|
|
|
|
- HTTP POST endpoint for text-to-speech requests
|
|
- High-quality neural TTS using Piper
|
|
- Non-blocking audio playback with sounddevice
|
|
- Async request queue for concurrent handling
|
|
- Automatic OpenAPI documentation
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
# Install dependencies
|
|
uv pip install -e ".[dev]"
|
|
|
|
# Run server
|
|
uvicorn app.main:app --reload
|
|
|
|
# Test endpoint
|
|
curl -X POST http://localhost:8000/notify \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"message": "Hello, world!"}'
|
|
```
|
|
|
|
## API Endpoints
|
|
|
|
- `POST /notify` - Submit text for TTS playback
|
|
- `GET /health` - Health check endpoint
|
|
- `GET /voices` - List available voice models
|
|
- `GET /docs` - OpenAPI documentation
|
|
|
|
## Configuration
|
|
|
|
See `.env.example` for configuration options.
|
|
|
|
## License
|
|
|
|
MIT
|