Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6193647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:09:22+00:00 2026-05-24T03:09:22+00:00

in softkeyboard i have the option for speech to text , when i spoke

  • 0

in softkeyboard i have the option for speech to text , when i spoke it show a list of suggestion , when i select a text ,i need to fill my editText with this text, how can i done this i have see SpeechRecognizer class ,i don’t know how can i use this ,please help me

SpeechRecognizer rec=SpeechRecognizer.createSpeechRecognizer(context);

        RecognitionListener listener = new RecognitionListener() {

            @Override
            public void onRmsChanged(float rmsdB) {


            }

            @Override
            public void onResults(Bundle results) {
                ArrayList<String> voiceResults = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);


            }

            @Override
            public void onReadyForSpeech(Bundle params) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onPartialResults(Bundle partialResults) {


            }

            @Override
            public void onEvent(int eventType, Bundle params) {


            }

            @Override
            public void onError(int error) {


            }

            @Override
            public void onEndOfSpeech() {


            }

            @Override
            public void onBufferReceived(byte[] buffer) {


            }

            @Override
            public void onBeginningOfSpeech() {


            }
        };
        rec.setRecognitionListener(listener);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:09:24+00:00Added an answer on May 24, 2026 at 3:09 am

    Assuming your text edit is named “te”:

    public void onResults(Bundle results) {   
      ArrayList<String> voiceResults = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
      StringBuilder sb = new StringBuilder();
      for(String p: voiceResults)   {
        sb.append(p);
        sb.append("\n");   }   te.setText(sb.toString()); 
      }
    

    Normally, you are only interested in the first result (i.e voiceResults (0)) since that is the most probable match but the code above shows all of them so you can see what is returned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one question: How can I select what soft-keyboard an edittext will load?
how can I have a done button in my softkeyboard (Samsung Galaxy 10.1, Android
I have a EditText control. If I tap it the softkeyboard will popup however
I have a layout with a ListView that contains EditText objects that can requestFocus()
i have listview and editText ,i need to scroll the last item of the
I have an EditText. I want that after typing some text, when user presses
Ok I have noticed in the android softkeyboard when the user wants to send
I have developed a Bengali fixed layout softkeyboard for android and now want to
I have an Activity with some EditText fields and some buttons as a convenience
I have never seen this before. I have a simple custom view that has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.