@elmotron9000/tts
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Text-to-Speech

Allows for easy access to Google's Text-to-Speech API. It also caches the audio to a temp file.

Features

  • [x] Turns text into ogg audio files
  • [x] Caches to a temp folder

Installation

npm install --save @elmotron9000/tts

This library requires API access to Google's Text-to-Speech API on GCP. Follow steps 1-5 found here.

Usage

// Don't forget to set the GOOGLE_APPLICATION_CREDENTIALS environment var
import { getAudio } from "@elmotron9000/tts";

(async () => {
  const output = await getAudio("This is a test");

  console.log(output.path);
})();

Disclaimer

This was built for a hackathon project. There will be bugs!

Readme

Keywords

none

Package Sidebar

Install

npm i @elmotron9000/tts

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

28.3 kB

Total Files

20

Last publish

Collaborators

  • dyladan
  • beeme1mr
  • tcarrio
  • evan-bradley