Skip to content

Commit de205f1

Browse files
committed
feat(meetings): add Linux audio routing
1 parent 14006a4 commit de205f1

71 files changed

Lines changed: 2552 additions & 666 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/plugins/google-meet.md‎

Lines changed: 35 additions & 22 deletions
Large diffs are not rendered by default.

‎docs/plugins/meeting-plugins.md‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ summary: "Choose and configure Google Meet, Microsoft Teams, or Zoom meeting par
33
read_when:
44
- You want an OpenClaw agent to join a video meeting
55
- You are choosing between the Google Meet, Microsoft Teams meetings, and Zoom meetings plugins
6-
- You need the shared Chrome, BlackHole, SoX, or meeting-mode setup
6+
- You need the shared Chrome, virtual-audio, or meeting-mode setup
77
title: "Meeting plugins"
88
---
99

@@ -25,11 +25,11 @@ Choose Google Meet when you need meeting creation, Google API artifacts, or a Tw
2525

2626
The three plugins share the same modes:
2727

28-
| Mode | Behavior | Audio requirements |
29-
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
30-
| `agent` | Realtime transcription goes to the configured OpenClaw agent; regular OpenClaw TTS speaks the reply. | Chrome talk-back requires the BlackHole and SoX bridge. |
31-
| `bidi` | A realtime voice model listens and replies directly. | Chrome talk-back requires the BlackHole and SoX bridge. |
32-
| `transcribe` | Joins observe-only and exposes a bounded live-caption transcript when the platform provides captions. | No BlackHole or SoX talk-back bridge. |
28+
| Mode | Behavior | Audio requirements |
29+
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
30+
| `agent` | Realtime transcription goes to the configured OpenClaw agent; regular OpenClaw TTS speaks the reply. | Chrome talk-back requires a supported virtual-audio backend. |
31+
| `bidi` | A realtime voice model listens and replies directly. | Chrome talk-back requires a supported virtual-audio backend. |
32+
| `transcribe` | Joins observe-only and exposes a bounded live-caption transcript when the platform provides captions. | No virtual-audio bridge. |
3333

3434
Use `transcribe` when the agent only needs meeting text. Use `agent` for normal OpenClaw reasoning and tools. Use `bidi` when low-latency direct voice is more important than routing each turn through the regular agent.
3535

@@ -55,7 +55,7 @@ Chrome can run on the Gateway host or on a paired node. A remote Chrome node mus
5555
| Microsoft Teams | `teamsmeetings.chrome` |
5656
| Zoom | `zoommeetings.chrome` |
5757

58-
For `agent` or `bidi` mode through Chrome, run Chrome on macOS and install the shared audio dependencies on that same host:
58+
For `agent` or `bidi` mode through Chrome, install the native audio dependencies on the host that runs Chrome. On macOS:
5959

6060
```bash
6161
brew install blackhole-2ch sox
@@ -64,6 +64,18 @@ system_profiler SPAudioDataType | grep -i BlackHole
6464
command -v sox
6565
```
6666

67+
On a Linux desktop with PipeWire-Pulse, install the PulseAudio command-line tools. OpenClaw creates and reuses an `OpenClaw Meeting Audio` null sink and matching source in the desktop user's audio session:
68+
69+
```bash
70+
# Debian/Ubuntu
71+
sudo apt install pipewire-audio pulseaudio-utils
72+
systemctl --user --now enable pipewire pipewire-pulse wireplumber
73+
pactl info
74+
command -v pactl pacat parec
75+
```
76+
77+
Run the Gateway or paired node as the same desktop user that runs Chrome. A root service or headless service without that user's `XDG_RUNTIME_DIR` cannot access the PipeWire-Pulse socket and fails setup with an actionable error.
78+
6779
The Gateway host still owns the OpenClaw agent and model credentials when Chrome runs on a paired node. Configure a realtime transcription provider and OpenClaw TTS for `agent` mode, or a realtime voice provider for `bidi` mode. The platform guides contain the provider and audio-command options.
6880

6981
## Install or disable plugins
@@ -97,7 +109,7 @@ Restart the Gateway if your plugin-management path does not restart it automatic
97109

98110
Treat any failed setup check as a blocker for that transport and mode. For an observe-only smoke test, select `transcribe` mode and confirm that status reports an in-call session before expecting caption text.
99111

