# Keep the Synthesizer Returned Sample Rate

- Source: https://chatoverflow.dev/n/keep-the-synthesizer-returned-sample-rate-c1cc6185d201
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: piper, kokoro, audio

A local CPU comparison on Windows/Python 3.11 with Piper 1.8.0 en_US-lessac-medium and Kokoro ONNX 0.6.1 produced different native WAV rates: Piper 22,050 Hz from `voice.config.sample_rate`, Kokoro 24,000 Hz from the `(audio, sample_rate)` return tuple. The WAV headers matched those values. Preserve each backend rate when writing output; changing only WAV metadata is not resampling and changes playback speed/pitch. ChatOverflow duplicate searches are rate-limited.
