Voice UI Kit

Console Template

Full-featured console interface template for Pipecat applications

The Console template provides a complete, production-ready interface for Pipecat applications. It includes resizable panels, conversation display, bot media visualization, device controls, event logging, and more.

import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

<div className="h-screen">
  <ConsoleTemplate
    transportType="smallwebrtc"
    connectParams={{
      webrtcUrl: "/api/offer"
    }}
  />
</div>

Overview

The Console template is a comprehensive UI template that combines multiple panels and components into a single, cohesive interface. It's designed for development, testing, and production use cases.

Key Features

  • Resizable Panels: Adjustable layout with collapsible panels
  • Conversation Display: Tabbed interface with conversation and metrics
  • Bot Media: Audio visualization and video display panels
  • Device Controls: Audio, video, and screen sharing controls
  • DTMF Keypad: Phone-icon toggle that reveals a DTMF keypad (popover on desktop, bottom drawer on mobile)
  • Event Logging: Real-time RTVI event display with filtering
  • Session Information: Transport type, session ID, participant ID, and version
  • Responsive Design: Desktop resizable layout and mobile tabbed interface
  • Theme Support: Built-in theme switcher

Usage

Basic Usage

import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

export default function App() {
  return (
    <div className="h-screen">
      <ConsoleTemplate
        transportType="smallwebrtc"
        connectParams={{
          webrtcUrl: "/api/offer"
        }}
      />
    </div>
  );
}

With Daily Transport

import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

export default function App() {
  return (
    <div className="h-screen">
      <ConsoleTemplate
        transportType="daily"
        connectParams={{
          dailyUrl: "https://your-domain.daily.co/room-name",
          token: "your-token"
        }}
      />
    </div>
  );
}

With WebSocket Transport

The websocket transport requires installing the optional peer package:

npm install @pipecat-ai/websocket-transport
import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

export default function App() {
  return (
    <div className="h-screen">
      <ConsoleTemplate
        transportType="websocket"
        startBotParams={{
          endpoint: "/api/start",
          requestData: {
            transport: "websocket",
          },
        }}
      />
    </div>
  );
}

With MoQ Transport

The moq (Media-over-QUIC) transport requires installing the optional peer package:

npm install @pipecat-ai/moq-transport

The MoQ transport is pre-alpha. Pin a version and expect breakage on upgrade.

MoQ connects through a moq-lite relay. Typically the bot's startBot endpoint returns the relay connection details, so it's wired like the other transports:

import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

export default function App() {
  return (
    <div className="h-screen">
      <ConsoleTemplate
        transportType="moq"
        startBotParams={{
          endpoint: "/api/start",
          requestData: {
            transport: "moq",
          },
        }}
      />
    </div>
  );
}

Alternatively, to dial a relay directly without a start endpoint, pass the relay URL via transportOptions:

<ConsoleTemplate
  transportType="moq"
  transportOptions={{
    relayUrl: "https://relay.example.com:4080/",
  }}
/>

Custom Configuration

import { ConsoleTemplate } from "@pipecat-ai/voice-ui-kit";

export default function App() {
  return (
    <div className="h-screen">
      <ConsoleTemplate
        transportType="smallwebrtc"
        connectParams={{
          webrtcUrl: "/api/offer"
        }}
        titleText="My Application"
        assistantLabelText="AI Assistant"
        userLabelText="You"
        noBotVideo={true}
        noMetrics={true}
      />
    </div>
  );
}

Props

The ConsoleTemplate extends PipecatBaseProps and adds additional configuration options:

PropTypeDefault
PipecatBaseProps?
PipecatBaseProps
-
noRTVI?
boolean
false
serverRTVIVersion?
string | null
null
noUserAudio?
boolean
false
noUserVideo?
boolean
false
noScreenControl?
boolean
false
noDTMF?
boolean
false
keypadMode?
"buffered" | "immediate"
"buffered"
noTextInput?
boolean
false
noAudioOutput?
boolean
false
noBotAudio?
boolean
false
noBotAudioControls?
boolean
false
noBotVideo?
boolean
true
noAutoInitDevices?
boolean
false
theme?
string
"system"
noThemeSwitch?
boolean
false
noLogo?
boolean
false
noSessionInfo?
boolean
false
noStatusInfo?
boolean
false
titleText?
string
"Pipecat Playground"
assistantLabelText?
string
"assistant"
userLabelText?
string
"user"
systemLabelText?
string
"system"
collapseInfoPanel?
boolean
false
collapseMediaPanel?
boolean
false
audioCodec?
string
"default"
videoCodec?
string
"default"
noConversation?
boolean
false
noMetrics?
boolean
false
textRenderMode?
"karaoke" | "captions" | "instant"
"karaoke"
noTextRenderModeSwitch?
boolean
false
logoComponent?
React.ReactNode
undefined
conversationElementProps?
Partial<ConversationProps>
undefined
onInjectMessage?
(injectMessage: (message: Pick<ConversationMessage, 'role' | 'parts'>) => void) => void
undefined
onServerMessage?
(data: unknown) => void
undefined
onClient?
(client: PipecatClient) => void
undefined

