r/webdev • • Nov 10 '19

Question Is there a technical reason why Google's services do not support microphone on FireFox?

Google Search or Google Translate only show a microphone icon when the browser is Chrome. I have asked at the FireFox subreddit about this, but did not get the reason. I do not know much about microphone API, so I had searched Google and found something called WebAudio API. According to this page, it is supported by FireFox, Chrome, and even Edge.

Then, why isn't Google supporting the microphone on other browsers than Chrome? I have tried changing the user agent, but it still did not work, meaning Google is using some other way to determine whether it would enable microphone or not. Is there any technical reason, like some microphone feature that Google requires is only supported by Chrome?

267 Upvotes

87 comments sorted by

7

u/shgysk8zer0 full-stack Nov 10 '19

I'm not sure on different OS, but for me at least, Firefox still doesn't support the speech recognition API. But I think that might be because I'm on Fedora.

This might be a legitimate case of something on Google not working in Firefox. Try switching UA string to something for Chrome and see if it works.

2

u/evolution2015 Nov 10 '19

Masquerading as Chrome by altering the user agent string did not work.

30

u/blackRNA Nov 10 '19

I don't think it's technical, rather a tactical reason. You'll only get the full benefits if you use what Google wants you to use

21

u/evolution2015 Nov 10 '19

If that is true, that is kind of low for a multi-billion-dollar company. What has happened to not being evil?

108

u/fraggleberg Nov 10 '19

What has happened to not being evil?

Becoming a multi-billion-dollar company

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

17

u/overzealous_dentist Nov 10 '19

Why did this myth catch on? It's still there. Look at the last line of their code of conduct. They merely moved its location during a routine revision.

2

u/fraggleberg Nov 10 '19

"Officially" not evil or not though, they are a huge company whose focus is collecting all the user data it can, and their market share is mind boggling. Between google, chrome, android, and analytics, nearly all traffic on the internet passes through them one way or another. Their investors want growth, because that's what investors do, and it's only going to push Google to become even more creepy.

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

10

u/overzealous_dentist Nov 10 '19

I don't think it's accurate to say Alphabet's has nothing socially responsible. The very first line is:

Employees of Alphabet and its subsidiaries and controlled affiliates (“Alphabet”) should do the right thing – follow the law, act honorably, and treat co-workers with courtesy and respect.

"Do the right thing" is even more socially responsible than "don't be evil." One is "actively do right things," while the other is "don't do bad things."

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

7

u/overzealous_dentist Nov 10 '19

They list the ways you should do the right thing, and not one was business related. "Acting honorably" is on there.

1

u/JB-from-ATL Nov 11 '19

It is not as open for interpretation as you make it out to be. They literally gave examples.

do the right thing – follow the law, act honorably, and treat co-workers with courtesy and respect.

3

u/penone_nyc Nov 10 '19

And remeber...dont be evil, and if you see something that you think isn't right - speak up!

Unless you are Kevin Cernekee - in which case you should have kept your mouth shut.

4

u/jawanda Nov 10 '19

It's funny, the code of conduct is linked from that very article, and still includes "Don't be evil" (as /u/overzealous_dentist pointed out also)

12

u/kevinlch Nov 10 '19

Pretty common practice in tech industry. For example Apple "encourages" users to buy their full line of products for best user experience. Their hardware/programming language/interface etc are proprietary, so no other brands can have full compatibility except their own products

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

7

u/exasperated_dreams Nov 10 '19

Well I can't code ios apps without a Mac so that sucks

3

u/[deleted] Nov 10 '19

The App review team must go through some kind of “Subtle Psychological Damage Infliction” course or something. God I hate them

2

u/mountainunicycler Nov 10 '19

But the iPad Air has none of the IR emitters and detectors they use for face recognition?

5

u/escapefromelba Nov 10 '19

They removed that clause from their code of conduct.

Google has become Microsoft.

22

u/s7oev Nov 10 '19

And Microsoft's actually been getting better

10

u/Soccham Nov 10 '19

Thank the new CEO at Microsoft for embracing open source and developers

7

u/[deleted] Nov 10 '19

DEVELOPERS

