@fonoster/googletts
TypeScript icon, indicating that this package has built-in type declarations

0.4.13 • Public • Published

Voice application plugin that converts text into natural-sounding speech using an API powered by Google’s AI technologies.

Installation

npm install @fonoster/googletts

or

yarn add @fonoster/googletts

Usage

const { VoiceServer } = require("@fonoster/voice");
const GoogleTTS = require("@fonoster/googletts");

const voiceServer = new VoiceServer({ base: '/voiceapp' });

// Set the server to use Google's TTS
const speechConfig = { keyFilename: "./google.json" };
voiceServer.use(new GoogleTTS(speechConfig));

voiceServer.listen(async(req, res) => {
  console.log(req);
  await res.answer();
  await res.say("Hi! This is google text to speech");
  await res.hangup();
});

Readme

Keywords

none

Package Sidebar

Install

npm i @fonoster/googletts

Weekly Downloads

28

Version

0.4.13

License

MIT

Unpacked Size

7.82 kB

Total Files

9

Last publish

Collaborators

  • fonoster-oss