Skip to content

Commit

Permalink
Fix duration from predictor.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnewman committed Oct 21, 2024
1 parent 46d02d8 commit 3f7614c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/F5TTS/F5TTS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class F5TTS: Module {

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

Expand Down

0 comments on commit 3f7614c

Please sign in to comment.