Do google Chrome extensions support Chrome's Web Speech speech recognition API? I have included some javascript to create a speech recognition object, but when I launch my extension, I am not prompted for microphone access.
This is not an issue with my code. I have searched on google, but I can't find any information on whether Chrome extensions support the Web Speech API. I just want a yes/no answer.
Note: I believe the WebSpeech API won't work for local files.
Speechify is the leading text-to-speech extension for Google Chrome. With about a million users and 6,000+ reviews, it is one of the fastest growing app in the Chrome Web Store.
Chrome provides extensions with many special-purpose APIs like chrome. runtime and chrome.
Accurately convert speech into text with an API powered by the best of Google's AI research and technology. New customers get $300 in free credits to spend on Speech-to-Text. All customers get 60 minutes for transcribing and analyzing audio free per month, not charged against your credits.
The Web Speech API can already be used by Chrome extensions, even in the background page and extension button popups. The fact that it works is not necessarily an intended feature, and I have previously explained how it works and why it works in this answer to How to use webrtc insde google chrome extension?. The previous explanation is about WebRTC, but it applies equally to Web Speech, and can be used as follows:
webkitSpeechRecognition
instance and start recording.onerror
being triggered with event.error === 'not-allowed'
), open an extension page (chrome-extension://[ID]/yourpage.html
). This extension page can be opened in a new window, tab or iframe.From this page, request access to the microphone. getUserMedia and SpeechRecognition both share the (persistent) audio permission, so to detect whether audio recording is allowed, you could use getUserMedia
to request the permission without activating speech recognition. For instance:
navigator.webkitGetUserMedia({
audio: true,
}, function(stream) {
stream.stop();
// Now you know that you have audio permission. Do whatever you want...
}, function() {
// Aw. No permission (or no microphone available).
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With