Turn any python function into a real-time audio and video stream over WebRTC or WebSockets.
pip install fastrtc
to use built-in pause detection (see ReplyOnPause), and text to speech (see Text To Speech), install the vad
and tts
extras:
pip install fastrtc[vad, tts]
.ui.launch()
method to launch the webRTC-enabled built-in Gradio UI..mount(app)
method to mount the stream on a FastAPI app and get a webRTC endpoint for your own frontend! .mount(app)
method to mount the stream on a FastAPI app and get a websocket endpoint for your own frontend! fastphone()
method of the stream to launch the application and get a free temporary phone number!Stream
can easily be mounted on a FastAPI app so you can easily extend it to fit your production application. See the Talk To Claude demo for an example on how to serve a custom JS frontend.