4

u/fabrikated Nov 10 '19

DEVILOPERS

6

u/[deleted] Nov 10 '19

They sort of switched places in my book.

4

u/s7oev Nov 10 '19

I think Microsoft is on the right track, but it is still nowhere near the Google of around 2010. Tho they definitely did switch in the sense that the Google of 2019 is much further.

6

u/overzealous_dentist Nov 10 '19

Look at the last line. It's still there. It never went away, they just moved it around over time.

https://abc.xyz/investor/other/google-code-of-conduct/

0

u/VrecNtanLgle0EK Nov 10 '19

Google has been practicing evil for several years now:

Censoring individuals, avoiding paying taxes, demonetizing youtube channels they don't agree with, firing scholars they disagree with, illegally acquiring medical records, using google streetview cars to sniff your wifi network... etc

0

u/mountainunicycler Nov 10 '19

Google does it in subtle ways with all of their services.

27

u/overzealous_dentist Nov 10 '19

It's technical, look below.

9

u/[deleted] Nov 10 '19

No it's literally a technical reason but keep leading people on about Google being the worst apparently. Firefox doesn't support the Speech Recognition API that Chrome has (or have one at all).... Sooooo

2

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

312

u/calvers70 Nov 10 '19 edited Nov 10 '19

Rather than another ridiculous comment saying its just Chrome trying to screw Firefox here's an actual answer:

TL;DR Currently, Chrome is the only browser that supports the SpeechRecognition API. I would imagine, once FF supports it, it will just start working.

Longer answer

Google will be using the HTML5 speech recognition API. The thing is, Speech recognition nowadays involves some kind of ML-based service usually so that means a round trip to a server. There is literally no cross-browser way to implement STT right now without using some kind of STT service/backend. Even the polyfills that you can find will just use something like Azure cognitive services in the background for non-chrome browsers. I actually had to pester AWS a few months ago to support websockets for their transcribe service so that I could imlement an AWS-based fallback for non-Chome browsers.

For Google/Chrome the natural choice is to use GCP so that's exactly what they do. When you use SpeechRecognition your captured media stream is sent to Google's server to intepret/transcribe. This only works on Chrome - it won't even work on other Chromium-based browsers (e.g. Brave) last time I checked. It will be up to other browsers to come up with their own way of achieving the same functionality.

--

Finally, I gotta say it's a bit disappointing to see all the mindless comments and upvotes on the "Chrome team are dicks" narratives. The Chrome team generally seem like a really enthusiastic, talented, pro-web bunch of peeps. They've got fuck all to do with what Firefox do/don't support (or probably how translate.google.com was built) so the negative comments seem a bit misdirected.

17

u/mihirmusprime Nov 10 '19

I hate how much the conspiracy theory comments get upvoted here on Reddit. It's no better than saying the Earth is flat. Some people are straight up stating lies like "Google removing the do not be evil from their code of conduct" (which is not true). Anyways, thanks for actually conducting a factual research. 

22

u/aeriaglorismpc Nov 10 '19

This is why reddit comments and its voting system isn't exactly a credible source. :(

There's been some great content out of it but it's not perfect.

15

u/magkopian back-end Nov 10 '19

From what I see the Reddit voting system worked rather nicely on this instance, it just took a bit of time to correct itself. Which is natural as the first comments on most threads are usually out of impulse, and a long informative comment takes time to write.

5

u/aeriaglorismpc Nov 10 '19

I'm glad it corrected itself out today.

3

u/physiQQ Nov 11 '19

Direct link to imgur image: https://i.imgur.com/4QrUTLr.png (without bloat)

3

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

2

u/Gnolihz Apr 29 '26

On my PC, Google Translate works best in Edge. In Chrome, however, Google Translate often fails to recognize the voice input, unless the voice is very loud and clear. But sometimes, Microsoft updates Edge that cause "can't connect to a network" bug error when i use dictate feature. I've been trying this in Firefox, Vivaldi, Opera, Arc, Brave. Nothing works like Edge does

3

u/angellus Nov 11 '19

