1.1.1 • Published 1 year ago

simple-gtts v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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)
1.1.1

1 year ago

1.1.0

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago