LibreAI / Áudio / fastrtc
// audio · gradio-app/fastrtc

fastrtc

fastrtc é um projeto de áudio de código aberto de gradio-app (gradio-app/fastrtc no GitHub). Tem 4.631 estrelas no GitHub e 436 forks, é publicado sob a licença MIT e foi atualizado pela última vez no GitHub em 12 de janeiro de 2026.

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

★ 4,6 mil estrelas⑂ 436 forksMITatualizado jan 2026
▦ visual: o README deste projeto não inclui nenhuma captura incorporável,
então aqui vai um marcador. O guia abaixo está completo mesmo assim.
// dados do projeto

Dados do projeto

Repositório
gradio-app/fastrtc
Estrelas no GitHub
4.631
Forks
436
Licença
MIT
Última atualização no GitHub
12 de janeiro de 2026
Categoria
Áudio
Tipo de ficha
Guia de instalação completo
Site oficial
Official site
// como funciona

Como funciona

  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.

// recursos

Por que as pessoas gostam tanto

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
// execute você mesmo

Execute você mesmo

  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()
// casos de uso

O que você pode criar

Advertisement
// perguntas frequentes

Perguntas frequentes

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()`.

// continue explorando

Ferramentas semelhantes

Áudio

hifi-gan

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

★ 2,4 mil estrelasMIT
Ver o guia →
Áudio

mcp-video-analyzer

MCP server that turns any video — YouTube.

★ 85 estrelasMIT
Ver o guia →
Áudio

gTTS

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

★ 2,6 mil estrelasMIT
Ver o guia →
Áudio

Real-Time-Voice-Cloning

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

★ 60,2 mil estrelasNOASSERTION
Ver o guia →
Áudio

VieNeu-TTS

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

★ 2,8 mil estrelasApache-2.0
Ver o guia →
Áudio

librosa

Python library for audio and music analysis

★ 8,6 mil estrelasISC
Ver o guia →
// alternativas

Alternativas em Áudio

Os outros projetos de Áudio com mais estrelas no catálogo do LibreAI — a lista realista de alternativas se fastrtc não for o ideal para você.

// mais em audio

Mais em Áudio

Projetos de Áudio próximos no catálogo, os mais próximos em estrelas de fastrtc: continue explorando dos dois lados dele.

Baixe o fastrtc

Grátis e aberto: pegue o código-fonte, dê uma estrela no repositório e comece a criar.