playht should return list of voice match voice engine configured at speech credentials

This commit is contained in:
Quan HL committed 2024-04-09 16:32:47 +07:00
1 parent e2c1383723
commit a5e423f84f
1 file changed
+3
+3
View File
@@ -700,6 +700,9 @@ ${concat(d.loudness)}${concat(d.style)}${concat(d.tempo)}${concat(d.texture)}` ;
};
const ttsVoices = voices.reduce((acc, voice) => {
if (!credential.voice_engine.includes(voice.voice_engine)) {
return acc;
}
const languageCode = voice.language_code;
const existingLanguage = acc.find((lang) => lang.value === languageCode);
if (existingLanguage) {