volcengine/rtc-aigc-demo

RTC AIGC Demo

What it solves

Building a conversational AI product usually means wiring together speech recognition, a large language model, and text-to-speech, plus handling audio/video streaming, edge access, and resource scheduling. This demo shows how to skip that plumbing: you configure the ASR, LLM, and TTS types through a standard OpenAPI, and the Volcengine cloud service manages the rest of the chain.

How it works

Two sub-projects run side by side. web/ is the frontend (a React app created with CRA), and server/ is a local Koa development server. The root package.json just orchestrates starting both with yarn dev. The server holds credentials (RTC App ID, access keys) in .env.local, reads scene configurations from server/scenes/*.json, and communicates with Volcengine's AIGC-RTC Server via OpenAPI (version 2025-06-01). The server generates per-session identifiers (SessionID, RoomId, UserId, Token, TaskId) so multiple browser pages can talk simultaneously. The frontend uses the RTC Web SDK to send audio, the server invokes the VoiceChat API to process speech, run the LLM, and return synthesized speech. Scenes are defined in JSON files; the file name becomes the SceneID. The server also generates RTC Tokens and enables the conversation-state callback, letting the UI know when the AI is ready.

Who it’s for

Developers who want to quickly prototype or ship real-time conversational AI experiences—voice chatbots, digital humans, or multi-modal interactions—without building the streaming, ASR, LLM integration, and TTS from scratch. The README expects Node.js 22, Yarn 1.22, and familiarity with environment variables and RTC concepts.

Highlights

  • Fully open source: two parallel sub-projects (web/ and server/) with clear separation, runnable with one yarn dev command.
  • Cloud-side heavy lifting: Volcengine AIGC-RTC Server handles audio/video processing, ASR, LLM integration, TTS, and edge access.
  • Scene-driven configuration: edit JSON files to add new use cases; use ${ENV_NAME} to reference secrets stored only in .env.local.
  • Per-page session isolation: the server generates unique IDs and tokens for every browser session, so multiple conversations can run at the same time.
  • Production builder included: yarn --cwd web build produces a static frontend build (still needs the server at runtime).
  • Includes health check endpoint, automated tests, and a troubleshooting FAQ for common errors like token mismatches and missing microphone permissions.

Related

  • Project
  • Project
  • Project
  • Project
  • Project