You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add local transcription fallback when captions are unavailable (#42)
* feat: add local Whisper transcription fallback
* feat: use local transcription when captions are unavailable
* test: cover local transcription fallback lifecycle
* test: verify preparation fallback selection and provenance
* docs: document local transcription fallback contract
* test: align preparation expectations with local fallback
* test: preserve source provenance on reused preparation
GYTE prefers source-provided captions. Local transcription is a fallback only when inspection found no usable caption.
4
+
5
+
## Selection order
6
+
7
+
```text
8
+
usable source caption
9
+
-> caption acquisition
10
+
otherwise
11
+
-> private audio acquisition with yt-dlp
12
+
-> local Whisper transcription
13
+
-> stable private transcript
14
+
-> normal normalization/reflow/preparation
15
+
```
16
+
17
+
The fallback does not turn generated transcription into source-provided evidence. Pipeline provenance records `evidence_origin: local-transcription`; caption-backed runs record `evidence_origin: source-caption`.
18
+
19
+
## Private artifacts
20
+
21
+
Fallback artifacts stay inside the private workspace:
22
+
23
+
-`transcription-source.<ext>` — minimum acquired audio used for local transcription;
- the normal `transcript.raw.txt`, normalized and analysis artifacts derived afterwards.
27
+
28
+
These files must not be committed or published automatically.
29
+
30
+
## Whisper configuration
31
+
32
+
The default executable is `whisper` from `PATH` and the default model is `base`.
33
+
34
+
Optional overrides:
35
+
36
+
```text
37
+
GYTE_WHISPER_COMMAND=/path/to/whisper
38
+
GYTE_WHISPER_MODEL=tiny|base|small|...
39
+
```
40
+
41
+
The command override may be an executable path or a command name available on `PATH`.
42
+
43
+
## Restart and retry semantics
44
+
45
+
- a completed non-empty `transcription.local.txt` plus its private audio is reused unless `--force` is requested;
46
+
- if audio acquisition completed but transcription did not, the existing audio is reused on retry;
47
+
- partial `yt-dlp` files are not treated as completed evidence;
48
+
-`prepare` is not advanced when local transcription fails;
49
+
- completed preparation preserves the original `source_mode`, `evidence_origin` and local-transcription details when stable outputs are reused.
50
+
51
+
`--force` requests a fresh transcription attempt while still allowing already acquired private audio to be reused.
52
+
53
+
## Failure contract
54
+
55
+
Local fallback failures are explicit and classified internally as:
56
+
57
+
-`configuration` — required executable/path is unavailable;
58
+
-`download` — private audio acquisition failed or produced no usable audio;
59
+
-`transcription` — Whisper execution failed;
60
+
-`output` — Whisper completed without a usable UTF-8 transcript.
61
+
62
+
These failures surface as preparation errors and do not silently advance later pipeline stages.
63
+
64
+
## Authority boundary
65
+
66
+
```text
67
+
source caption != locally generated transcription
68
+
local transcription != reviewed source lesson
69
+
local transcription != factual authority
70
+
```
71
+
72
+
Local Whisper output remains derived evidence that may contain recognition errors. It must pass the same later preparation/editorial boundaries as caption-derived material.
0 commit comments