From 950383fde83bb483e96ef4e766b39d3dd2fcf21c Mon Sep 17 00:00:00 2001 From: jimmy Date: Tue, 9 Jun 2020 00:14:34 -0400 Subject: [PATCH] Added support for basic export in linux, no voice support nor speed --- platform/linux.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/platform/linux.js b/platform/linux.js index 9cd30cf..b2c66e1 100644 --- a/platform/linux.js +++ b/platform/linux.js @@ -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 () {