すべてのプロダクト
Search
ドキュメントセンター

Alibaba Cloud Model Studio:サーバーイベント

最終更新日:Dec 25, 2025

この Topic では、Qwen-Omni-Realtime API のサーバーサイドイベントについて説明します。

詳細については、リアルタイムマルチモーダルをご参照ください。

error

サーバーから返されるエラーメッセージです。

event_id string

このイベントの一意の識別子です。

{
  "event_id": "event_RoUu4T8yExPMI37GKwaOC",
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_value",
    "message": "Invalid modalities: ['audio']. Supported combinations are: ['text'] and ['audio', 'text'].",
    "param": "session.modalities"
  }
}

type string

イベントタイプです。値は常に error です。

error object

エラーの詳細情報です。

プロパティ

type string

エラータイプです。

code string

エラーコードです。

message string

エラーメッセージです。

param string

エラーに関連付けられたパラメーター (例: session.modalities)。

session.created

クライアントが接続すると、サーバーは最初にこのイベントを返します。このイベントには、セッションのデフォルト構成が含まれています。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_RdvlSpbBb2ssyBjYrDHjt",
    "type": "session.created",
    "session": {
        "object": "realtime.session",
        "model": "qwen3-omni-flash-realtime",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "input_audio_format": "pcm16",
        "output_audio_format": "pcm24",
        "input_audio_transcription": {
            "model": "gummy-realtime-v1"
        },
        "turn_detection": {
            "type": "server_vad",
            "threshold": 0.5,
            "prefix_padding_ms": 300,
            "silence_duration_ms": 800,
            "create_response": true,
            "interrupt_response": true
        },
        "tools": [],
        "tool_choice": "auto",
        "temperature": 0.8,
        "id": "sess_Ov7GOXoNXhNjlxXtOGKQS"
    }
}

type string

イベントタイプ。値は常に session.created です。

session object

セッションの構成です。

プロパティ

object string

値は常に realtime.session です。

model string

使用されるモデルです。

modalities array

モデルの出力モダリティ設定です。

voice string

モデルによって生成されるオーディオの音色です。

input_audio_format string

入力音声のフォーマットです。値は常に pcm16 です。

output_audio_format string

モデルから出力されるオーディオのフォーマットです:

  • Qwen3-Omni-Flash-Realtime: pcm24 にのみ設定できます。

  • Qwen-Omni-Turbo-Realtime: pcm16 のみをサポートします。

input_audio_transcription object

音声文字起こしの構成です。

プロパティ

model string

音声文字起こしモデル。値は常に gummy-realtime-v1 です。

turn_detection object

音声区間検出 (VAD) の構成です。

プロパティ

type string

サーバーサイド VAD のタイプです。値は常に server_vad です。

threshold float

VAD 検出のしきい値です。

silence_duration_ms integer

発話の終了を検出するための無音の継続時間です。

temperature float

モデルの温度パラメーターです。

session.updated

サーバーは、ユーザーからの session.update リクエストの処理に成功すると、このイベントを返します。リクエストが失敗した場合、サーバーは error イベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_X1HsXS4b4uptp6yo1LgKd",
    "type": "session.updated",
    "session": {
        "id": "sess_Aih6vAcY5Ddt6jwFx1tCa",
        "object": "realtime.session",
        "model": "qwen3-omni-flash-realtime",
        "modalities": [
            "text",
            "audio"
        ],
        "instructions": "あなたはシャオユンという名前のパーソナルアシスタントです。ユーザーの質問に正確かつフレンドリーに、常に親切な態度で答えてください。",
        "voice": "Cherry",
        "input_audio_format": "pcm16",
        "output_audio_format": "pcm24",
        "input_audio_transcription": {
            "model": "gummy-realtime-v1"
        },
        "turn_detection": {
            "type": "server_vad",
            "threshold": 0.1,
            "prefix_padding_ms": 500,
            "silence_duration_ms": 900,
            "create_response": true,
            "interrupt_response": true
        },
        "temperature": 0.8,
        "max_response_output_token": "inf",
        "max_tokens": 16384,
        "repetition_penalty": 1.05,
        "presence_penalty": 0.0,
        "top_k": 50,
        "top_p": 1.0,
        "seed":-1
    }
}

