![Ringle](assets/ringle-logo.png)

# Voice demo and voice selection

## Purpose
Talk to your workspace's AI assistant by voice, and choose the voice it speaks with using the voice picker on the workspace Settings page.

## Prerequisites
- A demo workspace (see "Creating a demo workspace").
- Speakers or headphones to hear the assistant.
- A microphone and a browser with speech recognition (Chrome works best) for spoken input. Without one, the voice page falls back to typed input.

## Steps

### Step 1

![demo-voice, step-01](screenshots/demo-voice/step-01.png)

**Action:** Click Voice in the workspace sidebar, or Start voice on the dashboard.

**What you should see:** The Voice Demo page opens with a Connected status chip, a Language selector, and a Start Conversation button. The layout mirrors the chat page. The same OMS panel appears on the right (see the "Text chat and the OMS panel" guide for the tabs and sector rules).

### Step 2

![demo-voice, step-02](screenshots/demo-voice/step-02.png)

**Action:** Click Start Conversation.

**What you should see:** The assistant's greeting appears in the transcript and is spoken aloud. The caption under the round microphone button reads "Bot Speaking..." while it talks. It then switches to a ready caption inviting you to click the mic and speak. The OMS panel chip flips to Live. If your browser has no speech recognition, a text box is shown instead of the microphone button.

### Step 3

*Screenshot not available (a live voice session needs a microphone; the page and voice picker are shown above)*

**Action:** Click the microphone button and speak, for example your name and a question about an order. Click the button again or pause to finish.

**What you should see:** The caption shows "Listening..." and your words appear as an interim transcript. The message sends automatically when recognition ends. The assistant answers both in the transcript and out loud. The microphone is disabled while the assistant is speaking.

### Step 4

![demo-voice, step-01](screenshots/demo-voice/step-01.png)

**Action:** Click Stop to end the voice session.

**What you should see:** The transcript keeps the conversation with an ended marker. The controls return to the Start Conversation state shown here, ready for another run.

### Step 5

![demo-voice, step-03](screenshots/demo-voice/step-03.png)

**Action:** To change the assistant's voice, click Settings in the sidebar. Find the Voice Selection card.

**What you should see:** The card shows a Standard / Premium provider toggle with a short description of the selected tier, a Search Voices box, and a scrollable list of voices. Each row has the voice's name, a one-line description, and a play button to preview it. A check mark and a highlight mark the selected voice, which is the workspace's current voice when the page opens. A Save Voice button sits at the bottom right. It stays disabled until you pick a different voice.

### Step 6

![demo-voice, step-04](screenshots/demo-voice/step-04.png)

**Action:** Type a name in Search Voices to filter the list. Click a row's play button to hear a sample. Click a row itself to select that voice. Then click Save Voice to apply it.

**What you should see:** The list narrows as you type. The play button toggles to a stop control while the sample plays, and the selected row is highlighted. After saving, the assistant uses the new voice on the next voice conversation. Voice previews come from the speech provider and need no microphone.

## Troubleshooting
- No microphone button appears during a session: your browser does not support speech recognition, or microphone access was denied. Use the text box that appears instead, or switch to Chrome and allow microphone access for the portal.
- You cannot hear the assistant: check the tab is not muted and system volume is up. Browsers can also block audio until you interact with the page. Clicking Start Conversation counts as interaction.
- The caption stays on "Bot Speaking..." and the microphone stays disabled: the assistant is still reading a long reply. Wait for it to finish. If it never frees up, stop and restart the conversation.
- A voice preview button spins but nothing plays: the sample is still loading from the speech provider. Give it a moment or click again. Check tab audio if it still fails.

## Notes
- Routes: `/demos/:id/voice` (voice demo) and `/demos/:id/settings` (voice selection).
- Source components: `pages/demo-workspace/DemoWorkspaceVoice.jsx` (voice page) and `components/demo-workspace/VoicePicker.jsx` (voice picker) in the portal app. The voice picker lives on the Settings page, not the Voice page.
- Speech input uses the browser's speech recognition. The assistant's speech is generated by the workspace's configured voice provider. Starting a session does not require a microphone, only speaking does.
