11 lines
297 B
JavaScript
11 lines
297 B
JavaScript
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={}) {
|
|
await spawn('espeak', ['-v', voice, '-w',filepath, text]);
|
|
}
|
|
} |