Skip to content

Commit 3f7614c

Browse files
committed
Fix duration from predictor.
1 parent 46d02d8 commit 3f7614c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/F5TTS/F5TTS.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public class F5TTS: Module {
105105

106106
if resolvedDuration == nil, let durationPredictor = self._durationPredictor {
107107
let estimatedDurationInSeconds = durationPredictor(cond, text: text).item(Float32.self)
108-
resolvedDuration = MLXArray(Int(Double(estimatedDurationInSeconds) * F5TTS.framesPerSecond)) + lens
108+
resolvedDuration = MLXArray(Int(Double(estimatedDurationInSeconds) * F5TTS.framesPerSecond))
109109
print("Generating \(estimatedDurationInSeconds) seconds (\(resolvedDuration) total frames) of audio...")
110110
}
111111

0 commit comments

Comments
 (0)