npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mastashake08/speech-kit

v2.0.8

Published

Package for simplifying the Speech Recognition and Speech Utterence process.

Downloads

30

Readme

Speech Kit

GPL license Version PRs Welcome Maintenance Website jyroneparker.com Patreon Twitter CodeLife Discord online members

Simplifying the Speech Synthesis and Speech Recognition engines for Javascript. Listen for commands and perform callback actions, make the browser speak and transcribe your speech!

Features

  • Speak Commands
  • Listen for voice commands
  • Add your own grammar
  • Transcribe words and output as file.
  • Generate SSML from text for fine tune editing.

Functions

listen()

Start listening for speech recognition.

Kind: global function

stopListen()

Stop listening for speech recognition.

Kind: global function

speak(text, [voice])

Use Speech Synthesis to speak text.

Kind: global function

| Param | Type | Default | Description | | --- | --- | --- | --- | | text | string | | Text to be spoken | | [voice] | SpeechSynthesisVoice | | Optional parameter to change the voice that speaks |

getResultList() ⇒ SpeechRecognitionResultList

Get current SpeechRecognition resultsList.

Kind: global function
Returns: SpeechRecognitionResultList - - List of Speech Recognition results

getText() ⇒ string

Return text

Kind: global function
Returns: string - resultList as text string

getTextAsFile() ⇒ Blob

Return text file with results.

Kind: global function
Returns: Blob - transcript

getTextAsJson() ⇒ object

Return text as JSON.

Kind: global function
Returns: object - transcript

addGrammarFromUri()

Add grammar to the SpeechGrammarList from a URI.

Kind: global function
Params: string uri - URI that contains grammar

addGrammarFromString()

Add grammar to the SpeechGrammarList from a Grammar String.

Kind: global function
Params: string grammar - String containing grammar

getGrammarList() ⇒ SpeechGrammarList

Return current SpeechGrammarList.

Kind: global function
Returns: SpeechGrammarList - current SpeechGrammarList object

getRecognition() ⇒ SpeechRecognition

Return the urrent SpeechRecognition object.

Kind: global function
Returns: SpeechRecognition - current SpeechRecognition object

getSynth() ⇒ SpeechSynthesis

Return the current Speech Synthesis object.

Kind: global function
Returns: SpeechSynthesis - current instance of Speech Synthesis object

getVoices() ⇒ Array.<SpeechSynthesisVoice>

Return the current voices available to the user.

Kind: global function
Returns: Array.<SpeechSynthesisVoice> - Array of available Speech Synthesis Voices

setSpeechText()

Set the SpeechSynthesisUtterance object with the text that is meant to be spoken.

Kind: global function
Params: string text - Text to be spoken

setSpeechVoice()

Set the SpeechSynthesisVoice object with the desired voice.

Kind: global function
Params: SpeechSynthesisVoice voice - Voice to be spoken

getCurrentVoice() ⇒ SpeechSynthesisVoice

Return the current voice being used in the utterance.

Kind: global function
Returns: SpeechSynthesisVoice - current voice

share() ⇒ null

Share the text using the Web Share API or copy to Clipboard if not available

Kind: global function

createSSML() ⇒ string

Takes text and returns SSML encoded XML object

Kind: global function
Returns: string - - XML DOM object in SSML format serialized to a string
Params: string - Text to convert

parseSentenceSSML() ⇒ string

Takes sentence and returns SSML paragraph object with sentences.

Kind: global function
Returns: string - xmlString - XML DOM object in SSML format
Params: string xmlString - Text to convert

parseSSML() ⇒ object | string

Takes text and returns SSML object

Kind: global function
Returns: object | string - xmlDoc - XML DOM object in SSML format or XML object serialized to string
Params: string xmlString - Text to convert

Contributing

If you want to add functionality or fix a bug please provide a PR!

Sponsorships

This project is free for public use and will always be in perpetuity. That being said a brotha got bills to pay and ish! If you would like to sponsor this and all of my open source projects, then please consider becoming a patron on Patreon or a one time donation via Cash App