
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
vue-web-speech
Advanced tools
Vue wrapper for Web Speech API for recognizing voice and speech synthesis
Vue wrapper for Web Speech API for voice recognition.
Package contains two components <vue-web-speech>
for voice recognition and <vue-web-speech-synth>
for voice synthesis.
Web Speech API is in experimental phase, check browser compatibility before using in production.
npm i vue-web-speech
Inject plugin to your vue instance by Vue.use
import Vue from 'vue'
import VueWebSpeech from 'vue-web-speech'
...
Vue.use(VueWebSpeech)
Then use it as component
<template>
<vue-web-speech
v-model="record"
@results="onResults"
/>
<vue-web-speech-synth
v-model="play"
/>
</template>
<vue-web-speech>
Prop | Type | Default | Descrtiption |
---|---|---|---|
v-model | Boolean | false | Used to bind recording state. Can be used to start recording (true ) or stop recording (false ). |
lang | String | Defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. | Language to recognize speech. |
confidenceLimit | String | Number | 0.8 | Limit for confidence under which transcription will be filtered out. |
continuous | Boolean | false | Controls whether continuous results are returned for each recognition, or only a single result. |
interimResults | Boolean | false | Controls whether interim (not final) results should be returned. |
maxAlternatives | String | Number | 1 | Sets the maximum number of alternatives provided per result. |
grammar | String | null | Grammars that will be understood by the recognition. |
Slot | Props | Descrtiption |
---|---|---|
input | String text | You can use this slot as visualization of speech result array. text is string of made of joined arrays by \n . |
Example of input slot
<vue-web-speech>
<template v-slot:input="{text}">
<textarea :value="text" />
</template>
</vue-web-speech>
Event | Returns | Descrtiption |
---|---|---|
results | Array | Returns array of transcripts filtered by confidenceLimit . |
resultsRaw | SpeechRecognitionResultList | Returns raw SpeechRecognitionResultList on onResult event without confidenceLimit filtering. |
unrecognized | null | Fires when confidenceLimit was not satisfied. When continuous prop is on, fires when no result satisfied confidenceLimit . |
error | Event | Fires native onerror event. |
start | Event | Fires native onstart event. |
end | Event | Fires native onend event. |
speechstart | Event | Fires native onspeechstart event. |
speechend | Event | Fires native onspeechend event. |
audiostart | Event | Fires native onaudiostart event. |
audioend | Event | Fires native onaudioend event. |
soundstart | Event | Fires native onsoundstart event. |
soundend | Event | Fires native onsoundend event. |
nomatch | Event | Fires native onnomatch event. |
<vue-web-speech-synth>
Prop | Type | Default | Descrtiption |
---|---|---|---|
v-model | Boolean | false | Used to bind playing state. Can be used to start speaking (true ) or stop speaking (false ). |
voice | SpeechSynthesisVoice | Default system voice. | Voice to use for voice synthesis. Get in the @list-voices event |
text | String | null | Text to be synthesised. |
rate | String | Number | 1 | Speed at which the utterance will be spoken at. |
pitch | String | Number | 1 | Pitch at which the utterance will be spoken at. |
Event | Returns | Descrtiption |
---|---|---|
list-voices | Array of SpeechSynthesisVoice | Returns array of available SpeechSynthesisVoice supported by system. |
error | Event | Fires native onerror event. |
end | Event | Fires native onend event. |
boundary | Event | Fires native onboundary event. |
FAQs
Vue wrapper for Web Speech API for recognizing voice and speech synthesis
We found that vue-web-speech demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.