Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
synthesizer.init = () => {
const credentials = JSON.parse(fs.readFileSync(`${__dirname}/../../config/voice/watson-tts.json`, 'utf8'))
try {
if (process.env.LEON_LANG === 'fr-FR') {
log.warning('fr-FR (male) is not yet implemented for the Watson TTS synthesizer')
}
client = new Tts(credentials)
log.success('Synthesizer initialized')
} catch (e) {
log.error(`Watson TTS: ${e}`)
}
}