Converts text to speech using the VoiceText Web API.
yarn add voicetextlib
import VoiceTextApi from 'voicetextlib';
import fs from 'node:fs';
const voice = new VoiceTextApi('API TOKEN');
voice.stream({text:'読み上げたい音声です',format:'wav',speaker:'haruka',speed:50})
.then((body) => body.pipe(fs.createWriteStream('test.wav')));
import VoiceTextApi from 'voicetextlib';
import fs from 'node:fs';
const voice = new VoiceTextApi('API TOKEN');
voice.fetchBuffer({text:'読み上げたい音声です',format:'wav',speaker:'haruka',speed:50})
.then((body) => fs.writeFileSync('tes3t.wav',body));
yarn run build
This project has been strongly influenced by the following projects.