playht should return list of voice match voice engine configured at speech credentials (#306)

This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2024-04-09 06:53:17 -04:00
1 parent e2c1383723
commit 7875eb51b9
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) {