openclaw - 💡(How to fix) Fix Feature: per-agent realtime voice in voice-call plugin [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78190Fetched 2026-05-06 06:16:07
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
2
Timeline (top)
mentioned ×3subscribed ×3commented ×1

When using the voice-call plugin with OpenAI Realtime (bidirectional voice), all calls use a single global voice from realtime.providers.openai.voice. In a multi-agent setup where different agents handle different callers (via the callback transfer pattern), each agent should be able to have its own distinct OpenAI Realtime voice.

Root Cause

When using the voice-call plugin with OpenAI Realtime (bidirectional voice), all calls use a single global voice from realtime.providers.openai.voice. In a multi-agent setup where different agents handle different callers (via the callback transfer pattern), each agent should be able to have its own distinct OpenAI Realtime voice.

Code Example

const session = createRealtimeVoiceBridgeSession({
    provider: this.realtimeProvider,
    providerConfig: this.providerConfig,  // same for ALL calls
    instructions: this.config.instructions,
    ...
});

---

{
  "realtime": {
    "providers": {
      "openai": {
        "voice": "coral",  // default voice
        "model": "gpt-4o-realtime-preview"
      }
    },
    "agentVoices": {
      "main": "coral",
      "family-assistant": "ballad",
      "personal-assistant": "shimmer",
      "relationship-assistant": "echo",
      "research-assistant": "ash",
      "coder-assistant": "sage"
    }
  }
}

---

const agentId = effectiveConfig.agentId ?? "main";
const agentVoice = this.config.agentVoices?.[agentId];
const callProviderConfig = agentVoice
    ? { ...this.providerConfig, voice: agentVoice }
    : this.providerConfig;
RAW_BUFFERClick to expand / collapse

Summary

When using the voice-call plugin with OpenAI Realtime (bidirectional voice), all calls use a single global voice from realtime.providers.openai.voice. In a multi-agent setup where different agents handle different callers (via the callback transfer pattern), each agent should be able to have its own distinct OpenAI Realtime voice.

Current Behavior

realtime-handler creates every bridge session with the same providerConfig:

const session = createRealtimeVoiceBridgeSession({
    provider: this.realtimeProvider,
    providerConfig: this.providerConfig,  // same for ALL calls
    instructions: this.config.instructions,
    ...
});

All calls get the same voice regardless of which agent is handling the call.

Proposed Solution

Add a realtime.agentVoices config key that maps agentId → OpenAI voice name:

{
  "realtime": {
    "providers": {
      "openai": {
        "voice": "coral",  // default voice
        "model": "gpt-4o-realtime-preview"
      }
    },
    "agentVoices": {
      "main": "coral",
      "family-assistant": "ballad",
      "personal-assistant": "shimmer",
      "relationship-assistant": "echo",
      "research-assistant": "ash",
      "coder-assistant": "sage"
    }
  }
}

The handleCall() method already has access to agentId (line ~3004 in runtime-entry: const agentId = effectiveConfig.agentId ?? "main"). The fix would shallow-clone providerConfig and override voice when an agent-specific voice is configured:

const agentId = effectiveConfig.agentId ?? "main";
const agentVoice = this.config.agentVoices?.[agentId];
const callProviderConfig = agentVoice
    ? { ...this.providerConfig, voice: agentVoice }
    : this.providerConfig;

This covers:

  • Inbound calls: agent resolved from numbers[dialedNumber].agentId or default
  • Outbound calls: agentId from call metadata (already passed through)
  • Callback transfers: transfer_to_agent tool sets agentId on the outbound call

Use Case

Multi-agent voice system where ASANTE (receptionist, coral voice) answers all inbound calls, identifies the caller, and transfers to the appropriate agent via callback. Each agent should answer with their own distinct voice — Amma (family, ballad), Moneypenny (personal, shimmer), etc. This gives callers an immediate sense of who they are talking to.

Environment

  • OpenClaw: 2026.5.4
  • voice-call plugin: 2026.5.4
  • Realtime provider: OpenAI (gpt-4o-realtime-preview)
  • 7 agents, single Twilio number, callback transfer pattern

extent analysis

TL;DR

To fix the issue of all calls using a single global voice in a multi-agent setup, update the handleCall() method to use an agent-specific voice configuration.

Guidance

  • Update the realtime configuration to include an agentVoices key that maps agentId to OpenAI voice names.
  • Modify the handleCall() method to shallow-clone providerConfig and override the voice property with the agent-specific voice when available.
  • Use the agentId from the effectiveConfig to determine the agent-specific voice.
  • Test the updated configuration with different agents to verify that each agent uses their distinct voice.

Example

const agentId = effectiveConfig.agentId ?? "main";
const agentVoice = this.config.agentVoices?.[agentId];
const callProviderConfig = agentVoice
    ? { ...this.providerConfig, voice: agentVoice }
    : this.providerConfig;

Notes

This solution assumes that the agentId is correctly resolved for each call and that the agentVoices configuration is properly set up.

Recommendation

Apply the proposed solution by updating the handleCall() method and adding the agentVoices configuration to use distinct voices for each agent.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Feature: per-agent realtime voice in voice-call plugin [1 comments, 2 participants]