| 94 | || !voice.clone_audio_path.empty() |
| 95 | || voice.clone_audio.has_value(); |
| 96 | } |
| 97 | |
| 98 | void 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 |
no test coverage detected