Speech Recognizer

Trying to make an app that uses speech recognizer to count how many words someone says in a minute. Any ideas on how to do this, or perhaps some similar source code to get me started? Part of the problem is that I don’t quite understand how the Speech Recognizer functions work. Thanks!

Hi Andrew

Here is a very basic example of the components:

Press input ( it will start the microphone and listen for your speech) (next it will convert to text and fill Label1 with the text)
Press output (it will take the text in label1 then convert to speech)
speech.aia (1.6 KB)
speech.apk (2.2 MB)

This should get you started

1 Like

Updated with word count; same process as above but now the new label 2 will show word count.
speech.aia (2.1 KB)
speech.apk (2.2 MB)

Hope it helps you get started?


Thank you for your help!

I am relatively new to thunkable: I am using it as a quick and easy way to prototype my user interface for an app I am creating through Android Studio, so don’t quite know the ins and outs yet. How do I open your files/see them in the blocks editor? Appreciate the help!

Hello again

Just click the files to save them to your system; In thunkable under ‘Apps’ click upload app project .aia and browse to the downloaded file. Once uploaded it will appear in the your apps then you can click it to play. To live test it you will need your device to have the companion app installed and both on the same Wi_Fi.

The .apk is the packaged version which can be installed directly onto your device.

1 Like

Now this file (speech.aia) isn’t work. My problem show that "Runtime Error call to speech_Recognizer1…) could you please help me solve this problem?

The current “Speech Recognizer . After Getting Text” has 2 arguments, a “result” string, and a “partial” logical. Is it possible that you have a vintage app that should perhaps be revisited, as some blocks may have changed in the interim?

I’m trying to use basic command blocks. It isn’t work too. I think may be bug for current “Speech Recognizer .speech2.aia (1.8 KB)

I just tested your app, I got no problem running it and recognizing “testing testing 1 2 3”.

You however have to understand the limitations of the system: it sends the recording to an applet – likely part of the Android system itself – that locally interprets the spoken language and only recognizes English. If the language setting of your device is not English, then it is sent out through the internet to be analyzed. If that remote speech recognition is not capable of recognizing your speech, there is nothing you can do at the level of your app to fix this, it is all done by Google.