UnityAndroidSpeechRecognition icon indicating copy to clipboard operation
UnityAndroidSpeechRecognition copied to clipboard

How to remove Google popup

Open sweetan008 opened this issue 7 years ago • 26 comments

Hi, Thank you so much for this as a free. It's working awesome but I need your help to resolve my issue. I want to remove or hide google popup when it's started recording. Is there any solution. Thanks in advance Sweetan M

sweetan008 avatar Jun 27 '18 04:06 sweetan008

Hey @sweetan008 , I am bit busy for a few days. Can you send me a reminder on Saturday? I can try to give you some pointers on how to modify the plugin.

gsssrao avatar Jun 28 '18 16:06 gsssrao

Yaaa sure gsssrao Thank you for your reply.

sweetan008 avatar Jun 29 '18 14:06 sweetan008

Hi @gsssrao , what happened?

sweetan008 avatar Jul 03 '18 03:07 sweetan008

Hey, sorry for the late reply.

Basically, what you need to do to add such a feature is to find Android code which does the same thing i.e does speech recognition without a popup. Once you have the android code, you just need to remake this plugin using that code. The core of this plugin is just these two files. So, to modify this plugin, you just need to modify those files and recreate the plugin as explained in #4.

Kindly let me know if this solves your issue and if you have any additional queries.

gsssrao avatar Jul 03 '18 07:07 gsssrao

hai @gsssrao Thank you for your replay. we will try to solve our problem with your ideas. If we did let you know. or any quarries we will contact you.

sweetan008 avatar Jul 04 '18 04:07 sweetan008

Hi, First, thank you @gsssrao for your work! @sweetan008 did you manage to solve this?

UnityStefan avatar Aug 08 '18 11:08 UnityStefan

I also want to solve popup related problems. Can you help me with plug-in fixes? Finds material on Android studio But I do not know much about Java. ActiveClass and TestPlugin ask for help fix

Sudals avatar Nov 12 '18 23:11 Sudals

There seems to be some demand for this feature, so I will try to implement this. The way to go about doing this is as follow:

  1. Find an android java implementation of this feature which is closest to what you all are looking for
  2. Port it as a plugin
  3. Call it in Unity with some UI or button click

gsssrao avatar Nov 13 '18 00:11 gsssrao

Do I need to modify the JavaScript and create a Unity package with this?

Sudals avatar Nov 13 '18 00:11 Sudals

It is as I have described above, you would need to follow those steps if you want to do this yourself. You can find the details about experimenting here.

In the first step you will have to fiddle with the android java code. For the last step you will have to modify Unity code, but all my unity scripts are in C#.

gsssrao avatar Nov 13 '18 00:11 gsssrao

can you try to implement hiding popup option you're free? i really need this feature, but i'm a noob in coding, and i cant understand your instruction fully since english isn't my native tongue. Thx

3FanYu avatar Nov 25 '18 14:11 3FanYu

I was busy with other work, will try to implement it soon.

gsssrao avatar Nov 25 '18 19:11 gsssrao

Hi, First, thank you @gsssrao for your work! I really want to remove popup,but i haven't found the solution,can you help me with that? (I have seen all constants which are used to make android speech recognizer.) (and I am from taiwan,my english is not good,plz don't blame it,thank you)

morrismoppp avatar Dec 14 '18 10:12 morrismoppp

Hey @gsssrao , i opened the project with android studio but did not find any toast message to modify the popup in the two java classes you mentioned. Are you sure the popup is created in one of those classes? Also thanks for the plugin works great and you don't even need an api key which is kind of strange.

EAPantsios avatar Dec 28 '18 10:12 EAPantsios

@morrismoppp I can try to fix this over this weekend if I get time. Let me know if you have already done some work on this. I think the steps to be followed are just as I had mentioned before:

  1. Find an android java implementation of this feature which is closest to what you all are looking for
  2. Port it as a plugin
  3. Call it in Unity with some UI or button click

@EAPantsios Yes, the popup is created by this line. It is not a toast, it is a recognizer intent and the feature usually comes inbuilt in Android (it was the old way of doing speech recognition couple of years ago) and hence it is not a part of the other Speech APIs and thus you don't need any API keys.

gsssrao avatar Dec 28 '18 22:12 gsssrao

@gsssrao Sorry for replying late,I still can't make it. @EAPantsios Do you know what should I have to replace promptSpeechInput?

morrismoppp avatar Jan 07 '19 20:01 morrismoppp

@morrismoppp it seems like a native google speech popup. I have come across more speech recognition plugins and they also have this popup. I have not figured out how to remove it.

EAPantsios avatar Jan 08 '19 18:01 EAPantsios

@EAPantsios thank you for your reply,hope you can find the solution.

morrismoppp avatar Jan 09 '19 10:01 morrismoppp

@EAPantsios @morrismoppp, sorry for consistent postponing. I am busy this week with CES but I will get back on this soon.

gsssrao avatar Jan 09 '19 16:01 gsssrao

Hi here, many thanks for that work, just what I needed !

to remove the popup: just use this code instead of basic speech recognition overriding function disable the popup, and let you replace it with anything you like. it works like a charm (I will do this in the next weeks and may keep you posted)

https://github.com/sdsb8432/SpeechToText-Android/blob/master/app/src/main/java/com/sdsb8432/speechtotextdemo/CustomSTT.java

thibault-ketterer avatar Feb 10 '19 20:02 thibault-ketterer

Hi guys, any updates on hiding the pop-up window?

DonghanYang avatar Feb 11 '19 07:02 DonghanYang

Hi. Just wanted to know if there's anyone that already crated the unity package or at least have an archive with the 'no pop-up speech recognition' patch for unity.

Thank you. Best regards.

Rtyui avatar Jul 04 '19 19:07 Rtyui

Hi, is there any updates on disabling the pop-up window?

I'm sorry that I'm not good with Java, but I wonder is this syntax "intent.putExtra(RecognizerIntent.EXTRA_PROMPT, gQuestion);" at line 50 is the main call for google prompt ?

https://github.com/gsssrao/UnityAndroidSpeechRecognition/blob/master/SpeechPlugin/pluginlibrary/src/main/java/com/plugin/speech/pluginlibrary/TestPlugin.java

bhaktiugp avatar Aug 09 '19 01:08 bhaktiugp

@bhaktiugp nope, it's just to change the message in the box. Sorry I don't have time for this dev for now.

thibault-ketterer avatar Aug 15 '19 12:08 thibault-ketterer

Hey, Any updates on this issue?

monire91 avatar Feb 12 '20 07:02 monire91

Well, after a while, for the people that wants this feature, I can offer my own plugin-repository: https://github.com/EricBatlle/UnityAndroidSpeechRecognizer (give it some love!)

EricBatlle avatar Mar 28 '20 22:03 EricBatlle