Practical overview
When it fits
Use it when a Node.js application needs to turn text into Google text-to-speech output and the application can work with audio URLs or Base64 data.
Who it is for
- Node.js developers adding spoken output to an application.
- JavaScript or TypeScript developers building utilities that convert supplied text into audio.
Documented uses
- Generate an audio URL from a text input.
- Retrieve audio data as Base64.
- Process longer text through methods that return multiple text-and-audio results.
Requirements & limits
- The package is installed with npm as
google-tts-api. - Language, slower speech, and host can be configured; the README lists English and translate.google.com as defaults.
- Base64 methods accept a timeout option, while the long-text methods accept a punctuation-splitting option.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Google Tts in a Node.js project
Add the package dependency before using its documented text-to-speech methods.
Before you start
- A Node.js project using npm.
- TypeScript projects can also install TypeScript and @types/node as development dependencies.
Steps
Run the command below in the project.
npm install --save google-tts-apiFor a TypeScript project, run the command below.
npm install -D typescript @types/node
Expected outcome
The package is installed as a project dependency, ready for use through its documented JavaScript or TypeScript examples.
Guide limitations
- These steps cover installation only; they do not verify audio generation or host availability.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 21 November 2026
- Original website title
- zlargon/google-tts · Official homepage title · retained in its source language

