sherpa-onnx
sherpa-onnx copied to clipboard
Guidance needed: Location of JNI source code and required memory release pattern for Android TTS/JNI usage
I am evaluating the sherpa-onnx library for a project that requires tight control over memory management in the native C++ layer (specifically the TTS functionality). I need to ensure that resources are explicitly freed after use to prevent leaks. I have reviewed the build configurations and the project structure, but I am having trouble locating the specific C++ source files that handle the deallocation of resources.
Specifically:
Which source file(s) should I examine to find the C++ functions responsible for releasing the memory allocated for the TTS engine?
What are the required function calls or API patterns to correctly destroy the TTS engine objects after they are initialized and used? (e.g., a function like deleteTtsEngine(engine_handle) or tts_engine.dispose()).
Could you point me to any documentation or example C++ code that demonstrates the correct lifecycle management for the native TTS components?
Thank you for your assistance!