




















@@ -79,16 +79,17 @@ provider and tool contracts where the behavior fits cleanly.
7979| Batch text-to-speech | `messages.tts.provider: "xai"` / `tts` | Yes |
8080| Streaming TTS | — | Not exposed; OpenClaw's TTS contract returns complete audio buffers |
8181| Batch speech-to-text | `tools.media.audio` / media understanding | Yes |
82-| Streaming speech-to-text | — | Not exposed; needs streaming transcription contract mapping |
82+| Streaming speech-to-text | Voice Call `streaming.provider: "xai"` | Yes |
8383| Realtime voice | — | Not exposed yet; different session/WebSocket contract |
8484| Files / batches | Generic model API compatibility only | Not a first-class OpenClaw tool |
85858686<Note>
8787OpenClaw uses xAI's REST image/video/TTS/STT APIs for media generation,
88-speech, and transcription, and the Responses API for model, search, and
89-code-execution tools. Features that need new OpenClaw contracts, such as
90-streaming STT or Realtime voice sessions, are documented here as upstream
91-capabilities rather than hidden plugin behavior.
88+speech, and batch transcription, xAI's streaming STT WebSocket for live
89+voice-call transcription, and the Responses API for model, search, and
90+code-execution tools. Features that need different OpenClaw contracts, such as
91+Realtime voice sessions, are documented here as upstream capabilities rather
92+than hidden plugin behavior.
9293</Note>
93949495### Fast-mode mappings
@@ -277,10 +278,54 @@ Legacy aliases still normalize to the canonical bundled ids:
277278surface, but the xAI REST STT integration only forwards file, model, and
278279language because those map cleanly to the current public xAI endpoint.
279280281+</Accordion>
282+283+<Accordion title="Streaming speech-to-text">
284+The bundled `xai` plugin also registers a realtime transcription provider
285+for live voice-call audio.
286+287+- Endpoint: xAI WebSocket `wss://api.x.ai/v1/stt`
288+- Default encoding: `mulaw`
289+- Default sample rate: `8000`
290+- Default endpointing: `800ms`
291+- Interim transcripts: enabled by default
292+293+Voice Call's Twilio media stream sends G.711 µ-law audio frames, so the
294+xAI provider can forward those frames directly without transcoding:
295+296+```json5
297+{
298+ plugins: {
299+ entries: {
300+ "voice-call": {
301+ config: {
302+ streaming: {
303+ enabled: true,
304+ provider: "xai",
305+ providers: {
306+ xai: {
307+ apiKey: "${XAI_API_KEY}",
308+ endpointingMs: 800,
309+ language: "en",
310+ },
311+ },
312+ },
313+ },
314+ },
315+ },
316+ },
317+}
318+```
319+320+Provider-owned config lives under
321+`plugins.entries.voice-call.config.streaming.providers.xai`. Supported
322+keys are `apiKey`, `baseUrl`, `sampleRate`, `encoding` (`pcm`, `mulaw`, or
323+`alaw`), `interimResults`, `endpointingMs`, and `language`.
324+280325<Note>
281-xAI also offers streaming STT over `wss://api.x.ai/v1/stt`. OpenClaw's
282-bundled xAI plugin does not expose that yet; the current provider is batch
283-STT for file/segment transcription.
326+This streaming provider is for Voice Call's realtime transcription path.
327+Discord voice currently records short segments and uses the batch
328+`tools.media.audio` transcription path instead.
284329</Note>
285330286331</Accordion>
@@ -362,9 +407,9 @@ Legacy aliases still normalize to the canonical bundled ids:
362407- `grok-4.20-multi-agent-experimental-beta-0304` is not supported on the
363408 normal xAI provider path because it requires a different upstream API
364409 surface than the standard OpenClaw xAI transport.
365-- xAI streaming STT and Realtime voice are not registered as OpenClaw
366- providers yet. Batch xAI STT is registered through media understanding.
367- Streaming STT and Realtime voice need WebSocket/session contract mapping.
410+- xAI Realtime voice is not registered as an OpenClaw provider yet. It
411+ needs a different bidirectional voice session contract than batch STT or
412+ streaming transcription.
368413- xAI image `quality`, image `mask`, and extra native-only aspect ratios are
369414 not exposed until the shared `image_generate` tool has corresponding
370415 cross-provider controls.
@@ -401,10 +446,10 @@ OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_TEST_QUIET=1 OPENCLAW_LIVE_IMAGE_GENERATION_P
401446```
402447403448The provider-specific live file synthesizes normal TTS, telephony-friendly PCM
404-TTS, transcribes audio through xAI STT, generates text-to-image output, and
405-edits a reference image. The shared image live file verifies the same xAI
406-provider through OpenClaw's runtime selection, fallback, normalization, and
407-media attachment path.
449+TTS, transcribes audio through xAI batch STT, streams the same PCM through xAI
450+realtime STT, generates text-to-image output, and edits a reference image. The
451+shared image live file verifies the same xAI provider through OpenClaw's
452+runtime selection, fallback, normalization, and media attachment path.
408453409454## Related
410455此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。