Add Swift API for TTS (#439)

This commit is contained in:
Fangjun Kuang
2023-11-22 16:04:26 +08:00
committed by GitHub
parent fe977b8e8e
commit 2f22e6ed63
10 changed files with 324 additions and 4 deletions

View File

@@ -175,8 +175,8 @@ func run() {
var segments: [SpeechSegment] = []
for offset in stride(from: 0, to: array.count, by: windowSize) {
let end = min(offset + windowSize, array.count)
vad.acceptWaveform(samples: [Float](array[offset ..< end]))
let end = min(offset + windowSize, array.count)
vad.acceptWaveform(samples: [Float](array[offset..<end]))
}
var index: Int = 0