Fix formatting

This commit is contained in:
2021-04-07 01:36:35 +02:00
parent 158ed0372f
commit 12a9f8fc53
8 changed files with 78 additions and 78 deletions

View File

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