A Simple package for using Dectalk (Moonbase alpha voice)
npm install dectalk
see notes if it doesn't work for you
Javascript:
const { say } = require('dectalk');
const { writeFileSync } = require('fs');
(async () => {
const WavData = await say("Hello World!");
writeFileSync('Hello.wav', WavData)
})();
Typescript:
import { writeFileSync } from "fs";
import { say } from 'dectalk';
(async () => {
const WavData: Buffer = await say("Hello World");
writeFileSync('Hello.wav', WavData);
})();
Windows support was added recently, if you have any problems dont be afraid to make an issue
Unfortunately, Dectalk does not support macOS. If you would like to use this module on Mac, try running your project inside a Linux Docker container.
On Linux, you may have to install a dependency:
apt install libpulse0
or
pacman -S libpulse