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: a meeting whose empty notes were written (done) is transcribed from its recording too, and its notes written again (#30)

christianmat6385d26393da
diff --git a/app/src/main/index.ts b/app/src/main/index.ts
index 55d256b2..66bca95f 100644
--- a/app/src/main/index.ts
+++ b/app/src/main/index.ts
@@ -770,7 +770,7 @@ app.whenReady().then(() => {
const done = await transcribeRecorded(m.id, tracks, () => !!activeMeeting())
win?.webContents.send('meetings:changed'); win?.webContents.send('transcript:speakers', m.id)
// notes that came out empty (no transcript then) are written now
- if (done && store.notes(m.id).enhanced == null) void notes.writeAgain(m.id)
+ if (done && !store.notes(m.id).enhanced?.trim()) void notes.writeAgain(m.id)
}
} catch (e) { console.error('transcribing waiting meetings failed', e) } finally { backfilling = false }
}
diff --git a/app/src/main/store.ts b/app/src/main/store.ts
index 3c851095..59f54ffd 100644
--- a/app/src/main/store.ts
+++ b/app/src/main/store.ts
@@ -253,13 +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
+ // Meetings recorded before transcripts were tracked (0.3.15) were never marked as waiting: a finished 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
+ // meeting that really had nothing to transcribe is not tried on every launch. Version 1 (0.3.31) marked stopped
+ // meetings only; one whose empty notes were written is done, so version 2 marks those too.
+ if (Number((this.db.prepare('PRAGMA user_version').get() as Row).user_version) < 2) {
+ this.db.exec(`UPDATE meetings SET transcription_pending = 1 WHERE state IN ('stopped', 'done') 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')
+ this.db.exec('PRAGMA user_version = 2')
}
}
private readMeeting(r: Row): Meeting {
@@ -482,11 +483,11 @@ export class Store {
}
/**
- * Stopped meetings still waiting for their transcript with not one line of it: recorded before the speech model was in
+ * Finished meetings (stopped, or done once their notes were written) still waiting for their transcript with not one line of it: recorded before the speech model was in
* (#30), oldest first. One with some lines (whisper fell over partway) is left alone, so no line is transcribed twice.
*/
untranscribedMeetings(): Meeting[] {
- return (this.db.prepare(`SELECT * FROM meetings m WHERE state = 'stopped' AND trashed_at IS NULL AND transcription_pending = 1
+ return (this.db.prepare(`SELECT * FROM meetings m WHERE state IN ('stopped', 'done') AND trashed_at IS NULL AND transcription_pending = 1
AND NOT EXISTS (SELECT 1 FROM segments s WHERE s.meeting_id = m.id) ORDER BY started_at`).all() as Row[]).map(r => this.readMeeting(r))
}
diff --git a/app/test/store.test.ts b/app/test/store.test.ts
index a200fa4b..1e646650 100644
--- a/app/test/store.test.ts
+++ b/app/test/store.test.ts
@@ -500,14 +500,16 @@ describe('meetings recorded before transcripts were tracked (#30)', () => {
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' })
+ // its empty notes were "written", which made it done: the #30 meeting
+ const finished = s.createMeeting({ title: 'notes came out empty', startedAt: 5, endedAt: 6, eventId: null, app: null, attendees: [], state: 'done' })
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 })
+ expect(s.untranscribedMeetings().map((m) => m.id)).toEqual([silent.id, finished.id])
+ s.updateMeeting(silent.id, { transcriptionPending: false }); s.updateMeeting(finished.id, { transcriptionPending: false })
s.close()
s = openStore(file)
// only once: a meeting that really had nothing to transcribe is not tried on every launch
@@ -516,3 +518,15 @@ describe('meetings recorded before transcripts were tracked (#30)', () => {
rmSync(dir, { recursive: true, force: true })
})
})
+
+it('a store already marked by 0.3.31 (only stopped meetings) is marked again for done ones, once', () => {
+ const dir = mkdtempSync(join(tmpdir(), 'yogurt-store-30b-')), file = join(dir, 'y.db')
+ let s = openStore(file)
+ const done = s.createMeeting({ title: 'empty notes', startedAt: 1, endedAt: 2, eventId: null, app: null, attendees: [], state: 'done' })
+ ;(s as unknown as { db: { exec(q: string): void } }).db.exec('PRAGMA user_version = 1')
+ s.close()
+ s = openStore(file)
+ expect(s.untranscribedMeetings().map((m) => m.id)).toEqual([done.id])
+ s.close()
+ rmSync(dir, { recursive: true, force: true })
+})