October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

ElevenLabs + React: How to Build a Voice-Enabled UI

A practical guide to adding ElevenLabs voice to React: provider setup, session states, microphone permission, server-side credentials and a text-only fallback.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add voice to a React app with ElevenLabs, install @elevenlabs/react, wrap your voice component in ConversationProvider, and start a session with startSession when the user clicks a button. Use an agentId for a public agent. For an agent that requires authorization, use a signed URL or conversation token that your server generates, so the API key never reaches the browser. The harder part of a voice UI is the surrounding state: connection, listening, speaking, muting, errors and a fallback for people who can’t or won’t use a microphone. This guide covers those pieces. It was checked against ElevenLabs’ live docs on 2026-10-05, and those docs don’t pin a React version, so confirm package details when you implement.

What you need to install and where hooks live

ElevenLabs’ current React package is @elevenlabs/react. It re-exports @elevenlabs/client, so a typical integration doesn’t need both. Its conversation hooks only work beneath a ConversationProvider. You can wrap the whole app or only the subtree that contains the voice feature. The provider can also hold shared callbacks, client tools, overrides, mute state and server location (ElevenLabs React SDK docs).

npm install @elevenlabs/react

Wrapping only the relevant subtree keeps the rest of your app independent of the voice session. That is usually the better choice unless voice is a global feature.

Choose the right ElevenLabs path first

Two setups are easy to confuse:

  • ElevenAgents sessions. The React SDK docs cover these. A session starts from an agent ID, a signed URL or a conversation token.
  • Speech Engine. In the Speech Engine quickstart, your server supplies the LLM logic, ElevenLabs does speech-to-text and text-to-speech, and the browser client starts the conversation.

Use the identifiers and endpoints that belong to the path you picked. The rest of this guide follows the React SDK’s session flow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Third Reality Voice/Music Assistant Dev Edition – Preloaded with Home Assistant Voice Assistant and Music Assistant, Dual Digital Mics, 3W Speaker, 2.4G WiFi only, Open Source
  • Designed for Home Assistant Voice & Music Workflows: Preloaded with Home Assistant Voice Assistant and Music Assistant. Functions as both a voice input terminal and an audio playback endpoint.
  • Dual Microphones for Voice Capture: Built with dual digital microphones for wake word or button-activated voice capture. Audio is streamed to the Home Assistant voice pipeline.
  • Integrated 3W Speaker for Direct Playback: The built-in 3W/4Ω speaker supports TTS playback, Music Assistant streaming, and system audio without external speakers.
  • Linux-Based Local Operation: Runs a lightweight Linux system on a quad-core ARM A53 CPU with 256MB RAM and 512MB flash for local audio processing.
  • Development & Debugging Capabilities: Supports firmware flashing, and also provides access to live logs, on-device editing—suitable for routine development or issue diagnosis.

How do I build a voice-enabled UI with React? A step-by-step sequence

  1. Install @elevenlabs/react with your package manager.
  2. Add the provider. Wrap the voice component’s subtree in ConversationProvider and call the hooks only below it.
  3. Design the states before you write handlers (see the next section).
  4. Explain the microphone need, then request access from a user action such as clicking “Start voice chat”.
  5. Start the session with startSession, passing the credential that matches your agent.
  6. Keep secrets on the server. Your backend creates a token or signed URL, and the browser receives only that.
  7. Provide controls to end the session, mute, and change the input device. The SDK documents endSession, mute controls and input-device switching.
  8. Offer typed input if the agent supports text-only mode.

Model the UI as session state, not a mic button

A microphone button alone leaves users guessing. The SDK exposes connection status, listening/speaking mode and mute state, plus onConnect, onDisconnect, onError, onMessage and onModeChange callbacks. Use them to drive an explicit set of states:

UI state What to show Signal to use
Idle Start button and a short privacy/microphone explanation No active session
Connecting Disabled start button, progress indicator SDK connection status
Listening Live indicator, mute and end controls Mode via onModeChange or the mode state
Agent speaking Speaking indicator, optionally transcript text Mode state
Muted Clear muted badge and unmute control Mute state
Disconnected Option to restart onDisconnect
Error Plain-language message and a retry or typed-input option onError

The visual treatment is your design choice; the SDK only supplies the signals. Messages delivered through onMessage can include tentative or final user transcriptions, agent replies, and debug messages if enabled, which makes them a good source for a live transcript.

Rank #2
WinBridge Voice Amplifier with Bluetooth, Portable Speaker and Microphone
  • Teacher must haves: WB002 Bluetooth voice amplifier can be a thoughtful and practical gift for a teacher who frequently speaks in front of large groups or classrooms.15W powerful output could cover 10000 sq.ft,kindly recommend use this portable headset microphone speaker system indoors like classroom,it's plenty loud for a class of around 50 middle schoolers to hear you.
  • Easy Pairing and Operation: Wireless voice ampliifer unit is very easy to pair with bluetooth headset microphone,just turn them on and they will be paired automatically.Operation is straight forward, even if you could without needing the manual Everybody can very quickly up and running.
  • Long Battery Life: Portable voice amplifier built in 2600mAh rechargeable battery that could get up to 12-15 hours on one charge, perfect for teachers and presenters. wireless microphone headset support 8 to 10 hours. Both them are be charged quickly with the included Type-C charging cable.
  • Lightweight and Versatile: Bluetooth voice amplifier is lightweight to wear,it can be clipped to a belt or hung around the neck using the supplied neck strap.The bluetooth headset is lightweight and doesn't slide off head.Good think that wireless microphones come in two parts, it can also be used as handheld mic if anyone wants to use it that way. The headset comes apart very easily for storage.
  • Affordable and Reliable: The Voice Amplifier WB002 is an affordable yet reliable personal amplifier/speaker that comes with a Bluetooth earpiece/mic, a belt clip and a lanyard. WinBridge provides a one-year warranty + Lifetime Support and a 30-day return policy for added peace of mind.

Combined hook or granular hooks?

useConversation is the convenient option, but the docs say it re-renders on any state change. Granular hooks re-render only for the state they cover. If a small component such as a status badge or mute toggle needs one value, use a granular hook so the animated parts of your UI don’t re-render on every unrelated change. Check the React SDK page for the current hook names.

Request microphone access without surprising users

The SDK states: “Note that ElevenAgents requires microphone access for voice conversations. Consider explaining and allowing access in your app’s UI before the conversation starts.” In practice:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
WinBridge Wireless Voice Amplifier with Clip-On Lapel Mic for Teachers
  • End Voice Strain & Be Heard Clearly: Designed specifically for educators in small-medium classrooms: 15W powerful amplification ensures your voice cuts through background noise, so you don't need to shout to be heard clearly. Speak naturally all day without vocal cord damage or fatigue-just clip the mic and focus on teaching, not straining your voice. Suitable for teachers, presenters, and public speakers who value comfort over hoarseness
  • Ultra-Lightweight & Tangle-Free Comfort: At only 0.64oz, this wireless lavalier mic is lighter than most competing lapel mics-no bulky headsets pressing on your head, no dangling wires restricting your movement. Clip it to your collar, hold it in hand, or use the included strap for versatility: walk around the classroom, write on the whiteboard, or interact with students freely without sacrificing sound quality
  • All-Day Power & Truly Simple Setup: Built with a 2600mAh rechargeable battery in the speaker (12-15 hrs of voice amplification) and 300mAh battery in the mic (10+hrs of use)-teachers report using it for 5 consecutive days without charging. The auto power-down feature saves battery when not in use, and the included Type-C dual charging cable lets you charge both units simultaneously for hassle-free prep
  • Auto-Pair & Mute Function - No Technical Hassle: Just turn on the amplifier and mic-they pair instantly, no complicated setup or technical knowledge required. Both the speaker and lapel mic have a mute button: pause audio temporarily for private conversations or interruptions without turning off the entire system. Simple, intuitive operation for busy teachers and presenters
  • Bluetooth Playback & Versatile Use - Beyond the Classroom: Supports Bluetooth music playback (easily connect to your phone/laptop for background music). Suitable not just for teaching, but also for gym instruction, guided tours, church services, and outdoor events
  • Show a sentence of context next to the start button explaining that voice requires the microphone.
  • Trigger the start from a click, not on page load.
  • If the browser prompt is denied, move to an error or fallback state that offers typed input rather than a dead end.

Start a session: public versus authorized agents

A public agent without authentication needs only its agentId. If authorization is required, your server obtains a signed URL (for WebSocket) or a conversation token (for WebRTC) through ElevenLabs’ REST API. Voice sessions use WebRTC and text-only sessions use WebSocket by default; you can set the connection type explicitly if needed.

import { ConversationProvider, useConversation } from "@elevenlabs/react";

function VoiceButton() {
  const conversation = useConversation({
    onError: (err) => console.error(err),
  });

  async function start() {
    // Your own endpoint, which calls ElevenLabs with the server-side API key
    const { token } = await fetch("/api/conversation-token").then(r => r.json());
    await conversation.startSession({ conversationToken: token });
  }

  return (
    <button onClick={start}>Start voice chat</button>
  );
}

export default function App() {
  return (
    <ConversationProvider>
      <VoiceButton />
    </ConversationProvider>
  );
}

This is a sketch of the pattern: a provider, a hook beneath it, and a token fetched from your own endpoint. The /api/conversation-token route is a placeholder name. The Speech Engine quickstart follows the same shape, with the client fetching a conversation token from a server endpoint and passing it to startSession. That endpoint uses the server’s ElevenLabs API key, which must never appear in client code.

