# Chat with Empathic Voice Interface (EVI)

## HandshakeTry it

**WSS**  
wss://api.hume.ai/v0/evi/chat

### Query parameters

- **access_token**: string, Optional, Defaults to ` `` `  
  Access token used for authenticating the client. If not provided, an `api_key` must be provided to authenticate.  
  The access token is generated using both an API key and a Secret key, which provides an additional layer of security compared to using just an API key.  
  For more details, refer to the [Authentication Strategies Guide](https://dev.hume.ai/docs/introduction/api-key#authentication-strategies).

- **allow_connection**: boolean, Optional, Defaults to `false`  
  Allows external connections to this chat via the /connect endpoint.

- **config_id**: string, Optional  
  The unique identifier for an EVI configuration.  
  Include this ID in your connection request to equip EVI with the Prompt, Language Model, Voice, and Tools associated with the specified configuration.  
  If omitted, EVI will apply [default configuration settings](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration#default-configuration).  
  For help obtaining this ID, see our [Configuration Guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration).

- **config_version**: integer, Optional  
  The version number of the EVI configuration specified by the `config_id`.  
  Configs, as well as Prompts and Tools, are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.  
  Include this parameter to apply a specific version of an EVI configuration. If omitted, the latest version will be applied.

- **event_limit**: integer, Optional  
  The maximum number of chat events to return from chat history. By default, the system returns up to 300 events (100 events per page × 3 pages).  
  Set this parameter to a smaller value to limit the number of events returned.

- **resumed_chat_group_id**: string, Optional  
  The unique identifier for a Chat Group. Use this field to preserve context from a previous Chat session.  
  A Chat represents a single session from opening to closing a WebSocket connection. In contrast, a Chat Group is a series of resumed Chats that collectively represent a single conversation spanning multiple sessions.  
  Each Chat includes a Chat Group ID, which is used to preserve the context of previous Chat sessions when starting a new one.  
  Including the Chat Group ID in the `resumed_chat_group_id` query parameter is useful for seamlessly resuming a Chat after unexpected network disconnections and for picking up conversations exactly where you left off at a later time.  
  This ensures preserved context across multiple sessions.

- **verbose_transcription**: boolean, Optional, Defaults to `false`  
  A flag to enable verbose transcription. Set this query parameter to `"true"` to have unfinalized user transcripts be sent to the client as interim `UserMessage` messages.

- **api_key**: string, Optional, Defaults to ` `` `

- **session_settings**: object, Optional

### Send

**AudioInput**: object, Required  
**Base64 encoded audio input to insert into the conversation.** The content is treated as the user’s speech to EVI and must be streamed continuously.  
For optimal transcription quality, the audio data should be transmitted in small chunks. Hume recommends streaming audio with a buffer window of `20` milliseconds (ms), or `100` milliseconds (ms) for web applications.  
See our [Audio Guide](https://dev.hume.ai/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio.

- **SessionSettings**: object, Required  
**Settings for this chat session.** Session settings are temporary and apply only to the current Chat session.  
These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience.  
See our [Session Settings Guide](https://dev.hume.ai/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings.

- **UserInput**: object, Required  
**User text to insert into the conversation.** Text sent through a User Input message is treated as the user’s speech to EVI.  
EVI processes this input and provides a corresponding response.  
Expression measurement results are not available for User Input messages, as the prosody model relies on audio input and cannot process text alone.

- **AssistantInput**: object, Required  
**Assistant text to synthesize into spoken audio and insert into the conversation.** EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model.  
Our model adds appropriate emotional inflections and tones to the text based on the user’s expressions and the context of the conversation.  
The synthesized audio is streamed back to the user as an Assistant Message.

- **ToolResponseMessage**: object, Required  
**Return value of the tool call.** Contains the output generated by the tool to pass back to EVI.  
Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.  
For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`.  
See our [Tool Use Guide](https://dev.hume.ai/docs/speech-to-speech-evi/features/tool-use) for further details.

- **ToolErrorMessage**: object, Required  
**Error message from the tool call**, not exposed to the LLM or user.  
Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool’s failure.  
For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails.  
See our [Tool Use Guide](https://dev.hume.ai/docs/speech-to-speech-evi/features/tool-use) for further details.

- **PauseAssistantMessage**: object, Required  
**Pause responses from EVI.** Chat history is still saved and sent after resuming.  
Once this message is sent, EVI will not respond until a Resume Assistant message is sent.
  
When paused, EVI won’t respond, but transcriptions of your audio inputs will still be recorded.  
See our [Pause Response Guide](https://dev.hume.ai/docs/speech-to-speech-evi/features/pause-responses) for further details.

- **ResumeAssistantMessage**: object, Required  
**Resume responses from EVI.** Chat history sent while paused will now be sent.  
Upon resuming, if any audio input was sent during the pause, EVI will retain context from all messages sent but only respond to the last user message.  
See our [Pause Response Guide](https://dev.hume.ai/docs/speech-to-speech-evi/features/pause-responses) for further details.

### Receive

**SubscribeEvent**: object, Required
