| 153 | } |
| 154 | |
| 155 | VoiceTaskKind parse_voice_task_kind(const std::string & value) { |
| 156 | if (value == "vad") { |
| 157 | return VoiceTaskKind::Vad; |
| 158 | } |
| 159 | if (value == "asr") { |
| 160 | return VoiceTaskKind::Asr; |
| 161 | } |
| 162 | if (value == "diar") { |
| 163 | return VoiceTaskKind::Diarization; |
| 164 | } |
| 165 | if (value == "sep") { |
| 166 | return VoiceTaskKind::SourceSeparation; |
| 167 | } |
| 168 | if (value == "gen") { |
| 169 | return VoiceTaskKind::AudioGeneration; |
| 170 | } |
| 171 | if (value == "tts") { |
| 172 | return VoiceTaskKind::Tts; |
| 173 | } |
| 174 | if (value == "clon") { |
| 175 | return VoiceTaskKind::VoiceCloning; |
| 176 | } |
| 177 | if (value == "vc") { |
| 178 | return VoiceTaskKind::VoiceConversion; |
| 179 | } |
| 180 | if (value == "s2s") { |
| 181 | return VoiceTaskKind::SpeechToSpeech; |
| 182 | } |
| 183 | if (value == "align") { |
| 184 | return VoiceTaskKind::Alignment; |
| 185 | } |
| 186 | if (value == "vdes") { |
| 187 | return VoiceTaskKind::VoiceDesign; |
| 188 | } |
| 189 | if (value == "spk") { |
| 190 | return VoiceTaskKind::SpeakerRecognition; |
| 191 | } |
| 192 | if (value == "svc") { |
| 193 | return VoiceTaskKind::Svc; |
| 194 | } |
| 195 | throw std::runtime_error("unsupported task: " + value + " (expected vad, asr, diar, sep, gen, tts, clon, vc, s2s, align, vdes, spk, or svc)"); |
| 196 | } |
| 197 | |
| 198 | RunMode parse_run_mode(const std::string & value) { |
| 199 | if (value == "offline") { |
no outgoing calls
no test coverage detected