text-to-speech-file

0.3.2 • Public • Published

Text2Speech (File)

No More Updates: This package is not going to be updated anymore.

Please use newer (and better) NodTTS package instead.


This is a simple NodeJS module to convert text into speech file. This module uses Google service to convert those text into file therefore, this module depends on internet.

NOTE: Due to usage of free Google Text-To-Speech API, this module can not deal with texts which are over than 200 characters. See here for more information

Usage

Install

These are some step by step series that will get you production version of the module in your project

# add to project 
yarn add text-to-speech-file
 

Those steps should add this module to your project's node_module.

Usage

To use this module, simply do import and call synthesize('YOUR_SAMPLE_TEXT_HERE', 'YOUR_FILE_SAVE_PATH_HERE') function of it

// importing
import ttsf from 'text-to-speech-file'
// or 
import { synthesize } from 'text-to-speech-file'
 
// try synthesizing text
ttsf.synthesize('hello from shrotavre!', `${__dirname}/sample-speech.mp3`)
// or 
synthesize('hello from shrotavre!', `${__dirname}/sample-speech.mp3`)
 

Those steps should produce you a sample hello from shrotavre! sound file.

Getting Started on Developing

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Make sure your computer is connected
  • Make sure you have installed the development requirements.

Installing

These are some step by step series that will get you a development version running in your machine

# setup dependencies 
yarn
 
# build the project 
yarn build
 
# test out script's `synthesize()` function 
yarn test
 

Those steps should produce you a sample hello from shrotavre! sound file will be generated inside /temp folder.

Package Sidebar

Install

npm i text-to-speech-file

Weekly Downloads

1

Version

0.3.2

License

MIT

Unpacked Size

4.43 kB

Total Files

5

Last publish

Collaborators

  • shrotavre