I am looking for a solution.
The function as JavaScript in the HTML code works very well.
Now I wanted to do it with SpiderBasic.
I will probably get the answer, asyncron, from the JavaScript page.
I start this procedure with a button.
I hang on to this point.
Sorry for my English.
Code: Select all
Global transcript.s
Procedure CloseWindowEvent()
CloseWindow(EventWindow())
EndProcedure
Procedure SpeechRecognition()
;*** new speech recognition object ***
! var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition;
! var recognition = new SpeechRecognition();
;*** This runs when the speech recognition service returns result ***
! recognition.onresult = function(event) {
! var v_transcript = event.results[0][0].transcript;
! };
;*** start recognition ***
! recognition.start();
SetGadgetText(#tg_speech_result_text, transcript)
EndProcedure