XengShi / materialYouNewTab

A Simple New Tab ( browsers's home page ) inspired with Google's 'Material You' design
https://xengshi.github.io/materialYouNewTab/
GNU General Public License v3.0
1.41k stars 132 forks source link

Voice searching doesn't work in Brave #176

Open ceskyDJ opened 5 days ago

ceskyDJ commented 5 days ago

Hmm, the feature doesn't work for me. I click on the microphone icon, which shows "Listening..." for a few seconds and goes back to "Type here..." afterward. It required browser (Brave) permission, so I accepted it. It doesn't work anyway.

icon was visible in Brave? included changes from this PR?

What icon? I'm on main's latest commit, so yeah. I see Brave's icon signalizing that the webpage is listening for my input, but it's just for a few seconds, nothing more. The microphone icon in the UI of this extension is visible, of course.

ah sorry, I meant Mic icon. Are you using any other custom user agent? can you please share your user agent image

Here it's:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Originally posted by @ceskyDJ in https://github.com/XengShi/materialYouNewTab/issues/175#issuecomment-2468730903

ceskyDJ commented 5 days ago

@prem-k-r, could we please bring the discussion here? We need to finish the string in the PR's chat.

prem-k-r commented 5 days ago

Hmm, the feature doesn't work for me. I click on the microphone icon, which shows "Listening..." for a few seconds and goes back to "Type here..." afterward. It required browser (Brave) permission, so I accepted it. It doesn't work anyway.

icon was visible in Brave? included changes from this PR?

What icon? I'm on main's latest commit, so yeah. I see Brave's icon signalizing that the webpage is listening for my input, but it's just for a few seconds, nothing more. The microphone icon in the UI of this extension is visible, of course.

ah sorry, I meant Mic icon. Are you using any other custom user agent? can you please share your user agent image

Here it's:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Originally posted by @ceskyDJ in #175 (comment)

Ok

prem-k-r commented 5 days ago

Unfortunately, the voice search functionality used relies on the native Web Speech API available in Chromium-based browsers. Brave has probably disabled this.

We were discussing the hiding of microphone icon for unsupported browsers. Using the "Speech Recognition API not supported" approach helps identify non-Chromium browsers, while the user agent approach can detect Chrome, Edge, Opera, Firefox, Safari, and mobile devices. However, detecting Brave specifically remains challenging via direct means.

If we aim to implement voice typing across all browsers, we have to use complex API integrations. I can't do anything in this regard.

ceskyDJ commented 5 days ago

I see. I know about whisper-web (https://github.com/xenova/whisper-web), which could replace the Google API for STT (used internally by Web Speech API in Chromium browsers), but you'd need a way how to stream voice to it.

However, I found https://github.com/ccoreilly/vosk-browser. It could solve the problem entirely, but I wonder if it works and how good it is. (Maybe there are other simple solutions, but I only had a little time to Google it.)

prem-k-r commented 2 days ago

Hided mic icon for brave.

XengShi commented 2 days ago

Hided mic icon for brave.

IMG_20241114_121850.jpg

How about adding option like this

prem-k-r commented 2 days ago

I see. I know about whisper-web (xenova/whisper-web), which could replace the Google API for STT (used internally by Web Speech API in Chromium browsers), but you'd need a way how to stream voice to it.

However, I found ccoreilly/vosk-browser. It could solve the problem entirely, but I wonder if it works and how good it is. (Maybe there are other simple solutions, but I only had a little time to Google it.)

A bit complex. I can't do. Vosk-Browser supports only 13 languages. Yeah others better option may be available.

For Chrome and Edge, it’s best to keep using the Web Speech API, and for Firefox, Brave, Opera, and Safari, someone can use a third-party library.

prem-k-r commented 2 days ago

Hided mic icon for brave.

IMG_20241114_121850.jpg

How about adding option like this

on it

ceskyDJ commented 2 days ago

I see. I know about whisper-web (xenova/whisper-web), which could replace the Google API for STT (used internally by Web Speech API in Chromium browsers), but you'd need a way how to stream voice to it.

However, I found ccoreilly/vosk-browser. It could solve the problem entirely, but I wonder if it works and how good it is. (Maybe there are other simple solutions, but I only had a little time to Google it.)

A bit complex. I can't do. Vosk-Browser supports only 13 languages. Yeah others better option may be available.

For Chrome and Edge, it’s best to keep using the Web Speech API, and for Firefox, Brave, Opera, and Safari, someone can use a third-party library.

I'd look at it, but I don't have enough free time as it probably will take a lot. Let this issue open, and we'll see how the situation will change. I think as this is an open-source project, we should at least give users the ability to use some privacy-friendly locally hosted solution or provide them with a way to use anything they want to.