From 593edeef2520954d9972a58292ad5060a70a1553 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:47:47 +0000 Subject: [PATCH] Deployed 4b44e67 with MkDocs version: 1.6.1 --- .nojekyll | 0 404.html | 613 ++ CNAME | 1 + advanced-configuration/index.html | 954 +++ assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.f1b6f286.min.js | 16 + assets/javascripts/bundle.f1b6f286.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.f8cc74c7.min.js | 42 + .../workers/search.f8cc74c7.min.js.map | 7 + assets/stylesheets/main.8608ea7d.min.css | 1 + assets/stylesheets/main.8608ea7d.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + cookbook/index.html | 865 +++ deployment/index.html | 981 +++ faq/index.html | 801 ++ fastrtc_logo.png | Bin 0 -> 940125 bytes fastrtc_logo_small.png | Bin 0 -> 2991 bytes gradio-logo-with-title.svg | 20 + gradio-logo.svg | 1 + hf-logo-with-title.svg | 9 + hf-logo.svg | 8 + index.html | 924 +++ search/search_index.json | 1 + sitemap.xml | 59 + sitemap.xml.gz | Bin 0 -> 285 bytes stylesheets/extra.css | 63 + userguide/api/index.html | 1223 +++ userguide/audio-video/index.html | 677 ++ userguide/audio/index.html | 1154 +++ userguide/gradio/index.html | 824 ++ userguide/streams/index.html | 1137 +++ userguide/video/index.html | 793 ++ userguide/webrtc_docs/index.html | 816 ++ userguide/websocket_docs/index.html | 814 ++ utils/index.html | 873 +++ 70 files changed, 20888 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 CNAME create mode 100644 advanced-configuration/index.html create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.f1b6f286.min.js create mode 100644 assets/javascripts/bundle.f1b6f286.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.f8cc74c7.min.js create mode 100644 assets/javascripts/workers/search.f8cc74c7.min.js.map create mode 100644 assets/stylesheets/main.8608ea7d.min.css create mode 100644 assets/stylesheets/main.8608ea7d.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 cookbook/index.html create mode 100644 deployment/index.html create mode 100644 faq/index.html create mode 100644 fastrtc_logo.png create mode 100644 fastrtc_logo_small.png create mode 100644 gradio-logo-with-title.svg create mode 100644 gradio-logo.svg create mode 100644 hf-logo-with-title.svg create mode 100644 hf-logo.svg create mode 100644 index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 stylesheets/extra.css create mode 100644 userguide/api/index.html create mode 100644 userguide/audio-video/index.html create mode 100644 userguide/audio/index.html create mode 100644 userguide/gradio/index.html create mode 100644 userguide/streams/index.html create mode 100644 userguide/video/index.html create mode 100644 userguide/webrtc_docs/index.html create mode 100644 userguide/websocket_docs/index.html create mode 100644 utils/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..8796293 --- /dev/null +++ b/404.html @@ -0,0 +1,613 @@ + + + +
+ + + + + + + + + + + + + + +Any of the parameters for the Stream
class can be passed to the WebRTC
component directly.
You can specify the track_constraints
parameter to control how the data is streamed to the server. The full documentation on track constraints is here.
For example, you can control the size of the frames captured from the webcam like so:
+track_constraints = {
+ "width": {"exact": 500},
+ "height": {"exact": 500},
+ "frameRate": {"ideal": 30},
+}
+webrtc = Stream(
+ handler=...,
+ track_constraints=track_constraints,
+ modality="video",
+ mode="send-receive")
+
Warning
+WebRTC may not enforce your constraints. For example, it may rescale your video
+(while keeping the same resolution) in order to maintain the desired frame rate (or reach a better one). If you really want to enforce height, width and resolution constraints, use the rtp_params
parameter as set "degradationPreference": "maintain-resolution"
.
You can configure how the connection is created on the client by passing an rtc_configuration
parameter to the WebRTC
component constructor.
+See the list of available arguments here.
Warning
+When deploying on a remote server, the rtc_configuration
parameter must be passed in. See Deployment.
The ReplyOnPause
class runs a Voice Activity Detection (VAD) algorithm to determine when a user has stopped speaking.
The following parameters control this argument:
+from fastrtc import AlgoOptions, ReplyOnPause, Stream
+
+options = AlgoOptions(audio_chunk_duration=0.6, # (1)
+ started_talking_threshold=0.2, # (2)
+ speech_threshold=0.1, # (3)
+ )
+
+Stream(
+ handler=ReplyOnPause(..., algo_options=algo_options),
+ modality="audio",
+ mode="send-receive"
+)
+
You can configure the sampling rate of the audio passed to the ReplyOnPause
or StreamHandler
instance with the input_sampling_rate
parameter. The current default is 48000
from fastrtc import ReplyOnPause, Stream
+
+stream = Stream(
+ handler=ReplyOnPause(..., input_sampling_rate=24000),
+ modality="audio",
+ mode="send-receive"
+)
+
You can configure the output audio chunk size of ReplyOnPause
(and any StreamHandler
)
+with the output_sample_rate
and output_frame_size
parameters.
The following code (which uses the default values of these parameters), states that each output chunk will be a frame of 960 samples at a frame rate of 24,000
hz. So it will correspond to 0.04
seconds.
from fastrtc import ReplyOnPause, Stream
+
+stream = Stream(
+ handler=ReplyOnPause(..., output_sample_rate=24000, output_frame_size=960),
+ modality="audio",
+ mode="send-receive"
+)
+
Tip
+In general it is best to leave these settings untouched. In some cases, +lowering the output_frame_size can yield smoother audio playback.
+You can display an icon of your choice instead of the default wave animation for audio streaming.
+Pass any local path or url to an image (svg, png, jpeg) to the components icon
parameter. This will display the icon as a circular button. When audio is sent or recevied (depending on the mode
parameter) a pulse animation will emanate from the button.
You can control the button color and pulse color with icon_button_color
and pulse_color
parameters. They can take any valid css color.
Warning
+The icon
parameter is only supported in the WebRTC
component.
You can supply a button_labels
dictionary to change the text displayed in the Start
, Stop
and Waiting
buttons that are displayed in the UI.
+The keys must be "start"
, "stop"
, and "waiting"
.
Warning
+The button_labels
parameter is only supported in the WebRTC
component.
webrtc = WebRTC(
+ label="Video Chat",
+ modality="audio-video",
+ mode="send-receive",
+ button_labels={"start": "Start Talking to Gemini"}
+)
+