Made for real-time voice
Audio is written in chunks into a ring buffer drained by a lock-free audio callback, which suits streaming TTS. clear() from any thread discards buffered audio, a write in progress included, so a voice assistant can stop talking the moment the user does.
Zero configuration
Sample rate and channels are detected from the device; when the device cannot take the source format, audio is resampled and remixed for it, for example 22050 Hz mono TTS to a 48000 Hz stereo device. Blocking calls release the GIL.
Stack
- Rust
- CPAL
- PyO3
- maturin
- PipeWire
- WASAPI
- CoreAudio