Generation-time options for advanced TTS synthesis.
More...
#include <cxx-api.h>
Definition at line 1287 of file cxx-api.h.
◆ extra
| std::unordered_map<std::string, std::string> sherpa_onnx::cxx::GenerationConfig::extra |
Model-specific extra attributes serialized to JSON internally.
Definition at line 1304 of file cxx-api.h.
◆ num_steps
| int32_t sherpa_onnx::cxx::GenerationConfig::num_steps = 5 |
Number of flow-matching steps when supported.
Definition at line 1301 of file cxx-api.h.
◆ phoneme_codepoints
| std::vector<std::vector<int32_t> > sherpa_onnx::cxx::GenerationConfig::phoneme_codepoints |
Pre-phonemized input as Unicode codepoints.
Phonemize the text yourself (for instance with piper_phonemize) and pass the resulting codepoints here. When set, it is used in place of the text argument. Leave empty to use text with a lexicon.
Each inner vector is one sentence.
Definition at line 1315 of file cxx-api.h.
◆ reference_audio
| std::vector<float> sherpa_onnx::cxx::GenerationConfig::reference_audio |
Reference audio samples for zero-shot or voice-cloning models.
Definition at line 1295 of file cxx-api.h.
◆ reference_sample_rate
| int32_t sherpa_onnx::cxx::GenerationConfig::reference_sample_rate = 0 |
◆ reference_text
| std::string sherpa_onnx::cxx::GenerationConfig::reference_text |
Optional reference text. Not all models require it.
Definition at line 1299 of file cxx-api.h.
◆ sid
| int32_t sherpa_onnx::cxx::GenerationConfig::sid = 0 |
Speaker ID for multi-speaker models.
Definition at line 1293 of file cxx-api.h.
◆ silence_scale
| float sherpa_onnx::cxx::GenerationConfig::silence_scale = 0.2 |
Silence scale between sentences.
Definition at line 1289 of file cxx-api.h.
◆ speed
| float sherpa_onnx::cxx::GenerationConfig::speed = 1.0 |
Speech speed. Used only by some models.
Definition at line 1291 of file cxx-api.h.
◆ tokens
| std::vector<std::vector<std::string> > sherpa_onnx::cxx::GenerationConfig::tokens |
Pre-tokenized input, e.g. Chinese pinyin like "zhong1".
Each inner vector is one sentence.
Mutually exclusive with phoneme_codepoints: if both are set, a warning is printed and generation fails.
Definition at line 1325 of file cxx-api.h.
The documentation for this struct was generated from the following file: