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.

Call names (Teams in English on Windows): a tile whose label inside isn't the name ("(You)" on my own tile) is read by its first words, and "(You)" there marks me, so a meeting of two showing both tiles names the other side (#83)

christianmat9600291aec47
diff --git a/app/src/main/callNames/parse.ts b/app/src/main/callNames/parse.ts
index 3133d3e2..e16e2bd2 100644
--- a/app/src/main/callNames/parse.ts
+++ b/app/src/main/callNames/parse.ts
@@ -245,6 +245,8 @@ const TEAMS_ROLE = /^(?:organizer|presenter|guest|external|co-?organizer|attende
const TEAMS_SAYS = /^(?:speaking|talking|active speaker|now speaking|spricht(?: gerade)?)$/i
/** "(You)" after the person's own name: Sie and Du in German */
const SELF_TAG = 'you|me|sie|du|ich'
+/** my own tile's label when it holds only that: "(You)" */
+const SELF_LABEL = new RegExp(`^\\((?:${SELF_TAG})\\)$`, 'i')
const TEAMS_ME = new RegExp(`^(.{2,60}?)\\s*\\((?:${SELF_TAG})\\)`, 'i')
const cleanTeams = (s: string) => s.replace(new RegExp(`\\s*\\((?:organizer|presenter|guest|external|organisator(?:in)?|referent(?:in)?|gast|extern|${SELF_TAG})\\)`, 'gi'), '').replace(/[,.:;]+$/, '').trim()
@@ -324,13 +326,15 @@ function teamsTile(n: AxNode, alone: boolean): { name: string; speaking: boolean
const fields = rest.split(/\s*,\s*/).filter(Boolean)
return { name, speaking: fields.some((f) => TEAMS_SAYS.test(f)), me: head !== raw || TEAMS_ME.test(head), muted: fields.length ? fields.some((f) => TEAMS_MUTED.test(f)) : null }
}
- // no label inside: the name is the first of the tile's words when they end with Teams' context-menu hint
+ // no label with the name inside (none, or "(You)" on my own tile, #83 18:30): the name is the first of the tile's words
+ // when they end with Teams' context-menu hint. A label that starts the words but runs on is no name.
const fields = label.split(/\s*,\s*/)
- if (heads.length || fields.length < 3 || !TEAMS_HINT.test(fields.at(-1)!)) return null
+ if (heads.some((h) => h && label.startsWith(h)) || fields.length < 3 || !TEAMS_HINT.test(fields.at(-1)!)) return null
const name = cleanTeams(fields[0])
if (name.length < 2 || name.length > 60 || !/\p{L}/u.test(name) || /[+\d]/.test(name)) return null
const rest = fields.slice(1)
- return { name, speaking: rest.some((f) => TEAMS_SAYS.test(f)), me: TEAMS_ME.test(fields[0]), muted: rest.some((f) => TEAMS_MUTED.test(f)) }
+ const mine = TEAMS_ME.test(fields[0]) || heads.some((h) => SELF_LABEL.test(h))
+ return { name, speaking: rest.some((f) => TEAMS_SAYS.test(f)), me: mine, muted: rest.some((f) => TEAMS_MUTED.test(f)) }
}
/** what a tile's video image says about mute, by the names among its words: "..., Unmuted, video is on, ..., Dana Smith" */
diff --git a/app/test/callNames.test.ts b/app/test/callNames.test.ts
index 48d2765c..c903db97 100644
--- a/app/test/callNames.test.ts
+++ b/app/test/callNames.test.ts
@@ -316,6 +316,19 @@ describe('hookCallNames', () => {
expect(s.logs.filter((l) => l === 'call names: teams talking 0 of 0')).toHaveLength(2)
})
+ it('a Teams meeting of two showing my tile ("(You)" inside) and the other one names their lines, with my own name not set (#83)', async () => {
+ const s = setup({ app: 'Teams', myNames: [] })
+ s.start()
+ s.audio(0, 1_000_100)
+ s.store.addSegments([{ meetingId: s.m.id, track: 'them', startMs: 1000, endMs: 3000, text: 'Hi.', speaker: null }])
+ const tile = (name: string, label: string): AxNode => ({ r: 'menu item', t: `${name}, video is on, Weekly, Context menu is available`, k: [{ r: 'label', t: label }] })
+ const tree: AxNode = { r: 'frame', k: [{ r: 'push button', i: 'hangup-button', t: 'Leave' }, tile('Alex Morgan', '(You)'), tile('Dana Smith', 'DS')] }
+ for (let t = 1_000_000; t < 1_005_000; t += 500) s.emit({ t, app: 'ms-teams.exe', windows: [{ title: 'Weekly | Microsoft Teams', tree }] })
+ s.stop(); s.transcribed()
+ await s.hook.finished(s.m.id)
+ expect(s.store.segments(s.m.id).map((x) => x.speaker)).toEqual(['Dana Smith'])
+ })
+
it('reads Webex roster names during a call', () => {
const s = setup({ app: 'Webex' })
s.start()
diff --git a/app/test/callParse.test.ts b/app/test/callParse.test.ts
index 605af69f..8da1b19a 100644
--- a/app/test/callParse.test.ts
+++ b/app/test/callParse.test.ts
@@ -371,6 +371,14 @@ describe('new Teams in English on Windows (#83)', () => {
const r = readCall('teams', [enMeeting([enTile('Alex Morgan (You)'), enVideo('Dana Smith', 'Unmuted'), enTile('Dana Smith')])])
expect(r).toEqual({ speaking: [], participants: ['Alex Morgan', 'Dana Smith'], me: 'Alex Morgan' })
})
+ it('reads a tile whose label inside is not the name: "(You)" there is my own tile, anything else is just the name before it (#83, 18:30)', () => {
+ const mine = node('menu item', { t: `Alex Morgan, video is on, ${EN_TITLE}, Context menu is available` }, node('label', { t: '(You)' }))
+ const dana = node('menu item', { t: `Dana Smith, video is off, ${EN_TITLE}, Context menu is available` }, node('label', { t: 'DS' }))
+ expect(readCall('teams', [enMeeting([mine, dana])])).toEqual({ speaking: [], participants: ['Alex Morgan', 'Dana Smith'], me: 'Alex Morgan' })
+ // a label that starts the tile's words but runs on into something else is still no name
+ const odd = node('menu item', { t: `Dana Smith Contoso, video is on, ${EN_TITLE}, Context menu is available` }, node('label', { t: 'Dana Smith' }))
+ expect(readCall('teams', [enMeeting([odd])]).participants).toEqual([])
+ })
it('one other tile alone in a meeting names nobody: a bigger meeting with the chat open shows one tile too (#83, 15:30)', () => {
expect(readCall('teams', [enMeeting([enVideo('Dana Smith', 'Unmuted'), enTile('Dana Smith')])]).speaking).toEqual([])
})