Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

mespeak

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mespeak

Text to speech synthesizer

Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
262
-12.37%
Maintainers
1
Weekly downloads
 
Created
Source

mespeak

A CommonJS wrapper over Norbert Landsteiner mespeak text-to-speech library. Works in browserify. More

Example

Here is a simple example showing how to use mespeak:

var meSpeak = require("mespeak")

//Select english/american voice
meSpeak.loadVoice(require("mespeak/voices/en/en-us.json"))

//Play a sound
meSpeak.speak("hello world")

Install

npm install mespeak

API

The API is identical to that on Landsteiner's web page

var meSpeak = require("mespeak")

meSpeak.speak(str[, options])

Says a string.

  • str is a string to say
  • options is a list of options to pass to the speech synthesizer. For more info, see here.

meSpeak.loadConfig([url | json])

Loads a configuration for mespeak. By default uses mespeak/mespeak_config.json

meSpeak.loadVoice(json | url[, callback] )

Loads a voice for mespeak. You can either specify a url and a callback, or a JSON object. A list of voices are included in the voices/ directory. For example, to load an english voice you can do:

meSpeak.loadVoice(require("mespeak/voices/en/en-us.json"))`

meSpeak.setDefaultVoice(str)

Sets the default voice to use.

meSpeak.getDefaultVoice()

Returns the default voice. Note that this is set to the first loaded voice initially.

meSpeak.setVolume()

Sets the volume of playback

`meSpeak.getVolume()

Returns playback volume

meSpeak.play()

Plays a sound

meSpeak.isConfigLoaded()

Checks if mespeak is configured

meSpeak.isVoiceLoaded()

Checks if a voice is loaded

meSpeak.resetQueue()

Clears playback queue

meSpeak.canPlay()

Checks if mespeak can play a sound

Credits

(c) 2011-2013 Norbert Landsteiner. GPL License

NPM entry currently maintained by Mikola Lysenko

Keywords

text

FAQs

Package last updated on 24 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts