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 4593690
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:43:15+00:00 2026-05-21T22:43:15+00:00

I am looking to create an app which has Speech to text. I am

  • 0

I am looking to create an app which has Speech to text.

I am aware of this kind of ability using the RecognizerIntent: http://android-developers.blogspot.com/search/label/Speech%20Input

However – I do not want a new Intent to be popped up, I want to do the analysis a certain points in my current app, and I dont want it to pop something up stating that it is currently attempting to record your voice.

Has anybody any ideas on how best to do this. I was perhaps thinking of trying Sphinx 4 – but I dont know if this would be able to run on Android – has anyone got any advice or experience?!

I was wondering if I could alter the code here to perhaps not bothering to show the UI or button and just do the processing: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html

Cheers,

  • 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-21T22:43:16+00:00Added an answer on May 21, 2026 at 10:43 pm

    If you don’t want to use the RecognizerIntent to do speech recognition, you could still use the SpeechRecognizer class to do it. However, using that class is a little bit more tricky than using the intent. As a final note, I would highly suggest to let the user know when he is recorded, otherwise he might be very set up, when he finally finds out.

    Edit: A small example inspired (but changed) from,
    SpeechRecognizer causes ANR… I need help with Android speech API

    Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
            RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
            "com.domain.app");
    
    SpeechRecognizer recognizer = SpeechRecognizer
            .createSpeechRecognizer(this.getApplicationContext());
    RecognitionListener listener = new RecognitionListener() {
        @Override
        public void onResults(Bundle results) {
            ArrayList<String> voiceResults = results
                    .getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
            if (voiceResults == null) {
                System.out.println("No voice results");
            } else {
                System.out.println("Printing matches: ");
                for (String match : voiceResults) {
                    System.out.println(match);
                }
            }
        }
    
        @Override
        public void onReadyForSpeech(Bundle params) {
            System.out.println("Ready for speech");
        }
    
        /**
         *  ERROR_NETWORK_TIMEOUT = 1;
         *  ERROR_NETWORK = 2;
         *  ERROR_AUDIO = 3;
         *  ERROR_SERVER = 4;
         *  ERROR_CLIENT = 5;
         *  ERROR_SPEECH_TIMEOUT = 6;
         *  ERROR_NO_MATCH = 7;
         *  ERROR_RECOGNIZER_BUSY = 8;
         *  ERROR_INSUFFICIENT_PERMISSIONS = 9;
         *
         * @param error code is defined in SpeechRecognizer
         */
        @Override
        public void onError(int error) {
            System.err.println("Error listening for speech: " + error);
        }
    
        @Override
        public void onBeginningOfSpeech() {
            System.out.println("Speech starting");
        }
    
        @Override
        public void onBufferReceived(byte[] buffer) {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        public void onEndOfSpeech() {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        public void onEvent(int eventType, Bundle params) {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        public void onPartialResults(Bundle partialResults) {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        public void onRmsChanged(float rmsdB) {
            // TODO Auto-generated method stub
    
        }
    };
    recognizer.setRecognitionListener(listener);
    recognizer.startListening(intent);
    

    Important: Run this code from the UI Thread, and make sure you have required permissions.

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Xcode and I'm trying to create an app which has a
I'm looking to create a very small cataloguing app for personal use (although I'd
I'm writing a web app that points to external links. I'm looking to create
I'm looking to create favicon.ico files programatically from Python, but PIL only has support
I am looking to create an expression tree by parsing xml using C#. The
I am looking to create a video training program which records videos - via
Hopefully this still falls within StackOverflow's umbrella! I'm looking to create a quick boot
I am working on an app right now which has the potential to grow
I'm looking to create a C# application that changes content according to which application
I'm looking at starting a new web app which needs to be secure (if

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.