type string

イベントタイプ。値は常に session.updated です。

session object

セッションの構成です。

プロパティ

temperature float

モデルの温度パラメーターです。

modalities array

モデルの出力モダリティ設定です。

voice string

モデルによって生成されるオーディオの音色です。

instructions string

モデルの目的とロールです。

input_audio_format string

入力音声のフォーマット。値は常に pcm16 です。

output_audio_format string

出力音声のフォーマットです。値は常に pcm24 です。

input_audio_transcription object

音声文字起こしの構成です。

プロパティ

model string

音声文字起こしモデル。値は常に gummy-realtime-v1 です。

turn_detection object

VAD の構成です。

プロパティ

type string

サーバーサイド VAD のタイプです。値は常に server_vad です。

threshold float

VAD 検出のしきい値です。

silence_duration_ms integer

発話の終了を検出するための無音の継続時間です。

top_pfloat

ニュークリアスサンプリングの確率のしきい値です。

top_k integer

モデル生成時のサンプリングにおける候補セットのサイズです。

max_tokens integer

現在のリクエストに対してモデルが返すことができるトークンの最大数です。

repetition_penalty float

モデル生成時に連続するシーケンスの繰り返し度合いを制御します

presence_penalty float

モデルがコンテンツを生成する際の繰り返し度合いを制御します。

seed integer

各リクエストの結果の一貫性の度合いです。

input_audio_buffer.speech_started

VAD モードでは、サーバーはオーディオバッファー内で発話の開始を検出すると、このイベントを返します。

このイベントは、サーバーが発話を検出する前にオーディオがバッファーに追加されるたびにもトリガーされます。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_Pvp8nEhsQuGCQbFJ9x58n",
    "type": "input_audio_buffer.speech_started",
    "audio_start_ms": 3647,
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

type string

イベントタイプです。値は常に input_audio_buffer.speech_started です。

audio_start_ms integer

オーディオバッファーがデータの受信を開始してから、最初に発話が検出されるまでの時間 (ミリ秒) です。

item_id string

発話が停止したときに作成されるユーザーメッセージ項目の ID です。

ユーザーメッセージ項目は、後続のモデル推論と生成のために、ユーザー入力を会話履歴に追加するために使用されます。

input_audio_buffer.speech_stopped

VAD モードでは、サーバーはオーディオバッファー内で発話の終了を検出すると、このイベントを返します。

同時に、サーバーは conversation.item.created イベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_UhQiqNVRsgUiq4KUS5Xb5",
    "type": "input_audio_buffer.speech_stopped",
    "audio_end_ms": 4453,
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

type string

イベントのタイプ。値は常に input_audio_buffer.speech_stopped です。

audio_end_ms integer

セッションの開始から発話が停止するまでの時間 (ミリ秒) です。

item_id string

作成されるユーザーメッセージ項目の ID です。

input_audio_buffer.committed

このイベントは、入力オーディオバッファーがコミットされたときに返されます。

  • VAD モードでは、サーバーはユーザーの発話が終了したことを検出すると、自動的にオーディオバッファーをコミットし、このイベントを返します。

  • 手動モードでは、クライアントがinput_audio_buffer.commit イベントを送信した後に、サーバーはこのイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_Iy6sUzL1nmdFgshFYxJEz",
    "type": "input_audio_buffer.committed",
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

type string

イベントタイプ。値は常に input_audio_buffer.committed です。

item_id string

作成されるユーザーメッセージ項目の ID です。

input_audio_buffer.cleared

サーバーは、クライアントが input_audio_buffer.clear イベントを送信した後にこのイベントを返します。

event_id string

このイベントの一意の識別子です。

{
  "event_id": "event_RoUu4T8yExPMI37GKwaOC",
  "type": "input_audio_buffer.cleared"
}

type string

イベントタイプです。値は常に input_audio_buffer.cleared です。

conversation.item.created

このイベントは、会話項目が作成されたときに返されます。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_JEfkrr9gO3Ny7Xcv9bGVd",
    "type": "conversation.item.created",
    "item": {
        "id": "item_YbAiGvK2H7YaS34o4R6Ba",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": [
            {
                "type": "input_audio"
            }
        ]
    }
}

type string

イベントタイプ。値は常に conversation.item.created となります。

item object

会話に追加する項目です。

プロパティ

id string

会話項目の一意の ID です。

object string

値は常に realtime.item です。

status string

会話項目のステータスです。

role string

メッセージのロールです。

content string

メッセージのコンテンツです。

conversation.item.input_audio_transcription.completed

このイベントは、ユーザーのバッファリングされた音声の文字起こしを提供します。その文字起こしは、現在 gummy-realtime-v1 である個別の音声認識モデルによって処理されます。

音声認識モデルからの文字起こしされたテキストは、Qwen-Omni-Realtime モデルによって処理されるテキストとは異なる場合があり、参考用です。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_FrrZcxiDfTB9LD9p4pVng",
    "type": "conversation.item.input_audio_transcription.completed",
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba",
    "content_index": 0,
    "transcript": "Hello."
}

type string

イベントタイプです。値は常に conversation.item.input_audio_transcription.completed です。

item_id string

ユーザーメッセージ項目の ID です。

content_index integer

値は常に 0 です。

transcript string

文字起こしされたテキストです。

conversation.item.input_audio_transcription.failed

入力音声の文字起こしが有効な状態で失敗した場合、サーバーはこのイベントを返します。このイベントは error イベントとは異なり、クライアントが失敗の具体的な原因を特定するのに役立ちます。

event_id string

このイベントの一意の識別子です。

{
  "type": "conversation.item.input_audio_transcription.failed",
  "item_id": "<item_id>",
  "content_index": 0,
  "error": {
    "code": "<code>",
    "message": "<message>",
    "param": "<param>"
  }
}

type string

イベントタイプ。値は常に conversation.item.input_audio_transcription.failed です。

item_id string

ユーザーメッセージ項目の ID です。

content_index integer

値は常に 0 です。

error object

エラーメッセージです。

プロパティ

code string

エラーコードです。

message string

エラーメッセージです。

param string

エラーに関連するパラメーターです。

response.created

サーバーは、新しいモデル応答を生成するときにこのイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_XuDavMzQN3KKepqGu3KRh",
    "type": "response.created",
    "response": {
        "id": "resp_HaVOPdbmX6vifiV5pAfJY",
        "object": "realtime.response",
        "conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
        "status": "in_progress",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "output_audio_format": "pcm24",
        "output": []
    }
}

type string

イベントタイプです。値は常に response.created です。

response object

応答オブジェクトです。

プロパティ

id string

応答の一意の ID です。

conversation_id string

現在のセッションの一意の ID です。

object string

オブジェクトタイプです。このイベントでは、値は常に realtime.response です。

status string

応答のステータス。有効な値は completed、failed、in_progress、または incomplete です。

modalities array

応答のモダリティです。

voice string

モデルによって生成されるオーディオの音色です。

output string

このイベントでは、このフィールドは空です。

response.done

応答の生成が完了すると、サーバーはこのイベントを返します。イベント内の response オブジェクトには、生の音声データを除くすべての出力項目が含まれています。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_CSaxRRYLvbrfexDXAEuDG",
    "type": "response.done",
    "response": {
        "id": "resp_HaVOPdbmX6vifiV5pAfJY",
        "object": "realtime.response",
        "conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
        "status": "completed",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "output_audio_format": "pcm24",
        "output": [
            {
                "id": "item_Ls6MtCUWO7LM4E59QziNv",
                "object": "realtime.item",
                "type": "message",
                "status": "completed",
                "role": "assistant",
                "content": [
                    {
                        "type": "audio",
                        "transcript": "Hello! Is there anything I can help you with?"
                    }
                ]
            }
        ],
        "usage": {
            "total_tokens": 377,
            "input_tokens": 336,
            "output_tokens": 41,
            "input_tokens_details": {
                "text_tokens": 228,
                "audio_tokens": 108
            },
            "output_tokens_details": {
                "text_tokens": 9,
                "audio_tokens": 32
            }
        }
    }
}

