feat: add package scaffold and DictationController state machine
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user