Refactor recording metadata to JSON sidecar
Replaces the `.transcript.txt` sidecar with a structured `.json` file for recording metadata. This change consolidates transcript text, duration, and other potential metadata into a single, extensible JSON object. This also refactors the `TranscriptState` enum to better represent the on-disk state (absence of file means pending) and the in-memory representation. The `Transcript` enum now specifically models the terminal outcomes of the transcriber (`Silent` or `Content`). The commit includes updates to documentation, data structures, path handling, and various tests to align with the new metadata format.
This commit is contained in:
@@ -28,11 +28,11 @@ use wiremock::{Mock, MockServer, ResponseTemplate};
|
||||
|
||||
use common::{ONELINER_FILENAME, TestConfig};
|
||||
|
||||
/// Seed an m4a plus a silent (0-byte) transcript sidecar — the on-disk
|
||||
/// shape of a recording that whisper classified as silence.
|
||||
/// Seed an m4a plus a silent metadata sidecar — the on-disk shape of
|
||||
/// a recording that whisper classified as silence.
|
||||
fn seed_silent_recording(case_dir: &Path, stem: &str) {
|
||||
std::fs::write(case_dir.join(format!("{stem}.m4a")), b"audio").unwrap();
|
||||
std::fs::write(case_dir.join(format!("{stem}.transcript.txt")), b"").unwrap();
|
||||
common::seed_recording_meta(case_dir, stem, common::Transcript::Silent, None);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user