type string

イベントタイプです。値は常に response.done です。

response object

応答オブジェクトです。

プロパティ

id string

応答の一意の ID です。

conversation_id string

現在のセッションの一意の ID です。

object string

オブジェクトタイプです。このイベントでは、値は常に realtime.response です。

status string

応答のステータスです。

modalities array

応答モダリティです。

voice string

モデルによって生成されるオーディオの音色です。

output object

応答の出力です。

プロパティ

id string

応答出力の ID です。

type string

出力項目のタイプ。値は常にメッセージです。

object string

出力アイテムのオブジェクトタイプ。値は常に realtime.item です。

status string

出力項目のステータスです。

role string

出力項目のロールです。

content array

出力項目のコンテンツです。

プロパティ

type string

出力内容のタイプです。値は、出力がプレーンテキストの場合は text、音声を含む場合は audio です。

text string

出力テキストです。

transcript string

オーディオから文字起こしされたテキストです。

usage object

この応答のトークン使用量の詳細です。

response.text.delta

出力モダリティがテキストのみで、モデルが段階的にテキストを生成する場合、サーバーはこのイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "delta": "Hello",
    "event_id": "event_TH49MauuPmRo1RGaMSlP7",
    "type": "response.text.delta",
    "response_id": "resp_PrRSvPVpnCExdUOGHHLuP",
    "item_id": "item_L8IRm9kRXFpxoOjDqDC96",
    "output_index": 0,
    "content_index": 0
}

type string

イベントタイプ。値は常に response.text.delta です。

delta string

差分テキストです。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。この ID を使用して、同じメッセージの項目を関連付けることができます。

output_index integer

応答内の出力項目のインデックスです。値は常に 0 です。

content_index integer

出力項目内のコンテンツパートのインデックスです。値は常に 0 です。

response.text.done

出力モダリティがテキストのみで、モデルがテキストの生成を終了した場合、サーバーはこのイベントを返します。

このイベントは、応答が中断された、未完了、またはキャンセルされた場合にも返されます。

event_id string

このイベントの一意の識別子です。

{
  "event_id": "event_B1lIeE2Nac33zn5V7h2mm",
  "type": "response.text.done",
  "response_id": "resp_B1lIdtjF4Noqpn5NOjznj",
  "item_id": "item_B1lIdJsAJlJiFs8ztWpJt",
  "output_index": 0,
  "content_index": 0,
  "text": "How can I assist you today?"
}

type string

イベントタイプ。値は常に response.text.done です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

content_indexinteger

応答で返されるインデックスです。

text string

モデルによって生成された完全なテキストです。

response.audio.delta

出力モダリティにオーディオが含まれ、モデルが段階的にオーディオデータを生成する場合、サーバーはこのイベントを返します。

event_id string

このイベントの一意の識別子です。

{
  "event_id": "event_B1osWMZBtrEQbiIwW0qHQ",
  "type": "response.audio.delta",
  "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
  "item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
  "output_index": 0,
  "content_index": 0,
  "delta": "{base64 audio}"
}

type string

イベントタイプ。値は常に response.audio.delta です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

content_indexinteger

応答のインデックスです。

delta string

モデルによって生成された、Base64 でエンコードされた差分オーディオデータです。

response.audio.done

出力モダリティにオーディオが含まれ、モデルがオーディオデータの生成を終了した場合、サーバーはこのイベントを返します。

このイベントは、応答が中断された、未完了、またはキャンセルされた場合にも返されます。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_Le1TDl7VfyHQxl47DtGxI",
    "type": "response.audio.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0
}

type string

イベントタイプ。値は常に response.audio.done となります。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

content_indexinteger

出力項目内のコンテンツパートのインデックスです。

response.audio_transcript.delta

