mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Add code (#70)
Co-authored-by: Freddy Boulton <freddyboulton@hf-freddy.local>
This commit is contained in:
@@ -120,8 +120,8 @@ stream = Stream(
|
|||||||
],
|
],
|
||||||
ui_args={
|
ui_args={
|
||||||
"icon": "https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
"icon": "https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
||||||
"pulse_color": "rgb(35, 157, 225)",
|
"pulse_color": "rgb(255, 255, 255)",
|
||||||
"icon_button_color": "rgb(35, 157, 225)",
|
"icon_button_color": "rgb(255, 255, 255)",
|
||||||
"title": "Gemini Audio Video Chat",
|
"title": "Gemini Audio Video Chat",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -157,8 +157,8 @@ with gr.Blocks(css=css) as demo:
|
|||||||
if get_space() == "spaces"
|
if get_space() == "spaces"
|
||||||
else None,
|
else None,
|
||||||
icon="https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
icon="https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
||||||
pulse_color="rgb(35, 157, 225)",
|
pulse_color="rgb(255, 255, 255)",
|
||||||
icon_button_color="rgb(35, 157, 225)",
|
icon_button_color="rgb(255, 255, 255)",
|
||||||
)
|
)
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
image_input = gr.Image(
|
image_input = gr.Image(
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ stream = Stream(
|
|||||||
additional_inputs=[
|
additional_inputs=[
|
||||||
gr.Dropdown(
|
gr.Dropdown(
|
||||||
choices=voice_ids,
|
choices=voice_ids,
|
||||||
value="katherine",
|
value="victoria",
|
||||||
label="Voice",
|
label="Voice",
|
||||||
info="Select a voice from the dropdown",
|
info="Select a voice from the dropdown",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ The `Stream` has three main methods:
|
|||||||
yield audio
|
yield audio
|
||||||
|
|
||||||
stream = Stream(
|
stream = Stream(
|
||||||
handler=ReplyOnPause(detection),
|
handler=ReplyOnPause(echo),
|
||||||
modality="audio",
|
modality="audio",
|
||||||
mode="send-receive",
|
mode="send-receive",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
filter: brightness(0) invert(1);
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pulse-ring {
|
.pulse-ring {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "fastrtc"
|
name = "fastrtc"
|
||||||
version = "0.0.4.post1"
|
version = "0.0.4.post2"
|
||||||
description = "The realtime communication library for Python"
|
description = "The realtime communication library for Python"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "apache-2.0"
|
license = "apache-2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user