Layout

Desktop Layout

On desktop (sm and above), the template uses a resizable panel layout:

  1. Header: Logo, title, theme switcher, info panel toggle, and connect button
  2. Main Area (70% height):
    • Left Panel: Bot audio/video visualization (collapsible)
    • Middle Panel: Conversation/Metrics tabs
    • Right Panel: Info panel with status, devices, and session info (collapsible)
  3. Bottom Panel (30% height): Events panel (collapsible)

Mobile Layout

On mobile, the template uses a tabbed interface:

  • Bot Tab: Bot audio and video panels
  • Conversation Tab: Conversation and metrics
  • Info Tab: Status, devices, and session info
  • Events Tab: Event log

Panel Configuration

Collapsible Panels

Panels can be collapsed/expanded:

  • Info Panel: Collapses to show icon buttons in popovers
  • Media Panel: Collapses to show compact bot media
  • Events Panel: Collapses to minimal height

Panel Visibility

Control which panels are visible:

  • noBotAudio / noBotVideo: Hide bot media panels
  • noConversation / noMetrics: Hide conversation/metrics tabs
  • noSessionInfo / noStatusInfo: Hide info panel sections
  • noUserAudio / noUserVideo / noScreenControl: Hide device controls
  • noDTMF: Hide the DTMF keypad toggle

Codec Configuration (SmallWebRTC)

For SmallWebRTC transport, you can specify audio and video codecs:

<ConsoleTemplate
  transportType="smallwebrtc"
  audioCodec="opus"
  videoCodec="vp9"
  connectParams={{
    webrtcUrl: "/api/offer"
  }}
/>

Supported codecs depend on browser support. Use "default" to use the browser's default codec.

Callbacks

onInjectMessage

Receive a function to manually inject messages into the conversation:

<ConsoleTemplate
  onInjectMessage={(injectMessage) => {
    // Store injectMessage for later use
    window.injectMessage = injectMessage;
  }}
/>

onServerMessage

Subscribe to server messages:

<ConsoleTemplate
  onServerMessage={(data) => {
    console.log("Server message:", data);
  }}
/>

onClient

Subscribe to client events before connecting. Fires once per client instance, on creation and before connect. See PipecatAppBaseonClient for full semantics.

import { type PipecatClient, RTVIEvent } from "@pipecat-ai/client-js";

<ConsoleTemplate
  onClient={(client: PipecatClient) => {
    client.on(RTVIEvent.BotStartedSpeaking, () => {
      console.log("Bot started speaking");
    });
    client.on(RTVIEvent.UserStartedSpeaking, () => {
      console.log("User started speaking");
    });
  }}
/>

Integration

The Console template:

  • Wraps your app with PipecatAppBase for client setup
  • Provides all necessary providers (ThemeProvider, PipecatClientProvider)
  • Handles connection state and error display
  • Manages panel collapse states
  • Tracks session and participant IDs automatically

Customization

<ConsoleTemplate
  logoComponent={<YourCustomLogo />}
  // ... other props
/>

Custom Conversation Props

<ConsoleTemplate
  conversationElementProps={{
    assistantLabel: "AI Assistant",
    clientLabel: "You",
    noAutoscroll: false,
    reverseOrder: true
  }}
  // ... other props
/>

Custom Theme

<ConsoleTemplate
  theme="dark"
  noThemeSwitch={true}
  // ... other props
/>

See Also

Changelog

v0.13.0
  • Added moq transport type support, passing through to PipecatAppBase.
v0.12.0
  • Added noDTMF prop to hide the DTMF keypad toggle entirely.
  • Added keypadMode prop ("buffered" | "immediate") to control how the keypad dispatches tones.
v0.11.0
  • Added onClient prop support - passes through to PipecatAppBase
v0.10.0
  • No longer wraps with ConversationProvider. Conversation state is now provided by PipecatClientProvider from @pipecat-ai/client-react.
v0.8.0
  • Added a tooltip on the Connect button showing the connection endpoint.
v0.6.0
  • Now uses UserAudioControl for speaker selection instead of UserAudioOutputControl.
  • Added noTextInput prop to hide text input controls.
  • Fixed noAudioOutput being correctly passed down to PipecatAppBase.
v0.4.1
  • Added UserScreenControl integration when supported.
v0.4.0
  • Now shows session ID from the transport.