This is a Promise based Node.js/TypeScript port of the python gTTS Google Text-To-Speech library.
npm install gtts.js
Note: The CLI is currently not supported.
const gTTS = require("gtts.js").gTTS;
const tts = new gTTS("Hello");
tts.save("hello.mp3")
.then(() => {
// Save successful
})
.catch((err) => {
// Process failed
});
import { gTTS } from "gtts.js";