MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / validate_supported_style

Function validate_supported_style

src/models/pocket_tts/session.cpp:96–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 || !voice.clone_audio_path.empty()
95 || voice.clone_audio.has_value();
96}
97
98void validate_supported_style(const std::optional<runtime::VoiceCondition> & voice) {
99 if (!voice.has_value() || !voice->style.has_value()) {
100 return;
101 }
102 const auto & style = *voice->style;
103 if (style.language.has_value() || style.emotion.has_value() || style.speaking_rate.has_value()
104 || style.pitch_shift.has_value() || style.energy_scale.has_value() || !style.tags.empty()) {
105 throw std::runtime_error("PocketTTS framework session does not support runtime style controls");
106 }
107}
108

Callers 2

build_generation_requestFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected