What problem does it solve?
Building, deploying, and operating production-quality audio/speech HTTP APIs that are compatible with OpenAI-style endpoints is complex and error-prone; this Skill provides patterns to implement low-latency TTS synthesis, sentence-level streaming, concurrency control, and robust production concerns so teams can reliably serve audio models behind HTTP.
Core Features & Use Cases
- OpenAI-compatible /v1/audio/speech design for drop-in TTS SDK compatibility and model aliasing.
- Concurrency and throughput patterns: Semaphore + ThreadPoolExecutor, dynamic batching for high load, and single-worker memory strategies.
- Sentence-level streaming with PCM output, WAV encoding utilities, adapter pattern for upstream model changes, pydantic-settings configuration, and testing patterns that mock at the service boundary.
- Use cases: deploy a single-GPU TTS server for real-time streaming, wrap third-party audio models behind an OpenAI-like API, or implement a batch inference service with dynamic batching.
Quick Start
Create a FastAPI audio server exposing POST /v1/audio/speech that streams sentence-level PCM and uses a Semaphore plus ThreadPoolExecutor with optional dynamic batching for high-throughput inference.