Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
145d0af
Cancel and join actual tasks in timeout fixtures
aehlke Nov 6, 2026
177d208
Own custom vocabulary files per compilation and native consumer
aehlke Nov 6, 2026
dfe875c
Keep speech asset reservations leased across model managers
aehlke Nov 6, 2026
2d4d5b6
Bound file frame reads before narrowing to UInt32
aehlke Nov 6, 2026
c2ffc3d
Serialize screen capture transitions and join admitted shutdown work
aehlke Nov 6, 2026
95e00b2
Join file transcription tasks through terminal cleanup
aehlke Nov 6, 2026
0c9729c
Join concurrent screen cleanup and fence superseded resume outcomes
aehlke Nov 6, 2026
fdd8d07
Preserve file retirement errors and finalize normal input once
aehlke Nov 6, 2026
4a2b50a
Fence speech detector readers by monitor identity
aehlke Nov 6, 2026
21d50dd
Disambiguate screen readiness gates and organize bounded fixtures
aehlke Nov 6, 2026
03aa1ca
Separate joined file fixtures and bound suite bodies
aehlke Nov 6, 2026
d6fb578
Separate reservation probes and bound suite bodies
aehlke Nov 6, 2026
9a526fe
Fence live analyzer setup writes and failure publication
aehlke Nov 6, 2026
9189169
Fix detector closure and statement formatting
aehlke Nov 6, 2026
8baf033
Simplify stream timeout tests to await iterators directly
rudrankriyam Nov 12, 2026
e589f5b
Keep file read bounds at the read site
rudrankriyam Nov 12, 2026
d0bd68e
test: reproduce vocabulary cancellation and temporary storage regress…
rudrankriyam Nov 12, 2026
b1bab4d
Merge pull request #38 from ManabiIO/docs/upstream-apple-speech-notic…
rudrankriyam Nov 12, 2026
857a0c7
Limit stale setup failure cleanup to its owning generation
rudrankriyam Nov 12, 2026
beffc3f
fix: keep vocabulary artifacts temporary and preserve cancellation
rudrankriyam Nov 12, 2026
e9d8361
Reproduce paused status after a superseded screen resume
rudrankriyam Nov 12, 2026
58d57fa
Limit file progress delivery to the active session
rudrankriyam Nov 12, 2026
cdb6a99
Keep detector ownership fence in native reader
rudrankriyam Nov 12, 2026
34f26d9
Limit screen capture repair to serialized native transitions
rudrankriyam Nov 12, 2026
2d128fb
Cover pending successor starts and failed pause replacement
rudrankriyam Nov 12, 2026
5c0cc00
Wait for replacement starts and restore intent after failed pause
rudrankriyam Nov 12, 2026
3a48262
Publish resume status atomically with capture ownership
rudrankriyam Nov 12, 2026
a724fa3
Retire model preparation without waiting for downloads
rudrankriyam Nov 12, 2026
a0c0480
test: reproduce vocabulary admission and purged-file reuse failures
rudrankriyam Nov 12, 2026
59ec8f2
fix: rebuild purged vocabulary before dictation and fence cancellation
rudrankriyam Nov 12, 2026
d60d22b
Keep screen control handling in the screen capture extension
rudrankriyam Nov 12, 2026
da83140
Reject canceled and retired queued asset requests
rudrankriyam Nov 12, 2026
d32cf24
Move AuralKit CI to GitHub Actions
rudrankriyam Nov 13, 2026
33cd00f
Merge pull request #51 from rryam/ci/github-actions
rudrankriyam Nov 13, 2026
1c3da30
Merge branch 'main' into auralkit-fixes/pr-34
rudrankriyam Nov 13, 2026
77ba9e6
Merge branch 'main' into auralkit-fixes/pr-35
rudrankriyam Nov 13, 2026
fcf885e
Merge branch 'main' into auralkit-fixes/pr-36
rudrankriyam Nov 13, 2026
adefb53
Merge branch 'main' into auralkit-fixes/pr-37
rudrankriyam Nov 13, 2026
46ea850
Merge branch 'main' into auralkit-fixes/pr-39
rudrankriyam Nov 13, 2026
ccfcbcc
Merge branch 'main' into auralkit-fixes/pr-40
rudrankriyam Nov 13, 2026
cec5ff2
Merge branch 'main' into auralkit-fixes/pr-41
rudrankriyam Nov 13, 2026
2fa6748
Merge branch 'main' into auralkit-fixes/pr-42
rudrankriyam Nov 13, 2026
29b3326
Merge pull request #43 from rryam/auralkit-fixes/pr-34
rudrankriyam Nov 13, 2026
b583fde
Merge pull request #46 from rryam/auralkit-fixes/pr-37
rudrankriyam Nov 13, 2026
227e706
Merge pull request #50 from rryam/auralkit-fixes/pr-42
rudrankriyam Nov 13, 2026
8431176
Merge pull request #44 from rryam/auralkit-fixes/pr-35
rudrankriyam Nov 13, 2026
a11f3d5
Merge pull request #48 from rryam/auralkit-fixes/pr-40
rudrankriyam Nov 13, 2026
2cbb69f
Merge pull request #49 from rryam/auralkit-fixes/pr-41
rudrankriyam Nov 13, 2026
98a103d
Merge pull request #45 from rryam/auralkit-fixes/pr-36
rudrankriyam Nov 13, 2026
c3490d2
Update existing capture filters and preserve terminal stream errors
rudrankriyam Nov 13, 2026
c4286df
Reproduce filter updates suppressing capture startup failures
rudrankriyam Nov 13, 2026
56875fe
Separate filter updates from capture startup ownership
rudrankriyam Nov 13, 2026
9798d77
Reproduce terminal errors lost by pending screen resume
rudrankriyam Nov 13, 2026
592e246
Preserve terminal errors for the interrupted screen resume
rudrankriyam Nov 13, 2026
f31d9c0
Admit screen capture stop before awaiting cleanup
rudrankriyam Nov 13, 2026
24f8284
Reproduce resume returning before terminal capture cleanup
rudrankriyam Nov 13, 2026
bb3bb01
Await terminal screen capture cleanup before resume throws
rudrankriyam Nov 13, 2026
6512feb
Merge pull request #47 from rryam/auralkit-fixes/pr-39
rudrankriyam Nov 13, 2026
82071ac
Log native ScreenCaptureKit activity on OS 27
rudrankriyam Nov 13, 2026
0403ecb
Fix first-use speech authorization callback isolation
rudrankriyam Nov 13, 2026
fca3fb3
Transcribe a selected audio track in local media
rudrankriyam Nov 13, 2026
8c53867
Validate media references and duration before transcription
rudrankriyam Nov 13, 2026
49e05e5
Use the Sendable microphone tap on OS 27
rudrankriyam Nov 13, 2026
05cff64
Use native Speech input for screen audio on OS 27
rudrankriyam Nov 13, 2026
0bdda68
Omit precise timing option without a media duration limit
rudrankriyam Nov 13, 2026
1582336
Close media analysis when no audio samples arrive
rudrankriyam Nov 13, 2026
a92179b
Preserve screen capture errors when copying PCM
rudrankriyam Nov 13, 2026
a5895d6
Cancel file analyzer teardown before input starts
rudrankriyam Nov 13, 2026
c1d3d24
Split transcription finish and cancellation
rudrankriyam Nov 13, 2026
635d21d
Use analyzer compatible PCM in lifecycle test
rudrankriyam Nov 13, 2026
731ef5b
Admit screen stop before awaiting terminal cleanup
rudrankriyam Nov 13, 2026
17aa09e
Keep cancellation observable until result stream completes
rudrankriyam Nov 13, 2026
4943f0f
Close empty analysis and surface finish failures
rudrankriyam Nov 13, 2026
fc14155
Use final result times in transcript history
rudrankriyam Nov 13, 2026
938cf9d
Unblock the analyzer if the stop regression test times out
rudrankriyam Nov 13, 2026
4761dc9
Report a single outcome when screen audio drains
rudrankriyam Nov 13, 2026
6b7309a
Cover screen audio drain failure while pausing
rudrankriyam Nov 13, 2026
630afa4
Merge screen audio drain error handling into the lifecycle PR
rudrankriyam Nov 13, 2026
b84c336
Report a screen audio drain failure through Finish
rudrankriyam Nov 13, 2026
17a5e20
Merge commit '6b7309a' into auralkit-3.0-lifecycle-pr
rudrankriyam Nov 13, 2026
878e5fd
Preserve file ingestion errors when cancelling the recognizer
rudrankriyam Nov 13, 2026
c69aba5
Exercise the native Speech recognizer in the file error regression
rudrankriyam Nov 13, 2026
1fc75da
Preserve terminal capture and analyzer failures
rudrankriyam Nov 13, 2026
149545c
Limit immediate teardown to media playback
rudrankriyam Nov 13, 2026
67fcb49
Retire picker setup when its source finishes
rudrankriyam Nov 13, 2026
ec08f03
Forward recognizer results already queued at stop
rudrankriyam Nov 13, 2026
960b58c
Normalize screen capture drain failures
rudrankriyam Nov 13, 2026
728cad1
Merge pull request #52 from rryam/auralkit-2.1-speech-permission
rudrankriyam Nov 13, 2026
80dc50d
Merge pull request #53 from rryam/auralkit-3.0-capture-state
rudrankriyam Nov 13, 2026
dd19eae
Preserve screen stop errors at delegate ingress
rudrankriyam Nov 13, 2026
1574fe6
Merge pull request #55 from rryam/auralkit-3.0-microphone-tap
rudrankriyam Nov 13, 2026
19aa147
Merge commit '960b58c' into auralkit-3.0-lifecycle-pr
rudrankriyam Nov 13, 2026
2bd51e5
Merge pull request #56 from rryam/auralkit-2.2-video-track
rudrankriyam Nov 13, 2026
16b139c
Integrate 3.0 lifecycle with media and prepare version 3.0.0
rudrankriyam Nov 13, 2026
a4cf066
Merge pull request #54 from rryam/auralkit-3.0-audio-converter
rudrankriyam Nov 13, 2026
8ee6983
Merge remote-tracking branch 'origin/main' into auralkit-3.0-lifecycl…
rudrankriyam Nov 13, 2026
af625dc
Merge pull request #57 from rryam/auralkit-3.0-lifecycle-pr
rudrankriyam Nov 13, 2026
657e4e6
Merge upstream AuralKit lifecycle and capture improvements
aehlke Nov 16, 2026
93aa17f
Join file ingestion and result completion
aehlke Nov 16, 2026
8b87e13
Join Reader teardown in upstream AuralKit merge
aehlke Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
build-and-test:
name: Build and test
runs-on: xcode-27
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Show toolchain
run: |
xcodebuild -version
swift --version
- name: Lint Swift
run: |
brew install swiftlint
swiftlint lint --strict
- name: Build and test Swift package
run: |
swift build
swift test
- name: Build macOS demo
run: xcodebuild -project Aural.xcodeproj -scheme Aural -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build
- name: Build iOS Simulator demo
run: xcodebuild -project Aural.xcodeproj -scheme Aural -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
2 changes: 1 addition & 1 deletion Agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ Before opening a PR (or completing an automated change):
- Minimal transcription example lives in `Aural/TranscriptionView.swift`.
- Advanced transcription UI lives in `Aural/AdvancedTranscriptionView.swift`.
- Error cases and localized descriptions are centralized in `Sources/AuralKit/SpeechSessionError.swift`.
- CI uses Codemagic (`codemagic.yaml`); green builds are required before merging.
- CI uses GitHub Actions (`.github/workflows/ci.yml`). The Build and test job must pass before merging.

