Skip to content

Every account gets 10,000 free minutes every month for video, voice and chat in your app.How the free minutes work

Guide · Developer

Build a Live Audio Room App With React Native

Build a clubhouse-style live audio room in React Native with @voltkit-rtc/react-native: a stage and listeners, raise hand, speaking rings, audio routing.

Author
VoltKit
Published
Reading time
8 min read

A live audio room has a stage and an audience: a few people speak, everyone else listens, a listener raises a hand, and the host brings them up. It is the shape of a talk show, a language club or a Friday hangout, and a good first realtime feature because the screen is simple: a grid of avatars, a ring around whoever is talking, a hand button. This guide builds one in React Native with @voltkit-rtc/react-native, the React Native SDK of VoltKit RTC: a token endpoint, the room screen, the microphone for speakers, raise hand and promotion, speaking rings, the audio output, the room in the background and what it costs. The SDK is tested on Android; iOS is a preview. The same room in Kotlin is build a voice chat app, and the calls have the same names.

Before you start

You need a VoltKit account and an RTC project; the quickstart creates both and gives you the API base URL and secret. A new project starts with every media option off: open the project's Settings tab, find Media and quality, and switch on standard voice, or the SDK refuses the microphone with the code media-disabled.

You also need Node.js, Android Studio's SDK and an Android phone with USB debugging: the emulator's microphone records silence. The SDK needs React Native 0.82 or newer with the New Architecture and React 19.1 or newer; an Expo app needs a development build, not Expo Go (Expo).

Every account gets 10,000 free participant-minutes every month, shared by all your projects, at any quality. They are spent before anything paid, so the rooms you open while you build cost nothing until they are used up: what the free minutes cover.

Step 1: roles and the token endpoint

Your backend chooses each person's role when it mints their token: host for the room's owner, cohost for a speaker on stage, moderator for someone who keeps order without speaking, and viewer for a listener. Roles change during the room without your backend: the host promotes a listener to cohost and back to viewer.

The endpoint checks your own login, creates the room or returns the live one, and returns token and wsUrl for that person; build a token server has it in Node.js, Spring Boot, Python, Go and PHP. In the app, ask for it right before joining:

// token.ts
export type Credentials = { token: string; wsUrl: string };

export async function fetchCredentials(callId: string, accessToken: string): Promise<Credentials> {
  const res = await fetch(`https://api.example.com/calls/${encodeURIComponent(callId)}/token`, {
    method: "POST",
    headers: { Authorization: `Bearer ${accessToken}` }, // your app's sign-in, never the RTC secret
  });
  if (!res.ok) throw new Error(`Could not get a token (${res.status}).`);
  return (await res.json()) as Credentials;
}

Step 2: install and build

npm install @voltkit-rtc/react-native @voltkit-rtc/react @voltkit-rtc/client react-native-webrtc

The SDK has native code, so build the app after installing: npx expo run:android with the SDK's config plugin in app.json, or npx react-native run-android with the RECORD_AUDIO permission and the call service in AndroidManifest.xml. Add video calling to a React Native app has both blocks; an audio room needs no camera permission.

Step 3: the room screen

The room screen fetches the credentials on a tap, keeps them in state with an attempt counter, and renders VoltkitProvider with them. The provider makes the client, connects it, takes the phone's call audio, starts the call service and lets everything go when it unmounts. onClosed says why a session ended (ENDED maps each reason to a sentence), and a closed session stays closed, so joining again mounts a new provider with a new key. The whole screen is a call screen in the docs; its provider part:

  return (
    <VoltkitProvider
      key={attempt}
      wsUrl={credentials.wsUrl}
      token={credentials.token}
      onError={(err) => console.warn("[voltkit]", err.message)} // warnings too: see Errors
      onClosed={(reason) => {
        setCredentials(null);
        setNotice(ENDED[reason]);
      }}
    >
      <Call onRetry={join} />
    </VoltkitProvider>
  );
}

Inside the provider, Call draws the room from the hooks. useParticipants() is everyone in the room, each with their role, the metadata they joined with (a name, an avatar) and handRaised; split it into the stage (host and cohost) and the audience (viewer). useRoom() gives the connection state and your own info.role. Remote sound plays by itself: an audio room needs no AudioTrack and no video component.

Step 4: the microphone for speakers

Only hosts and co-hosts publish. useLocalMedia().publish({ video: false }) opens the microphone alone and asks for the permission first; a refusal rejects with media-unavailable, and its data says whether the user said no for now (denied) or blocked it in Settings (blocked), in which case offer Linking.openSettings(). The permissions section has that handler in full. A mute button is setMicEnabled(false), and everyone else sees it on the trackMuted event. A listener never publishes, so the permission is asked only when someone comes on stage.

Step 5: raise a hand and bring someone on stage

A listener asks to speak with raiseHand() on the client from useVoltkitClient(). The host sees each request on handRaised and accepts with promote(identity, "cohost"):

import { useState } from "react";
import { Button, Text, View } from "react-native";
import { useVoltkitClient, useVoltkitEvent } from "@voltkit-rtc/react-native";

