Add Flush to VAD so that the last segment can be detected. (#1099)
This commit is contained in:
@@ -53,6 +53,11 @@ namespace SherpaOnnx
|
||||
SherpaOnnxVoiceActivityDetectorReset(_handle.Handle);
|
||||
}
|
||||
|
||||
public void Flush()
|
||||
{
|
||||
SherpaOnnxVoiceActivityDetectorFlush(_handle.Handle);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Cleanup();
|
||||
@@ -106,5 +111,7 @@ namespace SherpaOnnx
|
||||
[DllImport(Dll.Filename)]
|
||||
private static extern void SherpaOnnxVoiceActivityDetectorReset(IntPtr handle);
|
||||
|
||||
[DllImport(Dll.Filename)]
|
||||
private static extern void SherpaOnnxVoiceActivityDetectorFlush(IntPtr handle);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user