sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
Loading...
Searching...
No Matches
sherpa_onnx::cxx::GenerationConfig Struct Reference

Generation-time options for advanced TTS synthesis. More...

#include <cxx-api.h>

+ Collaboration diagram for sherpa_onnx::cxx::GenerationConfig:

Public Attributes

float silence_scale = 0.2
 
float speed = 1.0
 
int32_t sid = 0
 
std::vector< float > reference_audio
 
int32_t reference_sample_rate = 0
 
std::string reference_text
 
int32_t num_steps = 5
 
std::unordered_map< std::string, std::string > extra
 

Detailed Description

Definition at line 1016 of file cxx-api.h.

Member Data Documentation

◆ extra

std::unordered_map<std::string, std::string> sherpa_onnx::cxx::GenerationConfig::extra

Model-specific extra attributes serialized to JSON internally.

Definition at line 1033 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 1030 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 1024 of file cxx-api.h.

◆ reference_sample_rate

int32_t sherpa_onnx::cxx::GenerationConfig::reference_sample_rate = 0

Sample rate of reference_audio.

Definition at line 1026 of file cxx-api.h.

◆ reference_text

std::string sherpa_onnx::cxx::GenerationConfig::reference_text

Optional reference text. Not all models require it.

Definition at line 1028 of file cxx-api.h.

◆ sid

int32_t sherpa_onnx::cxx::GenerationConfig::sid = 0

Speaker ID for multi-speaker models.

Definition at line 1022 of file cxx-api.h.

◆ silence_scale

float sherpa_onnx::cxx::GenerationConfig::silence_scale = 0.2

Silence scale between sentences.

Definition at line 1018 of file cxx-api.h.

◆ speed

float sherpa_onnx::cxx::GenerationConfig::speed = 1.0

Speech speed. Used only by some models.

Definition at line 1020 of file cxx-api.h.


The documentation for this struct was generated from the following file: