constGoogleTts=require("google-tts.js")/*GoogleTts.saveFile("text", "language codes", "the location that will be filled by the result mp3. (optional)")*/GoogleTts.saveFile("abc","id","./src/audio.mp3").then(console.log)/* console log:{ success: true, message: 'Saved audio in ./src/audio.mp3' }*//* andadd the resulting file to the location you wrote earlier.*/
Response
console log:
{ success: true, message: 'Saved audio in ./src/audio.mp3' }
and add the resulting file to the location you wrote earlier.
Events
Saved with .mp3 Result
GoogleTts.saveFile("text","language codes","the location that will be filled by the result mp3. (optional)")
Get the result url
GoogleTts.getUrl("text","language codes")
About
A wrapper for the Google Text To Speech API with various features.