TTS/STT languages and voices for each provider (#281)

* wip

* wip

* wip

* wip

* wip

* wip

* add testcase
This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2024-01-08 18:15:40 -05:00
1 parent 997ff05f3c
commit 7e046ac7f3
27 files changed
+11536 -82

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
const TtsAwsLanguagesVoiceRaw = require('./tts-microsoft-raw');
const languagesVoices = [];
TtsAwsLanguagesVoiceRaw.forEach((data) => {
const lang = languagesVoices.find((l) => {
return l.value === data.Locale;
});
if (!lang) {
languagesVoices.push({
value: data.Locale,
name: data.LocaleName,
voices: TtsAwsLanguagesVoiceRaw
.filter((d) => {
return d.Locale === data.Locale;
})
.map((d) => {
return {
value: d.ShortName,
name: `${d.DisplayName} (${d.Gender})`,
};
}),
});
}
});
module.exports = languagesVoices;