Hello!
So in my application I am using
implementation group: 'com.alphacephei', name: 'vosk-android', version: '0.3.32'
with Vosk running in Service
private void initModel() {
StorageService.unpack(this, "model-en-us", "model",
new Callback<Model>() {
@Override
public void onComplete(Model model) {
VoskSpeechRecognitionService.this.model = model;
VoskSpeechRecognitionService.this.recognizeMicrophone();
}
},
new Callback<IOException>() {
@Override
public void onComplete(IOException exception) {
// exception.printStackTrace();
}
});
}
private void recognizeMicrophone() {
speechThread = new Thread(new Runnable() {
@Override
public void run() {
if (searching)
return;
searching = true;
try {
Recognizer rec = new Recognizer(model, 16000.0f);
speechService = new SpeechService(rec, 16000.0f);
speechService.startListening(VoskSpeechRecognitionService.this);
} catch (IOException e) {
e.printStackTrace();
}
}
});
speechThread.start();
}
So this is running 24/7. I check onResult if word is found. Everything works great
The problem I see is that this is using more and more memory each day passes. My app used around 100MB memory, but after X days I saw it using around 450mb+. So I don't know if there is any problem with running this 24/7?
Also I am sometimes pausing speech for X seconds and then unpause, if that can maybe cause any issues?
Hello! So in my application I am using
implementation group: 'com.alphacephei', name: 'vosk-android', version: '0.3.32'
with Vosk running in Service
So this is running 24/7. I check onResult if word is found. Everything works great
The problem I see is that this is using more and more memory each day passes. My app used around 100MB memory, but after X days I saw it using around 450mb+. So I don't know if there is any problem with running this 24/7? Also I am sometimes pausing speech for X seconds and then unpause, if that can maybe cause any issues?
Thank you!