new Speech()
- Description:
Web Speech API
Methods
assist(options)
- Description:
Simple assistant (experimental)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Parameters Properties
|
createSpeechRecognition()
- Description:
New SpeechRecognition if exists
getVoice(voices, lang, use)
- Description:
Find a voice matching language
Parameters:
Name | Type | Description |
---|---|---|
voices |
Array | supported voices |
lang |
string | Language FRA, ENU... |
use |
string | Try to use this voice if supported |
getVoices(ss, cbk)
- Description:
Get browser voices
Parameters:
Name | Type | Description |
---|---|---|
ss |
Object | speechSynthesis |
cbk |
function | callback(voices) |
langISO(l)
- Description:
Get language ISO
Parameters:
Name | Type | Description |
---|---|---|
l |
string | language FRA, ENU... |
Returns:
ISO code (ex fr-FR)
recognition(el, options)
- Description:
Speech recognition
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el |
Object | Element input or textarea |
|||||||||||||||||||||||||||||||||||||||
options |
Object | Options Properties
|
speak(el, options)
- Description:
Speech synthesis (experimental)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el |
Object | Text or input or textarea |
||||||||||||||||||||||||||||||
options |
Object | Options Properties
|
speakStart(msg)
- Description:
Start to speech
Parameters:
Name | Type | Description |
---|---|---|
msg |
SpeechSynthesisUtterance | Message to read |
speakStop()
- Description:
Stop current speech