New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

simple-gtts

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-gtts

Simple Google text to speech

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 13 Feb 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc