Expand description
§kokoroxide
A high-performance Rust implementation of Kokoro TTS (Text-to-Speech) synthesis, leveraging ONNX Runtime for efficient neural speech generation.
§Example
use kokoroxide::{KokoroTTS, TTSConfig, load_voice_style};
// Configure and initialize Kokoro TTS
let config = TTSConfig::new("path/to/model.onnx", "path/to/tokenizer.json");
let tts = KokoroTTS::with_config(config)?;
// Load a voice style
let voice = load_voice_style("path/to/voice.bin")?;
// Generate speech
let audio = tts.speak("Hello, world!", &voice)?;
// Save to file
audio.save_to_wav("output.wav")?;Re-exports§
pub use kokoro::load_voice_style;pub use kokoro::GeneratedAudio;pub use kokoro::KokoroTTS;pub use kokoro::TTSConfig;pub use kokoro::VoiceStyle;
Modules§
- kokoro
- Kokoro TTS synthesis engine and related types
Enums§
- Graph
Optimization Level - ONNX Runtime provides various graph optimizations to improve performance. Graph optimizations are essentially graph-level transformations, ranging from small graph simplifications and node eliminations to more complex node fusions and layout optimizations.