Custom vocabulary for Speak the Words

Hi,

I'm using Speak the Words set to teach/test students in speaking specific Air Traffic Control phrases based on a stimulus in the users' own language. The answers can be single words (eg "visibility") or more complex phrases ("hold short of the runway"). I am finding that some complex phrases are not understood by the system, such as "hold short of the runway". On looking at the guesses it is making, the speech engine seems to use a grammar that favours real world language. An industry-specific combination of words is simply not understood. Is it possible to supply a list of phrases to add to the grammar (for eg using the js addFromString method), or even limiting the grammar to make these the only phrases recognisable?

Thanks and regards

Summary: 
Custom Vocab for Speak the Words
0
0
Supporter votes Members of the Supporter Network can vote for feature requests. When the supporter network has generated sufficient funding for the top voted feature request it will normally be implemented and released. More about the H5P Supporter Network
otacke's picture

H5P is using the WebSpeechAPI of browsers. Browsers implement the speech recognition engine and are responsible for returning a textual representation of what was spoken, and unfortunately the WebSpeechAPI does not allow what you require.

Normal 0 false false false EN-AU X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Aptos",sans-serif; mso-ascii-font-family:Aptos; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Aptos; mso-hansi-theme-font:minor-latin; mso-font-kerning:1.0pt; mso-ligatures:standardcontextual; mso-fareast-language:EN-US;}

Thank you for the response. The Web Speech API, specifically the SpeechRecognition interface, does supports custom grammars through the JavaScript Speech Grammar Format (JSGF). I'm wondering if I amend some of the Speak the Words code to allow certain custom phrases to be recognised, as below. Any developers out there who could comment on this?

 

 

 

var recognition = new webkitSpeechRecognition() || new SpeechRecognition(); var speechRecognitionList = new webkitSpeechGrammarList() || new SpeechGrammarList(); // Define a custom grammar var grammar = '#JSGF V1.0; grammar atcPhrases; public <phrase> = custom phrase | novel phrase | special phrase;';

 

Thanks!

 

otacke's picture

The SpeechGrammarList function is experimental and has been for a couple of years. It's implemented in the WebSpeechAPI implementation for Chrome only and supporting one browser only is not a good thing. But what't even more important: While the SpeechGrammarList function is implemented, the backend speech recognition service does not use it, so the function does not actually do anything. That's my latest information at least. That's why I concluded that your wish could not be fulfilled.