use of ee.ioc.phon.android.recsession.NotAvailableException in project K6nele by Kaljurand.
the class HttpRecognitionService method configure.
@Override
protected void configure(Intent recognizerIntent) throws IOException {
ChunkedWebRecSessionBuilder mRecSessionBuilder = new ChunkedWebRecSessionBuilder(this, getExtras(), null);
mRecSessionBuilder.setContentType(getEncoderType(), getSampleRate());
if (Log.DEBUG)
Log.i(mRecSessionBuilder.toStringArrayList());
mRecSession = mRecSessionBuilder.build();
try {
mRecSession.create();
} catch (IOException e) {
onError(SpeechRecognizer.ERROR_NETWORK);
} catch (NotAvailableException e) {
// This cannot happen in the current net-speech-api?
onError(SpeechRecognizer.ERROR_SERVER);
}
}
Aggregations