add clearCache() to Synthesizer to free MLX memory after synthesis

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-14 05:24:37 +01:00
parent 8d4da7dc92
commit bf7fce3fae

View File

@@ -43,5 +43,9 @@ public final class Synthesizer: @unchecked Sendable {
}
}
public func clearCache() {
MLX.Memory.clearCache()
}
public static let sampleRate: Double = 24_000
}