Posts

Showing posts with the label speech to text

Speech Recognition: Speech to text in Sketchware

Image
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, ...