Add Flush to VAD so that the last segment can be detected. (#1099)
This commit is contained in:
@@ -876,6 +876,10 @@ void SherpaOnnxVoiceActivityDetectorReset(SherpaOnnxVoiceActivityDetector *p) {
|
||||
p->impl->Reset();
|
||||
}
|
||||
|
||||
void SherpaOnnxVoiceActivityDetectorFlush(SherpaOnnxVoiceActivityDetector *p) {
|
||||
p->impl->Flush();
|
||||
}
|
||||
|
||||
#if SHERPA_ONNX_ENABLE_TTS == 1
|
||||
struct SherpaOnnxOfflineTts {
|
||||
std::unique_ptr<sherpa_onnx::OfflineTts> impl;
|
||||
|
||||
@@ -815,6 +815,9 @@ SHERPA_ONNX_API void SherpaOnnxDestroySpeechSegment(
|
||||
SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorReset(
|
||||
SherpaOnnxVoiceActivityDetector *p);
|
||||
|
||||
SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorFlush(
|
||||
SherpaOnnxVoiceActivityDetector *p);
|
||||
|
||||
// ============================================================
|
||||
// For offline Text-to-Speech (i.e., non-streaming TTS)
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user