Voice to Text

Hello Scott,

I bought the plugin and I’m using it in a project, it’s very good, congratulations!

But I have the following difficulty:

I created 2 buttons 1 that starts = voiceToText.startRecording () and the other button is to stop = voiceToText.stopRecording ().

The 2 buttons work very well, however I need to add an audio when I start the recording and another when I stop, type when I send an audio in whatsapp (when I click on the microphone it gives a “signal” informing that it is recording).

I’m using audio.play for this situation, on the start button it works perfectly, however on the stop button it does not work, I believe it’s because of voiceToText.init, after it is initialized I can not emit any sound through the application .

My question is, is there any parameter to quit voiceToText.init when I click the pause button? Or do you have any other way?

Thank for your attention.

I will look into it, are you saying you cannot play audio when after the “stopped” event of the recording. Also is this android or iOS?

Also can you please email or post a sample of this issue?

Hi Scott,

At this point I’m just testing on iOS.

I’ll email the sample.

pushed update to fix audio bug, please play audio when there is a “stopped” event in init, not when you stop recording. 

^please note updates take up to an hour to sync

Hi Scott,

I tested it again with the code you sent, but it does not work.

I believe what is happening is this:

1 - Clicking on the “activate microphone” button before startRecording () will play audio.play () because the microphone has not been connected yet;

2 - When I click on the button “cancel microphone” I give a stopRecording () and then I use audio.play (), however the problem is here -> the microphone is still on so I can not play the audio.

To resolve this situation, you must turn off the microphone when the stopped event is triggered.

As I emailed my tests are performed on the device iPhone 6S Plus.

This actually was fixed, the problem is corona is servers are not taking any plugin updates. Basically corona still has a bug in there server system and any new code I push to the corona bitbucket is not being pushed out to you guys. I have reported this issue and hope this gets fixed soon.

Perfect, I’ll be waiting

Everything should be fixed

Thanks you guys for using this plugin a bunch of new features

  1. language preferences(set which language you want to listener for) example:

    voiceToText.startRecording(“en_GB”) 

Note this may not work on android(just test on iOS)

android docs say “Optional IETF language tag (as defined by BCP 47), for example “en-US””

  1. android now supports mute audio when recording audio, this mute all audio( system alerts like notification may make noises), this is great for muting out google now start and stop.

    voiceToText.startRecording(nil, true) 

  2. android now support partial word support like iOS

  3. calling stop recording on android will return text like iOS

see docs for details 

https://scotth.tech/plugin-voiceToText

NOTE: android is still only listens for your voice will it think the user is speaking and will go off when a user stop speaking like google now acts. There is nothing I can do.

Enjoy,

Scott 

Hello Scott, 

Is there a way to use the voice recognition while a song is playing on the app at the same time? When I try this it just work separately. When press stop the audio plays and speech recognition stops and vice versa.

I don’t think the APIs I use allow or want any music playing. If you ever call some or use Siri or dictation or google now or YouTube search with voice or sound hound, they all stop audio while recording.

Hi Scott,

I was testing the android plugin and I noticed that the publisherId = “tech.scotth” is not working (moto G3 and Samsung Galaxy S6 Edge), so I changed to publisherId = “com.scottrules44” and it work. If it can be adjusted in the documentation, it may be useful for another user.

regarding: “NOTE: android is still only listens for your voice will it think the user is speaking and will go off when a user stop speaking like google now acts. There is nothing I can do.”, Is it possible to increase the time to recognize that the user is no longer talking?

Thanks.

it should be tech.scotth, could you please specify the issue? As for the time of recognition, based on reports and research it stopped work on jelly bean and up so it seems pretty pointless to add this feature.  

When I clicked on “start” and started talking it crashed the application and closed, stating “The app stopped working”, I tested it with my application that works for iOS and tested it with your application in git (https: // github .com / scottrules44 / voiceToText-Demo /), changing to com.scottrules44 it worked without any problem.

On recognition time, let’s go by the following example, I have a long text to dictate, if I stop to breathe the function will stop and if I click play again it will overwrite the previously said text, ie if I stop Speak 2 seconds it stops capturing the voice and turning into text, hence I have to start talking from scratch again. This is my point of view, in which this functionality would be very useful in the business app.

Thank you for your attention. 

I just build with the sample you used above, I tested on android 4.4, 5.1, 5.0, and 7.0. It works as expected for me. I cannot add this to bugs unless there is a sample of the issue, logs, android version, and corona version. You can continue to used com.scottrules44 but it is at your own risk. All updates and bug fixes are tied to tech.scotth and I don’t know if corona with remove the com.scottrules44 build from there server.

I’m using Build 2016.2992, android 6.0 (Moto G) and 6.0.1 (Galaxy S6 Edge), I’m going to send a video for you showing with “tech.scotth” and with “com.scottrules44” (video from e-mail)

I understand the video, I really need the logs. You should be able build directly to device in corona simulator and logs appear in the corona terminal.

http://imgur.com/a/kseaX

“WARNING: The ‘plugin.voiceToText’ library is not available on this platform.” 

Corona: Build 2016.2992

Mac: Server

OS X El Capitan 10.11.6