Socket
Socket
Sign inDemoInstall

simple-gtts

Package Overview
Dependencies
7
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-gtts

Simple Google text to speech


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

simple-gtts

Simple Google text to speech

await gTTS("hello there", {
  lang: "en-us",
  path: "./hello.mp3"
})

Install

$ npm i simple-gtts

Usage

import { gTTS } from "simple-gtts"

gTTS(text, data)

gTTS turns text into speech, and can output either a file or a buffer

file

// Include a path to save to a file
await gTTS("hello there", {
  path: "./hello.mp3"
})

buffer

// Not including a path will return a buffer
const buff = await gTTS("hello there")

languages

You can change the language the text is read in by providing a language code

// Languages work with both files and buffers
await gTTS("hello there", {
  lang: "fr",
  path: "./hello.mp3"
})

To view the available languages, you can import and console.log them

import {languages} from "simple-gtts"

console.log(languages)

Keywords

FAQs

Last updated on 13 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc