Skip to main content

Qwen-LiveTranslate-Realtime サーバーイベント

Qwen リアルタイム音声・音声映像翻訳 API のサーバーイベントの種類、パラメーター、例について説明します。

リファレンス: リアルタイム音声・動画翻訳 - Qwen
このページは Qwen-LiveTranslate-Realtime のイベントリファレンスです。イベント定義は WebSocket アクセスを基準としています。AOQ と WebRTC は、それぞれのデータチャネルでモデルイベントを送受信し、メディアトラックでメディアを転送します。最初に WebSocket アクセス、WebRTC アクセス、または AOQ アクセスをお読みください。
WebSocket SDK の使用方法は、Python SDKと Java SDKをご覧ください。モデルとプロトコルの選択は、概要をご覧ください。

error

サーバーから返されるエラーメッセージ。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に error です。errorobjectエラーに関する詳細情報。

プロパティ

typestringエラータイプ。codestringエラーコード。messagestringエラーメッセージ。paramstringエラーに関連するパラメーター。例:session.modalities。
{
  "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"
  }
}

session.created

クライアントが接続すると、サーバーはまずデフォルトのセッション構成でこのイベントを返します。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に session.created です。sessionobjectセッション構成。

プロパティ

idstringセッションの一意の識別子。objectstring値は常に realtime.session です。modelstring使用中のモデル。input_modalitiesarrayqwen3.8-livetranslate-flash-realtime に適用されます。入力モダリティの例:["audio"]。output_modalitiesarrayqwen3.8-livetranslate-flash-realtime に適用されます。出力モダリティは ["text"] または ["text", "audio"] です。audioobjectqwen3.8-livetranslate-flash-realtime に適用されます。音声入力と出力の設定。

プロパティ

input.formatobject入力フォーマット。type のデフォルトは pcm、sample_rate のデフォルトは 16000 Hz です。input.turn_detectionobjectターン検出の設定。デフォルトは type が speaker_detection、threshold が 0.5、silence_duration_ms が 1000 です。output.formatobject出力フォーマット。type のデフォルトは pcm、sample_rate のデフォルトは 24000 Hz です。output.voicestring出力音色。デフォルトは Tina です。
modalitiesarrayqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。モデルの出力モダリティ設定。voicestringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。モデルによって生成された音声のボイス。input_audio_formatstringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。入力音声のフォーマット。デフォルトは pcm です。sample_rateintegerqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。入力音声のサンプルレート (Hz)。output_audio_formatstringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。出力音声のフォーマット。デフォルトは pcm です。turn_detectionobjectqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。VAD (音声アクティビティ検出) の構成。translationobject(任意)翻訳構成。

プロパティ

language string (任意)翻訳のターゲット言語。corpusobject(任意)ドメイン固有の用語の翻訳精度を向上させるためのカスタム用語構成。

プロパティ

corpus.phrasesobject(任意)ソース言語の用語とターゲット言語の翻訳のマッピング。詳細については、「サポートされている言語」をご参照ください。
qwen3.8-livetranslate-flash-realtime に適用されます。
{
  "event_id": "event_example",
  "type": "session.created",
  "session": {
    "id": "sess_example",
    "object": "realtime.session",
    "model": "qwen3.8-livetranslate-flash-realtime",
    "input_modalities": [
      "audio"
    ],
    "output_modalities": [
      "text",
      "audio"
    ],
    "audio": {
      "input": {
        "format": {
          "type": "pcm",
          "sample_rate": 16000
        },
        "turn_detection": {
          "type": "speaker_detection",
          "threshold": 0.5,
          "silence_duration_ms": 1000
        }
      },
      "output": {
        "format": {
          "type": "pcm",
          "sample_rate": 24000
        },
        "voice": "Tina"
      }
    },
    "translation": {
      "language": "en"
    }
  }
}
qwen3.5-livetranslate-flash-realtime の例:
{
    "event_id": "event_QxBGpjBDmDDQQWDtrqBKB",
    "type": "session.created",
    "session": {
        "id": "sess_OozZ1vtbPt2muDflHODIH",
        "object": "realtime.session",
        "model": "qwen3.5-livetranslate-flash-realtime",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "input_audio_format": "pcm",
        "sample_rate": 16000,
        "output_audio_format": "pcm",
        "turn_detection": {
            "type": "server_vad",
            "threshold": 0.2,
            "silence_duration_ms": 1000
        },
        "translation": {
           "language": "en",
           "corpus": {
               "phrases": {
                   "人工智能": "Artificial Intelligence",
                   "机器学习": "Machine Learning"
               }
           }
        }
    }
}

