|
| void | Destroy (const SherpaOnnxOfflineTts *p) const |
| | Destroy the wrapped C handle.
|
| |
| int32_t | SampleRate () const |
| | Return the output sample rate of generated audio.
|
| |
| int32_t | NumSpeakers () const |
| | Return the number of supported speakers.
|
| |
| GeneratedAudio | Generate (const std::string &text, int32_t sid=0, float speed=1.0, OfflineTtsCallback callback=nullptr, void *arg=nullptr) const |
| | Generate speech using the simple speaker-id and speed interface.
|
| |
| GeneratedAudio | Generate (const std::string &text, const GenerationConfig &config, OfflineTtsCallback callback=nullptr, void *arg=nullptr) const |
| | Generate speech using the advanced generation configuration.
|
| |
| std::shared_ptr< GeneratedAudio > | Generate2 (const std::string &text, int32_t sid=0, float speed=1.0, OfflineTtsCallback callback=nullptr, void *arg=nullptr) const |
| | Like Generate(), but returns a shared pointer to the result.
|
| |
| std::shared_ptr< GeneratedAudio > | Generate2 (const std::string &text, const GenerationConfig &config, OfflineTtsCallback callback=nullptr, void *arg=nullptr) const |
| | Like the advanced Generate() overload, but returns a shared pointer.
|
| |
| | MoveOnly ()=default |
| | Construct an empty wrapper.
|
| |
| | MoveOnly (const SherpaOnnxOfflineTts *p) |
| | Construct a wrapper from a raw C handle.
|
| |
| | MoveOnly (const MoveOnly &)=delete |
| |
| | MoveOnly (MoveOnly &&other) |
| |
| | ~MoveOnly () |
| | Destroy the wrapped handle if present.
|
| |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| |
| MoveOnly & | operator= (MoveOnly &&other) |
| |
| const SherpaOnnxOfflineTts * | Get () const |
| | Return the wrapped raw pointer without transferring ownership.
|
| |
| const SherpaOnnxOfflineTts * | Release () |
| | Release ownership of the wrapped raw pointer.
|
| |
Example using Pocket TTS:
"./sherpa-onnx-pocket-tts-int8-2026-01-26/lm_flow.int8.onnx";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/lm_main.int8.onnx";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/encoder.onnx";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/decoder.int8.onnx";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/text_conditioner.onnx";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/vocab.json";
"./sherpa-onnx-pocket-tts-int8-2026-01-26/token_scores.json";
Configuration for offline TTS.
OfflineTtsModelConfig model
OfflineTtsPocketModelConfig pocket
std::string token_scores_json
std::string text_conditioner
Definition at line 1090 of file cxx-api.h.