File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 6464 ) ;
6565 } ;
6666
67- recognition1 . phrases = new SpeechRecognitionPhraseList ( [
68- new SpeechRecognitionPhrase ( "test" , 1.0 )
69- ] ) ;
67+ recognition1 . phrases . push ( new SpeechRecognitionPhrase ( "test" , 1.0 ) ) ;
7068
7169 // Create the second speech recognition with a mode that supports contextual biasing.
7270 const recognition2 = new SpeechRecognition ( ) ;
7371 recognition2 . processLocally = true ;
7472 recognition2 . lang = "en-US" ;
7573
76- recognition2 . onerror = function ( event ) {
77- // Currently WPT may not be able to detect that SODA is available and
78- // will throw a "language-not-supported" error here.
79- assert_unreached ( "Caught an error: " + event . error ) ;
80- } ;
74+ // On-device speech recognition should not throw an error.
75+ recognition2 . onerror = t . unreached_func ( "recognition2 should not error" ) ;
8176
82- recognition2 . phrases = new SpeechRecognitionPhraseList ( [
83- new SpeechRecognitionPhrase ( "ASIC" , 1 .0) ,
84- new SpeechRecognitionPhrase ( "FPGA" , 1 .0)
85- ] ) ;
77+ recognition2 . phrases = [
78+ new SpeechRecognitionPhrase ( "ASIC" , 3 .0) ,
79+ new SpeechRecognitionPhrase ( "FPGA" , 3 .0)
80+ ] ;
8681
8782 const recognitionPromise = new Promise ( ( resolve ) => {
8883 recognition2 . onresult = ( event ) => {
You can’t perform that action at this time.
0 commit comments