Add Flush to VAD so that the last segment can be detected. (#1099)
This commit is contained in:
@@ -65,6 +65,12 @@ void main(List<String> arguments) async {
|
||||
}
|
||||
}
|
||||
|
||||
vad.flush();
|
||||
while (!vad.isEmpty()) {
|
||||
allSamples.add(vad.front().samples);
|
||||
vad.pop();
|
||||
}
|
||||
|
||||
vad.free();
|
||||
|
||||
final s = Float32List.fromList(allSamples.expand((x) => x).toList());
|
||||
|
||||
Reference in New Issue
Block a user