xAI: Grok Voice 3.0
xAI's flagship realtime speech-to-speech voice agent over WebSockets, with reasoning on by default, low-latency turn-taking, interruptions and tool use such as web search.
バリアントモデル
同じ正規モデルファミリーに対して、作成者やプロバイダーが受け付けるネイティブのモデルIDです。
Pinned Grok Voice 3.0 release, selected via the model query param on /v1/realtime.
Alias that xAI points at its current flagship voice model, grok-voice-3.0 since 2026-10-14.
プロバイダー
同じモデルを複数のプロバイダーがホストしている場合があります。バックエンドを固定したい場合は1つのプロバイダーを選び、そうでなければルーティングに選択を任せられます。
対応言語
en
ar-EG
ar-SA
ar-AE
bn
zh
fr
de
hi
id
it
ja
ko
pt-BR
pt-PT
ru
es-MX
es-ES
tr
vi
機能
Bidirectional realtime speech-to-speech over WebSocket.
speech_to_speech
Natural conversational turn-taking.
turn_taking
Integrated tool calling (e.g. web search) during conversation.
tool_use
Optional transcription of input audio, biased by a language hint and key terms.
input_transcription
Reasoning is on by default and can be turned off per session with reasoning.effort none.
reasoning_effort
コード
OpenAI SDKによるリアルタイム音声変換
question.pcm(24 kHz・16ビット・モノラルPCM)をOpenAI Realtimeプロトコルで1ターンとして送信し、音声の返答をreply.pcmに保存します。
import { once } from "node:events";
import { readFile, writeFile } from "node:fs/promises";
import OpenAI from "openai";
import { OpenAIRealtimeWS } from "openai/realtime/ws";
const client = new OpenAI({
apiKey: process.env.ALLMODELS_API_KEY,
baseURL: "https://api.allmodels.io/oai"
});
const realtime = new OpenAIRealtimeWS({ model: "grok-voice-3.0" }, client);
const reply = [];
realtime.on("response.output_audio.delta", ({ delta }) => reply.push(Buffer.from(delta, "base64")));
realtime.on("response.done", async () => {
await writeFile("reply.pcm", Buffer.concat(reply));
realtime.close();
});
realtime.on("error", console.error);
if (realtime.socket.readyState !== 1) await once(realtime.socket, "open");
const format = { type: "audio/pcm", rate: 24000 };
realtime.send({
type: "session.update",
session: {
voice: "eve",
output_modalities: ["audio"],
turn_detection: { type: null },
audio: { input: { format }, output: { format } }
}
});
realtime.send({ type: "input_audio_buffer.append", audio: (await readFile("question.pcm")).toString("base64") });
realtime.send({ type: "input_audio_buffer.commit" });
realtime.send({ type: "response.create" });
