1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Unified text-to-speech for voice pipelines.
//!
//! Provides a clean abstraction over TTS engines — both local models and
//! cloud APIs — behind common Rust traits. Same pattern as
//! [`wavekat-vad`](https://github.com/wavekat/wavekat-vad) and
//! [`wavekat-turn`](https://github.com/wavekat/wavekat-turn).
//!
//! All backends produce [`AudioFrame<'static>`](wavekat_core::AudioFrame)
//! from `wavekat-core`, keeping audio abstract across the WaveKat ecosystem.
//!
//! # Architecture
//!
//! ```text
//! wavekat-vad → "is someone speaking?"
//! wavekat-turn → "are they done speaking?"
//! wavekat-tts → "synthesize the response"
//! │ │ │
//! └───────────────────┴─────────────────────┘
//! │
//! AudioFrame (wavekat-core)
//! ```
//!
//! # Feature flags
//!
//! ## Backends
//!
//! | Feature | Backend | Multilingual | Requires |
//! |---------|---------|-------------|----------|
//! | `qwen3-tts` | Qwen3-TTS (ONNX) | 10 languages | ONNX model download |
//! | `cosyvoice` | CosyVoice (ONNX) | Yes | ONNX model download |
//!
//! ## Execution providers
//!
//! Composable with any backend feature. Selects the inference hardware at build time.
//!
//! | Feature | Provider | Platform |
//! |---------|----------|----------|
//! | `cuda` | NVIDIA CUDA | Linux / Windows |
//! | `tensorrt` | NVIDIA TensorRT | Linux / Windows |
//! | `coreml` | Apple CoreML | macOS / iOS |
//!
//! # Quick start
//!
//! ```toml
//! [dependencies]
//! wavekat-tts = { version = "0.0.1", features = ["qwen3-tts"] }
//! ```
//!
//! ```ignore
//! use wavekat_tts::{TtsBackend, SynthesizeRequest};
//! use wavekat_tts::backends::qwen3_tts::Qwen3Tts;
//!
//! let tts = Qwen3Tts::new("path/to/model.onnx")?;
//! let request = SynthesizeRequest::new("我觉得这个方案");
//! let audio = tts.synthesize(&request)?;
//! // audio: AudioFrame<'static> at 24kHz
//! ```
pub use TtsError;
pub use ;
pub use ;
// Re-export AudioFrame so users don't need to depend on wavekat-core directly.
pub use AudioFrame;