gotev / android-speech

Android speech recognition and text to speech made easy
http://gotev.github.io/android-speech/
Apache License 2.0
486 stars 157 forks source link

Unable to set StopListeningAfterInactivity #18

Closed afomic closed 5 years ago

afomic commented 6 years ago

whatever value I set for the is method it doesn't seem to make any effect

gotev commented 6 years ago

Please provide more context and steps to reproduce

afomic commented 6 years ago

public class App extends Application { @Override public void onCreate() { super.onCreate(); FirebaseDatabase.getInstance().setPersistenceEnabled(true); Speech.init(this, getPackageName()); Speech.getInstance().setStopListeningAfterInactivity(10000) .setGetPartialResults(false);

    Logger.setLogLevel(Logger.LogLevel.DEBUG);
}

} this how am setting the stopListeningAfterInactivity, but if i stop talking for like 2s, the app makes a sound and stop listening for more input

gotev commented 5 years ago

This is standard behaviour of the underlying Android Speech API. This library is a simple wrapper.