[Realtime] Emit current (non-beta) OpenAI audio/transcript event names (#7339)
Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5c69fc2a8a
commit
498c41b8d6
34 files changed
+251
-189
No files matched your search
@@ -60,7 +60,7 @@ def test_post_commit_decision_accepts_drained_speak_after_commit_ack():
|
||||
events = [
|
||||
{"type": "input_audio_buffer.committed"},
|
||||
{"type": "response.created", "response": {"id": "resp-a"}},
|
||||
{"type": "response.audio.delta", "response_id": "resp-a", "delta": "AAAA"},
|
||||
{"type": "response.output_audio.delta", "response_id": "resp-a", "delta": "AAAA"},
|
||||
{"type": "response.done", "response_id": "resp-a"},
|
||||
]
|
||||
|
||||
@@ -267,7 +267,7 @@ def test_streaming_output_writer_persists_audio_deltas_as_they_arrive(tmp_path,
|
||||
|
||||
writer.handle(
|
||||
{
|
||||
"type": "response.audio.delta",
|
||||
"type": "response.output_audio.delta",
|
||||
"response_id": "resp-a",
|
||||
"delta": base64.b64encode(first_pcm).decode("ascii"),
|
||||
"sample_rate_hz": 24_000,
|
||||
@@ -275,14 +275,14 @@ def test_streaming_output_writer_persists_audio_deltas_as_they_arrive(tmp_path,
|
||||
)
|
||||
writer.handle(
|
||||
{
|
||||
"type": "response.audio_transcript.delta",
|
||||
"type": "response.output_audio_transcript.delta",
|
||||
"response_id": "resp-a",
|
||||
"delta": "你好",
|
||||
}
|
||||
)
|
||||
writer.handle(
|
||||
{
|
||||
"type": "response.audio.delta",
|
||||
"type": "response.output_audio.delta",
|
||||
"response_id": "resp-a",
|
||||
"delta": base64.b64encode(second_pcm).decode("ascii"),
|
||||
"sample_rate_hz": 24_000,
|
||||
|
||||
@@ -42,8 +42,8 @@ def test_client_uses_proxy_relative_realtime_url_and_model_policy_session():
|
||||
assert "input_audio_buffer.commit" not in source
|
||||
assert "playback.ack" in source
|
||||
assert "event.event || event" in source
|
||||
assert "response.audio.delta" in source
|
||||
assert "response.audio_transcript.delta" in source
|
||||
assert "response.output_audio.delta" in source
|
||||
assert "response.output_audio_transcript.delta" in source
|
||||
assert "conversation.item.input_audio_transcription" in source
|
||||
assert "force_barge_in" not in source
|
||||
assert "server_vad" not in source
|
||||
|
||||
Reference in new issue
Block a user