refactor(app): the device's speech recognition moves from Learn into halkyon_app, with dictation into a text
Learn's `SpeechInput` and `DeviceSpeechInput` (ADR 0021, D67) are halkyon_app's now, and its `FakeSpeechInput` is in `testing.dart`, so Meditate's dream journal (ADR 0038, D15) listens through the same code. Learn imports them from there and behaves as before: its composer and its tests are unchanged but for the imports, and `DeviceSpeechInput()` asks for what it asked before. `DeviceSpeechInput` takes three options, off by default: - `preferOnDevice`: on Android, recognition on the device where it can (Android 12 on), else offline; should that fail before a word is heard (not a pause), it listens as Android otherwise does from then on. - `pauseFor`: how long a pause may last before the recogniser stops. - `listenFor`: how long one listen may last at most. `Dictation` writes what is heard where the cursor stands (`DictationInsertion`: in place of a selection, set apart by a space), shows the words so far, and listens again after each pause while it is on, stopping by itself after three listens running heard nothing. speech_to_text moves from Learn's pubspec to halkyon_app's, the lock unchanged. Todo, Train and Meditate link the plugin now; their generated plugin registrants (macOS, Windows) say so. An app declares the microphone itself, and Todo and Train declare none, so nothing there can listen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
86c9f4522a
commit
603218ef96
1 changed files with 405 additions and 16 deletions
|
|
@ -69,6 +69,11 @@ dependencies:
|
|||
# libsodium's API, as halkyon_keys pins it (the same version, exactly):
|
||||
# opening it on each isolate the account's keys are worked on.
|
||||
sodium: 4.1.0+1
|
||||
# What the person says, written (SpeechInput, Dictation; Halkyon Learn's
|
||||
# ADR 0021, D67, Halkyon Meditate's ADR 0038, D15): the device's own speech
|
||||
# recognition (Android's, Apple's, Windows'); none on Linux. An app that
|
||||
# listens declares the microphone and its usage texts itself.
|
||||
speech_to_text: ^7.5.0
|
||||
url_launcher: ^6.3.2
|
||||
|
||||
dev_dependencies:
|
||||
|
|
|
|||
Loading…
Reference in a new issue