2

I have recently tried using the getUserMedia function from the navigator.mediaDevices.getUserMedia function. I am trying to access the microphone from a website that I created (www.speechbud.com) so that a speech to text transcription can be performed. This is working on PC and mobile(android) but doesn't seem to work for IOS. I have checked many previous articles and it says that from IOS 11 getUserMedia should work, however it is still not working. Is IOS still not compatible, and if that's the case, how am I supposed to access the microphone from a website?

I have checked previous articles and tried using different npm packages, with no luck.

getUserMedia({video: false, audio: true},function (err, stream) {
 if (err) {
    console.log('failed');
    stream.end(); // end the stream
 } else {
   micStream.setStream(stream);
   if (keepMic) {`enter code here`
     preservedMicStream = micStream;
   }
 }
});

TLDR; I would like to basically be able to access the microphone from an IOS device upon a button click for live transcription.

THANKS!

  • What error are you getting? If your website is insecure (IE, you're using `http` instead of `https`) then Mozilla's documentation says `getUserMedia` will be `undefined`. – ArtOfWarfare Apr 11 '20 at 19:04
  • I was using the watson API from IBM and getUserMedia was not working with IOS. my site is secured using https so I don't believe that was the issue. Now I have moved away from getUserMedia and started using recognizeMicrophone, however they say they only support chrome as of now. So if I would like to build an app that converts speech to text from the microphone, is it impossible to do so for a IOS device like a macbook or iphone? If you could tell me a way to have universal access to ones mic despite operating system or browser that would be great help! I have been searching for a while. – Rohit Sangaraju Apr 12 '20 at 20:16
  • Sorry I am using window.SpeechRecognition not recognizeMicrophone – Rohit Sangaraju Apr 12 '20 at 20:23
  • see answer here: https://stackoverflow.com/questions/27846392/access-microphone-from-a-browser-javascript – Z80 Apr 30 '20 at 14:18

0 Answers0