GithubHelp home page GithubHelp logo

text-to-speech-offline's Introduction

text-to-speech-offline

A very small JavaScript library, easily triggered a text to speech conversion using Web Speech API. You can use it when offline.

Attention

Support for Web Speech API speech synthesis is still getting there across mainstream browsers, and is currently limited to the following:

  • Firefox desktop and mobile support it in Gecko 42+ (Windows)/44+, without prefixes.
  • Firefox OS 2.5+ supports it, by default, and without the need for any permissions.
  • Chrome for Desktop and Android have supported it since around version 33, without prefixes.

For more information, check here.

๐Ÿ”‘ Features

  • Set the language of the utterance.
  • Set the pitch at which the utterance will be spoken at.
  • Set the speed at which the utterance will be spoken at.
  • Set the text that will be synthesised when the utterance is spoken.
  • Set the volume that the utterance will be spoken at.

โ˜๏ธ Installation

npm i text-to-speech-offline

Basic Usage

Format to use this library:

TTS(string, language, volume, rate, pitch)

๐Ÿ“‹ Example

Basic usage with default configuration:

  • Indonesian language of the Utterance
  • Volume: 1 (0.1 - 1)
  • Rate: 1 (0.5 - 2)
  • Pitch: 1 (0 - 2)
import TTS from 'text-to-speech-offline'

<button onClick={() => TTS("Apa kabar?")}> Speak </button>

text-to-speech-offline's People

Contributors

faktaarief avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.