r/learnrust • u/bigfish-rpi • 5d ago
Looking for TTS and STT libraries in Rust — any recommendations?
/r/u_bigfish-rpi/comments/1wrz7rq/looking_for_tts_and_stt_libraries_in_rust_any/
4
Upvotes
r/learnrust • u/bigfish-rpi • 5d ago
2
u/ThatWasAce 3d ago
for tts if you want pure rust kokoros is the best option rn, good quality and actively developed. tts-rs is the classic choice but it just wraps the os voices (sapi on windows, avspeechsynthesizer on mac) so quality depends on your system. if you want the best offline quality piper via subprocess, it's a c++ engine through onnx but the quality per resource usage is unbeatable
for stt use whisper-rs, it's bindings to whisper.cpp
fast, runs on cpu, good accuracy, start there. vosk is lighter and streaming friendly, better for real-time stuff. the usual pipeline for mic input is cpal to capture then feeding chunks into whisper-rs
tho one honest caveat is that the pure rust options lag behind the c/c++ engines, if you want state of the art you're binding to something. also whisper needs model files so plan your download size
tl;dr whisper-rs for stt, kokoros for pure rust tts, tts-rs for no bs