gtts-browser
v2.0.1
Published
a browser-based solution for the popular gtts npm package
Downloads
9
Readme
the browser-based Solution for the gtts npm package
uses the same tokenization system as the gtts package
note: this package can only be used in a browser-based environment and not in node.js system
usage
installation
npm I gtts-browser
or directly import from javascript:
<script type="module">
import gtts-browser from 'https://esm.run/gtts-browser';
</script>
generating audios
const tts = new gtts("Hello everyone", "en");
tts.getAudioStream().then((blob) => {
const audio = new Blob(blob, {type: "audio/mpeg"});
const url = URL.createObjectURL(audio);
// do what ever you need
});