Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. recognize strings

recognize strings

Scheduled Pinned Locked Moved Android
helptutorial
1 Posts 1 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10390935
    wrote on last edited by
    #1

    / / TODO Perform some action to recognize strings=Help me pliz! How to bring those recognized strings in a ListView or editText Creating a dialog box for speech recognition:

    Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH)
    // Specify an empty entry form
    intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
    RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    intent.putExtra(RecognizerIntent.EXTRA_PROMPT,
    "or forever hold your peace");
    intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
    intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.ENGLISH);
    startActivityForResult(intent, VOICE_RECOGNITION);

    Removing speech recognition results:

    @Override
    protected void onActivityResult(int requestCode,
    int resultCode,
    Intent data) {
    if (requestCode == VOICE VOICE_RECOGNITION && resultCode == RESULT_OK)
    {
    ArrayList results;
    results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_
    RESULTS);
    // TODO Perform some action to recognize strings
    }
    super.onActivityResult(requestCode, resultCode, data);
    }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups