feat: add package scaffold and DictationController state machine

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 09:39:56 +02:00
co-authored by Claude Sonnet 5.5
parent aa20a5941f
commit 6ab94cfdd0
6 changed files with 282 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
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
}