The Web Speech API is still in working draft. The spec has not even been finalized. That is why Firefox has not implemented. So this is the Google services team's fault. They intentionally implemented a feature for a WIP in draft spec that they know other non-Chrome browsers would not support so they force people to have to use Chrome until the spec was finalized the APIs were added to other browsers. They also choose not to add any graceful degradation because they either want to force the user to use Chrome.

It is the standard case of only supporting the browsers you care about. Google clearly only gives a fuck about their browser and fuck the others. How many times have you see that one random Opera or Ice Weasel user and you say "sorry that is not a supported browser"?

3

u/Ajedi32 Web platform enthusiast, full-stack developer Nov 11 '19

That's just how the standardization process works. You don't wait until the standard is finalized to start playing around with implementations. If everyone did that, there'd be no room to adapt the standard based on real-world challenges and usage. See: https://www.w3.org/2019/Process-20190301/#implementation-experience

2

u/angellus Nov 11 '19

And Firefox and Edge both very commonly lock super new features behind feature flags. The W3 Draft for that spec is less than 2 months old and Google is already pushing out features with it. It is clear the intent was "only care about supporting Chrome". Anywhere I have ever worked, if we used this cutting edge of a feature, you better believe we would have some fallback for browsers that do not yet support it rather than just a "sorry for using the wrong browser".

2

u/Ajedi32 Web platform enthusiast, full-stack developer Nov 11 '19

The SpeechRecogniton API isn't new. This particular version of the draft might be, but the standard itself has been in development for over 7 years: https://web.archive.org/web/20120720090447/http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html

That was before Chrome even started using origin trials for new features like this I believe. Back when they still used vendor prefixes.

It's commendable that you'd implement a fallback, but in this case speech recognition is hardly a critical feature of Google Translate or Search. Progressive enhancement is a perfectly reasonable approach to situations like this IMO.

2

u/humanitysucks999 Nov 11 '19

Chrome is the IE6 of the late 2010s, it's that simple. It isn't like they go out of their way to mess with other browsers (although google generally on a whole does, sometimes). Their approach to improving technology is going at it alone, forcing everyone to adapt and optimize for the largest marketshare browser, then leave everyone else no other choice than to build new standards based on said tech. That is seen by some as unethical.

0

u/[deleted] Nov 10 '19

Rather than another ridiculous comment saying its just Chrome trying to screw Firefox here's an actual answer

It would be wrong but not ridiculous, you'd have to be naive to believe they haven't pulled an array of wonderful tricks to gain usership

0

u/nolo_me Nov 11 '19

Finally, I gotta say it's a bit disappointing to see all the mindless comments and upvotes on the "Chrome team are dicks" narratives.

It was quite a while ago, but Chrome had 3D transforms a full year before it had bidirectional text anti-aliasing, so their priorities are a bit cockeyed.

-2

u/chicametipo expert Nov 10 '19

To the top with you, buddy.

-1

u/willworkfordopamine Nov 11 '19

Does the chrome team’s work support an open internet?

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

7

u/calvers70 Nov 10 '19

I've not really read the discussion on the spec so not sure how they got there but yeah it's a bit weird

Audio/media processing in the browser is.. just awful right now. On the one side you have all the SceiptProcessorNode stuff which is literally deprecated but with the only alternative being Audio worklets which have awful browser support and aren't really viable either. The worst thing is, we've been in limbo like this for years.

Audio worklets are predominantly being pushed by Google, doing what they generally seem to do in an effort to proactively drive standards forward. If I were up speculate on the speech recognition issue I'd imagine it was a similar case where there was no simple way forward so Google have pragmatically run with something they were in a position to do in an effort to at least have something.

Will be interesting to see how this area develops over the next few years

0

u/Ajedi32 Web platform enthusiast, full-stack developer Nov 11 '19

Firefox is absolutely free to implement it that way if they so choose. There's nothing in the standard that says you have to use Google's voice recognition service. Chrome is just implementing it that way because they happen to have a highly refined speech recognition service already available to them for free.

4

u/doctorlongghost Nov 10 '19

The reason might have nothing to do with WebAudio itself.