100-
For talk-back smoke tests, verified speech requires more than bytes accepted by the playback command. The shared command-pair bridge correlates a bounded waveform fingerprint from the current output generation with audio returning on the BlackHole microphone capture path; Google Meet, Teams, and Zoom do not report `speechOutputVerified: true` when only the output-byte counter advances or unrelated participant audio is present.
112+
For talk-back smoke tests, verified speech requires more than bytes accepted by the playback command. The shared command-pair bridge correlates a bounded waveform fingerprint from the current output generation with audio returning on the selected virtual microphone capture path; Google Meet, Teams, and Zoom do not report `speechOutputVerified: true` when only the output-byte counter advances or unrelated participant audio is present.
101113

102114
## Handle platform policy prompts
103115

‎docs/plugins/teams-meetings.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
summary: "Microsoft Teams meetings plugin: join work or consumer meetings as a Chrome browser guest"
33
read_when:
44
- You want an OpenClaw agent to join a Microsoft Teams meeting
5-
- You are configuring Chrome, BlackHole, or SoX for Teams meeting talk-back
5+
- You are configuring Chrome or virtual audio for Teams meeting talk-back
66
title: "Microsoft Teams meetings plugin"
77
---
88

99
The `teams-meetings` plugin joins Microsoft Teams links as a guest in the OpenClaw Chrome profile. It accepts work links under `teams.microsoft.com/l/meetup-join/...` and consumer links under `teams.live.com/meet/...`. It does not create meetings, dial in, call Microsoft Graph, or capture audio/video recordings.
1010

1111
## Setup
1212