出力モダリティにオーディオが含まれている場合、モデルが対応するオーディオのテキストを増分的に生成するのに伴い、サーバーは response.audio_transcript.delta イベントを返します。

event_id string

イベントの一意の識別子です。

{
    "event_id": "event_BksW7fOwnyavZdDxIzZYM",
    "type": "response.audio_transcript.delta",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "delta": "Is there"
}

type string

イベントタイプです。値は response.audio_transcript.delta です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_index integer

出力のインデックスです。

content_index integer

コンテンツのインデックスです。

delta string

差分テキストです。

response.audio_transcript.done

出力モダリティにオーディオが含まれる場合、サーバーは、モデルがオーディオの文字起こしを完了したときに response.audio_transcript.done イベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_X49tL2WerT4WjxcmH16lS",
    "type": "response.audio_transcript.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "transcript": "Hello! Is there anything I can help you with?"
}

type string

イベントタイプです。値は常に response.audio_transcript.done です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

content_indexinteger

出力項目内のコンテンツパートのインデックスです。

transcript string

完全なテキストです。

response.output_item.added

サーバーは、応答生成中に新しい項目が作成されると、このイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_DsCO341DEVtiATtCB6BUY",
    "type": "response.output_item.added",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "output_index": 0,
    "item": {
        "id": "item_Ls6MtCUWO7LM4E59QziNv",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": []
    }
}

type string

イベントタイプです。値は常に response.output_item.added です。

response_id string

応答の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

itemobject

出力項目に関する情報です。

プロパティ

id string

出力項目の一意の ID です。

object string

値は常に realtime.item となります。

status string

出力項目のステータスです。

role string

メッセージ送信者のロールです。

content string

メッセージのコンテンツです。

response.output_item.done

サーバーは、新しい項目の出力が完了すると、このイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_MEu5nlLw1LsOguHiehIP8",
    "type": "response.output_item.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "output_index": 0,
    "item": {
        "id": "item_Ls6MtCUWO7LM4E59QziNv",
        "object": "realtime.item",
        "type": "message",
        "status": "completed",
        "role": "assistant",
        "content": [
            {
                "type": "audio",
                "text": "Hello! Is there anything I can help you with?"
            }
        ]
    }
}

type string

イベントタイプ。値は常に response.output_item.done です。

response_id string

応答の ID です。

output_indexinteger

応答内の出力項目のインデックスです。

itemobject

出力項目に関する情報です。

プロパティ

id string

出力項目の一意の ID です。

object string

値は常に realtime.item です。

status string

出力項目のステータスです。

role string

メッセージ送信者のロールです。

content string

メッセージのコンテンツです。

response.content_part.added

サーバーは、応答生成中に新しいコンテンツパートがアシスタントメッセージ項目に追加されると、このイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_AVBOmrgY3C8bjlRajfSUT",
    "type": "response.content_part.added",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": ""
    }
}

type string

イベントタイプ。値は常に response.content_part.added です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。値は常に 0 です。

content_indexinteger

出力項目内のコンテンツパートのインデックスです。値は常に 0 です。

partobject

コンテンツパートに関する情報です。

プロパティ

type string

コンテンツパートのタイプです。

text string

コンテンツパートのテキストです。

response.content_part.done

サーバーは、アシスタントメッセージ項目内のコンテンツパートのストリーミングが完了すると、このイベントを返します。

event_id string

このイベントの一意の識別子です。

{
    "event_id": "event_Il8HD19v58Qr5IBkw7LtN",
    "type": "response.content_part.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": "Hello! Is there anything I can help you with?"
    }
}

type string

イベントタイプです。値は常に response.content_part.done です。

response_id string

応答の ID です。

item_id string

メッセージ項目の ID です。

output_indexinteger

応答内の出力項目のインデックスです。値は常に 0 です。

content_indexinteger

項目内のコンテンツ配列におけるコンテンツパートのインデックスです。値は常に 0 です。

partobject

コンテンツパートに関する情報です。

プロパティ

type string

コンテンツパートのタイプです。

text string

コンテンツパートのテキストです。