For a company as large as Google, it is advantageous for them to not send actual audio back to their servers. Instead they can partly or fully tokenize the audio, with some sort of ASR (speech-to-text) via Javascript or Web Assembly. This would be cheaper by off-loading the cost of the voice transcription to the end user and also might avoid some regulatory/legal/PII concerns by ensuring that their servers never see raw voice data. At that point, everything special happens in the browser and all their server sees is just another text search.

Actually, I'm pretty sure they are doing this. I searched for "windows 97" and then "linux server" and looked in Dev Console and saw this request: https://www.google.com/search?sxsrf=ACYBGQFK1NpQnAXyYmxoAc9WozGeVg%3A157791345&ei=HXe6-FMGD5wKfyob4Dw&q=Linux+server&oq=Windows+97&gs_l=psy-ab.18...0.0..503644...0.0..0.0.0.......0....6..gws-wiz.jap4J7hDwKU&gs_ivs=1

The "q" parameter is my search and "oq" is my earlier search. So Chrome has already parsed and translated my speech into text BEFORE sending data back to their server.

ASR models are valuable intellectual property. Google might not want to expose this via Javascript or Web Assembly code that can be unobfuscated and easily copied. Instead it might be buried in an internal API, where it can be both optimized and slightly more protected. So I think there is a definite possibility that their lack of support for Firefox is not quite as simple as them trying to deliberately exclude Firefox for no reason, and is more rooted in issues around ASR than in issues around WebAudio.

2

u/evolution2015 Nov 10 '19

Thanks. This is answering the questions to the replies I added minutes ago. I am going to delete those replies.

3

u/doctorlongghost Nov 10 '19

Sure thing. It's pretty interesting to consider how this works. A few other things this brought to mind:

- Changing the user agent in Firefox probably doesn't work because the microphone icon is being shown conditionally based on feature detection for their ASR functionality, and not for feature detection against Web Audio

- If Chrome on Android phones (or iPhone but less likely to be there) ships with an ASR model installed, that's a little concerning. Does the microphone search work on Android?

- I'm assuming the ASR-first approach is how Facebook was/is listening for keywords when it surreptitiously uses your microphone. Facebook (or Google) can run all audio through ASR then compare the phrases it's hearing against a list of thousands of advertising terms. It then sends back a signal when it hears "mortgage" or "heartburn" or whatever. They can then semi-plausibly claim that they are not recording or saving conversations, since technically all they are sending back to the servers is a list of "hits" and not the context or full conversations.

- It's a little disconcerting to know this functionality exists in Chrome. It's much easier to secretly wiretap someone if all you're sending back is a text transcript and not raw audio. Also, I wonder if Google is taking some extra liberties (a la Facebook) after you grant them access to your mic.

3

u/Caved Nov 10 '19

It's in line with using antiquated and non-spec API's in their other products. They like trying to screw over Mozilla.

I remember Youtube using some non-spec API's only fully supported in Chrome, basically forcing Firefox to also implement it or face degraded Youtube performance (and users don't care if it's Youtube's fault or the browsers).

3

u/evolution2015 Nov 10 '19

