WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
239816
[iOS] Web Speech API doesn't work in WKWebView, but webkitSpeechRecognition is still exposed
https://bugs.webkit.org/show_bug.cgi?id=239816
Summary
[iOS] Web Speech API doesn't work in WKWebView, but webkitSpeechRecognition i...
Ali Juma
Reported
2022-04-27 11:53:02 PDT
The Web Speech API is available in Safari on iOS, but is not enabled for other WKWebView embedders. This means that sites that use the Web Speech API work in Safari on iOS but not in other browsers. Please consider enabling this API more generally so that these sites work in all iOS browsers. I've also filed FB9998082 for this request.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2022-04-29 16:07:55 PDT
rdar://92408768
Ali Juma
Comment 2
2022-06-21 08:38:33 PDT
The current state in WKWebView is very confusing for web developers using feature detection, since webkitSpeechRecognition is exposed on window, but doesn't work (the permission prompt never appears). Here's a test page that works in Safari on iOS, but not on any other browser on iOS:
https://www.google.com/intl/en/chrome/demos/speech.html
Sihui Liu
Comment 3
2022-08-01 23:01:43 PDT
Hi Ali, WebKit uses Speech framework for recognition, so your app might need to add NSSpeechRecognitionUsageDescription:
https://developer.apple.com/documentation/speech/asking_permission_to_use_speech_recognition?language=objc
. Did you already do that?
Sihui Liu
Comment 4
2022-08-01 23:10:56 PDT
or if you are a website developer... I think we will throw error when the app cannot prompt (e.g. due to missing the keyword), do you see the error? Or it's just nothing? The API should work in WebKit app.
Ali Juma
Comment 5
2022-08-02 07:16:46 PDT
(In reply to Sihui Liu from
comment #3
)
> Hi Ali, > > WebKit uses Speech framework for recognition, so your app might need to add > NSSpeechRecognitionUsageDescription: >
https://developer.apple.com/documentation/speech/
> asking_permission_to_use_speech_recognition?language=objc. > > Did you already do that?
Thanks! That explains why it isn't working.
> or if you are a website developer... I think we will throw error when the > app cannot prompt (e.g. due to missing the keyword), do you see the error? > Or it's just nothing?
Yes, we get a service-not-allowed error when trying to use the API.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug