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
//! The synthesis engine a [`TtsBundle`](super::bundle::TtsBundle) runs.
//!
//! A bundle holds the voice catalog and the request plumbing; the engine is
//! the model behind it. Kokoro and VoxCPM2 both implement this, so the same
//! `/v1/audio/speech` handler serves either from one `TtsBundle` type.
use crateResult;
use crateVoice;
/// A text-to-waveform model.
///
/// `Send + Sync` because a server shares one engine across requests and runs
/// `synthesize` on blocking worker threads. An engine that must serialise
/// device work takes its own lock inside `synthesize`.