mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Cloudflare turn integration (#264)
* Turn integration * Add code: * type hint * Fix typehint * add code * format * WIP * trickle ice * bump version * Better docs * Modify * code * Mute icon for whisper * Add code * llama 4 demo * code * OpenAI interruptions * fix docs
This commit is contained in:
@@ -54,6 +54,9 @@ class OpenAIHandler(AsyncStreamHandler):
|
||||
)
|
||||
self.connection = conn
|
||||
async for event in self.connection:
|
||||
# Handle interruptions
|
||||
if event.type == "input_audio_buffer.speech_started":
|
||||
self.clear_queue()
|
||||
if event.type == "response.audio_transcript.done":
|
||||
await self.output_queue.put(AdditionalOutputs(event))
|
||||
if event.type == "response.audio.delta":
|
||||
|
||||
Reference in New Issue
Block a user