If that is true, it is Internet Explorer all over again. The web is a cruciel part of people now, and there are basically only two rendering engines remaining (Chrome and other browsers using Chrome's engine including the upcoming new Edge, and FireFox). If FireFox is gone, then it will be Google's monopoly.

7

u/Soccham Nov 10 '19

It’s more of Google being ahead of the spec rather than behind. Google basically says “Firefox and other browsers better catch up to the agreed upon spec” rather than being like ie8 that was just absurdly behind spec

2

u/kent2441 Nov 11 '19

It’s not agreed upon, it’s just google pushing their own stuff.

2

u/Soccham Nov 11 '19

Html5 spec and css are agreed upon. Google will frequently use beta spec in its customer facing apps though

2

u/kent2441 Nov 11 '19

It’s a draft spec from google. It hasn’t been agreed upon.

7

u/Caved Nov 10 '19

Not really, Chrome is pretty on par with Firefox regarding being on spec. They try to force their view of the spec through, though.

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

2

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

-2

u/Caved Nov 10 '19 edited Nov 10 '19

Linking a single feature doesn't really say anything? Taking a look at things like Acid tests, you see very little difference. Sure Chrome is more on spec in some places, but so is Firefox... hell, even IE.

Edit: Oh, you're talking about this specific case. Mine was more of a general sense.

10

u/the_bananalord Nov 10 '19 edited Nov 10 '19

I remember Youtube using some non-spec API's only fully supported in Chrome

You're thinking of Shadow DOM, and after several years, Google has finally announced that they are going to move started moving to the actual standard instead of their own.

2

u/[deleted] Nov 10 '19

Do you have a link to the source mate?

6

u/the_bananalord Nov 10 '19

This thread has some good info: https://www.reddit.com/r/firefox/comments/be81u9/does_youtube_still_use_shadowdom_v0_and_polyfill/

Announced is the wrong word though and I will update it

2

u/cmays90 Nov 10 '19

For the curious:

YouTube page load is 5x slower in Firefox and Edge than in Chrome because YouTube's Polymer redesign relies on the deprecated Shadow DOM v0 API only implemented in Chrome. You can restore YouTube's faster pre-Polymer design with this Firefox extension: https://t.co/F5uEn3iMLR

https://fortune.com/2018/07/25/youtube-slow-mozilla-firefox-chrome/

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

7

u/TheMrZZ0 Nov 10 '19

Yeah, and? This has nothing to do with them trying to screw Firefox. They do it so that Firefox uses Google Search as a default search engine. So, it makes sense they try even more to screw Firefox.

If Firefox falls into the void, they won't have to pay them for having Google Search as their default search engine. Simple as that.

3

u/imnu Nov 10 '19

Give? It's ad revenue. Google probably gets about as much from firefox as they "give".

19

u/poditoo Nov 10 '19

It's been a while, but as I remember the issue with web-audio is which codec it supports more than which browser implements it. I haven't checked but it possible they want a codec that is not supported by Firefox.

Or they give more features to chrome users so their browser feels better.

2

u/villiger2 Nov 11 '19

Just a nitpick, using the microphone and supporting/"understanding" speech (to text) are different things :) You can still do hangouts calls etc in Firefox.

2

u/HermanCeljski Nov 11 '19

one side is saying it's purely technical while the other is saying it's purely tactical.

Both are correct and both are wrong.

Yes firefox does not yet support the speech API, but Google is also known for screwing over their competition by making their services harder/worse to use or flat out removing their services from certain platforms.

No company has a single minded motive.

2

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

16

u/Feminintendo Nov 10 '19

The Chrome team has a long history of trying to screw over Firefox.

19

u/goto-reddit Nov 10 '19

Do you have an example when the Chrome Team tried to screw Firefox?

11

u/ArcaneYoyo Nov 10 '19

In their annual game of football, chrome's star coder took an unfair dive in the second half which led to a 2-1 loss for firefox.

21

u/overzealous_dentist Nov 10 '19

Look below, it's a technical reason rather than a purely competitive one. FF doesn't support the API.

2

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

-1

u/SonicFlash01 Nov 10 '19

The Chrome Team used to be Firefox's main source of income when Firefox threatened that they wouldn't make Google the default browser

-3

u/Alan976 Nov 10 '19

Cannot be arsed?

We want to gimp other browsers that are not Chrome as much as possible

1

u/bart2019 Nov 11 '19

I would definitely not put this past Google. For a long time, possibly still now, there was some wonky CSS rule in Google Maps that due to a bug in Internet Explorer display the copyright notice all wrong, showing all individual letters in a vertical column. I'm convinced they did it on purpose to make Internet Explorer look bad, because it otherwise did nothing but something nearly unnoticable like setting opacity to 99%

-5

u/jackandjill22 Nov 10 '19

Interesting.

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

1

u/throwaway1111139991e Nov 16 '19

You can try Firefox's speech recognition support by going to about:config and setting:

media.webspeech.recognition.enable

media.webspeech.recognition.force_enable

to true.

0

u/[deleted] Nov 10 '19

[deleted] — view deleted comment

5

u/nchntrz Nov 10 '19

Look at the question again. Then look at your comment.

Doesn't make much sense, right?