mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 09:59:22 +08:00
code
This commit is contained in:
@@ -108,7 +108,7 @@ async def player_worker_decode(
|
||||
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
logger.warning(
|
||||
"Timeout in frame processing cycle after %s seconds - resetting", 5
|
||||
"Timeout in frame processing cycle after %s seconds - resetting", 60
|
||||
)
|
||||
continue
|
||||
except Exception as e:
|
||||
|
||||
@@ -10,11 +10,9 @@ import time
|
||||
import traceback
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Callable
|
||||
from copy import deepcopy
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
Callable,
|
||||
Concatenate,
|
||||
Generator,
|
||||
Iterable,
|
||||
@@ -146,13 +144,9 @@ class StreamHandler(ABC):
|
||||
self.output_frame_size = output_frame_size
|
||||
self._resampler = None
|
||||
|
||||
@abstractmethod
|
||||
def copy(self) -> "StreamHandler":
|
||||
try:
|
||||
return deepcopy(self)
|
||||
except Exception:
|
||||
raise ValueError(
|
||||
"Current StreamHandler implementation cannot be deepcopied. Implement the copy method."
|
||||
)
|
||||
pass
|
||||
|
||||
def resample(self, frame: AudioFrame) -> Generator[AudioFrame, None, None]:
|
||||
if self._resampler is None:
|
||||
|
||||
Reference in New Issue
Block a user