const BaseEngine=require('../BaseEngine') const {spawn} = require('child_process') module.exports=class extends BaseEngine { constructor() { super('ESpeak','wav') } async getSpeechFile(text, filepath, voice='en', params={}) { let proc=await spawn('espeak', ['-v', voice, '-w',filepath, '--stdin']); proc.stdin.end(text); } }