session.updated

session.update リクエストが成功した後に返されます。リクエストが失敗した場合は、代わりに error イベントが返されます。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に session.updated です。sessionobjectセッション構成。

プロパティ

idstringセッションの一意の識別子。objectstring値は常に realtime.session です。modelstring使用中のモデル。input_modalitiesarrayqwen3.8-livetranslate-flash-realtime に適用されます。入力モダリティの例:["audio"]。output_modalitiesarrayqwen3.8-livetranslate-flash-realtime に適用されます。出力モダリティは ["text"] または ["text", "audio"] です。audioobjectqwen3.8-livetranslate-flash-realtime に適用されます。音声入力と出力の設定。

プロパティ

input.formatobject入力フォーマット。type のデフォルトは pcm、sample_rate のデフォルトは 16000 Hz です。input.turn_detectionobjectターン検出の設定。デフォルトは type が speaker_detection、threshold が 0.5、silence_duration_ms が 1000 です。output.formatobject出力フォーマット。type のデフォルトは pcm、sample_rate のデフォルトは 24000 Hz です。output.voicestring出力音色。デフォルトは Tina です。
modalitiesarrayqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。モデルの出力モダリティ設定。voicestringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。モデルによって生成された音声のボイス。sample_rateinteger(任意)qwen3.5-livetranslate-flash-realtime などのモデルに適用されます。入力音声のサンプルレート (Hz)。input_audio_formatstringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。入力音声のフォーマット。値は常に pcm です。output_audio_formatstringqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。出力音声のフォーマット。値は常に pcm です。input_audio_transcriptionobject入力音声文字起こし構成。セッションで input_audio_transcription.model パラメーターが構成されている場合にのみ返されます。

プロパティ

modelstring音声認識モデル。languagestring構成された音声認識言語。
turn_detectionobjectqwen3.5-livetranslate-flash-realtime などのモデルに適用されます。VAD (音声アクティビティ検出) の構成。このフィールドは、手動モード (クライアントが session.update でこのパラメーターを null に設定した場合) では返されません。

プロパティ

typestringVAD タイプ。値は常に server_vad です。thresholdfloatVAD 検出感度。prefix_padding_msinteger発話の開始を失わないように、発話開始前に保持される音声の持続時間 (ミリ秒)。silence_duration_msinteger発話が終了したと判断するために、発話終了後に必要な無音の最小持続時間 (ミリ秒)。create_responsebooleanVAD が発話の終了を検出した後に、翻訳応答を自動的にトリガーするかどうか。interrupt_responsebooleanVAD が新しい発話ターンを検出したときに、現在生成中の翻訳応答を割り込むかどうか。
translationobject(任意)翻訳構成。

プロパティ

language string (任意)翻訳のターゲット言語。corpusobject(任意)ドメイン固有の用語の翻訳精度を向上させるためのカスタム用語構成。

プロパティ

corpus.phrasesobject(任意)ソース言語の用語とターゲット言語の翻訳のマッピング。
enable_voice_cloneboolean音声クローニングを有効にするかどうか。voice_clone_optionsobject音声クローニング制御パラメーター。enable_voice_clone が true の場合にのみ返されます。

プロパティ

