import Foundation import SstWhisper func runTranscribeProbe() async { print("Model laden (eerste keer: download ≈1.5 GB)…") let transcriber = WhisperKitTranscriber() do { try await transcriber.load() } catch { print("mislukt:", error.localizedDescription) return } print("Model klaar.") for i in [3, 2, 1] { print("\(i)...") try? await Task.sleep(for: .seconds(1)) } guard let samples = await recordSamples(seconds: 8) else { return } let peak = samples.map { abs($0) }.max() ?? 0 print("samples: \(samples.count), piek: \(peak)") let perSecond = stride(from: 0, to: samples.count, by: 16_000).map { start -> String in let chunk = samples[start..