Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Voice to Text
Started by Scott Harrison Oct 17 2016 09:45 AM

106 replies to this topic
[TOPIC CONTROLS]
Page 2 of 5 1 2 3 4 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

^please note updates take up to an hour to sync



[TOPIC: post.html]
#27

dev179

[GLOBAL: userInfoPane.html]
dev179
  • Observer

  • 6 posts
  • Corona SDK

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.


[TOPIC: post.html]
#28

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

 

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.



[TOPIC: post.html]
#29

dev179

[GLOBAL: userInfoPane.html]
dev179
  • Observer

  • 6 posts
  • Corona SDK

Perfect, I'll be waiting



[TOPIC: post.html]
#30

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

Everything should be fixed

[TOPIC: post.html]
#31

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

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""

 

2. 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) 

3. android now support partial word support like iOS

4. 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 


  • schroederapps likes this

[TOPIC: post.html]
#32

rafael.rpadovani

[GLOBAL: userInfoPane.html]
rafael.rpadovani
  • Observer

  • 3 posts
  • Corona SDK

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.



[TOPIC: post.html]
#33

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

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.

[TOPIC: post.html]
#34

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

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.



[TOPIC: post.html]
#35

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

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.  



[TOPIC: post.html]
#36

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

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. 



[TOPIC: post.html]
#37

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

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.



[TOPIC: post.html]
#38

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

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)



[TOPIC: post.html]
#39

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

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.



[TOPIC: post.html]
#40

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

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



[TOPIC: post.html]
#41

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

try selecting "copy to device and launch"

and then post corona terminal out when getting error

Screen%20Shot%202017-02-21%20at%208.40.5



[TOPIC: post.html]
#42

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

try selecting "copy to device and launch"

and then post corona terminal out when getting error

Screen%20Shot%202017-02-21%20at%208.40.5

 
Ok, I'm not on the computer right now, just as I run the test and send the log.
 
But I would still like to know if it is possible to increase the time for the e.response == "stopped" event, or even leave it as non-iOS works, click a text / button to fire the voiceToText.stopRecording ()


[TOPIC: post.html]
#43

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

I pushed an update a couple yesterday that fixes a few things on android and adds more options for length of speech for android. i just update the docs, please look under startRecoding.



[TOPIC: post.html]
#44

devcrm

[GLOBAL: userInfoPane.html]
devcrm
  • Observer

  • 8 posts
  • Corona SDK

Perfect, that's it!

 

The PublisherId issue now also worked (tech.scotth)
 
Thanks.


[TOPIC: post.html]
#45

andrea_corte

[GLOBAL: userInfoPane.html]
andrea_corte
  • Enthusiast

  • 32 posts
  • Corona SDK

Good morning
I'm trying again plugin VOICE TO TEXT
I can not get it running on samsung galaxy S6 (6.0.1) 
Instead on samsung galaxy ace 4 (4.4.4) works
Not from any mistake, it seems as if it can not access the phone's microphone.
 
You know how to help me
thank you so much


[TOPIC: post.html]
#46

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

 

Good morning
I'm trying again plugin VOICE TO TEXT
I can not get it running on samsung galaxy S6 (6.0.1) 
Instead on samsung galaxy ace 4 (4.4.4) works
Not from any mistake, it seems as if it can not access the phone's microphone.
 
You know how to help me
thank you so much

 

 

have you checked out the code in this example https://github.com/scottrules44/voiceToText-Demo

 

you need to request access

local function appPermissionsListener( event )
    
    for k,v in pairs( event.grantedAppPermissions ) do
        if ( v == "Microphone" ) then
            microphoneAccess = true
            print( "Microphone permission granted!" )
        end
    end
    if microphoneAccess == false then
        print( "Microphone permission not granted" )
    end
end

function showPermissionPopup(  )
    local options =
    {
        appPermission = "Microphone",
        urgency = "Critical",
        listener = appPermissionsListener,
        rationaleTitle = "Microphone access required",
        rationaleDescription = "Microphone access is required to take photos. Re-request now?",
        settingsRedirectTitle = "Alert",
        settingsRedirectDescription = "Without the ability to use microphone, this app cannot properly function. Please grant microphone access within Settings."
    }
    native.showPopup( "requestAppPermission", options )
end
showPermissionPopup(  )


[TOPIC: post.html]
#47

andri.yunanto

[GLOBAL: userInfoPane.html]
andri.yunanto
  • Observer

  • 4 posts
  • Corona SDK

Hi Scott,

 

I'm from Indonesia and I want to use indonesian language (bahasa indonesia) as default language on my android apps. I've tried to set language using "id_ID" in :

 

voiceToText.startRecording("id_ID")

 

but seems it doesn't work and my apps keep using english as default language, I even have tried to change the code using "id-ID" "in-ID" "in_ID", but my apps still translate my voice using english. There are no errors on my log.

Is it because I use wrong language code for bahasa indonesia or anything else I should set in my codes?

I use corona Version 2017.3033 (2017.2.9).

Thanks.



[TOPIC: post.html]
#48

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

Hi Scott,

 

I'm from Indonesia and I want to use indonesian language (bahasa indonesia) as default language on my android apps. I've tried to set language using "id_ID" in :

 

 

voiceToText.startRecording("id_ID")

 

but seems it doesn't work and my apps keep using english as default language, I even have tried to change the code using "id-ID" "in-ID" "in_ID", but my apps still translate my voice using english. There are no errors on my log.

Is it because I use wrong language code for bahasa indonesia or anything else I should set in my codes?

I use corona Version 2017.3033 (2017.2.9).

Thanks.

Have you tried "id" ?



[TOPIC: post.html]
#49

andri.yunanto

[GLOBAL: userInfoPane.html]
andri.yunanto
  • Observer

  • 4 posts
  • Corona SDK

Have you tried "id" ?

 

Yes, I've tried using "id" and "ID, but unfortunately both are still failed and the apps still detect my voice using english language.



[TOPIC: post.html]
#50

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,769 posts
  • Enterprise

This should be fixed, use “id-ID”


[topic_controls]
Page 2 of 5 1 2 3 4 »
 
[/topic_controls]