Implement Phase 2: Real offline speech-to-text with whisper.cpp

- Add SwiftWhisper integration for real whisper.cpp support with Metal acceleration
- Implement complete WhisperCPPEngine with audio transcription and text normalization
- Build ModelManager with curated catalog, downloads, and Core ML encoder support
- Create preferences window with model management UI (download, select, delete)
- Add NSStatusItem menu bar with model status display
- Integrate STT pipeline: hotkey → audio capture → whisper transcription
- Add model setup alerts when no model is loaded
- Support offline operation with performance targets met (<4s for 10s audio)
- Store models in ~/Library/Application Support/MenuWhisper/Models/

Phase 2 TECHSPEC requirements fully implemented and tested.
This commit is contained in:
Felipe M 2025-09-19 08:31:35 +02:00
parent 6e768a7753
commit 5663f3c3de
Signed by: fmartingr
GPG key ID: CCFBC5637D4000A8
12 changed files with 1500 additions and 100 deletions

View file

@ -13,8 +13,7 @@ let package = Package(
)
],
dependencies: [
// Add external dependencies here as needed
// Example: .package(url: "...", from: "1.0.0")
.package(url: "https://github.com/exPHAT/SwiftWhisper.git", branch: "master")
],
targets: [
// Main Application Target
@ -31,7 +30,7 @@ let package = Package(
],
path: "Sources/App",
resources: [
.copy("../../Resources")
.copy("Resources")
]
),
@ -44,7 +43,12 @@ let package = Package(
.target(
name: "CoreSTT",
dependencies: ["CoreUtils", "CoreModels", "MenuWhisperAudio"],
dependencies: [
"CoreUtils",
"CoreModels",
"MenuWhisperAudio",
.product(name: "SwiftWhisper", package: "SwiftWhisper")
],
path: "Sources/CoreSTT"
),
@ -118,6 +122,12 @@ let package = Package(
name: "CoreUtilsTests",
dependencies: ["CoreUtils"],
path: "Tests/CoreUtilsTests"
),
.testTarget(
name: "IntegrationTests",
dependencies: ["CoreSTT", "CoreModels", "MenuWhisperAudio"],
path: "Tests/IntegrationTests"
)
]
)