Skip to content

Commit

Permalink
Added support for basic export in linux, no voice support nor speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jzp128 committed Jun 9, 2020
1 parent 2d83f23 commit 950383f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion platform/linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ class SayPlatformLinux extends SayPlatformBase {
}

buildExportCommand ({ text, voice, speed, filename }) {
throw new Error(`say.export(): does not support platform ${this.platform}`)
let args = []
let pipedData = undefined
let options = {}

let linuxShellCommand = 'sh'
args.push('-c')

let fullcmd = `echo "${text}" | text2wave -o ${filename}`
args.push(fullcmd)

// voice and speed not working, could probably get speed working with an -eval argument
return { command: linuxShellCommand, args, pipedData, options }
}

runStopCommand () {
Expand Down

0 comments on commit 950383f

Please sign in to comment.