Valora
API Reference@valora-ai/reactindexFunctions

VoiceAssistantControlBar

function VoiceAssistantControlBar(__namedParameters): Element;

Defined in: packages/react/src/components/controlbar/VoiceAssistantControlBar.tsx:40

Mic toggle + leave, wired to useTrackToggle('microphone'). Composes the existing Valora ControlBar.

Parameters

ParameterType
__namedParametersVoiceAssistantControlBarProps

Returns

Element

Example

// Basic — show microphone and leave controls.
<VoiceAssistantControlBar controls={{ microphone: true, leave: true }} onLeave={hangUp} />

// Advanced — compose voice state with the assistant controls.
function AssistantFooter() {
  return <VoiceRoom agent={agent}><AssistantFooterContent /></VoiceRoom>;
}

function AssistantFooterContent() {
  const { state } = useVoiceAssistant();
  return (
    <>
      <p>{state === "listening" ? "Listening..." : "Ready"}</p>
      <VoiceAssistantControlBar controls={{ microphone: true, leave: true }} onLeave={hangUp} />
    </>
  );
}

On this page

Valora is local-first

No API key, no server — everything in this doc runs on-device.

Star on GitHub