Happy transcribing!
23 changes: 6 additions & 17 deletions Aural/CustomVocabularyDemoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ struct CustomVocabularyDemoView: View {
TranscriptionControlsView(
status: viewModel.status,
error: viewModel.errorMessage,
showStopButton: showStopButton,
buttonColor: buttonColor,
buttonIcon: buttonIcon,
statusMessage: statusMessage,
onPrimaryAction: handlePrimaryAction,
onStopAction: handleStopAction
onFinishAction: { model.finishTranscription() },
onCancelAction: { model.cancelTranscription() },
isPreparing: model.isCompiling
)
.padding(.horizontal)
}
Expand Down Expand Up @@ -256,15 +257,6 @@ private extension CustomVocabularyDemoView {
}
}

var showStopButton: Bool {
switch model.status {
case .idle, .stopping:
return false
case .preparing, .transcribing, .paused:
return true
}
}

var statusMessage: String {
switch model.status {
case .idle:
Expand All @@ -274,9 +266,9 @@ private extension CustomVocabularyDemoView {
case .transcribing:
return "Listening..."
case .paused:
return "Paused — tap to resume or stop"
return "Paused"
case .stopping:
return "Stopping..."
return "Ending session..."
}
}

Expand All @@ -285,7 +277,7 @@ private extension CustomVocabularyDemoView {
case .idle:
model.startTranscription()
case .preparing:
model.stopTranscription()
model.cancelTranscription()
case .transcribing:
model.pauseTranscription()
case .paused:
Expand All @@ -295,7 +287,4 @@ private extension CustomVocabularyDemoView {
}
}

func handleStopAction() {
model.stopTranscription()
}
}
37 changes: 13 additions & 24 deletions Aural/CustomVocabularyDemoViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ final class CustomVocabularyDemoViewModel {
// MARK: - Intent Handlers

func startTranscription() {
guard status != .transcribing, status != .preparing else { return }
guard status == .idle, transcriptionTask == nil else { return }

resetTranscriptionState()
cancelExistingTasks()

transcriptionTask = Task { @MainActor in
do {
let stream = try await prepareTranscriptionStream()
monitorDownloadProgress()
try await processTranscriptionStream(stream)
} catch is CancellationError {
// expected when stopped
partialText = ""
currentTimeRange = ""
} catch {
errorMessage = error.localizedDescription
isCompiling = false
Expand All @@ -78,17 +78,15 @@ final class CustomVocabularyDemoViewModel {
}
}

func stopTranscription() {
progressTask?.cancel()
progressTask = nil
resetProgressObservation(clearFraction: true)
transcriptionTask?.cancel()
transcriptionTask = nil
func finishTranscription() {
Task { await session.finishTranscribing() }
}

Task { @MainActor in
await session.stopTranscribing()
partialText = ""
currentTimeRange = ""
func cancelTranscription() {
if session.status == .idle {
transcriptionTask?.cancel()
} else {
Task { await session.cancelTranscribing() }
}
}

Expand All @@ -111,7 +109,7 @@ final class CustomVocabularyDemoViewModel {
func handleToggleChange(_ isEnabled: Bool) {
isCustomVocabularyEnabled = isEnabled
if !isEnabled, status == .transcribing || status == .preparing {
stopTranscription()
cancelTranscription()
}
}

Expand All @@ -124,7 +122,7 @@ final class CustomVocabularyDemoViewModel {
}

func teardown() {
stopTranscription()
cancelTranscription()
statusTask?.cancel()
statusTask = nil
}
Expand Down Expand Up @@ -153,10 +151,6 @@ final class CustomVocabularyDemoViewModel {
isCompiling || status == .preparing || status == .transcribing
}

var isStopDisabled: Bool {
status == .idle || status == .stopping
}

// MARK: - Private helpers

private func bindStatusStream() {
Expand Down Expand Up @@ -287,11 +281,6 @@ extension CustomVocabularyDemoViewModel {
compilationDuration = nil
}

private func cancelExistingTasks() {
transcriptionTask?.cancel()
progressTask?.cancel()
}

private func prepareTranscriptionStream() async throws -> AsyncThrowingStream<DictationTranscriber.Result, Error> {
let startTime = Date()

Expand Down
2 changes: 1 addition & 1 deletion Aural/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.1</string>
<string>3.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Aural/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct SettingsView: View {
Text("AuralKit Demo")
.font(.caption)
.foregroundStyle(.secondary)
Text("Version 2.1.1")
Text("Version 3.0.0")
.font(.caption2)
.foregroundStyle(.secondary)
}
Expand Down
42 changes: 26 additions & 16 deletions Aural/TranscriptionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TranscriptionManager {
var selectedPreset: DemoTranscriberPreset = .manual {
didSet {
if oldValue != selectedPreset, status != .idle {
stopTranscription()
finishTranscription()
}
}
}
Expand Down Expand Up @@ -66,7 +66,8 @@ class TranscriptionManager {
currentTimeRange = ""
isSpeechDetected = true

let session = SpeechSession(locale: selectedLocale, preset: selectedPreset.preset)
let sessionLocale = selectedLocale
let session = SpeechSession(locale: sessionLocale, preset: selectedPreset.preset)
speechSession = session
observeStatus(from: session)
observeAudioInput(from: session)
Expand All @@ -77,12 +78,12 @@ class TranscriptionManager {
for try await result in session.startTranscribing() {
self.handleTranscriptionResult(result)
}
self.finishSession()
self.finishSession(locale: sessionLocale)
} catch is CancellationError {
self.cleanupSession()
} catch {
self.error = error.localizedDescription
self.finishSession()
self.finishSession(locale: sessionLocale)
}
}
}
Expand Down Expand Up @@ -122,12 +123,14 @@ class TranscriptionManager {
return String(format: "%d:%02d.%02d", minutes, remainingSeconds, milliseconds)
}

func stopTranscription() {
guard status != .idle, status != .stopping else { return }
Task { @MainActor in
await self.speechSession?.stopTranscribing()
}
stopAuxiliaryTasks()
func finishTranscription() {
guard let speechSession else { return }
Task { await speechSession.finishTranscribing() }
}

func cancelTranscription() {
guard let speechSession else { return }
Task { await speechSession.cancelTranscribing() }
}

func pauseTranscription() {
Expand All @@ -154,7 +157,7 @@ class TranscriptionManager {
case .idle:
startTranscription()
case .preparing:
stopTranscription()
cancelTranscription()
case .transcribing:
pauseTranscription()
case .paused:
Expand Down Expand Up @@ -182,15 +185,22 @@ class TranscriptionManager {
transcriptionHistory.removeAll { $0.id == record.id }
}

private func finishSession() {
if !currentTranscript.isEmpty {
private func finishSession(locale: Locale) {
let transcript = String(finalizedText.characters)
if !transcript.isEmpty {
let ranges = finalizedText.runs.compactMap(\.audioTimeRange)
let timeRange = if let first = ranges.first, let last = ranges.last {
"\(formatTime(first.start)) - \(formatTime(last.end))"
} else {
""
}
let record = TranscriptionRecord(
id: UUID(),
text: currentTranscript,
locale: selectedLocale,
text: transcript,
locale: locale,
timestamp: Date(),
alternatives: [],
timeRange: currentTimeRange
timeRange: timeRange
)
transcriptionHistory.insert(record, at: 0)
}
Expand Down
17 changes: 4 additions & 13 deletions Aural/TranscriptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ struct TranscriptionView: View {
TranscriptionControlsView(
status: manager.status,
error: manager.error,
showStopButton: showStopButton,
buttonColor: buttonColor,
buttonIcon: buttonIcon,
statusMessage: statusMessage,
onPrimaryAction: { manager.primaryAction() },
onStopAction: { manager.stopTranscription() },
onFinishAction: { manager.finishTranscription() },
onCancelAction: { manager.cancelTranscription() },
animationScale: animationScale
)
.padding(.horizontal)
Expand Down Expand Up @@ -166,15 +166,6 @@ struct TranscriptionView: View {
}
}

private var showStopButton: Bool {
switch manager.status {
case .idle, .stopping:
return false
case .preparing, .transcribing, .paused:
return true
}
}

private var statusMessage: String {
switch manager.status {
case .idle:
Expand All @@ -184,9 +175,9 @@ struct TranscriptionView: View {
case .transcribing:
return "Listening..."
case .paused:
return "Paused — tap to resume or stop"
return "Paused"
case .stopping:
return "Stopping..."
return "Ending session..."
}
}
}
Expand Down
20 changes: 13 additions & 7 deletions Aural/TranscriptionViewComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ struct TranscriptionTextView: View {
struct TranscriptionControlsView: View {
let status: SpeechSession.Status
let error: String?
let showStopButton: Bool
let buttonColor: Color
let buttonIcon: String
let statusMessage: String
let onPrimaryAction: () -> Void
let onStopAction: () -> Void
let onFinishAction: () -> Void
let onCancelAction: () -> Void
var isPreparing = false
var animationScale: CGFloat = 1.0

var body: some View {
Expand Down Expand Up @@ -153,12 +154,17 @@ struct TranscriptionControlsView: View {
}
.buttonStyle(.glass)
.buttonBorderShape(.circle)
.disabled(error != nil || status == .stopping)
.disabled(error != nil || status == .stopping || isPreparing)

if showStopButton {
Button("Stop", action: onStopAction)
.buttonStyle(.borderedProminent)
.tint(.gray)
if status != .idle || isPreparing {
HStack {
if status == .transcribing || status == .paused {
Button("Finish", action: onFinishAction)
.buttonStyle(.borderedProminent)
}
Button("Cancel", action: onCancelAction)
.buttonStyle(.bordered)
}
}

Text(statusMessage)
Expand Down
Loading