frequencystring音声クローニング周波数。
qwen3.8-livetranslate-flash-realtime に適用されます。
{
  "event_id": "event_example",
  "type": "session.updated",
  "session": {
    "id": "sess_example",
    "object": "realtime.session",
    "model": "qwen3.8-livetranslate-flash-realtime",
    "input_modalities": [
      "audio"
    ],
    "output_modalities": [
      "text",
      "audio"
    ],
    "audio": {
      "input": {
        "format": {
          "type": "pcm",
          "sample_rate": 16000
        },
        "turn_detection": {
          "type": "speaker_detection",
          "threshold": 0.5,
          "silence_duration_ms": 1000
        }
      },
      "output": {
        "format": {
          "type": "pcm",
          "sample_rate": 24000
        },
        "voice": "Tina"
      }
    },
    "translation": {
      "language": "en"
    }
  }
}
qwen3.5-livetranslate-flash-realtime の例:
{
    "event_id": "event_QxBGpjBDmDDQQWDtrqBKB",
    "type": "session.updated",
    "session": {
        "id": "sess_OozZ1vtbPt2muDflHODIH",
        "object": "realtime.session",
        "model": "qwen3.5-livetranslate-flash-realtime",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Ethan",
        "sample_rate": 16000,
        "input_audio_format": "pcm",
        "output_audio_format": "pcm",
        "input_audio_transcription": {
            "model": "qwen3-asr-flash-realtime",
            "language": "zh"
        },
        "turn_detection": {
            "type": "server_vad",
            "threshold": 0.2,
            "prefix_padding_ms": 300,
            "silence_duration_ms": 1000,
            "create_response": true,
            "interrupt_response": true
        },
        "translation": {
           "language": "en",
           "corpus": {
               "phrases": {
                   "人工智能": "Artificial Intelligence",
                   "机器学习": "Machine Learning"
               }
           }
        },
        "enable_voice_clone": true,
        "voice_clone_options": {
            "frequency": "once"
        }
    }
}

session.finished

セッションが終了し、すべての音声翻訳が完了しました。 このイベントは、クライアントが session.finish を送信した後に返されます。受信後、残りの翻訳音声を再生する場合は、ローカルでの再生を完了してからクライアント側で接続を切断してください。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に session.finished です。
{
    "event_id": "event_xxx",
    "type": "session.finished"
}

response.created

サーバーが新しいモデル応答を生成したときに返されます。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に response.created です。responseobject応答オブジェクト。

プロパティ

id string応答の一意の識別子。conversation_id string現在のセッションの一意の識別子。object stringオブジェクトタイプ。このイベントでは、値は常に realtime.response です。status string応答ステータス。有効な値:
  • completed
  • failed
  • in_progress
  • incomplete
modalities array応答モダリティ。voice string生成された音声のボイス。output_audio_format string出力音声のフォーマット。output arrayこのイベントは現在空です。
{
    "event_id": "event_L8hHVI5jYis6BzAjnPWJh",
    "type": "response.created",
    "response": {
        "id": "resp_P79OOMs8LnrXVpiIHUCKR",
        "object": "realtime.response",
        "conversation_id": "conv_UFClXtYkRkFXrs48y8pmK",
        "status": "in_progress",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "output_audio_format": "pcm16",
        "output": []
    }
}

response.done

応答生成が完了した後に返されます。生の音声データを除くすべての出力アイテムが含まれます。
event_id stringこのイベントの一意の識別子。type stringイベントタイプ。値は常に response.done です。response object応答オブジェクト。

プロパティ

id string応答の一意の識別子。conversation_id string現在のセッションの一意の識別子。object stringオブジェクトタイプ。このイベントでは、値は常に realtime.response です。status string応答のステータス。modalities array応答のモダリティ。voice stringモデルによって生成された音声に使用されるボイス。output_audio_format string出力音声のフォーマット。output object応答の出力。

プロパティ

id string応答出力の一意の識別子。type string出力アイテムのタイプ。現在、値は常に message です。object string出力アイテムのオブジェクトタイプ。現在、値は常に realtime.item です。status string出力アイテムのステータス。role string出力アイテムのロール。content array出力アイテムのコンテンツ。

プロパティ

type string出力コンテンツのタイプ。プレーンテキスト出力の場合は値が text、出力に音声が含まれる場合は audio です。text string出力のテキストコンテンツ。transcript string音声コンテンツのテキスト文字起こし。
usage object現在の応答までのセッション累計トークン使用量です。各 response.done は、その時点の累計値を返します。セッション全体の使用量は最後の usage で確認できるため、各応答の値を合計する必要はありません。
total_tokens integer入力トークン数と出力トークン数の合計です。input_tokens と output_tokens の和に相当します。input_tokens integer入力トークン数です。output_tokens integer出力トークン数です。input_tokens_details object入力トークンの内訳です。
text_tokens integerモデルの固定システムプロンプトに含まれるテキストトークン数です。課金対象外です。audio_tokens integer音声入力トークン数です。video_tokens integer画像入力トークン数です。画像入力として課金されます。
output_tokens_details object出力トークンの内訳です。
text_tokens integerテキスト出力トークン数です。audio_tokens integer音声出力トークン数です。
{
  "event_id": "event_CNea8oXNipVanSg2VIzkO",
  "type": "response.done",
  "response": {
    "id": "resp_TfhYTqej692vsGA2jNEtH",
    "object": "realtime.response",
    "conversation_id": "conv_ZtyLfKVm8XqLwYRlsuDih",
    "status": "completed",
    "modalities": [
      "text",
      "audio"
    ],
    "voice": "Cherry",
    "output_audio_format": "pcm16",
    "output": [
      {
        "id": "item_MKtkMwN9RtcyE9eJShyWy",
        "object": "realtime.item",
        "type": "message",
        "status": "completed",
        "role": "assistant",
        "content": [
          {
            "type": "audio",
            "transcript": "Hello? "
          }
        ]
      }
    ],
    "usage": {
      "total_tokens": 56,
      "input_tokens": 47,
      "output_tokens": 9,
      "input_tokens_details": {
        "text_tokens": 20,
        "audio_tokens": 27
      },
      "output_tokens_details": {
        "text_tokens": 2,
        "audio_tokens": 7
      }
    }
  }
}

response.text.text

モデルがテキストを段階的に生成するときに、テキストのみの出力に対して返されます。
event_idstringイベントの一意の識別子。typestringイベントのタイプ。値は常に response.text.text です。textstring返される段階的なテキスト。response_idstring応答 ID。item_idstringメッセージアイテムの一意の識別子。output_indexinteger現在、値は常に 0 です。content_indexinteger現在、値は常に 0 です。stashstringモデルによって生成された一時的なテキスト。stash を現在の text と連結して中間結果を形成します。システムは response.text.done イベントを受信するまで、response.text.text イベントを使用して text と stash を継続的に更新します。その後、最終的な完全なテキストが text フィールドで利用可能になります。
{
    "event_id": "event_B1lIeyOXR7qJMEExbqtTG",
    "type": "response.text.text",
    "response_id": "resp_B1lIdtjF4Noqpn5NOjznj",
    "item_id": "item_B1lIdJsAJlJiFs8ztWpJt",
    "output_index": 0,
    "content_index": 0,
    "text": "How are",
    "stash": " you today?"
}

response.text.done

テキストのみの出力でテキスト生成が終了した場合、または応答が中断された、不完全な、またはキャンセルされた場合に返されます。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に response.text.done です。response_idstring応答の一意の識別子。item_id文字列メッセージアイテムの一意の識別子です。output_indexinteger値は、現時点では常に 0 です。content_index整数値は常に 0 です。text 文字列モデルから出力される完全なテキストです。
{
    "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?"
}

response.audio.delta

WebSocket アクセスでは、出力モダリティに音声が含まれ、モデルが新しい音声データを逐次生成すると、サーバーがこのイベントを返します。
event_id文字列イベントの一意の識別子です。type文字列イベントタイプです。値は常に response.audio.delta です。response_id文字列応答の一意の識別子です。item_id文字列メッセージ項目の一意の識別子です。output_index 整数値は常に 0 です。content_index 整数値は常に 0 です。delta 文字列モデルによって出力される増分オーディオデータです。データは Base64 エンコードされています。
{
    "event_id": "event_B1osWMZBtrEQbiIwW0qHQ",
    "type": "response.audio.delta",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
    "output_index": 0,
    "content_index": 0,
    "delta": "UklGRnoGAABXQVZFZm10IBAAAAAB..."
}

response.audio.done

