Fix formatting
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user