Empathic Voice Interface (EVI)

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.

EVI configuration

EVI configuration options affect the behavior and capabilities of the interface, and include the following configuration options:

  • System prompt: Set the system prompt text to provide instructions and context that guide how EVI should respond.
  • Language model: Select a language model that best fits your application’s needs. For details on incorporating your own language model, refer to our guide on using your own language model.
  • Voice: Select a voice for EVI from a growing list of available options.
  • Tools: Choose user-created tools or built-in tools for EVI to use during conversations. For details on creating tools and adding them to your configuration, see our guide on tool use.

Configs, as well as system prompts, tools, and language models, are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.

See instructions below for creating an EVI configuration through the Portal.

Create a configuration

In the playground navigate to the Voice Configurations page. Click the Create configuration button to begin.

Voice configurations page

Specify the name of the configuration, a description, a system prompt, a voice, and click the Create button to create your new configuration.

Create your configuration

For guidance on engineering your system prompt, see our prompting guide.

Test the configuration

The newly created configuration can now be tested. From the Voice Config details page, click Run in playground to test it out.

Configuration details page

Once in the Voice Playground, click Start Call to connect to EVI with your configuration.

Voice playground

Apply the configuration

Once you have created an EVI configuration, you can apply it to your conversations with EVI through the API. This involves including the config_id in the query parameters of your connection request. You can find the config ID associated with your newly created configuration, on the Voice Configurations page.

Configuration ID

See the sample code below which showcases how to apply your configuration:

1import { Hume, HumeClient } from 'hume';
2// instantiate the Hume client
3const client = new HumeClient({
4 apiKey: <YOUR_API_KEY>,
5 clientSecret: <YOUR_CLIENT_SECRET>,
7// instantiate WebSocket connection with specified EVI config
8const socket = await client.empathicVoice.chat.connect({
9 configId: <YOUR_CONFIG_ID> // specify config ID here

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 system 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 SessionSettingsMessage prior to sending an audio input:

2 "type": "session_settings",
3 "audio": {
4 "channels": 1,
5 "encoding": "linear16",
6 "sample_rate": 48000
7 }