音声生成が完了したときに返されます。応答が中断された場合、不完全な場合、またはキャンセルされた場合にも返されます。完全な音声データは含まれません。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。この値は常に response.audio.done です。response_id文字列応答の一意の識別子です。item_id文字列メッセージアイテムの一意の識別子です。output_index整数値は常に 0 です。content_index整数値は常に 0 です。
{
    "event_id": "event_B1osWMWoDRYyITDyNYcBu",
    "type": "response.audio.done",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
    "output_index": 0,
    "content_index": 0
}

input_audio_buffer.speech_started

サーバー側の音声区間検出 (VAD) が、ユーザーが発話を開始したことを検出した場合に返されます。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。値は常に input_audio_buffer.speech_started です。audio_start_ms整数音声ストリームの開始時点を基準とした、発話開始が検出された時点のオフセットです (単位:ミリ秒)。item_id文字列関連付けられたメッセージ項目の一意の識別子です。
{
    "event_id": "event_xxx",
    "type": "input_audio_buffer.speech_started",
    "audio_start_ms": 568,
    "item_id": "item_xxx"
}

input_audio_buffer.speech_stopped

サーバー側の VAD (音声区間検出) がユーザーの発話停止を検出した際に返されるイベントで、現在の音声入力の発話が終了したことを示します。翻訳応答はストリーミング音声入力と同期して生成されるため、このイベントを待つことなく、音声入力のプロセス中に実際の翻訳応答がすでに開始されている場合があります。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。値は常に input_audio_buffer.speech_stopped です。audio_end_ms整数発話の終了が検出された時点を、音声ストリームの開始時点からのオフセット (ミリ秒単位) で示します。item_id文字列関連付けられたメッセージ項目の一意の識別子です。
{
    "event_id": "event_xxx",
    "type": "input_audio_buffer.speech_stopped",
    "audio_end_ms": 3900,
    "item_id": "item_xxx"
}

input_audio_buffer.committed

手動モード (turn_detection が null の場合)、クライアントが input_audio_buffer.commit イベントを送信すると、サーバーはこのイベントを確認として返し、自動的に翻訳応答の生成を開始します。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。値は常に input_audio_buffer.committed です。
{
    "event_id": "event_xxx",
    "type": "input_audio_buffer.committed"
}

input_audio_buffer.cleared

クライアントが input_audio_buffer.clear イベントを送信すると、サーバーはバッファー内のコミットされていない音声データがクリアされたことの確認としてこのイベントを返します。
event_idstringこのイベントの一意の識別子です。typestringイベントタイプです。値は常に input_audio_buffer.cleared です。
{
    "event_id": "event_xxx",
    "type": "input_audio_buffer.cleared"
}

conversation.item.created

会話内で新しいメッセージアイテムが作成されると返されます。このイベントは、以下のシナリオでトリガーされます:
  • サーバーが翻訳応答の生成を開始すると、対応するアシスタントメッセージアイテムが作成されます (この時点では、content は空の配列であり、ストリーミング応答によって内容が段階的に入力されます)。
  • 手動モードでは、クライアントが input_audio_buffer.commit イベントを送信した後、サーバーはユーザーの入力音声に対応するメッセージアイテムをさらに作成します (content には {"type": "input_audio"} が含まれます)。
同じ VAD セグメントに対して、サーバーは音声認識結果と翻訳結果のために別々のメッセージアイテムを作成します。音声認識結果の item.id は、翻訳結果イベントの previous_item_id と一致します。これらの値を使用して、ソーステキストとその翻訳を関連付けて表示します。
event_idstringこのイベントの一意の識別子です。typestringイベントタイプです。値は常に conversation.item.created です。previous_item_idstring前のメッセージアイテムの一意の識別子です。翻訳結果イベントの場合、この値は同じ VAD セグメントの音声認識結果の item.id と一致します。itemobjectメッセージアイテムの情報です。

プロパティ

