
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
A CommonJS wrapper over Norbert Landsteiner mespeak text-to-speech library. Works in browserify. More
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")
It also works in node.js too (though audio playback is unsupported):
var meSpeak = require("mespeak")
meSpeak.loadVoice(require("mespeak/voices/en/en-us.json"))
process.stdout.write(meSpeak.speak("hello world", {rawdata: "buffer"}))
npm install mespeak
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 sayoptions is a list of options to pass to the speech synthesizer. For more info, see here.The options argument takes the following parameters:
buffer: A node.js buffer containing a wav fileNote: The value of 'rawdata' must evaluate to boolean 'true' in order to be recognized.
meSpeak.loadConfig(json | url[, callback])Loads a configuration for mespeak. By default uses mespeak/mespeak_config.json There are two forms.
json Synchronously loads a configuration JSON object. This can be done using require("filename.json")The other option is to load the config asynchronously via http:
url is the url of the config filecallback is called once the config is loadedmeSpeak.isConfigLoaded()Checks if mespeak is configured
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"))`
The other form is the same as in meSpeak.loadConfig and takes two arguments:
url which is the url of the voice to loadcallback which is an optional callback-handler. The callback will receive two arguments:
meSpeak.setDefaultVoice(str)Sets the default voice to use. The default voice is always the the last voice loaded.
meSpeak.isVoiceLoaded()Checks if a voice is loaded
meSpeak.getDefaultVoice()Returns the default voice.
meSpeak.setVolume(volume)Sets the volume of playback globally.
volume is the volume represented as a floatThis update happens immediately and is applied relatively
meSpeak.getVolume()Returns playback volume.
meSpeak.play(stream[, relativeVolume])Plays a sound. You can use this to cache previously generated voices and play them back at run time by setting the
stream is a sound to playrelativeVolume is the relative loudness of the soundmeSpeak.resetQueue()Clears playback queue, stops all currently playing sounds.
meSpeak.canPlay()Checks if mespeak can play a sound.
(c) 2011-2013 Norbert Landsteiner. GPL License
NPM entry currently maintained by Mikola Lysenko
FAQs
Text to speech synthesizer
The npm package mespeak receives a total of 297 weekly downloads. As such, mespeak popularity was classified as not popular.
We found that mespeak demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.