Configuring EVI
Guide to configuring the Empathic Voice Interface (EVI).
The Empathic Voice Interface (EVI) is designed to be highly configurable, allowing developers to customize the interface to align with their specific requirements. Configuration of EVI can be managed through two primary methods: an EVI configuration and session settings.
Configuration options
EVI configuration options affect the behavior and capabilities of the interface, and include the following configuration options:
Configs, as well as system prompts and tools, are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.
Default configuration options
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration.
The default configuration settings are as follows:
Default configuration settings are subject to change. To ensure your setup remains consistent should changes occur, we recommend choosing explicit options when defining your EVI configuration.
Create a configuration
See instructions below for creating an EVI configuration through the Portal. In the Portal, navigate to the EVI Configurations page. Click the Create configuration button to begin.
Choose EVI version
To learn more about the differences between EVI versions 1 and 2, please see the feature comparison guide.
Choose voice
Select a voice from Hume’s 8 presets, or create your own custom voice. To learn more about voice customization options on the Hume Platform, please visit the Voices page.
Add tools
Equip EVI with built-in tools, like web search, or custom user-defined tools. Click the + Add button to select an existing tool or create a new one.
Test the configuration
The newly created configuration can now be tested. From the EVI Config details page, click Run in playground to test it out.
Once in the EVI Playground, click Start call to connect to EVI with your configuration.
The event message and timeout configuration options are not part of the initial config creation flow. However, you can set these options at any time in the playground or from the configuration’s edit page after your configuration has been created.
Apply the configuration
After creating an EVI configuration, you can use it in your conversations with EVI by including the config_id
in the query parameters of your connection request. You can find the config_id
on the configuration’s edit page. To access this page, first navigate to the configurations page
and then click the Edit button for the desired configuration.
See the sample code below which showcases how to apply your configuration:
Session settings
EVI configurations are persistent and version-controlled. In contrast, session settings are temporary and apply only to the current session, such as microphone settings. These parameters can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience.
Refer to the API reference for detailed descriptions of the various session settings options.
Updating the session settings is only a requirement when the audio input is encoded in PCM Linear 16. If this is the case, be sure to send the following Session Settings message prior to sending an audio input:
Webhooks
EVI webhooks send structured payloads to your specified URL in real time, allowing your application to respond to key events during EVI Chat sessions. They enable you to connect EVI with your systems to monitor events, automate workflows, and gain valuable insights into user interactions.
For more information on EVI Chat sessions, check out our Chat history guide.
Supported events
The following section details each supported event, including what triggers the event, the structure of its payload, and practical use cases to help you integrate it into your workflows.
chat_started
chat_ended
Trigger: The chat_started
event is triggered when a new Chat session is started. This includes both new and resumed
sessions.
Use cases
- Workflow initiation: Use this event to trigger workflows such as starting a logging session, updating a dashboard, or notifying a team.
- Activity monitoring: Track when new or resumed sessions occur to measure usage trends or generate real-time analytics.
- Custom integrations: Push session start data to third-party systems (e.g., Zapier) to automate downstream actions like data collection or tracking.
Payload structure
Sample payload
Subscribing to events
To receive event notifications, define your webhook URL and specify the events you want to subscribe to within your
EVI Config. The example below
demonstrates how to configure a webhook URL for the chat_started
and chat_ended
events:
Handling events
When EVI sends event payloads to your webhook URL, your application can process them by implementing a handler. Below
are simplified example implementations in TypeScript and Python for handling chat_started
and chat_ended
events.
For complete implementations, check out our TypeScript Example Project and Python Example Project.
Security
To ensure the authenticity and integrity of webhook payloads, EVI includes an HMAC signature and a timestamp in each request. Implementing verification safeguards your application from tampering and replay attacks.
Verifying Authenticity
Each webhook request contains the following headers:
X-Hume-AI-Webhook-Signature
: HMAC-SHA256 signature of the payload and timestamp, signed with your Webhook Secret.X-Hume-AI-Webhook-Timestamp
: Unix timestamp indicating when the request was sent.
To verify authenticity:
- Retrieve the
X-Hume-AI-Webhook-Signature
andX-Hume-AI-Webhook-Timestamp
headers. - Concatenate the payload and timestamp, then compute the HMAC-SHA256 hash using your Webhook Secret.
- Compare the computed hash with the provided signature using a timing-safe comparison.
Preventing Replay Attacks
Validate the X-Hume-AI-Webhook-Timestamp
header to ensure the request is recent:
- Check if the timestamp is within a predefined range (e.g., 3 minutes from the current time).
- Reject requests with timestamps outside this range.