Rank #4
ZOWEETEK Portable Rechargeable Mini Voice Amplifier for Teachers
  • A True Original Voice Amplifier that amplifies your voice without making it mechanized in sound quality
  • ZOWEETEK Voice Amplifier Amplifys your voice and saves your throat. The sound is clear, crisp, no noise and no distortion. The max 10 watts sound can cover about 10000 sq. ft (1000 ㎡), loud enough to cover a big room
  • Portable Voice Amplifier Compact size (4. 1 x 1. 4 x 3. 4 inches) and light weight (0. 36 lb.). You can use the back clip to fix it on your belt or pocket. You can also use waistbelt to tie it around your waist or hang it on your neck
  • Built in 1800 mAh rechargeable lithium battery. Continuously working time is up to 12 hours. You can use USB cable to charge this mini voice amplifier. Only needs 3~5 hours to fully charge it
  • Supports MP3 audio playing: TF (Micro SD) card playing & USB flash drive playing. Can repeat single tune, loop all music and switch songs
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Add a text fallback

If the configured agent supports text-only mode, a typed option helps people in quiet or noisy places, on devices without a microphone, or who deny permission. In text-only mode the SDK requests no microphone permission and creates no audio context. sendUserMessage submits typed text in a conversation. This only works when the agent is configured for it, so check the agent settings before promising a text option in your UI.

Custom UI or ElevenLabs UI?

ElevenLabs UI is a component library and custom registry built on shadcn/ui, with components for agents, transcription and audio, and official voice chat and voice-form examples. It’s a quick way to prototype, and you add and customize the components in your own project. It doesn’t replace understanding the session lifecycle above, since you still manage credentials, permissions and error states. Build custom when you need tight control over the experience; start from the registry when you want a working baseline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
seeed studio reSpeaker XVF3800 USB Microphone Array with Case
  • [Crystal-Clear Voice Capture in Noisy Environments]: Powered by the advanced XMOS XVF3800 voice processor, this 360° circular 4-microphone array delivers exceptional far-field audio clarity up to 5 meters. With built-in AEC, adaptive beamforming, dereverberation, DoA, VAD, dynamic noise suppression, and 60dB AGC—ensuring your voice stands out even in loud, echo-filled, or reverberant environments.
  • [360° Far-Field Voice Pickup up to 5 Meters]: Equipped with a circular array of 4 high-sensitivity digital MEMS microphones, the device captures sound from every direction with built-in Direction of Arrival (DoA) detection, enabling accurate voice recognition from up to 5 meters away — perfect for smart assistants, meeting rooms, robotics, and full-room smart home voice coverage.
  • [Plug & Play USB – No Drivers Required]: Simply connect via USB and it works instantly as a standard plug-and-play USB microphone. Ships with USB audio firmware pre-installed — no additional MCU, no programming, no driver installation needed. Fully compatible with Windows, macOS, Linux, Raspberry Pi, and NVIDIA Jetson — ideal for developers, makers, and AI voice applications right out of the box.
  • [Flexible Integration for AI, IoT & Voice Projects]: Supports two mutually exclusive, firmware-selectable modes — USB (default, plug-and-play) and I2S (via DFU reflash, requires external MCU like ESP32 or Arduino). Ideal for smart home, voice AI, conferencing, robotics, and custom embedded voice projects.
  • [Enclosed Design for Easier Deployment]: Comes with a protective case featuring a programmable RGB LED ring for cleaner desktop installation and easier handling. Compared with the bare-board version, it's more convenient for prototyping, testing, demos, conference calls, and product evaluation — ready to use out of the box with no assembly required.

Other SDK capabilities

  • Client tools and overrides. The provider can hold client tools and conversation overrides, letting the agent trigger actions in your UI.
  • Controlled mute state. Mute state can be managed through the provider.
  • Server location. serverLocation accepts us (the default), eu-residency, in-residency and global. Set it when your deployment has regional needs, but the setting alone isn’t a compliance guarantee, so verify your requirements independently.

Pre-launch checklist

  • Hooks are all beneath ConversationProvider.
  • No ElevenLabs API key in client bundles or environment variables exposed to the browser.
  • Microphone explanation appears before the permission prompt; denial leads somewhere useful.
  • Every state in the table above is reachable and visually distinct.
  • Users can always end the session and mute.
  • Typed fallback works if your agent supports text-only mode.
  • Package and docs re-checked for current names, since the SDK documentation is live and unversioned in the passages reviewed.

Optional: a headset or USB microphone can help you test audio input separately from your laptop’s built-in mic, but the docs don’t require or recommend any specific hardware. For the React side, the React reference covers the core APIs used here.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.