LibreAI / Audio / fastrtc
// audio · gradio-app/fastrtc

fastrtc

fastrtc est un projet de audio open source, créé par gradio-app (gradio-app/fastrtc sur GitHub). Il compte 4 631 étoiles sur GitHub et 436 forks, il est publié sous la licence MIT et a été mis à jour pour la dernière fois sur GitHub le 12 janvier 2026.

FastRTC turns any Python function into a real-time audio or video stream over WebRTC or WebSockets

★ 4,6 k étoiles⑂ 436 forksMITmis à jour janv. 2026
▦ visuel — le README de ce projet ne contient aucune capture intégrable,
voici donc un emplacement réservé. Le guide ci-dessous est complet malgré tout.
// détails du projet

Détails du projet

Étoiles GitHub
4 631
Forks
436
Licence
MIT
Dernière mise à jour sur GitHub
12 janvier 2026
Catégorie
Audio
Type de fiche
Guide d'installation complet
Site officiel
Official site
// fonctionnement

Comment ça marche

  1. Define your reply function

    Write a Python generator that takes audio (or video) frames and yields responses.

  2. Install FastRTC

    Install from PyPI, adding the vad/tts extras if you want pause detection and text-to-speech.

  3. Wrap it in a Stream

    Create a Stream with ReplyOnPause for audio conversations, and pick a delivery mode: built-in UI, FastAPI mount, or a phone number.

  4. Launch and talk

    Start the stream and speak to your function in real time.

// fonctionnalités

Pourquoi on l'adore

Automatic turn-taking

Built-in voice activity detection (the ReplyOnPause handler) runs your function when the user stops speaking.

WebRTC and WebSockets

Stream real-time audio or video over either transport, in send, receive, or send-receive modes.

Built-in Gradio UI

Every stream can launch with a test interface via stream.ui.launch().

FastAPI mounting

Mount a stream into an existing FastAPI application with stream.mount(app).

FastPhone

Get a temporary phone number to call your stream, using a Hugging Face token.

Extras for speech

Optional vad and tts extras add pause detection and text-to-speech support.

Advertisement
// lancez-le

Lancez-le vous-même

  1. Clone the repository

    Clone the project and enter its directory (library users can install from PyPI instead).

    git clone https://github.com/gradio-app/fastrtc.git
    cd fastrtc
  2. Install FastRTC

    Install the package, with the speech extras if you need them.

    pip install fastrtc
    pip install "fastrtc[vad, tts]"
  3. Create and launch a stream

    Wrap a reply function in a Stream and launch the built-in UI.

    from fastrtc import Stream, ReplyOnPause
    stream = Stream(handler=ReplyOnPause(fn), modality="audio", mode="send-receive")
    stream.ui.launch()
// cas d'usage

Ce que vous pouvez créer

Advertisement
// faq

Questions fréquentes

Who maintains FastRTC?

The Gradio team (gradio-app) — the same group behind the Gradio ML interface library.

Is FastRTC free?

Yes, it is MIT-licensed open source. FastPhone numbers are provided through Hugging Face and require an HF token.

Does it need a paid API key?

No — the library is self-contained; you supply your own speech/LLM models inside your handler function.

How does it compare to raw WebRTC libraries like aiortc?

FastRTC abstracts the transport and adds the conversational layer — VAD, turn-taking, a test UI, and FastAPI mounting — so you write a plain function instead of managing peers and tracks.

How do I get started?

`pip install fastrtc`, wrap your function with `Stream(handler=ReplyOnPause(fn), ...)`, and call `stream.ui.launch()`.

// continuez l'exploration

Outils similaires

Audio

hifi-gan

GAN vocoder that turns mel-spectrograms into high-fidelity speech audio, fast enough for real-time use.

★ 2,4 k étoilesMIT
Voir le guide →
Audio

mcp-video-analyzer

MCP server that turns any video — YouTube.

★ 85 étoilesMIT
Voir le guide →
Audio

gTTS

gTTS — Python library and CLI that turns text into spoken mp3 via Google Translate's speech API

★ 2,6 k étoilesMIT
Voir le guide →
Audio

Real-Time-Voice-Cloning

Clone a voice from 5 seconds of audio and generate arbitrary speech in real time

★ 60,2 k étoilesNOASSERTION
Voir le guide →
Audio

VieNeu-TTS

Vietnamese TTS with instant voice cloning — on-device, real-time CPU inference, 48 kHz audio

★ 2,8 k étoilesApache-2.0
Voir le guide →
Audio

librosa

Python library for audio and music analysis

★ 8,6 k étoilesISC
Voir le guide →
// alternatives

Alternatives en Audio

Les autres projets de la catégorie Audio avec le plus d'étoiles du catalogue LibreAI — la sélection réaliste d'alternatives si fastrtc ne vous convient pas.

// plus en audio

Plus en Audio

Projets de la catégorie Audio proches dans le catalogue, les plus proches en étoiles de fastrtc — continuez à explorer de part et d'autre.

Obtenir fastrtc

Gratuit et ouvert : récupérez le code source, mettez une étoile au dépôt et commencez à créer.