Unable To Run Speechrecognizer Android

I seem to be not be able to run the speech recognizer on my phone. The app instals and the button is returning what it needs to be returning but the actual voice recognizer isn't returning onBeginning of Speech and etc... Here is my code, hopefully it's an easy fix. I am running on a Galaxy s3 which displays the erros (Trace: Can't open, no such directory) and ActivityManager: Warning: Activity not started, its current task has been brought to the front. May be a problem with permissions. Any help would be great!

public class MainActivity extends Activity implements OnClickListener {

ListView lv;
private SpeechRecognizer mSpeechRecognizer;
private Intent mSpeechRecognizerIntent; 

protected void onCreate(Bundle savedInstanceState) {

    lv = (ListView)findViewById(R.id.lvVoiceReturn);
    Button b= (Button)findViewById(R.id.bVoice);
    boolean available = SpeechRecognizer.isRecognitionAvailable(this);
    Log.d("Speech", "available = " + available);
    mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
    mSpeechRecognizer.setRecognitionListener(new SpeechListener());
    mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;

public void onClick(View v) {
    // TODO Auto-generated method stub
    Log.d("speech", "button active");

private class SpeechListener implements RecognitionListener {

    public void onBeginningOfSpeech() {
        Log.d("Speech", "onBeginningOfSpeech");

    public void onBufferReceived(byte[] buffer) {
        Log.d("Speech", "onBufferReceived");

    public void onEndOfSpeech() {
        Log.d("Speech", "onEndOfSpeech");

    public void onError(int error) {
        Log.d("Speech", "onError");

    public void onEvent(int eventType, Bundle params) {
        Log.d("Speech", "onEvent");

    public void onPartialResults(Bundle partialResults) {
        Log.d("Speech", "onPartialResults");

    public void onReadyForSpeech(Bundle params) {
        Log.d("Speech", "onReadyForSpeech");

    public void onResults(Bundle results) {
        Log.d("Speech", "results");


    public void onRmsChanged(float rmsdB) {
        //Log.d("Speech", "onRmsChanged");



Here is my Manifest

    android:targetSdkVersion="17" />

<uses-permission android:name="android.permission.RECORD_AUDIO"/> 

    android:theme="@style/AppTheme" >
        android:label="@string/app_name" >
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />



You need the following permission

<uses-permission android:name="android.permission.RECORD_AUDIO"/>  

And fix the following error instead of

protected class mSpeechRecognizerIntent implements RecognitionListener  

it should be

private class SpeechListener implements RecognitionListener  

and add the following in onCreate after the line

boolean available = SpeechRecognizer.isRecognitionAvailable();
Log.d("Speech", "available = " + available);
mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
mSpeechRecognizer.setRecognitionListener(new SpeechListener());

Need Your Help

How to deduce the count of the vacancies next to the name of the city?

php sql yii

I made a sql query that counts of jobs in a particular city

Hibernate NamedQuery and Pagination

java hibernate jpa pagination

I have my Entity with custom NamedQuery:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.