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

This commit is contained in:
Hoan Luu Huu
2024-04-09 17:53:17 +07:00
committed by GitHub
parent e2c1383723
commit 7875eb51b9

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) {