0.0.5 • Published 3 years ago

@elmotron9000/tts v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Text-to-Speech

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

Features

  • Turns text into ogg audio files
  • 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!