
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
SpeakEZ is a lightweight TypeScript library that simplifies the use of the Web Speech API for text-to-speech functionality in web applications. It provides an easy-to-use interface for configuring speech parameters, selecting voices, and handling speech synthesis with improved sentence splitting for better results.
You can install SpeakEZ via npm:
npm install speak-ez
Here's a basic example of how to use SpeakEZ in your project:
import SpeakEZ from 'speak-ez';
const speakWords = async (text: string) => {
// Create an instance of SpeakEZ
const ez = new SpeakEZ();
// Check for browser support
if (!ez.isSupportedBrowser) {
console.error('Speech Synthesis is not supported in this browser.');
return;
}
// Speak the provided text
ez.speak(text);
};
speakWords('Hello world!');
new SpeakEZ()Creates a new instance of SpeakEZ with optional configuration.
init(config?)Initializes the SpeakEZ instance with the provided configuration and fetches available voices. This is not strictly necessary unless you want to set a custom voice. Individual properties can be set directly on the instance.
config Object Propertieslang: Language code for selecting the default voice (e.g., 'en-US').volume: Volume level (0.0 to 1.0).rate: Speech rate (0.1 to 10).pitch: Speech pitch (0.0 to 2.0).voice: Selected voice for speech synthesis (string or SpeechSynthesisVoice).shouldSplitSentences: Boolean indicating whether to split text into sentences for better speech synthesisvoiceLoadTimeoutInMilliseconds: Timeout in milliseconds to wait for voices to load (default: 1000).speak(text, options?)Speaks the provided text with optional event listeners.
textThe text to be spoken.
options Object Propertieslisteners: An object containing event listeners for speech synthesis events (start, end, error, pause, resume, mark, boundary).interrupt: Boolean indicating whether to interrupt ongoing speech (default: false).pause()Pauses the current speech synthesis.
resume()Resumes the paused speech synthesis.
cancel()Cancels the current speech synthesis.
isSupportedBrowser: Boolean indicating if the browser supports Speech Synthesis.voices: Array of available speech synthesis voices.volume: Volume level (0.0 to 1.0).rate: Speech rate (0.1 to 10).pitch: Speech pitch (0.0 to 2.0).shouldSplitSentences: Boolean indicating whether to split text into sentences for better speech synthesisvoice: Selected voice for speech synthesis.speaking: Boolean indicating if speech synthesis is currently in progress.pending: Boolean indicating if speech synthesis is pending.paused: Boolean indicating if speech synthesis is paused.SpeakEZ is licensed under the MIT License. See the LICENSE file for more information.
FAQs
Browser Text-to-Speech (TTS using WebSpeech API) made easy
We found that speak-ez demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.