mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
A tester on build 147 (iPhone19,7, iOS 27.2.1): "Dictation stops whenever I
get any notification... Calls stopping it are fine." In-keyboard dictation
records through WebKit in a hidden web view. When iOS gives the audio
session to another sound, WebKit interrupts the page's AudioContext (no
more audio) and mutes the microphone track. It unmutes the track when
WebKit hears the interruption end, but resumes the context only when iOS
says it may (ShouldResume). Some captures fail and end the track. The
page's only defence was a 250 ms ctx.resume(). So:
- a context that didn't come back within 6 s hit the keyboard's watchdog
("capture silent"), which finished the dictation with the words so far;
- a track left muted or ended under a running context sent silence for
good: the dictation went on, but nothing after the sound was heard.
- The capture page reports each track mute/unmute/ended and each context
statechange (and any change its 250 ms check sees) to the keyboard, with
the page's time. The keyboard writes every one to the probe log.
- Every 250 ms the page still resumes a context that isn't running. Once
it runs, it opens the microphone again for a track that ended or stayed
muted for 3 s (backing off 1, 2, 4, then 8 s), into the same context and
ScriptProcessor. The same job, file, live words and Type as I speak
carry on; the gap is missing audio.
- KeyboardCaptureWatch (HEXShared) keeps the recording's clock. While the
page says it's interrupted, the 6 s quiet rule doesn't count, and quiet
counts again from when it's back. Interrupted past
KeyboardJobWatchdog.captureInterruption (15 s: a call, an alarm), it
finishes with what was said, as before.
- Simulator only (#if targetEnvironment(simulator)): capture-debug.js in
the App Group runs once in the capture page, and each recording is kept
as capture-debug.wav, so interruptions can be driven by hand where there
is no microphone or interruption.
- KeyboardSpeech and KeyboardProbeLog move unchanged to their own files to
make room: KeyboardLocalDictation.swift 1,398 -> 1,389 lines.
- The app's own recorder (AudioBackend, finishing on interruptionBegan) is
unchanged.
- ios/docs/dictation.md describes the behaviour.
Verified:
- HEXMobile suite on an iPhone 17 Pro iOS 27.2 simulator (Mac Studio): 952
tests, 0 failures, including the new KeyboardBridgeTests case (interrupted
time isn't quiet, quiet restarts at the end, the 15 s limit, a muted
track's silence counts as interrupted).
- Release simulator build of Hex in a text field. A recorded voice (two
sentences, 9 s apart) stood in for the microphone, and each interruption
was driven 5 s in. The kept recordings were transcribed:
- context suspended 2 s, track muted then unmuted 2 s, both together,
track muted for good (reopened at +3 s), track stopped (reopened at
once): each kept both sentences in one dictation;
- context held suspended: finished at 15 s with the first sentence only.
- Nothing was run on an iPhone. Which of these a notification causes there
is unverified.
|
||
| .. | ||
| Fixtures | ||
| AppleSpeechAssetReservationsTests.swift | ||
| AutocorrectEngineTests.swift | ||
| CleanupTaggerTests.swift | ||
| CustomVocabularyTests.swift | ||
| DictationControllerTests.swift | ||
| DictationLanguageTests.swift | ||
| DictationLearningTests.swift | ||
| DotScopeTests.swift | ||
| EmojiPanelLettersKeyTests.swift | ||
| EmojiShortcodeTests.swift | ||
| EmojiSuggesterTests.swift | ||
| FullKeyboardEngineTests+AdaptiveTouch.swift | ||
| FullKeyboardEngineTests+Layouts.swift | ||
| FullKeyboardEngineTests+Punctuation.swift | ||
| FullKeyboardEngineTests+Suggestions.swift | ||
| FullKeyboardEngineTests+SwipeSpacing.swift | ||
| FullKeyboardEngineTests+SwipeTyping.swift | ||
| FullKeyboardEngineTests+TrackpadAndLanguages.swift | ||
| FullKeyboardEngineTests.swift | ||
| GreeklishRomanizerTests.swift | ||
| HangulComposerTests.swift | ||
| HexKeyGestureTests.swift | ||
| KeyboardBridgeTests.swift | ||
| KeyboardClipboardTests.swift | ||
| KeyboardDuoCoverTests.swift | ||
| KeyboardLayoutTests.swift | ||
| KeyboardSwitchGuessTests.swift | ||
| KeyboardThemeTests.swift | ||
| LaggingField.swift | ||
| LanguageLearningTests.swift | ||
| SettingsHierarchyTests.swift | ||
| ShiftStateMachineTests.swift | ||
| SwipeDecoderTests.swift | ||
| TranscriptCleanupTests.swift | ||
| TwoLanguageMergeTests.swift | ||
| TwoThumbSelectionTests.swift | ||
| TypingGateReplayTests.swift | ||
| TypingLogTests.swift | ||
| TypingReplayTests.swift | ||