idstringメッセージアイテムの一意の識別子です。typestring値は常に message です。objectstring値は常に realtime.item です。statusstringメッセージアイテムのステータスです。rolestringメッセージのロールです。有効な値: assistant または user。contentarrayメッセージの内容です。応答が最初に作成されたとき、これは空の配列であり、ストリーミング応答によって段階的に入力されます。手動モードでコミットによって作成されたユーザーメッセージアイテムの場合、これには {"type": "input_audio"} が含まれます。
{
    "event_id": "event_xxx",
    "type": "conversation.item.created",
    "previous_item_id": "item_asr_xxx",
    "item": {
        "id": "item_translation_xxx",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": []
    }
}

conversation.item.input_audio_transcription.text

input_audio_transcription.model が設定されている場合、サーバーは元のソース言語で音声認識の結果をストリームします。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。値は常に conversation.item.input_audio_transcription.text です。item_id文字列メッセージアイテムの一意の識別子です。content_index整数現在、値は常に 0 です。text文字列確定済みの認識テキストです。stash文字列確定保留中の認識テキストです。このテキストは後続のイベントによって修正される可能性があります。language文字列検出されたソース言語です。emotion文字列認識された音声から検出された感情です。サポートされている感情は次のとおりです:
  • surprised: 驚き
  • neutral: 普通
  • happy: 喜び
  • sad: 悲しみ
  • disgusted: 嫌悪
  • angry: 怒り
  • fearful: 恐れ
{
    "event_id": "event_xxx",
    "type": "conversation.item.input_audio_transcription.text",
    "item_id": "item_xxx",
    "content_index": 0,
    "text": "",
    "stash": "The weather is really nice today",
    "language": "zh",
    "emotion": "neutral"
}

conversation.item.input_audio_transcription.completed

input_audio_transcription.model が設定されている場合、音声認識の完了後に最終的な認識結果を返します。
event_idstringこのイベントの一意の識別子です。typestringイベントタイプです。この値は常に conversation.item.input_audio_transcription.completed です。item_idstringメッセージ項目の一意の識別子です。content_indexinteger現在、この値は常に 0 です。transcriptstring元のソース言語での完全な音声認識結果です。languagestring検出されたソース言語です。emotionstring認識された音声から検出された感情です。サポートされている感情は次のとおりです:
  • surprised:驚き
  • neutral:平常/中立
  • happy:喜び
  • sad:悲しみ
  • disgusted:嫌悪
  • angry:怒り
  • fearful:恐れ
{
    "event_id": "event_xxx",
    "type": "conversation.item.input_audio_transcription.completed",
    "item_id": "item_xxx",
    "content_index": 0,
    "transcript": "What a beautiful day! Let's go for a walk in the park together.",
    "language": "en",
    "emotion": ""
}

conversation.item.input_audio_transcription.failed

音声入力は受信されたものの、音声認識に失敗した場合に返されます。このイベントは他の error イベントとは別に処理されるため、クライアントは関連する特定のアイテムを容易に識別できます。
typestringイベントタイプです。値は常に conversation.item.input_audio_transcription.failed です。item_idstring関連する会話アイテムの ID です。content_indexinteger音声を含むコンテンツパートのインデックスです。error.codestringエラーコードです。error.messagestringエラーメッセージです。
{
    "event_id": "event_xxx",
    "type": "conversation.item.input_audio_transcription.failed",
    "item_id": "item_xxx",
    "content_index": 0,
    "error": {
        "code": "xxx",
        "message": "xxx",
        "param": "xxx"
    }
}

response.audio_transcript.text

オーディオ出力でリアルタイム翻訳を表示するために返されます。
event_idstringこのイベントの一意の識別子です。typestringイベントのタイプで、値は常に response.audio_transcript.text です。response_idstring応答の一意の識別子です。item_idstringメッセージ項目の一意の識別子です。output_index integer現在、値は常に 0 です。content_index integer現在、値は常に 0 です。textstring確定済みの翻訳テキストセグメントです。stashstringtext と連結されて中間結果を形成する、一時的な翻訳テキストです。システムは、response.audio_transcript.done イベントが受信されるまで、response.audio_transcript.text イベントを介して text と stash を継続的に更新します。その後、transcript から最終的な翻訳を取得します。
{
  "event_id": "event_xxx",
  "type": "response.audio_transcript.text",
  "response_id": "resp_xxx",
  "item_id": "item_xxx",
  "output_index": 0,
  "content_index": 0,
  "text": "Hello,",
  "stash": " who are you?"
}

