mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 01:49:23 +08:00
Introduce static type checking with pyright (#255)
This commit is contained in:
committed by
GitHub
parent
d7995b8116
commit
0767030997
@@ -196,6 +196,8 @@ async def player_worker_decode(
|
||||
layout = "mono"
|
||||
elif len(frame) == 3:
|
||||
sample_rate, audio_array, layout = frame
|
||||
else:
|
||||
raise ValueError(f"frame must be of length 2 or 3, got: {len(frame)}")
|
||||
|
||||
logger.debug(
|
||||
"received array with shape %s sample rate %s layout %s",
|
||||
|
||||
Reference in New Issue
Block a user