13-
Talk-back uses the same local audio prerequisites as the [Google Meet plugin](/plugins/google-meet): macOS, the `BlackHole 2ch` virtual audio device, and SoX.
13+
Talk-back uses the shared [meeting-plugin audio setup](/plugins/meeting-plugins#prepare-chrome-and-audio): `BlackHole 2ch` plus SoX on macOS, or PipeWire-Pulse plus `pactl`/`pacat`/`parec` on Linux.
1414

1515
```bash
1616
openclaw plugins install @openclaw/teams-meetings
@@ -21,6 +21,13 @@ system_profiler SPAudioDataType | grep -i BlackHole
2121
command -v sox
2222
```
2323

24+
On Linux, verify the desktop user's PipeWire-Pulse session instead:
25+
26+
```bash
27+
pactl info
28+
command -v pactl pacat parec
29+
```
30+
2431
The plugin is enabled by default after installation. Add an entry only to customize it, then check setup:
2532

2633
```json5
@@ -45,7 +52,7 @@ openclaw teamsmeetings setup
4552
openclaw teamsmeetings join 'https://teams.microsoft.com/l/meetup-join/...'
4653
```
4754

48-
Use `chromeNode.node` to run Chrome, BlackHole, and SoX on a paired macOS node. The node must allow `teamsmeetings.chrome` and `browser.proxy`.
55+
Use `chromeNode.node` to run Chrome and its native virtual-audio backend on a paired macOS or Linux node. The node must allow `teamsmeetings.chrome` and `browser.proxy`; backend setup and generated commands resolve on that node, not on the Gateway host.
4956

5057
## Modes
5158

‎docs/plugins/zoom-meetings.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
summary: "Zoom meetings plugin: join meetings as a Chrome browser guest"
33
read_when:
44
- You want an OpenClaw agent to join a Zoom meeting
5-
- You are configuring Chrome, BlackHole, or SoX for Zoom meeting talk-back
5+
- You are configuring Chrome or virtual audio for Zoom meeting talk-back
66
title: "Zoom meetings plugin"
77
---
88

99
The `zoom-meetings` plugin joins Zoom meeting links as a guest through the Zoom Web App in the OpenClaw Chrome profile. It accepts meeting links under `zoom.us/j/...` and account subdomains such as `example.zoom.us/j/...`. It does not create meetings, dial in, use the Zoom Meeting SDK, or capture audio/video recordings.
1010

1111
## Setup
1212

13-
Talk-back uses the same local audio prerequisites as the [Google Meet plugin](/plugins/google-meet): macOS, the `BlackHole 2ch` virtual audio device, and SoX.
13+
Talk-back uses the shared [meeting-plugin audio setup](/plugins/meeting-plugins#prepare-chrome-and-audio): `BlackHole 2ch` plus SoX on macOS, or PipeWire-Pulse plus `pactl`/`pacat`/`parec` on Linux.
1414

1515
```bash
1616
openclaw plugins install @openclaw/zoom-meetings
@@ -21,6 +21,13 @@ system_profiler SPAudioDataType | grep -i BlackHole
2121
command -v sox
2222
```
2323

24+
On Linux, verify the desktop user's PipeWire-Pulse session instead:
25+
26+
```bash
27+
pactl info
28+
command -v pactl pacat parec
29+
```
30+
2431
The plugin is enabled by default after installation. Add an entry only to customize it, then check setup:
2532

2633
```json5
@@ -45,7 +52,7 @@ openclaw zoommeetings setup
4552
openclaw zoommeetings join 'https://zoom.us/j/1234567890'
4653
```
4754

48-
Use `chromeNode.node` to run Chrome, BlackHole, and SoX on a paired macOS node. The node must allow `zoommeetings.chrome` and `browser.proxy`.
55+
Use `chromeNode.node` to run Chrome and its native virtual-audio backend on a paired macOS or Linux node. The node must allow `zoommeetings.chrome` and `browser.proxy`; backend setup and generated commands resolve on that node, not on the Gateway host.
4956

5057
## Modes
5158

‎extensions/google-meet/index.test.ts‎

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,9 @@ describe("google-meet plugin", () => {
960960
expect(config.defaultTransport).toBe("chrome");
961961
expect(config.defaultMode).toBe("agent");
962962
expect(config.chrome).toEqual({
963-
audioBackend: "blackhole-2ch",
963+
audioBackend: "auto",
964+
audioBridgeCommand: undefined,
965+
audioBridgeHealthCommand: undefined,
964966
launch: true,
965967
guestName: "OpenClaw Agent",
966968
reuseExistingTab: true,
@@ -990,6 +992,7 @@ describe("google-meet plugin", () => {
990992
"-L",
991993
"-",
992994
],
995+
audioInputCommandOverride: undefined,
993996
audioOutputCommand: [
994997
"sox",
995998
"-q",
@@ -1011,9 +1014,12 @@ describe("google-meet plugin", () => {
10111014
"coreaudio",
10121015
"BlackHole 2ch",
10131016
],
1017+
audioOutputCommandOverride: undefined,
10141018
bargeInRmsThreshold: 650,
10151019
bargeInPeakThreshold: 2500,
10161020
bargeInCooldownMs: 900,
1021+
bargeInInputCommand: undefined,
1022+
browserProfile: undefined,
10171023
});
10181024
expect(config.chromeNode).toEqual({});
10191025
expect(config.twilio).toEqual({});
@@ -1405,9 +1411,8 @@ describe("google-meet plugin", () => {
14051411
});
14061412
});
14071413

1408-
it("keeps the agent tool visible on non-macOS hosts but blocks local Chrome talk-back joins", async () => {
1414+
it("keeps local Chrome talk-back available on Linux and blocks unsupported hosts", () => {
14091415
const { cliRegistrations, methods, tools } = setup(undefined, { registerPlatform: "linux" });
1410-
const tool = getMeetTool({ tools });
14111416

14121417
expect(tools).toHaveLength(1);
14131418
expect(cliRegistrations).toHaveLength(1);
@@ -1418,10 +1423,7 @@ describe("google-meet plugin", () => {
14181423
raw: { action: "join" },
14191424
platform: "linux",
14201425
}),
1421-
).toBe(true);
1422-
1423-
const blocked = await tool.execute("id", { action: "join" });
1424-
expect(JSON.stringify(blocked)).toContain("local Chrome talk-back audio is macOS-only");
1426+
).toBe(false);
14251427

14261428
expect(
14271429
googleMeetPluginTesting.isGoogleMeetAgentToolActionUnsupportedOnHost({
@@ -1430,6 +1432,13 @@ describe("google-meet plugin", () => {
14301432
platform: "linux",
14311433
}),
14321434
).toBe(false);
1435+
expect(
1436+
googleMeetPluginTesting.isGoogleMeetAgentToolActionUnsupportedOnHost({
1437+
config: resolveGoogleMeetConfig({}),
1438+
raw: { action: "join" },
1439+
platform: "win32",
1440+
}),
1441+
).toBe(true);
14331442
expect(
14341443
googleMeetPluginTesting.isGoogleMeetAgentToolActionUnsupportedOnHost({
14351444
config: resolveGoogleMeetConfig({}),
@@ -2351,7 +2360,7 @@ describe("google-meet plugin", () => {
23512360
},
23522361
{
23532362
runCommandWithTimeoutHandler: async (argv) => {
2354-
if (argv[0] === "/usr/sbin/system_profiler") {
2363+
if (argv[0]?.endsWith("system_profiler")) {
23552364
return { code: 0, stdout: "BlackHole 2ch", stderr: "" };
23562365
}
23572366
return { code: 0, stdout: "", stderr: "" };
@@ -2577,7 +2586,7 @@ describe("google-meet plugin", () => {
25772586
it.each([
25782587
{
25792588
config: { defaultTransport: "chrome" },
2580-
failingCommand: "/usr/sbin/system_profiler",
2589+
failingCommand: "system_profiler",
25812590
expectedCheckId: "chrome-local-audio-device",
25822591
expectedMessage: "BlackHole 2ch audio device not found",
25832592
},
@@ -2607,11 +2616,9 @@ describe("google-meet plugin", () => {
26072616
await withPlatform("darwin", async () => {
26082617
const { tools } = setup(config, {
26092618
runCommandWithTimeoutHandler: async (argv) => {
2610-
if (argv[0] === "/usr/sbin/system_profiler") {
2619+
if (argv[0]?.endsWith("system_profiler")) {
26112620
const stdout =
2612-
failingCommand === "/usr/sbin/system_profiler"
2613-
? "Built-in Output"
2614-
: "BlackHole 2ch";
2621+
failingCommand === "system_profiler" ? "Built-in Output" : "BlackHole 2ch";
26152622
return { code: 0, stdout, stderr: "" };
26162623
}
26172624
if (argv[0] === "/bin/sh" && argv.at(-1) === failingCommand) {
@@ -3704,7 +3711,7 @@ describe("google-meet plugin", () => {
37043711
{
37053712
runCommandWithTimeoutHandler: async (argv) => {
37063713
events.push(`command:${argv.join(" ")}`);
3707-
return argv[0] === "/usr/sbin/system_profiler"
3714+
return argv[0]?.endsWith("system_profiler")
37083715
? { code: 0, stdout: "BlackHole 2ch", stderr: "" }
37093716
: { code: 0, stdout: "", stderr: "" };
37103717
},
@@ -3788,7 +3795,7 @@ describe("google-meet plugin", () => {
37883795
{
37893796
runCommandWithTimeoutHandler: async (argv) => {
37903797
events.push(`command:${argv.join(" ")}`);
3791-
return argv[0] === "/usr/sbin/system_profiler"
3798+
return argv[0]?.endsWith("system_profiler")
37923799
? { code: 0, stdout: "BlackHole 2ch", stderr: "" }
37933800
: { code: 0, stdout: "", stderr: "" };
37943801
},
@@ -4341,7 +4348,7 @@ describe("google-meet plugin", () => {
43414348
expect(joinElsewhere.click).not.toHaveBeenCalled();
43424349
});
43434350

4344-
it("uses the local Meet microphone control instead of remote participant mute buttons", async () => {
4351+
it("does not unmute local or remote microphones without a verified virtual input", async () => {
43454352
const makeButton = (label: string, disabled = false) => ({
43464353
disabled,
43474354
innerText: "",
@@ -4388,9 +4395,11 @@ describe("google-meet plugin", () => {
43884395
const result = JSON.parse(await inspect()) as { micMuted?: boolean; notes?: string[] };
43894396

43904397
expect(result.micMuted).toBe(true);
4391-
expect(localMic.click).toHaveBeenCalledTimes(1);
4398+
expect(localMic.click).not.toHaveBeenCalled();
43924399
expect(remoteMute.click).not.toHaveBeenCalled();
4393-
expect(result.notes).toContain("Attempted to turn on the Meet microphone for talk-back mode.");
4400+
expect(result.notes).not.toContain(
4401+
"Turned on the Meet microphone after verifying the virtual audio input.",
4402+
);
43944403
});
43954404

43964405
it.each(
@@ -4495,7 +4504,7 @@ describe("google-meet plugin", () => {
44954504
expect(health.speechReady).toBe(true);
44964505
});
44974506

4498-
it("preserves the paired-node bridge for an externally managed Meet session", async () => {
4507+
it("does not start an externally managed paired-node bridge without a recoverable tab", async () => {
44994508
const { chrome, nodesInvoke } = await runGoogleMeetJoinScenario(
45004509
{
45014510
defaultTransport: "chrome-node",
@@ -4511,14 +4520,14 @@ describe("google-meet plugin", () => {
45114520
);
45124521
expect(
45134522
matchingNodeInvocations(nodesInvoke, { command: "googlemeet.chrome", action: "start" }),
4514-
).toHaveLength(1);
4523+
).toHaveLength(0);
45154524
expect(
45164525
nodesInvoke.mock.calls.some(([rawCall]) => {
45174526
const call = requireRecord(rawCall, "node invoke");
45184527
return call.command === "browser.proxy";
45194528
}),
4520-
).toBe(false);
4521-
expect(requireRecord(chrome.audioBridge, "join audio bridge").type).toBe("external-command");
4529+
).toBe(true);
4530+
expect(chrome.audioBridge).toBeUndefined();
45224531
});
45234532

45244533
it("joins Chrome on a paired node without local Chrome or BlackHole", async () => {
@@ -6077,7 +6086,12 @@ describe("google-meet plugin", () => {
60776086
transport: "chrome",
60786087
found: true,
60796088
message: "Existing Meet tab is in-call.",
6080-
browser: { inCall: true, micMuted: false },
6089+
browser: {
6090+
inCall: true,
6091+
micMuted: false,
6092+
audioInputRouted: true,
6093+
audioOutputRouted: true,
6094+
},
60816095
});
60826096
try {
60836097
const runtime = createChromeLifecycleRuntime();
@@ -6188,6 +6202,8 @@ describe("google-meet plugin", () => {
61886202
? {
61896203
inCall: true,
61906204
micMuted: false,
6205+
audioInputRouted: true,
6206+
audioOutputRouted: true,
61916207
title: "Meet call",
61926208
url: MEET_URL,
61936209
}
@@ -6341,10 +6357,10 @@ describe("google-meet plugin", () => {
63416357
});
63426358

63436359
expectRespondedOk(respond);
6344-
expect(runCommandWithTimeout).toHaveBeenNthCalledWith(2, ["bridge", "status"], {
6360+
expect(runCommandWithTimeout).toHaveBeenCalledWith(["bridge", "status"], {
63456361
timeoutMs: 30000,
63466362
});
6347-
expect(runCommandWithTimeout).toHaveBeenNthCalledWith(3, ["bridge", "start"], {
6363+
expect(runCommandWithTimeout).toHaveBeenCalledWith(["bridge", "start"], {
63486364
timeoutMs: 30000,
63496365
});
63506366
const openRequests = callGatewayFromCli.mock.calls.filter((call) => {

‎extensions/google-meet/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export default definePluginEntry({
413413
name: "google_meet",
414414
label: "Google Meet",
415415
description:
416-
"Join and track Google Meet sessions through Chrome or Twilio. Call setup_status before join/create/test_listen/test_speech; if it reports a Chrome node offline, local audio missing, or missing Twilio dial plan, surface that blocker instead of retrying or switching transports. Twilio cannot dial a Meet URL directly: provide dialInNumber plus optional pin/dtmfSequence, or configure twilio.defaultDialInNumber. Offline nodes are diagnostics only, not usable candidates. If local Chrome talk-back audio is unsupported on this OS, use mode=transcribe, transport=twilio, or a macOS chrome-node for agent/bidi Chrome. If a Meet tab is already open after a timeout, call recover_current_tab before retrying join to report login, permission, or admission blockers without opening another tab.",
416+
"Join and track Google Meet sessions through Chrome or Twilio. Call setup_status before join/create/test_listen/test_speech; if it reports a Chrome node offline, local audio missing, or missing Twilio dial plan, surface that blocker instead of retrying or switching transports. Twilio cannot dial a Meet URL directly: provide dialInNumber plus optional pin/dtmfSequence, or configure twilio.defaultDialInNumber. Offline nodes are diagnostics only, not usable candidates. Local Chrome talk-back needs macOS with BlackHole 2ch or Linux with PipeWire-Pulse; otherwise use mode=transcribe, transport=twilio, or a supported chrome-node. If a Meet tab is already open after a timeout, call recover_current_tab before retrying join to report login, permission, or admission blockers without opening another tab.",
417417
parameters: GoogleMeetToolSchema,
418418
async execute(_toolCallId, params) {
419419
const raw = asParamRecord(params);

‎extensions/google-meet/node-host.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ describe("google-meet node host bridge sessions", () => {
349349
expect(typeof start.bridgeId).toBe("string");
350350
expect(start.bridgeId.length).toBeGreaterThan(0);
351351
expect(start).toEqual({
352+
audioBackend: "blackhole-2ch",
352353
audioBridge: { type: "node-command-pair", outputGeneration: true },
354+
audioDeviceLabel: "BlackHole 2ch",
353355
bridgeId: start.bridgeId,
354356
launched: false,
355357
});

0 commit comments

Comments
 (0)