Skip to content

Commit

Permalink
Fix swift example for generating subtitles. (#1362)
Browse files Browse the repository at this point in the history
We need to invoke vad.flush() at the end.
  • Loading branch information
csukuangfj authored Sep 20, 2024
1 parent 647b63e commit 73c90ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions swift-api-examples/generate-subtitles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ func run() {
vad.acceptWaveform(samples: [Float](array[offset..<end]))
}

vad.flush()
var index: Int = 0
while !vad.isEmpty() {
let s = vad.front()
Expand Down

0 comments on commit 73c90ec

Please sign in to comment.