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.

Configs, as well as system prompts 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, 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 a EVI configuration, you can apply it to your interactions 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 { VoiceClient, createConfig } from '@humeai/voice';
2// define EVI configuration
3const config = createConfig({
4 auth: { type: 'accessToken', value: ACCESS_TOKEN},
5 configId: '<YOUR CONFIG ID>' // specify config ID here
6});
7// instantiate client with configuration
8const client = VoiceClient.create(config);
9// establish an authenticated WebSocket connection
10client.connect();

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:

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