|
@@ -64,7 +64,7 @@ class SherpaNcnn(
|
|
|
|
|
|
fun inputFinished() = inputFinished(ptr)
|
|
|
fun isEndpoint(): Boolean = isEndpoint(ptr)
|
|
|
- fun reset() = reset(ptr)
|
|
|
+ fun reset(recreate: Boolean = false) = reset(ptr, recreate = recreate)
|
|
|
|
|
|
val text: String
|
|
|
get() = getText(ptr)
|
|
@@ -82,9 +82,9 @@ class SherpaNcnn(
|
|
|
private external fun acceptWaveform(ptr: Long, samples: FloatArray, sampleRate: Float)
|
|
|
private external fun inputFinished(ptr: Long)
|
|
|
private external fun isReady(ptr: Long): Boolean
|
|
|
- private external fun decode(ptr: Long): Boolean
|
|
|
+ private external fun decode(ptr: Long)
|
|
|
private external fun isEndpoint(ptr: Long): Boolean
|
|
|
- private external fun reset(ptr: Long): Boolean
|
|
|
+ private external fun reset(ptr: Long, recreate: Boolean)
|
|
|
private external fun getText(ptr: Long): String
|
|
|
|
|
|
companion object {
|