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:
@@ -7,7 +7,7 @@ import json
|
||||
import logging
|
||||
import tempfile
|
||||
import traceback
|
||||
from collections.abc import Callable
|
||||
from collections.abc import Callable, Coroutine
|
||||
from contextvars import ContextVar
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Literal, Protocol, TypedDict, cast
|
||||
@@ -486,3 +486,15 @@ async def wait_for_item(queue: asyncio.Queue, timeout: float = 0.1) -> Any:
|
||||
return await asyncio.wait_for(queue.get(), timeout=timeout)
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
return None
|
||||
|
||||
|
||||
RTCConfigurationCallable = (
|
||||
Callable[[], dict[str, Any]]
|
||||
| Callable[[], Coroutine[dict[str, Any], Any, dict[str, Any]]]
|
||||
| Callable[[str | None, str | None, str | None], dict[str, Any]]
|
||||
| Callable[
|
||||
[str | None, str | None, str | None],
|
||||
Coroutine[dict[str, Any], Any, dict[str, Any]],
|
||||
]
|
||||
| dict[str, Any]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user