/** For the host: who raised a hand, and a button to bring each one on stage. */
export function RaisedHands() {
  const client = useVoltkitClient();
  const [hands, setHands] = useState<string[]>([]);

  useVoltkitEvent("handRaised", ({ identity, handRaised }) =>
    setHands((list) => [...list.filter((i) => i !== identity), ...(handRaised ? [identity] : [])]),
  );

  return (
    <View>
      {hands.map((identity) => (
        <View key={identity}>
          <Text>{identity} raised a hand</Text>
          <Button title="Bring on stage" onPress={() => void client?.promote(identity, "cohost")} />
        </View>
      ))}
    </View>
  );
}

On the listener's phone the promotion arrives as roleChanged for their own identity, and useRoom().info.role reads cohost from then on: the moment to publish the microphone. promote(identity, "viewer") sends a speaker back, and their microphone stops by itself. A moderator can mute a speaker with forceMute(identity, "audio") and remove someone with kick(identity, reason); the service enforces each call from the role in the token.

Seats are optional: a fixed grid of chairs is a named slot per chair, held by one person at a time with claim("seat-3") and release("seat-3"), and claimChanged redraws the board. Group audio rooms covers seats and room metadata.

Step 6: speaking rings and the audio output

useIsSpeaking(identity) is true while that person talks, read twice a second on a phone, so a ring around a tile follows the conversation; useActiveSpeakers() ranks who is talking, most active first, for a larger tile.

A room plays on the loudspeaker by default, and a Bluetooth or wired headset wins while it is connected. useAudioOutput() gives you the outputs and setSpeakerphoneOn(on) for a toggle; an output picker is in audio routing. Do not set the SDK's audio mode to media in a room where a listener may come on stage: it is for apps whose users only listen, and a listener brought on stage would echo.

Step 7: the room in the background

Listeners lock their phone and keep listening, and a speaker who takes a call should not drop off the stage. The SDK's call service keeps the room going on Android: a foreground service with an ongoing notification, started when the room connects, whose words you set with the provider's callService prop. An app that targets Android 14 or later declares the service's types in Play Console; calls in the background has the details. The room's chat, for comments under the stage, runs on the same connection: sendMessage and the message event, as live chat describes.

Test it on two phones

Join the same room from two phones, one as host and one as listener, on the loudspeaker in different rooms. Raise a hand, bring the listener up, talk, send them back. Lock the listener's screen and keep talking; switch the host from Wi-Fi to mobile data and watch the state go through reconnecting and back. If one person hears their own voice back, the other phone is the cause (Echo). A host on a weak connection can check it first:

Check a connection with theInternet Speed Test

What a room costs

Each connected person is billed per second, listeners included. An audio room is standard voice for everyone, and an empty room costs nothing:

A one-hour room: 3 speakers and 17 listeners

20 people × 60 minutes = 1,200 participant-minutes

1,200 participant-minutes × 39 ÷ 1,000 = 46.8 credits, ₹46.80 (≈ $0.49) at today's rate

Standard Voice: 39 credits per 1,000 participant-minutes. Billed per second, so a 7½-minute call costs 7½ minutes.

Prices are in Indian rupees; dollar figures are approximate, at ₹95 per US dollar on 24 October 2026, for orientation only. You are billed in rupees.

The free minutes of the month are spent first and reset on the 1st (UTC); used up, the rest is billed from your wallet or plan at the same rates.

What is a participant-minute? explains the unit; the pricing page has every rate and pricing in India a calculator.

Where to go next

While you develop, the JWT Decoder shows a test token's expiry on your own device and never sends it anywhere:

Inspect a test token with theJWT Decoder

Use test tokens only: a token is a credential for a room, and production tokens belong to the app that asked for them.

Frequently asked questions

What is a live audio room?

A room where a few people speak on a stage and everyone else listens, with a way for a listener to raise a hand and be brought on stage. The host and the speakers publish their microphone; listeners only receive, which keeps a big room light and cheap.

Do I need my own servers for an audio room app?

Only a small backend that signs your users in, creates rooms and mints a token per person with the role you choose. VoltKit RTC runs the media servers and the relays, and the React Native SDK handles the phone's audio, reconnection and the call in the background.

Does the app work when the phone screen is off?

On Android, yes, when the app declares the SDK's call service: a foreground service with an ongoing notification keeps the room going while the app is in the background, with the microphone sending and the sound playing. Without it, Android cuts the connection a few seconds after the app leaves the screen.

Does it work on iOS?

The React Native SDK is tested on Android; iOS is a preview, and audio routing and the call service are Android only for now. The Flutter SDK targets iOS as well, so a Flutter build is the safer choice today if iPhones matter on launch day.

What does a room with many listeners cost?

Each connected person is billed per second at the standard voice rate from the live price list, listeners included, and nothing while the room is empty. Every account also gets a monthly allowance of free participant-minutes, spent first; the live number is on the free minutes page.

← Back to Guides

VoltKit RTC

Video and voice calls in your app

VoltKit RTC is an API and SDKs for live video, voice and chat: your server creates rooms and tokens, VoltKit runs the media, and you pay in rupees by the participant-minute.

Every account gets 10,000 free participant-minutes every month, shared by all your projects, at any quality. How the free minutes work

Standard voice from ₹39 (≈ $0.41) and Full HD video with HD audio from ₹99 (≈ $1.04) per 1,000 participant-minutes. Chat is included.

SDKs:JavaScriptReactReact NativeFlutterAndroidServer SDKs for Node.js, Python, Go, PHP and Java

You might also like

Something useful from another corner of VoltKit.