Refactor transcript file handling to use JSON metadata

This commit changes the way transcriptions are stored and accessed.
Instead of using plain text files (`.transcript.txt`), transcriptions
will now be part of a JSON metadata file (`<stem>.json`). This allows
for richer metadata to be stored alongside the transcript, such as
duration, and provides a more robust mechanism for tracking
transcription states.

The changes include:
- Updating documentation and code to reflect the new `.json` file
  extension.
- Modifying file handling logic to read and write JSON metadata.
- Adjusting tests to accommodate the new file format.
This commit is contained in:
2026-04-27 13:08:36 +02:00
parent 66b3b7e4c8
commit c15590f3e0
10 changed files with 78 additions and 46 deletions
+3 -2
View File
@@ -33,8 +33,9 @@ start per-user hotwords tuning.
2. Note the case UUID the script prints.
3. Copy `$DATA_PATH/<slug>/open/<case_id>/<timestamp>.m4a`
`tests/fixtures/dictations/<name>.m4a`.
4. Copy `$DATA_PATH/<slug>/open/<case_id>/<timestamp>.transcript.txt`
`tests/fixtures/dictations/<name>.expected.txt`.
4. Extract the transcript from the recording metadata sidecar:
`jq -r '.transcript.text' $DATA_PATH/<slug>/open/<case_id>/<timestamp>.json`
→ write it to `tests/fixtures/dictations/<name>.expected.txt`.
5. **Review the transcript** — fix any Whisper errors by hand. This is the
golden reference; accept nothing that is actually wrong.
6. If the fixture tests Fachvokabular, add `<name>.hotwords.txt` with the