Java API Usage example — Mozilla DeepSpeech 0.9.3 documentation (original) (raw)


Examples are from native_client/java/app/src/main/java/org/deepspeech/DeepSpeechActivity.java.

Creating a model instance and loading model

this._m = new DeepSpeechModel(tfliteModel); this._m.setBeamWidth(BEAM_WIDTH);

Performing inference

String decoded = this._m.stt(shorts, shorts.length);

Full source code

See Full source code.