Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Speech SDK - not working in IPAD Safari browser #96

Open
sacynthia opened this issue Dec 17, 2018 · 0 comments
Open

Speech SDK - not working in IPAD Safari browser #96

sacynthia opened this issue Dec 17, 2018 · 0 comments

Comments

@sacynthia
Copy link

Hi Team,
We have integrated the Speech SDK in our angular 6 client application for record and Recognizing speech to Text. The functionality works as expected in Desktop chrome browser. But we are facing some issues in IPAD Safari Browser.
Microphone allow deny option is prompting only after the recognizer event "Initializing"(But in Chrome before the event initializing it prompts for the Mic Allow/Block). If we give the option as allow to access Microphone, then it is not triggering the further events and just the text "Loading ...." comes with no option for stop recording.
When i tried to debug the code from Mac Book web inspector, it seems the state of the audio source is in suspended status.It is not changing to running state
Code Which shows audiosource in Suspended state:
MicAudioSource.js:
image
Client UI Code:
RecognizerStart(SDK, recognizer) {
console.log('recognizer', recognizer);
recognizer.Recognize((event) => {
console.log("event.name in RecognizerStart() :" + event.name);
/*
Alternative syntax for typescript devs.
if (event instanceof SDK.RecognitionTriggeredEvent)
*/

  switch (event.Name) {
    case "RecognitionTriggeredEvent":
      this.UpdateStatus("Initializing");
      break;
    case "ListeningStartedEvent":
      this.UpdateStatus("Listening");
      break;
    case "RecognitionStartedEvent":
      this.UpdateStatus("Listening_Recognizing");
      break;
    case "SpeechStartDetectedEvent":
      this.UpdateStatus("Listening_DetectedSpeech_Recognizing");
      console.log(JSON.stringify(event.Result)); // check console for other information in result
      break;
    case "SpeechHypothesisEvent":
      this.UpdateRecognizedHypothesis(event.Result.Text, false);
      console.log(JSON.stringify(event.Result)); // check console for other information in result
      break;
    case "SpeechFragmentEvent":
      this.UpdateRecognizedHypothesis(event.Result.Text, true);
      console.log(JSON.stringify(event.Result)); // check console for other information in result
      break;
    case "SpeechEndDetectedEvent":
      this.UpdateStatus("Processing_Adding_Final_Touches");
      this.UpdateAudioClip(event.Result.Binary);
      this.OnSpeechEndDetected();
      console.log("SpeechEndDetectedEvent : " + JSON.stringify(event.Result)); // check console for other information in result
      break;
    case "SpeechSimplePhraseEvent":
      this.UpdateRecognizedPhrase(JSON.stringify(event.Result, null, 3));
      break;
    case "SpeechDetailedPhraseEvent":
      this.UpdateRecognizedPhrase(JSON.stringify(event.Result, null, 3));
      break;
    case "RecognitionEndedEvent":
      this.OnComplete();
      this.UpdateStatus("Idle");
      console.log(JSON.stringify(event)); // Debug information
      break;
    default:
      console.log(JSON.stringify(event)); // Debug information
      break;
  }
})
  .On(() => {
    // The request succeeded. Nothing to do here.
  },
    (error) => {
      this.toggleRecordingButtonsState(false);
      this.hypothesisText = '';
     console.error(error);
    });

}

Debugger Screenshot:
screen shot 2018-12-17 at 17 16 42
Version Details:
Angular - 6
Speech SDK- 0.0.12
Tested in IPAD IOS Safari-12.1
Could you please help us to resolve this issue. Much Appreciated for the quick response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant