add phoneme on
This commit is contained in:
parent
4edf84b66f
commit
2ad60dbb1f
2 changed files with 8 additions and 6 deletions
|
@ -29,17 +29,18 @@ 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;
|
||||||
|
|
||||||
if (process.platform == 'win32') {
|
if (process.platform == 'win32') {
|
||||||
exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${args.decMessage}"`)
|
exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
return console.error(err);
|
return console.error(err);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return message.channel.send({files: ['./dectalk/dectalk.wav']});
|
return message.channel.send({files: ['./dectalk/dectalk.wav']});
|
||||||
});
|
});
|
||||||
} else if (process.platform == 'linux') {
|
} else if (process.platform == 'linux' || process.platform == 'darwin') {
|
||||||
exec(`cd dectalk && DISPLAY=:0.0 wine say.exe -w dectalk.wav "${args.decMessage}"`)
|
exec(`cd dectalk && DISPLAY=:0.0 wine say.exe -w dectalk.wav "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
return console.error(err);
|
return console.error(err);
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,9 +29,10 @@ 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;
|
||||||
|
|
||||||
if (process.platform == 'win32') {
|
if (process.platform == 'win32') {
|
||||||
exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${args.decMessage}"`)
|
exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
return console.error(err);
|
return console.error(err);
|
||||||
})
|
})
|
||||||
|
@ -50,8 +51,8 @@ class dectalkvcCommand extends Command {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (process.platform == 'linux') {
|
} else if (process.platform == 'linux' || process.platform == 'darwin') {
|
||||||
exec(`cd dectalk && DISPLAY=:0.0 wine say.exe -w dectalkvc.wav "${args.decMessage}"`)
|
exec(`cd dectalk && DISPLAY=:0.0 wine say.exe -w dectalkvc.wav "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
return console.error(err);
|
return console.error(err);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue