Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Transcripts: meetings recorded before transcripts were tracked, with not one line, are transcribed from their recording too; the catch-up also runs at launch (#30)

christianmat9a3aa0b88934
diff --git a/app/src/main/index.ts b/app/src/main/index.ts
index fa39507d..55d256b2 100644
--- a/app/src/main/index.ts
+++ b/app/src/main/index.ts
@@ -775,6 +775,8 @@ app.whenReady().then(() => {
} catch (e) { console.error('transcribing waiting meetings failed', e) } finally { backfilling = false }
}
setup.onState(() => void transcribeWaiting())
+ // at launch too, when the model is already in and setup has nothing new to say
+ void transcribeWaiting()
// tests: a recorded meeting back to "recorded before the speech model was in", and the catch-up run now
if (isFake()) Object.assign(((globalThis as Record<string, unknown>).__fake__ ??= {}) as object, {
untranscribe: () => { const id = store.meetings({ limit: 1 })[0].id; store.deleteSegments(store.segments(id).map((x) => x.id)); store.updateMeeting(id, { transcriptionPending: true }); return id },
diff --git a/app/src/main/store.ts b/app/src/main/store.ts
index fb4f3893..3c851095 100644
--- a/app/src/main/store.ts
+++ b/app/src/main/store.ts
@@ -253,6 +253,14 @@ export class Store {
if (this.db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'speakers'").get()) {
this.db.exec("UPDATE segments SET speaker = NULL WHERE track = 'them'; DROP TABLE speakers")
}
+ // Meetings recorded before transcripts were tracked (0.3.15) were never marked as waiting: a stopped one with not
+ // one line is marked once, so a recording made before the speech model was in gets transcribed (#30). Once only: a
+ // meeting that really had nothing to transcribe is not tried on every launch.
+ if (Number((this.db.prepare('PRAGMA user_version').get() as Row).user_version) < 1) {
+ this.db.exec(`UPDATE meetings SET transcription_pending = 1 WHERE state = 'stopped' AND trashed_at IS NULL
+ AND NOT EXISTS (SELECT 1 FROM segments s WHERE s.meeting_id = meetings.id)`)
+ this.db.exec('PRAGMA user_version = 1')
+ }
}
private readMeeting(r: Row): Meeting {
const m = toMeeting(r)
diff --git a/app/test/store.test.ts b/app/test/store.test.ts
index 56f4db3e..a200fa4b 100644
--- a/app/test/store.test.ts
+++ b/app/test/store.test.ts
@@ -494,3 +494,25 @@ it('migrates old meetings with nullable snapshot columns and preserves them acro
expect(reopened.meeting('old')).toMatchObject({ title: 'My old note', startedAt: 50, eventEndedAt: 200, eventTitle: 'Event', eventCalendarName: 'Work', eventCalendarSource: 'Calendar' })
expect(reopened.notes('old').mine).toBe('My existing notes')
})
+
+describe('meetings recorded before transcripts were tracked (#30)', () => {
+ it('on the first open after the update, a stopped meeting with no transcript is marked as waiting for one, once', () => {
+ const dir = mkdtempSync(join(tmpdir(), 'yogurt-store-30-')), file = join(dir, 'y.db')
+ let s = openStore(file)
+ const silent = s.createMeeting({ title: 'old call', startedAt: 1, endedAt: 2, eventId: null, app: null, attendees: [], state: 'stopped' })
+ const heard = s.createMeeting({ title: 'had words', startedAt: 3, endedAt: 4, eventId: null, app: null, attendees: [], state: 'stopped' })
+ s.addSegments([{ meetingId: heard.id, track: 'them', startMs: 0, endMs: 900, text: 'hello', speaker: null }])
+ // as an older Yogurt left it: nothing marked, and the store never looked
+ ;(s as unknown as { db: { exec(q: string): void } }).db.exec('PRAGMA user_version = 0')
+ s.close()
+ s = openStore(file)
+ expect(s.untranscribedMeetings().map((m) => m.id)).toEqual([silent.id])
+ s.updateMeeting(silent.id, { transcriptionPending: false })
+ s.close()
+ s = openStore(file)
+ // only once: a meeting that really had nothing to transcribe is not tried on every launch
+ expect(s.untranscribedMeetings()).toEqual([])
+ s.close()
+ rmSync(dir, { recursive: true, force: true })
+ })
+})