Fangjun Kuang
Committed by GitHub

Fix swift example for generating subtitles. (#1362)

We need to invoke vad.flush() at the end.
@@ -179,6 +179,7 @@ func run() { @@ -179,6 +179,7 @@ func run() {
179 vad.acceptWaveform(samples: [Float](array[offset..<end])) 179 vad.acceptWaveform(samples: [Float](array[offset..<end]))
180 } 180 }
181 181
  182 + vad.flush()
182 var index: Int = 0 183 var index: Int = 0
183 while !vad.isEmpty() { 184 while !vad.isEmpty() {
184 let s = vad.front() 185 let s = vad.front()