valgrind clean
This commit is contained in:
parent
f32e4401c8
commit
520eeeb99e
1 changed files with 6 additions and 0 deletions
|
@ -955,6 +955,9 @@ pub const SttSession = struct {
|
||||||
self.parseVoskResult(result_str) catch |err| {
|
self.parseVoskResult(result_str) catch |err| {
|
||||||
self.options.event_handler.onError(err, "Failed to parse Vosk result");
|
self.options.event_handler.onError(err, "Failed to parse Vosk result");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Reset recognizer after getting final result to clear internal buffers
|
||||||
|
c.vosk_recognizer_reset(self.vosk_recognizer);
|
||||||
}
|
}
|
||||||
} else if (accept_result == 0) {
|
} else if (accept_result == 0) {
|
||||||
// Partial result available (optional - for real-time feedback)
|
// Partial result available (optional - for real-time feedback)
|
||||||
|
@ -1286,6 +1289,9 @@ pub const SttSession = struct {
|
||||||
// Free processing buffer
|
// Free processing buffer
|
||||||
self.allocator.free(self.processing_buffer);
|
self.allocator.free(self.processing_buffer);
|
||||||
|
|
||||||
|
// Clean up ALSA global configuration cache
|
||||||
|
_ = c.snd_config_update_free_global();
|
||||||
|
|
||||||
// Mark as uninitialized
|
// Mark as uninitialized
|
||||||
self.initialized = false;
|
self.initialized = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue