mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
音频配置参数引入
This commit is contained in:
16
demo/app.py
16
demo/app.py
@@ -97,6 +97,22 @@ with gr.Blocks(css=css) as demo:
|
||||
mode="send-receive",
|
||||
video_chat=True,
|
||||
elem_id="video-source",
|
||||
track_constraints={
|
||||
"video": {
|
||||
"facingMode": "user",
|
||||
"width": {"ideal": 500},
|
||||
"height": {"ideal": 500},
|
||||
"frameRate": {"ideal": 30},
|
||||
},
|
||||
"audio": {
|
||||
"echoCancellation": True,
|
||||
"noiseSuppression": {"exact": True},
|
||||
"autoGainControl": {"exact": False},
|
||||
"sampleRate": {"ideal": 24000},
|
||||
"sampleSize": {"ideal": 16},
|
||||
"channelCount": {"exact": 1},
|
||||
},
|
||||
}
|
||||
)
|
||||
webrtc.stream(
|
||||
VideoChatHandler(),
|
||||
|
||||
Reference in New Issue
Block a user