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.
TypeScript ai-meeting-assistantai-notetakerelectrongranola-alternativelinuxllama-cpplocal-ailocal-firstmacosmcpmeeting-minutesmeeting-notesoffline-firstopen-sourceprivacyspeech-to-texttranscriptionwhisperwhisper-cppwindows
Webex: speaker names from its participants list (#40)
Scorpionsess4615d883719c
diff --git a/app/src/main/callNames/index.ts b/app/src/main/callNames/index.tsindex 7e547f47..a470e958 100644--- a/app/src/main/callNames/index.ts+++ b/app/src/main/callNames/index.ts@@ -20,6 +20,7 @@ export type Watch = (ids: string[], onLine: (l: WatchLine) => void) => { stop():const APPS: Record<string, { kind: CallKind; ids: string[] }> = {Zoom: { kind: 'zoom', ids: ['us.zoom.xos', 'zoom', 'us.zoom.Zoom'] },Teams: { kind: 'teams', ids: ['com.microsoft.teams2', 'com.microsoft.teams', 'teams-for-linux', 'com.github.IsmaelMartinez.teams_for_linux'] },+ Webex: { kind: 'webex', ids: ['Cisco-Systems.Spark', 'com.cisco.webexmeetingsapp'] },Chrome: { kind: 'meet', ids: ['com.google.Chrome', 'chrome', 'google-chrome'] },Arc: { kind: 'meet', ids: ['company.thebrowser.Browser'] },Brave: { kind: 'meet', ids: ['com.brave.Browser', 'brave'] },diff --git a/app/src/main/callNames/parse.ts b/app/src/main/callNames/parse.tsindex 05dd6b5b..b47aef18 100644--- a/app/src/main/callNames/parse.ts+++ b/app/src/main/callNames/parse.ts@@ -8,7 +8,7 @@/** one element of the tree as the helper copies it: role, subrole, description, title, value, identifier, DOM classes, size */export type AxNode = { r: string; s?: string; d?: string; t?: string; v?: string; i?: string; c?: string[]; w?: number; h?: number; k?: AxNode[] }export type AxWindow = { title?: string; id?: string; tree: AxNode }-export type CallKind = 'zoom' | 'teams' | 'meet'+export type CallKind = 'zoom' | 'teams' | 'meet' | 'webex'export type CallReading = { speaking: string[]; participants: string[]; me: string | null }// A role has two names: macOS Accessibility says AXTabGroup, AXStaticText, AXRow, AXOutline; AT-SPI (Linux) says@@ -252,9 +252,43 @@ function readTeams(windows: AxWindow[]): CallReading {return { speaking: uniq(speaking), participants: uniq(participants.filter((p) => p.length >= 2)), me }}+// ---- Webex desktop app ----+// The meeting's Participants outline contains AXCell rows backed by GenericParticipantListCellView. Each person row+// describes its name, organization, and (when present) "speaking" / "me". With that panel closed, the floating video+// tile still marks its person as speaking in a fixed English shape; it is safe to use only that explicit mark.+const WEBEX_SPEAKING_TILE = /^(.+?),\s*,\s*,\s*speaking,\s*Video (?:on|off),?$/i+function readWebex(windows: AxWindow[]): CallReading {+ const speaking: string[] = [], participants: string[] = []+ let me: string | null = null+ for (const w of windows) {+ walk(w.tree, (n, up) => {+ if (n.r === 'AXGroup' && n.t) {+ const tile = WEBEX_SPEAKING_TILE.exec(n.t.normalize('NFKC').trim())+ if (tile && tile[1].trim().length >= 2 && tile[1].trim().length <= 60) speaking.push(tile[1].trim())+ }+ if (n.r !== 'AXCell' || !up.some((a) => a.r === 'AXOutline' && /^participants(?:\s|$)/i.test((a.d ?? a.t ?? '').trim()))) return+ let personRow = false, name: string | undefined+ const labels: string[] = []+ walk(n, (x) => {+ if (x.i === 'GenericParticipantListCellView') personRow = true+ labels.push(...texts(x))+ if (!name && STATIC_TEXT.has(x.r)) name = x.v ?? x.t+ })+ if (!personRow || !name) return+ name = name.normalize('NFKC').trim()+ if (name.length < 2 || name.length > 60) return+ const label = labels.join(', ').normalize('NFKC')+ participants.push(name)+ if (/(?:^|[,،]\s*)speaking(?:\s*[,،]|$)/i.test(label)) speaking.push(name)+ if (/(?:^|[,،]\s*)me(?:\s*[,،]|$)/i.test(label)) me = name+ })+ }+ return { speaking: uniq(speaking), participants: uniq(participants), me }+}+/** What the call app shows right now */export function readCall(kind: CallKind, windows: AxWindow[], o: { talkingClasses?: string[] } = {}): CallReading {- return kind === 'zoom' ? readZoom(windows) : kind === 'meet' ? readMeet(windows, o) : readTeams(windows)+ return kind === 'zoom' ? readZoom(windows) : kind === 'meet' ? readMeet(windows, o) : kind === 'webex' ? readWebex(windows) : readTeams(windows)}/**diff --git a/app/test/callNames.test.ts b/app/test/callNames.test.tsindex 5a6987a8..e25eea9c 100644--- a/app/test/callNames.test.ts+++ b/app/test/callNames.test.ts@@ -5,7 +5,7 @@ import { tmpdir } from 'node:os'import { join } from 'node:path'import { openStore, type Meeting, type Store } from '../src/main/store'import { hookCallNames, watchIds, type WatchLine } from '../src/main/callNames'-import type { AxNode } from '../src/main/callNames/parse'+import { readCall, type AxNode } from '../src/main/callNames/parse'const dirs: string[] = [], stores: Store[] = []afterEach(() => { stores.splice(0).forEach((s) => s.close()); dirs.splice(0).forEach((d) => rmSync(d, { recursive: true, force: true })) })@@ -18,6 +18,22 @@ const zoomLine = (t: number, people: string[], talking?: string, me?: string): W] } }],})+const webexWindows = (): WatchLine['windows'] => [{ title: 'Webex meeting', tree: { r: 'AXWindow', k: [{ r: 'AXOutline', d: 'Participants', k: [+ { r: 'AXCell', d: 'Participants group, 2 participants', k: [{ r: 'AXUnknown', i: 'GenericParticipantListGroupCellView' }] },+ { r: 'AXCell', d: '[email protected], Host, presenter, me, Muted, ', k: [+ { r: 'AXUnknown', i: 'GenericParticipantListCellView', d: '[email protected], Host, presenter, me, Muted, ' },+ { r: 'AXStaticText', v: '[email protected]' }, { r: 'AXStaticText', v: 'Host, presenter, me' },+ ] },+ { r: 'AXCell', d: 'Wilson Pei, apple.com, speaking, ', k: [+ { r: 'AXUnknown', i: 'GenericParticipantListCellView', d: 'Wilson Pei, apple.com, speaking, ' },+ { r: 'AXStaticText', v: 'Wilson Pei' }, { r: 'AXStaticText', v: 'apple.com' },+ ] },+] }] } }]+const webexFloatingWindows = (): WatchLine['windows'] => [{ title: 'Webex multitasking floating window', tree: { r: 'AXWindow', k: [{+ r: 'AXGroup', t: 'Wilson Pei, , , speaking, Video off, ', k: [{ r: 'AXStaticText', v: 'Wilson Pei' }],+}] } }]+const webexLine = (t: number): WatchLine => ({ t, app: 'Cisco-Systems.Spark', windows: webexWindows() })+function setup(o: { app?: string | null; attendees?: Meeting['attendees'] } = {}) {const root = mkdtempSync(join(tmpdir(), 'yogurt-callnames-')); dirs.push(root)const store = openStore(join(root, 'yogurt.db')); stores.push(store)@@ -52,6 +68,7 @@ describe('watchIds: only the call app the meeting is in', () => {it('maps the detected app to its ids (bundle ids on a Mac, program names and Flatpak ids on Linux); no app known: every call app (the first with a call is read)', () => {expect(watchIds('Zoom')).toEqual(['us.zoom.xos', 'zoom', 'us.zoom.Zoom'])expect(watchIds('Teams')).toEqual(['com.microsoft.teams2', 'com.microsoft.teams', 'teams-for-linux', 'com.github.IsmaelMartinez.teams_for_linux'])+ expect(watchIds('Webex')).toEqual(['Cisco-Systems.Spark', 'com.cisco.webexmeetingsapp'])expect(watchIds('Chrome')).toEqual(['com.google.Chrome', 'chrome', 'google-chrome'])expect(watchIds('Safari')).toEqual(['com.apple.Safari'])expect(watchIds('FaceTime')).toEqual([])@@ -61,6 +78,18 @@ describe('watchIds: only the call app the meeting is in', () => {})})+describe('Webex accessibility roster', () => {+ it('reads roster names, the speaking mark, and me while ignoring group rows', () => {+ expect(readCall('webex', webexWindows()!)).toEqual({+ speaking: ['Wilson Pei'], participants: ['[email protected]', 'Wilson Pei'], me: '[email protected]',+ })+ })++ it('reads the marked speaker from the floating video tile when the roster is closed', () => {+ expect(readCall('webex', webexFloatingWindows()!)).toEqual({ speaking: ['Wilson Pei'], participants: [], me: null })+ })+})+describe('hookCallNames', () => {it('a resumed session names only new lines and preserves previous speaker labels', async () => {const s = setup()@@ -85,6 +114,15 @@ describe('hookCallNames', () => {expect(s.hook.nameFor('other', 1500, 4000)).toBeNull()})+ it('reads Webex roster names during a call', () => {+ const s = setup({ app: 'Webex' })+ s.start()+ expect(s.watched).toEqual([['Cisco-Systems.Spark', 'com.cisco.webexmeetingsapp']])+ s.audio(0, 1_000_100)+ for (let t = 1_000_000; t < 1_005_000; t += 500) s.emit(webexLine(t))+ expect(s.hook.nameFor(s.m.id, 1000, 3000)).toBe('Wilson Pei')+ })+it('after the meeting every line of the other side is named again from the whole timeline; new people join the attendees', async () => {const s = setup({ attendees: [{ name: 'Dana Smith', email: '[email protected]' }] })s.start()