百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

realtime-ai

> 编程语言
开源

一个用于音频和视频的实时代理框架。

182 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个用于音频和视频的实时代理框架。

Realtime AI


Overview

Realtime AI is a WebRTC-based framework for building low-latency AI applications with audio and video. It features a modular pipeline architecture inspired by GStreamer, enabling you to compose processing elements for speech recognition, LLM interactions, and text-to-speech.

Architecture:

Client (Browser) → WebRTC Gateway → AI Pipeline
                                    (Decode → STT → LLM → TTS → Encode)

Features

  • Low Latency - WebRTC for real-time audio/video streaming
  • Modular Pipelines - Composable processing elements
  • AI Integrations - Gemini, OpenAI Realtime API, Azure STT/TTS
  • ⚡ Interruption Support - Natural conversation flow

Quick Start

Installation

macOS:

bash
brew install opus ffmpeg go

Ubuntu/Debian (推荐使用安装脚本):

bash
# 使用预编译 FFmpeg (更稳定)
./scripts/setup-ffmpeg.sh
eval "$(./scripts/setup-ffmpeg.sh --env)"

# 安装其他依赖
apt-get install pkg-config libopus-dev

Ubuntu/Debian (手动安装):

bash
apt-get install pkg-config libopus-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev

Setup:

bash
git clone https://github.com/realtime-ai/realtime-ai.git
cd realtime-ai
go mod download

Run Example

bash
# Set API key
export GOOGLE_API_KEY="your_api_key"

# Run Gemini assistant
go run examples/gemini-assis/main.go

# Open browser
open http://localhost:8080

Basic Usage

go
// Create pipeline
pipeline := pipeline.NewPipeline("assistant")

// Add and link elements
resample := elements.NewAudioResampleElement("resample")
gemini := elements.NewGeminiElement("gemini", apiKey)
audioPacer := elements.NewAudioPacerSinkElement("audioPacer")

pipeline.Link(resample, gemini)
pipeline.Link(gemini, audioPacer)

// Start processing
pipeline.Start(ctx)

Documentation

  • CLAUDE.md - Development guide and architecture details
  • WebRTC Protocol - Signaling protocol specification

Project Structure

pkg/
├── pipeline/      # Core pipeline system
├── elements/      # AI, codecs, and processing elements
├── connection/    # WebRTC abstractions
├── server/        # HTTP/WebRTC server
└── audio/         # Audio utilities

examples/
├── gemini-assis/  # Gemini multimodal assistant
├── local-assis/   # Local connection example
└── openai-realtime/ # OpenAI Realtime API

License

Apache License 2.0 - see LICENSE for details.

Status

⚠️ Active Development - APIs may change without notice.


Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言