So the Web Speech API split into two, the speech recognition and the speech to text, and it's starting to be obvious how I'm going to be using the speech recognition here. But actually, one of the core ideas straight was built for karaoke, but it was to enable developers to use the speech recognition as an input for forms, continuous dictation, and control. In fact, there's quite an old draft that details how this API should work on input field. It's really old, not everything was implemented, but it's still a very interesting read.
In fact, you can see this vision live in a tool that many of us are familiar with. In Chrome, when using the Google Translate, you are able to use the microphone function to speak into an input field and see it translated into text. I thought, great, the code works in my head, so let's see what's the browser support. I was quite optimistic. I went to MDN, and it looks like it currently isn't supported in Firefox, and any other browser still requires a vendor prefix or a different name. And I thought, all right, one browser out, it's not the worst, let's go. Wrong.
Actually, this is a more realistic outcome, in my experience. And it turns out the explanation is fairly simple. This quote from the MDN page says, on some browsers like Chrome, using speech recognition on a webpage involves a server-based recognition engine. Your audio is sent to a web service for recognition processing, so it won't work offline. Right. Thinking about it, it makes sense. It needs access to a lot of data to train on. So browser vendors that belong to massive corporations have an easier time with all the necessary infrastructure, as well as that data to train on.
And this is an important note, browsers that use Chrome don't necessarily have access to the Google transcription service. It's a paid service from Google, which Chrome gets to use for free. Again, yeah, it does make sense. And when trying it on Safari, I was presented with a popover that said speech data from this app will be sent to Apple to process your requests. This will also help Apple improve its speech recognition technology. All right. At this point, I'm down to two browsers only. But I was in too deep, so I'm not going to give up. But I was curious, what's happening in Firefox? Unfortunately, I wasn't able to be in touch with someone who is currently working on this, but I was pointed to an enlightening thread that talks about their concerns about privacy and implementation. So it's a really interesting thread. I really recommend having a look at it, especially if you're curious to see why some browsers make the decisions they do.
Comments