Detect windows in dec-talk

This commit is contained in:
Dragon Fire
2024-04-06 19:01:31 -04:00
parent 3b3c8a1afb
commit d0cd4b3dea
2 changed files with 7 additions and 7 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ module.exports = class DECTalkCommand extends Command {
const inputFile = path.join(__dirname, '..', '..', 'tmp', 'dec-talk', `${id}.txt`);
await writeFile(inputFile, input);
const outputFile = path.join(__dirname, '..', '..', 'tmp', 'dec-talk', `${id}.wav`);
await execAsync(`xvfb-run wine say.exe -pre "[:phoneme on]" -w ${outputFile} < ${inputFile}`, {
const pre = process.platform === 'win32' ? '' : 'xvfb-run wine ';
await execAsync(`${pre}say.exe -pre "[:phoneme on]" -w ${outputFile} < ${inputFile}`, {
cwd: path.join(__dirname, '..', '..', 'dectalk'),
timeout: 30000
});