openModel

fun openModel(encoderPath: String, decoderPath: String, modelType: Int): Int

Opens the speech recognition model files.

To run Whisper on the Qualcomm NPU (QNN), pass the same .qnn package as both encoderPath and decoderPath. modelType must match the package. Bundle libailia_speech_qnn.so and the Qualcomm QNN runtime libraries (libQnnHtp.so, libQnnSystem.so, libQnnHtpVStub.so, libQnnHtpVSkel.so) in jniLibs/arm64-v8a.

Return

0 if successful, otherwise an error code.

Parameters

encoderPath

Path to the encoder model file.

decoderPath

Path to the decoder model file.

modelType

Type of the model, one of the AILIA_SPEECH_MODEL_TYPE_* constants.