fix tts stt langs and voices when credential is provided (#282)

This commit is contained in:
Hoan Luu Huu
2024-01-09 19:31:33 +07:00
committed by GitHub
parent 7e046ac7f3
commit c8999a5929

View File

@@ -535,11 +535,7 @@ async function getLanguagesVoicesForCobalt(credential) {
}
async function getLanguagesVoicesForSoniox(credential) {
if (credential) {
} else {
return tranform(undefined, SttSonioxLanguagesVoices);
}
return tranform(undefined, SttSonioxLanguagesVoices);
}
async function getLanguagesVoicesForElevenlabs(credential) {
@@ -585,19 +581,11 @@ async function getLanguagesVoicesForElevenlabs(credential) {
}
async function getLanguagesVoicesForAssemblyAI(credential) {
if (credential) {
} else {
return tranform(undefined, SttAssemblyaiLanguagesVoices);
}
return tranform(undefined, SttAssemblyaiLanguagesVoices);
}
async function getLanguagesVoicesForWhisper(credential) {
if (credential) {
} else {
return tranform(TtsWhisperLanguagesVoices, undefined, TtsModelWhisper);
}
return tranform(TtsWhisperLanguagesVoices, undefined, TtsModelWhisper);
}
function tranform(tts, stt, models) {