DOCS
v0.4

AI Components / Voice Panel

Voice Panel

Self-managing voice panel with built-in Web Speech API, mic button with pulse rings, real-time transcript, push-to-talk, browser detection, permission handling, and auto-timeout. Also available as a mic button variant inside ai-chat.

ai-workflowv0.6.0

Playground

Examples

Click to speak
<ai-voice-panel style="max-width:320px;"></ai-voice-panel>
Push-to-talk
<ai-voice-panel pushToTalk style="max-width:320px;"></ai-voice-panel>
Continuous + Portuguese
<ai-voice-panel continuous language="pt-BR" style="max-width:320px;"></ai-voice-panel>

Import

import { AiVoicePanel } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/ai-voice-panel';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
languagestring"en-US"BCP-47 language tag
pushToTalkbooleanfalseHold mic to talk mode
continuousbooleanfalseKeep listening after each result
timeoutnumber10Auto-stop after N seconds of silence (0=off)
rounded"none"|"sm"|"md"|"lg""lg"Border radius variant

Events

EventDetailDescription
ai-voice-start{}Recording started
ai-voice-stop{}Recording stopped
ai-voice-result{transcript, isFinal}Speech result (interim or final)
ai-voice-error{error, message}Error with human-readable message