sherpa-onnx
sherpa-onnx copied to clipboard
Possible memory leak?
I am using zipformer with online model (streaming mode) using C APIs on android platform, the ASR functionality is working OK. In my code during constructor call, I am initializing and keeping the recognizer object and stream object in a class variable and only free them during destructor call. During the entire lifecycle of application, constructor will be called once during start of the app and the during exit of the application, the destructor is called. I am using reset functionality to reset stream and recognizer object across different ASR commands.
But I am seeing a ever increasing (although) memory growth over time, although the growth is small and unpredictable across iteration. Valgrind and other analyzer tools are unable to pinpoint the issue. Has anyone here observed this issue?
memory growth over time, although the growth is small
Could you describe the amount it grows? And how long have you run it?
memory growth over time, although the growth is small
Could you describe the amount it grows? And how long have you run it?
I have ran it for about 8-10 hours. Making a dummy streaming ASR call every 1 minute. Each such audio command is around 4-5 second long feed to the streaming ASR in chunks of 0.1 second (1600 samples). The memory growth over 8 - 10 hours period is around 125 MB using initial memory as baseline
memory growth over time, although the growth is small
Could you describe the amount it grows? And how long have you run it?
I have ran it for about 8-10 hours. Making a dummy streaming ASR call every 1 minute. Each such audio command is around 4-5 second long feed to the streaming ASR in chunks of 0.1 second (1600 samples). The memory growth over 8 - 10 hours period is around 125 MB using initial memory as baseline
Since you are using the C API, you have to free resources by yourself for some function calls. Could you please post the code about how you use the C APIs?
Any update on this issue?
Any update on this issue?
I am planning to work on this issue and shall share any updates accordingly.
Any updates on this?