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

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

最終更新日:Nov 09, 2025

このトピックでは、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

出力音声フォーマットです。これは常に 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

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

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": "You are a personal assistant named Xiaoyun. Please answer user questions accurately and in a friendly manner, always responding with a helpful attitude.",
        "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, or 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

出力アイテムのタイプです。値は現在 message に設定されています。

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 anything"
}

type string

イベントタイプです。これは常に response.audio_transcript.delta です。

response_id string

応答の ID です。

item_id string

メッセージアイテムの ID です。

output_indexinteger

応答内の出力アイテムのインデックスです。

content_indexinteger

出力アイテム内のコンテンツ部分のインデックスです。

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

コンテンツ部分のテキストです。