speech-synth

1.0.1 • Public • Published

speech-synth

Simple text to speech module built on Web Speech API.

  • Try out a live demo of the component here

  • The NPM page can be found here

  • The GitHub page can be found here

Table of Contents

  1. Usage
  2. Initial Setup
  3. Component API
  4. Team

Usage

Install Module

run npm install speech-synth --save in console while in root directory to add the component to your project.

Initial Setup

Import the module buy using a requrie statement: const speech = require('speech-synth');

or an import statement: import speech from 'speech-synth';

Component API

  • say:
    • Description: convert text to speech
    • Type: Method
    • Params: (input, voiceURI)
      • input -> String to be spoken
      • voiceURI -> name of the voice to use
        • Default: 'Google US English'
    • Return: none
  speech.say('hello')
  • getVoiceNames:
    • Description: returns an array of all voiceURI options that can be used with the say method
    • Type: Method
    • Params: none
    • Return: Array[String]
  speech.getVoiceNames()

Example:

  let voice = speech.getVoiceNames()[3];
  speech.say('My voice is Google Deutsch', voice);

Team

  • Development Team Members:
    • Alec Draymore

Package Sidebar

Install

npm i speech-synth

Weekly Downloads

17

Version

1.0.1

License

MIT

Last publish

Collaborators

  • cariboublue