How to recognize a voice?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to recognize a voice?
I'm trying to make an app on my phone that recognizes sound
What I want to do is let the user talk and then the app will recognize what he said and do what the user wanted
So how can I detect sound in my app?
What I want to do is let the user talk and then the app will recognize what he said and do what the user wanted
So how can I detect sound in my app?
Re: How to recognize a voice?
Currently there is no "speech recognition" in LC, only the opposite -> text to speech
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How to recognize a voice?
Popular answer: you can use LC Builder to tap into OS APIs for things LC doesn't currently provide a scripting interface for.
Unpopular answer: I do not encourage use of any always-on microphone connected to the internet. Few consumers are aware of the implications, and unwittingly have their private conversations listened to by strangers thousands of miles away. I used to use voice navigation until I listened to the recordings the device was collecting on the provider's servers. Turned it off, never looked back.
Background:
Apple Belatedly Confirms Bug Which Collected Audio Recordings From iPhone Users
Excerpt:
“I listened to hundreds of recordings every day, from various Apple devices,” said le Bonniec. “These recordings were often taken outside of any activation of Siri, eg in the context of an actual intention from the user to activate it for a request. These processings were made without users being aware of it, and were gathered into datasets to correct the transcription of the recording made by the device.”
https://www.forbes.com/sites/gordonkell ... 06264193b7
As Voice Recognition Technology Market Surges, Organizations Face Privacy and Cybersecurity Concerns
https://www.natlawreview.com/article/vo ... rivacy-and
Report Reveals How Amazon Uses Alexa Voice Data for Targeted Ads
https://www.pcmag.com/news/a-new-report ... rgeted-ads
How to locate and delete voice commands on Google Assistant, Siri, and Alexa
https://knowtechie.com/how-to-delete-vo ... iri-alexa/
A possible exception may be the open source Mycroft AI project, when self-hosted (though few consumers want to run their own server)
https://mycroft.ai
Bonus: Anything from Cory Doctorow, eg:
https://onezero.medium.com/how-to-destr ... 35e6744d59
Unpopular answer: I do not encourage use of any always-on microphone connected to the internet. Few consumers are aware of the implications, and unwittingly have their private conversations listened to by strangers thousands of miles away. I used to use voice navigation until I listened to the recordings the device was collecting on the provider's servers. Turned it off, never looked back.
Background:
Apple Belatedly Confirms Bug Which Collected Audio Recordings From iPhone Users
Excerpt:
“I listened to hundreds of recordings every day, from various Apple devices,” said le Bonniec. “These recordings were often taken outside of any activation of Siri, eg in the context of an actual intention from the user to activate it for a request. These processings were made without users being aware of it, and were gathered into datasets to correct the transcription of the recording made by the device.”
https://www.forbes.com/sites/gordonkell ... 06264193b7
As Voice Recognition Technology Market Surges, Organizations Face Privacy and Cybersecurity Concerns
https://www.natlawreview.com/article/vo ... rivacy-and
Report Reveals How Amazon Uses Alexa Voice Data for Targeted Ads
https://www.pcmag.com/news/a-new-report ... rgeted-ads
How to locate and delete voice commands on Google Assistant, Siri, and Alexa
https://knowtechie.com/how-to-delete-vo ... iri-alexa/
A possible exception may be the open source Mycroft AI project, when self-hosted (though few consumers want to run their own server)
https://mycroft.ai
Bonus: Anything from Cory Doctorow, eg:
https://onezero.medium.com/how-to-destr ... 35e6744d59
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How to recognize a voice?
Richard, thanks for that last link to Cory Doctorow - very long but quite an interesting read...
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How to recognize a voice?
Glad you found it helpful. He was a keynote speaker at the SoCal Linux Expo a few years ago. Very eye-opening talk. Been following him ever since. His Twitter feed is worthwhile.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 29
- Joined: Tue Jun 27, 2006 8:35 pm
- Location: Bellingham, WA USA
- Contact:
Re: How to recognize a voice?
I don't know your exact use case and this could be quite ugly from a UI standpoint but, might one possible "work around" be to create a native UITextField and use the built-in speech to text feature provided to the field by the OS. Then the app could query the field.
Elementary Software
...now with 20% less chalk dust!
...now with 20% less chalk dust!
Re: How to recognize a voice?
So can anyone direct me more how do I do that?
-
- VIP Livecode Opensource Backer
- Posts: 29
- Joined: Tue Jun 27, 2006 8:35 pm
- Location: Bellingham, WA USA
- Contact:
Re: How to recognize a voice?
"How to do it" is a particularly reasonable question in this case since looking up "field" in the dictionary doesn't point to mobileControlCreate, mobileControlSet or mobileControlGet(). While it does show the native field Widget objects, and the Android one does seems pretty comprehensive, neither of them point to mobileControlCreate, mobileControlSet or mobileControlGet() either.
LiveCode has a lesson for creating native mobile text fields:
https://lessons.livecode.com/m/4069/l/2 ... -on-mobile
Below is a brief overview.
To create a native field in iOS or Android use the command: mobileControlCreate. There are two kinds of mobile fields.
mobileControlCreate "input", "YourFieldName" -- this field allows a single line
mobileControlCreate "multiline", "YourFieldName" -- this field allows multiple lines
To set properties of the field look up the command: mobileControlSet
examples:
mobileControlSet "YourFieldName", "visible", true
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
To get the content of the field use the function: mobileControlGet()
put mobileControlGet("YourFieldName", "unicodeText") into tUnicodeText
In order to get the dictation to work the user will need to tap the microphone icon that comes up with the mobile keyboard once the field is active.
This field object is native to iOS and Android, so it cannot be used in the IDE or desktop standalone apps. Sadly, you will also need to keep from triggering code which touches these "mobile only" commands and functions when you are not running on mobile because they will cause a script error outside of a mobile OS. So something like:
if the environment is "mobile" then
mobileControlCreate "input", "YourFieldName"
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
end if
LiveCode has a lesson for creating native mobile text fields:
https://lessons.livecode.com/m/4069/l/2 ... -on-mobile
Below is a brief overview.
To create a native field in iOS or Android use the command: mobileControlCreate. There are two kinds of mobile fields.
mobileControlCreate "input", "YourFieldName" -- this field allows a single line
mobileControlCreate "multiline", "YourFieldName" -- this field allows multiple lines
To set properties of the field look up the command: mobileControlSet
examples:
mobileControlSet "YourFieldName", "visible", true
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
To get the content of the field use the function: mobileControlGet()
put mobileControlGet("YourFieldName", "unicodeText") into tUnicodeText
In order to get the dictation to work the user will need to tap the microphone icon that comes up with the mobile keyboard once the field is active.
This field object is native to iOS and Android, so it cannot be used in the IDE or desktop standalone apps. Sadly, you will also need to keep from triggering code which touches these "mobile only" commands and functions when you are not running on mobile because they will cause a script error outside of a mobile OS. So something like:
if the environment is "mobile" then
mobileControlCreate "input", "YourFieldName"
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
end if
Elementary Software
...now with 20% less chalk dust!
...now with 20% less chalk dust!