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:
}
break;
case REQ_CODE_SPEECH_INPUT:
if (_resultCode == RESULT_OK && null != _data) {
ArrayList<String> result = _data.getStringArrayListExtra(android.speech.RecognizerIntent.EXTRA_RESULTS);
edittext1.setText(result.get(0));
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.
Very useful
ReplyDeletePlease , add video "how to your app work is background"
ReplyDeletenice works
ReplyDeleteNice bro
ReplyDeletePlease add video how to creat one time view activity(page)
ReplyDeletei am sri lanka....i watched your all videos....i am your subscriber....👊👊👊👊
ReplyDeleteplease help me
ReplyDeleteplease help me
ReplyDeleteThank you for this excellent tutorial...
ReplyDeleteI'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!
http://codesforsw.blogspot.com/
ReplyDeleteHow to use your code on sketchware.. Please add screen shot
DeleteHow to make a application like this ?
ReplyDeletehttps://github.com/AllAboutEE/Android-App-HTTP-Helper/blob/master/app/src/main/java/com/allaboutee/httphelper/HomeActivity.java
how to automatic screenshot method in sketchware
ReplyDeleteCompiler log error is coming
ReplyDeleteIt's not work and given 3 error line
ReplyDeleteDear admin...
ReplyDeleteCan you tell me how to change the speech recognition language?? I want use another language. Thank you!
How can i add more languages??
ReplyDeleteThanks
ReplyDeletehow can i limit the time of the speech function, because it doesn't stop recognizing sound if there's still some noise.
ReplyDeleteSvp comment faire une application d'enregistrement audio
ReplyDeleteCreate a SONG reconation app
ReplyDeleteLike Google assistant
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.
ReplyDeleteThere'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.
ReplyDeleteHave you ever used stafaband? You can play the songs before downloading them, but when you're ready to save the songs to your computer.
ReplyDeleteThis 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
ReplyDeleteThanks bro,👊
ReplyDeleteI was able to creat this app💪
Most of the court does not work. Show me some error. How can I solve it?olsen mark question is how can I set Bangla language to speech to text?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis is a great post with lots of informative resources. I appreciate your work. This is really helpful for everyone. Check out our website Panasonic Programming Manual Support for more visit.
ReplyDeleteThis is a good post. Static QR Code Generator Thanks for sharing with us, Excellent work and I really appreciate your work.
ReplyDelete