import Foundation public enum HotkeyEvent: Equatable, Sendable { case pressed case released } public enum DictationState: Equatable, Sendable { case idle case recording case transcribing case inserting } public struct CleaningContext: Sendable { public init() {} } public protocol AudioRecording { func start() throws /// Stops recording and returns all captured 16 kHz mono Float samples. func stop() -> [Float] } public protocol Transcriber { func transcribe(_ samples: [Float]) async throws -> String } public protocol Cleaner { func clean(_ text: String, context: CleaningContext) async throws -> String } public protocol TextInserting { func insert(_ text: String) async throws }