Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parser.init = () => {
const credentials = JSON.parse(fs.readFileSync(`${__dirname}/../../config/voice/watson-stt.json`, 'utf8'))
try {
client = new Stt(credentials)
log.success('Parser initialized')
} catch (e) {
log.error(`Watson STT: ${e}`)
}
}