Fix dectalk

This commit is contained in:
loicbersier 2020-02-01 02:06:16 +01:00
parent a10c453ecf
commit c3f4c9d786
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ class dectalkCommand extends Command {
async exec(message, args) { async exec(message, args) {
args.decMessage = rand.random(args.decMessage, message); args.decMessage = rand.random(args.decMessage, message);
args.decMessage = args.decMessage.replace('\n', ' '); args.decMessage = args.decMessage.replace('\n', ' ');
let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1'); let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["'$`\\])/g,'\\$1');
if (process.platform == 'win32') { if (process.platform == 'win32') {
exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`) exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`)

View file

@ -30,7 +30,7 @@ class dectalkvcCommand extends Command {
async exec(message, args) { async exec(message, args) {
args.decMessage = rand.random(args.decMessage, message); args.decMessage = rand.random(args.decMessage, message);
args.decMessage = args.decMessage.replace('\n', ' '); args.decMessage = args.decMessage.replace('\n', ' ');
let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1'); let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["'$`\\])/g,'\\$1');
if (process.platform == 'win32') { if (process.platform == 'win32') {
exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${decMessage}"`) exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${decMessage}"`)