Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maskaravivek/204d3408674c7f8a75ae7b4b750de7cc to your computer and use it in GitHub Desktop.
Save maskaravivek/204d3408674c7f8a75ae7b4b750de7cc to your computer and use it in GitHub Desktop.
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