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

# Test drive text and voice

## Purpose
The Test Drive pages let you talk to your tenant's assistant exactly as a customer would, in text or by voice. No phone number setup or embedded chat is needed. Every run is recorded as a session you can review in Analytics.

## Prerequisites
- Any signed-in portal account; a tenant member drives their own tenant's assistant. (Guests are offered the text demo from the tenant access page.)
- For the voice page, a microphone and a browser with speech recognition. Without one the page falls back to typed input.

## Steps

### Step 1

![test-drive-text-and-voice, step-01](screenshots/test-drive-text-and-voice/step-01.png)

**Action:** Click Text Chat under Test Drive in the sidebar.

**What you should see:** The Text Chat Demo page connects automatically. The chip in the corner reads Connected. A Tenant selector shows your active business, a Language selector defaults to English (US), and a Start Conversation button sits beside them. The chat area shows "Start a conversation to begin chatting". The message box is disabled until a conversation starts.

### Step 2

![test-drive-text-and-voice, step-02](screenshots/test-drive-text-and-voice/step-02.png)

**Action:** Click Start Conversation. Chat with the assistant from the message box. When you are done, click End Conversation.

**What you should see:** The assistant greets you once in character for the tenant, then answers as it would on a live channel. Your messages appear on the right, the bot's on the left, each timestamped. While a conversation is active, the tenant and language selectors lock. In the demo auto shop shown here, the assistant runs the service-booking flow: ask to book a service and it offers the available service types. A restaurant tenant would instead answer from its menu catalog. Ending the conversation posts a "Conversation ended" marker and re-enables the controls.

### Step 3

![test-drive-text-and-voice, step-03](screenshots/test-drive-text-and-voice/step-03.png)

**Action:** Click Voice Demo under Test Drive in the sidebar.

**What you should see:** The Voice Demo page has the same tenant and language controls and its own status chip. The chip reads Disconnected until you start. The empty state says "Start a conversation to begin".

### Step 4

![test-drive-text-and-voice, step-04](screenshots/test-drive-text-and-voice/step-04.png)

**Action:** Click Start Conversation on the voice page.

**What you should see:** The assistant's greeting appears in the chat area. A round microphone button appears at the bottom, with a status caption inviting you to click the mic and speak. Bot replies are read aloud in the tenant's configured voice. The mic is disabled while the bot is speaking.

### Step 5

*Screenshot not available (needs a microphone)*

**Action:** Click the microphone button. Then speak.

**What you should see:** The caption switches to listening. Your words appear as an interim transcript while you talk, and the finished sentence is sent to the assistant automatically. Clicking the mic while the bot is reading a reply stops the playback first. If your browser has no speech recognition, a warning appears and a regular text input replaces the mic.

## Troubleshooting
- Start Conversation is greyed out: no tenant is selected. Members should check the switcher at the top of the sidebar; admins must pick a tenant in the page's Tenant selector.
- No audio on the voice demo: the tenant has no working voice configured, or the browser blocked autoplay. The conversation still works; replies appear as text.
- You want to review a test run afterwards: open Analytics; each test drive run is a session on the Web channel with a full transcript.

## Notes
- Routes: `/test-drive/text` and `/test-drive/voice`. Source components: `pages/voice-portal/TextChatDemoPage.jsx` and `pages/voice-portal/VoiceDemoPage.jsx` in the portal app.
- Tenant members drive their active tenant; platform admins get a selector across all tenants. The language list comes from the tenant's demo locales.
- The captures were taken in the Demo Auto Shop tenant as its owner, so the sample conversation is a service booking for that shop.
- These pages simulate the customer side. Demo workspaces have their own Chat and Voice pages with an operator's order panel alongside; see the demo workspace docs.
