openclaw - 💡(How to fix) Fix [Feature]: feat(volcengine): Doubao Realtime voice provider via gateway-relay transport

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…

Add Volcengine Doubao Realtime as a talk.realtime.provider, using the gateway-relay transport over the Doubao Realtime Dialog API (WebSocket-based, end-to-end speech).

This is the Volcengine equivalent of the existing OpenAI realtime provider.


Error Message

The implementation includes 12 unit tests for the binary protocol encode/decode logic and a fix for an edge-case bug in error frame decoding.

Root Cause

Add Volcengine Doubao Realtime as a talk.realtime.provider, using the gateway-relay transport over the Doubao Realtime Dialog API (WebSocket-based, end-to-end speech).

This is the Volcengine equivalent of the existing OpenAI realtime provider.


Code Example

capabilities: {
  transports: ["gateway-relay"],
  inputAudioFormats: ["pcm16-24khz"],
  outputAudioFormats: ["pcm16-24khz"],
  supportsBargeIn: true,
  supportsToolCalls: false,
  supportsSessionResumption: false,
}

---

{
  "talk": {
    "realtime": {
      "provider": "volcengine",
      "providers": {
        "volcengine": {
          "appId": "<volcengine-app-id>",
          "accessKey": "<volcengine-access-key>",
          "model": "1.2.1.1",           // optional, defaults to "1.2.1.1"
          "speaker": "zh_female_vv_jupiter_bigtts"  // optional
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Add Volcengine Doubao Realtime as a talk.realtime.provider, using the gateway-relay transport over the Doubao Realtime Dialog API (WebSocket-based, end-to-end speech).

This is the Volcengine equivalent of the existing OpenAI realtime provider.


Problem

Users with Volcengine / Doubao API access cannot use native speech-to-speech Talk mode. The existing volcengine plugin supports text LLM and TTS, but has no realtime voice provider.


Proposed Solution

Implement a gateway-relay provider plugin under extensions/volcengine/:

FileDescription
realtime-voice-protocol.tsBinary frame encode/decode for the Doubao Realtime Dialog binary protocol
realtime-voice-bridge.tsWebSocket bridge: connection lifecycle, event routing, PCM 24 kHz→16 kHz resampling
realtime-voice-provider.tsRealtimeVoiceProviderPlugin implementation

Capabilities

capabilities: {
  transports: ["gateway-relay"],
  inputAudioFormats: ["pcm16-24khz"],
  outputAudioFormats: ["pcm16-24khz"],
  supportsBargeIn: true,
  supportsToolCalls: false,
  supportsSessionResumption: false,
}

Configuration

{
  "talk": {
    "realtime": {
      "provider": "volcengine",
      "providers": {
        "volcengine": {
          "appId": "<volcengine-app-id>",
          "accessKey": "<volcengine-access-key>",
          "model": "1.2.1.1",           // optional, defaults to "1.2.1.1"
          "speaker": "zh_female_vv_jupiter_bigtts"  // optional
        }
      }
    }
  }
}

Implementation

A ready-to-review branch is available: shushushv/feat/volcengine-realtime.

The implementation includes 12 unit tests for the binary protocol encode/decode logic and a fix for an edge-case bug in error frame decoding.


Notes

  • The X-Api-App-Key header value is a protocol-level fixed constant per Volcengine official documentation — not a user secret.
  • No WebRTC involved; this uses the existing gateway-relay transport path already established by the OpenAI realtime provider.
  • The Doubao Realtime API endpoint: wss://openspeech.bytedance.com/api/v3/realtime/dialogue

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]: feat(volcengine): Doubao Realtime voice provider via gateway-relay transport