ByteChef LogoByteChef
PlatformAutomationBuildVoice
Enterprise EditionComing soon

Voice Quickstart

Build a browser voice workflow with a Deepgram voice agent, test it in the editor, and connect it to the chat widget or AI Hub.

Coming soon

This capability is not available in the latest released version of ByteChef.

A browser voice workflow lets a user speak to an AI assistant from the browser. This quickstart builds a workflow with the Browser Voice Session trigger and the Deepgram Voice Agent action, tests it in the workflow editor, and connects it to a front end.

Architecture

microphone → ByteChef WebSocket → Deepgram Voice Agent (STT + LLM + TTS) → speaker

The Deepgram Voice Agent action runs speech-to-text, LLM reasoning, and text-to-speech at Deepgram over a single WebSocket. ByteChef forwards the audio, so you do not configure STT, the agent, and TTS as separate tasks. Splitting the chain across providers (for example, Deepgram STT, an Anthropic LLM, and ElevenLabs TTS) is possible, but the single-action setup is the recommended starting point.

Prerequisites

  • ByteChef Enterprise Edition. Browser voice is not available in Community Edition.
  • A Deepgram account and API key, from console.deepgram.com.
  • A browser that supports the AudioWorklet API: Chrome 66+, Firefox 76+, or Safari 14.1+.
  • HTTPS, or http://localhost for development. Browsers block microphone access on other insecure origins.

Step 1: Create a Deepgram connection

  1. Click Connections in the main sidebar, then New Connection.
  2. Select Deepgram, paste the API key, and click Save.

Step 2: Build the workflow

  1. Create a workflow.

  2. Add the trigger Browser > Browser Voice Session.

  3. Configure the trigger:

    PropertyValue
    Real-Time WorkflowAny name, for example voice-subflow-1
    Audio Sample Rate16 kHz
    Echo CancellationOn
    Noise SuppressionOn
  4. In the trigger's Real-Time Workflow editor (the embedded sub-workflow), add Deepgram > Voice Agent as the only task and configure it:

    PropertyDescription
    System PromptThe agent's behavior, for example "You are a helpful assistant. Keep responses concise and natural for spoken delivery."
    GreetingThe assistant's opening line, for example "Hi! How can I help?"
    LLM Provider, LLM ModelThe model that generates replies, for example OpenAI gpt-4o-mini.
    TTS Provider, TTS VoiceThe voice, for example Deepgram aura-asteria-en.
    Audio Input/Output Encodinglinear16. The input sample rate must match the trigger's sample rate.
    ConnectionThe Deepgram connection from step 1.

Step 3: Test in the workflow editor

  1. Save the workflow.
  2. Click the microphone icon in the Playground panel header. The icon appears only when the workflow has a voice trigger.
  3. Grant microphone permission.
  4. Wait for the greeting, then speak.

See Testing voice in the editor for details and troubleshooting.

Step 4: Deploy

Deploy the project. The deployed workflow gets a webhook URL such as https://<your-host>/api/automation/webhooks/<webhook-id>. Use this URL in the chat widget, the AI Hub voice settings, or another front end.

Step 5: Connect a front end

Chat widget

import {AutomationChatModal} from '@bytechef/chat';

<AutomationChatModal
    config={{
        voiceWebhookUrl: 'https://<your-host>/api/automation/webhooks/<webhook-id>',
        webhookUrl: 'https://<your-host>/api/automation/webhooks/<webhook-id>',
    }}
/>

If the widget runs inside an <iframe>, the iframe must have allow="microphone". Otherwise the browser denies microphone access without a prompt:

<iframe src="https://your-site.com/chat" allow="microphone"></iframe>

See the widget README for the full configuration reference.

AI Hub composer

A workspace administrator selects one of two voice routing modes in AI Hub Settings (the gear icon in the composer). The modes are mutually exclusive: selecting one clears the other.

ModeHow it worksSetup
Workflow webhook (Path A)Voice runs through your workflow's agent, with its system prompt, model, and tools. The AI Hub chat agent, its tools, and its memory are not active during voice.Select Workflow webhook (Path A), paste the webhook URL from step 4, and click Save.
Native AI Hub voice (Path B)Deepgram handles STT and TTS only. The AI Hub agent runs the LLM with the workspace's provider, tools, and chat memory. Voice and text turns in the same chat share session memory.Create a Deepgram connection, select Native AI Hub voice (Path B), select Deepgram as the provider, paste the connection ID, optionally override Voice ID (default aura-asteria-en), and click Save.

Then open an AI Hub chat and click the microphone button.

To use the Deepgram Voice Agent for STT, LLM, and TTS together, use Path A with a workflow that contains the Voice Agent action.

Limitations of native AI Hub voice

  • Text-to-speech is buffered per sentence, not per token.
  • The assistant does not stop speaking when the user starts talking (no barge-in).
  • Deepgram is the only supported provider.

Costs

Deepgram bills voice usage per minute; ByteChef does not meter or charge for voice minutes. Check Deepgram's current pricing, and limit concurrent sessions per workspace in production.

Troubleshooting

SymptomCause and fix
The microphone button does not appearThe workflow has no voice trigger with a Real-Time Workflow. Complete step 2.
The microphone button is disabledThe browser does not support AudioWorklet. Use a supported browser.
"Voice requires https://"The page is served over plain HTTP from a host other than localhost. Serve ByteChef over HTTPS.
Microphone permission deniedThe browser stored a denial for the origin. Reset it in the browser's site settings and reload.
"Invalid or expired session token"Session tokens are single-use and expire after 60 seconds. Start a new session; check the client clock if it persists.
No audio responseThe trigger's sample rate and the Voice Agent's audioInputSampleRate differ. Use the same value (typically 16000 for input; output is typically 24000).
The session ends after 30 minutesThe server limits each session to 30 minutes. Start a new session.

How is this guide?

Last updated on

On this page