Created
July 25, 2023 01:29
-
-
Save maskaravivek/204d3408674c7f8a75ae7b4b750de7cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const iso2LangToPollyParams = { | |
fr: { | |
engine: "neural", | |
voiceId: "Lea", | |
langCode: "fr-FR", | |
}, | |
en: { | |
engine: "neural", | |
voiceId: "Joanna", | |
langCode: "en-US", | |
}, | |
ar: { | |
engine: "standard", | |
voiceId: "Zeina", | |
langCode: "arb", | |
}, | |
de: { | |
engine: "neural", | |
langCode: "de-DE", | |
voiceId: "Vicki", | |
}, | |
it: { | |
engine: "neural", | |
langCode: "it-IT", | |
voiceId: "Bianca", | |
}, | |
es: { | |
engine: "neural", | |
langCode: "es-ES", | |
voiceId: "Lucia", | |
}, | |
}; | |
const getLangConfigurationOrDefault = (iso2Lang) => | |
iso2LangToPollyParams[iso2Lang] || iso2LangToPollyParams["en"]; | |
module.exports = { getLangConfigurationOrDefault }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment