feat(storage): thread audio_layout through FinalizeMeeting + Meeting + get_meeting (FR-SPK)
This commit is contained in:
1 parent
998de62df2
commit
845903a772
1 file changed
+15
-2
@@ -74,6 +74,10 @@ pub struct FinalizeMeeting {
|
||||
pub language: Option<String>,
|
||||
pub backend_used: Option<String>,
|
||||
pub model_used: Option<String>,
|
||||
/// How `audio.wav`'s channels are laid out (FR-SPK/FR-CAP): `"split"` =
|
||||
/// stereo mic-left/loopback-right, `"summed"`/`None` = mic mixed into every
|
||||
/// channel. `None` leaves the stored value unchanged (e.g. on reprocess).
|
||||
pub audio_layout: Option<String>,
|
||||
}
|
||||
|
||||
/// Full meeting detail: DB row + transcript + speakers + notes (`get_meeting`'s
|
||||
@@ -91,6 +95,10 @@ pub struct Meeting {
|
||||
pub language: Option<String>,
|
||||
pub backend_used: Option<String>,
|
||||
pub model_used: Option<String>,
|
||||
/// `audio.wav` channel layout (FR-SPK/FR-CAP): `"split"` (mic-left /
|
||||
/// loopback-right) or `"summed"`/`None` (mic mixed into every channel).
|
||||
/// Diarization, playback downmix, and bundle export branch on it.
|
||||
pub audio_layout: Option<String>,
|
||||
pub segments: Vec<TranscriptSegment>,
|
||||
pub speakers: Vec<SpeakerInfo>,
|
||||
pub notes_markdown: String,
|
||||
@@ -742,7 +750,8 @@ impl Store for SqliteStore {
|
||||
let now = now_unix();
|
||||
sqlx::query(
|
||||
"UPDATE meetings SET status = 'ready', ended_at = ?, duration_secs = ?, recorded = ?,
|
||||
language = ?, backend_used = ?, model_used = ?, updated_at = ? WHERE id = ?",
|
||||
language = ?, backend_used = ?, model_used = ?,
|
||||
audio_layout = COALESCE(?, audio_layout), updated_at = ? WHERE id = ?",
|
||||
)
|
||||
.bind(now)
|
||||
.bind(s.duration_secs)
|
||||
@@ -750,6 +759,7 @@ impl Store for SqliteStore {
|
||||
.bind(&s.language)
|
||||
.bind(&s.backend_used)
|
||||
.bind(&s.model_used)
|
||||
.bind(&s.audio_layout)
|
||||
.bind(now)
|
||||
.bind(id)
|
||||
.execute(&self.pool)
|
||||
@@ -865,7 +875,7 @@ impl Store for SqliteStore {
|
||||
|
||||
async fn get_meeting(&self, id: &MeetingId) -> Result<Meeting, StoreError> {
|
||||
let row = sqlx::query(
|
||||
"SELECT id, title, started_at, ended_at, duration_secs, status, recorded, language, backend_used, model_used, calendar_event_id, template_id
|
||||
"SELECT id, title, started_at, ended_at, duration_secs, status, recorded, language, backend_used, model_used, calendar_event_id, template_id, audio_layout
|
||||
FROM meetings WHERE id = ?",
|
||||
)
|
||||
.bind(id)
|
||||
@@ -936,6 +946,7 @@ impl Store for SqliteStore {
|
||||
language: row.get("language"),
|
||||
backend_used: row.get("backend_used"),
|
||||
model_used: row.get("model_used"),
|
||||
audio_layout: row.get("audio_layout"),
|
||||
segments,
|
||||
speakers,
|
||||
notes_markdown,
|
||||
@@ -2031,6 +2042,7 @@ mod tests {
|
||||
language: Some("fr".to_string()), // what auto-detect resolved to
|
||||
backend_used: Some("cpu".to_string()),
|
||||
model_used: Some("small-q5_1".to_string()),
|
||||
audio_layout: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -2074,6 +2086,7 @@ mod tests {
|
||||
language: Some("en".to_string()),
|
||||
backend_used: Some("cpu".to_string()),
|
||||
model_used: Some("small-q5_1".to_string()),
|
||||
audio_layout: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user