Speech Recognition: Speech to text in Sketchware

We can implement Speech recognition using codes in add source directly block in Sketchware. Follow the steps below to implement Speech recognition in Sketchware.

1. Create a new android project in Sketchware.

2. In VIEW area add a Button button1 and an EditText edittext1 (or a TextView).

3. Add a new FilePicker component fp.

4. Add a new More Block extra.

5. To define this block extra, use an add source directly block and put following code in it:
public static final int REQ_CODE_SPEECH_INPUT = 1;

6. In the event button1 onClick, use an add source directly block and put following code:
Intent intent = new Intent(android.speech.RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE_MODEL, android.speech.RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); intent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault()); intent.putExtra(android.speech.RecognizerIntent.EXTRA_PROMPT, "Speak Now");
try { startActivityForResult(intent, REQ_CODE_SPEECH_INPUT); }
catch (ActivityNotFoundException a) {
Toast.makeText(getApplicationContext(), "There was an error", Toast.LENGTH_SHORT).show(); }

7. Add the event FilePicker onFilesPicked. Here use an add source directly block and put following code:
if (_resultCode == RESULT_OK && null != _data) {
ArrayList<String> result = _data.getStringArrayListExtra(android.speech.RecognizerIntent.EXTRA_RESULTS);

8. Save and run the project. Now in the app, the Button can be pressed to speak things to be written in the EditText field.


  1. Please , add video "how to your app work is background"

  2. Please add video how to creat one time view activity(page)

  3. i am sri lanka....i watched your all videos....i am your subscriber....👊👊👊👊

  4. Thank you for this excellent tutorial...
    I'm working on an app, and I want to get the current location of the device, how can I do this in sketchware?
    Thank you!

  5. http://codesforsw.blogspot.com/

    1. How to use your code on sketchware.. Please add screen shot

  6. How to make a application like this ?


  7. how to automatic screenshot method in sketchware

  8. Dear admin...
    Can you tell me how to change the speech recognition language?? I want use another language. Thank you!

  9. how can i limit the time of the speech function, because it doesn't stop recognizing sound if there's still some noise.

  10. Svp comment faire une application d'enregistrement audio

  11. Create a SONG reconation app
    Like Google assistant

  12. More efficient and effective than writing by hand, transcribe video to text is a powerful tool that can benefit users with healthier bodies and states of mind.

  13. There's also a Latest music filter to see recently added songs in stafaband. You can also search for artists that you know to see if their music is available for download.

  14. Have you ever used stafaband? You can play the songs before downloading them, but when you're ready to save the songs to your computer.

  15. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post. Text to Speech Mp3 Free


Post a Comment

Popular posts from this blog

Create Music Player app in Sketchware

A Flash Light App in Sketchware

Admob rewarded video Ads in Sketchware

Simple car racing android game in Sketchware

Firebase auth in Sketchware for Login Activity