response.audio_transcript.done

オーディオ出力が有効で、テキスト生成が完了したときに返されます。
event_id文字列このイベントの一意の識別子です。type文字列イベントタイプです。この値は常に response.audio_transcript.done です。response_id文字列応答の一意の識別子です。item_id文字列メッセージ項目の一意の識別子です。output_index 整数現在は常に 0 です。content_index 整数現在は常に 0 です。transcript文字列完全なテキストです。
{
    "event_id": "event_VN4Q4GJugLcc1S23viW8E",
    "type": "response.audio_transcript.done",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "item_id": "item_JvJauNH2CTXb1D9WV6pD4",
    "output_index": 0,
    "content_index": 0,
    "transcript": "How can I assist you today?"
}

response.output_item.added

応答の生成中に新しい出力アイテムが追加されたときに返されます。
event_idstringこのイベントの一意の識別子です。typestringイベントタイプです。値は常に response.output_item.added です。response_idstring応答の一意の識別子です。output_index integer現在の値は常に 0 です。item object出力アイテムに関する情報です。

プロパティ

idstring出力アイテムの一意の識別子です。typestring値は常に message です。objectstring値は常に realtime.item です。statusstring出力アイテムのステータスです。rolestringメッセージのロールです。contentstringメッセージのコンテンツです。
{
    "event_id": "event_B4O5yPt3Gjnjy5eYH3plG",
    "type": "response.output_item.added",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "output_index": 0,
    "item": {
        "id": "item_OFaPGtzfWCPyGzxnuEX9i",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": []
    }
}

response.output_item.done

出力アイテムが完了したときに返されます。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。値は常に response.output_item.done です。response_idstring応答の一意の識別子。output_indexinteger現在の値は常に 0 です。itemobject出力アイテムに関する情報。

プロパティ

idstring出力アイテムの一意の識別子。objectstring値は常に realtime.item です。typestring値は常に message です。statusstring出力アイテムのステータス。rolestringメッセージ送信者のロール。contentstringメッセージのコンテンツ。
{
    "event_id": "event_XkiwbYTBC9Wcdwy6uYJ2G",
    "type": "response.output_item.done",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "output_index": 0,
    "item": {
        "id": "item_JvJauNH2CTXb1D9WV6pD4",
        "object": "realtime.item",
        "type": "message",
        "status": "completed",
        "role": "assistant",
        "content": [
            {
                "type": "audio",
                "text": "Hello, I am a large language model developed by Alibaba Cloud. My name is Qwen. How can I help you?"
            }
        ]
    }
}

response.content_part.added

新しいコンテンツパートが追加されたときに返されます。
event_id stringイベントの一意の ID です。type stringイベントのタイプを示します。値は常に response.content_part.added になります。response_id string応答の一意の ID です。item_id stringメッセージアイテムの一意の ID です。output_index integer値は常に 0 です。content_index integer値は常に 0 です。part objectアイテム情報を出力します。

プロパティ

type stringコンテンツパートのタイプです。text stringコンテンツパートのテキストです。
{
    "event_id": "event_J2UixwYKZsXg7c9YXZetL",
    "type": "response.content_part.added",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": ""
    }
}

response.content_part.done

コンテンツパートが完了したときに返されます。
event_idstringこのイベントの一意の識別子。typestringイベントタイプ。この値は常に response.content_part.done です。response_idstring応答の一意の識別子。item_idstringメッセージアイテムの一意の識別子。output_index integer値は常に 0 です。content_index integer値は常に 0 です。part objectコンテンツパートに関する情報。

プロパティ

typestringコンテンツパートのタイプ。textstringコンテンツパートのテキスト。
{
    "event_id": "event_VN4Q4GJugLcc1S23viW8E",
    "type": "response.content_part.done",
    "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
    "item_id": "item_JvJauNH2CTXb1D9WV6pD4",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": "Hello, I am a large language model developed by Alibaba Cloud. My name is Qwen. How can I help you?"
    }
}