Skip to content

Voice Preview

The Voice Preview feature lets users quickly test their AI Agents' voice output in the Flow editor or Interaction Panel without going through the entire Flow with a mock call. This feature supports cloud speech-to-text (STT) and text-to-speech (TTS) services. To use the Voice Preview, you need to enter text or SSML syntax, and select the language and voice.

Restrictions

  • The Voice Preview feature supports only the Google, Microsoft, Amazon AWS, and Deepgram speech providers. When testing a voice Flow through the Interaction Panel, you should check the STT and TTS settings of the voice Nodes to ensure that one of these providers is specified. If any other provider, such as Evenlabs, is specified in the Nodes, the Interaction Panel won't support the voice conversation.
  • To use SSML syntax in the Voice Preview, the speech provider must support SSML syntax.

Access STT and TTS Providers

If your environment has network connection restrictions or requires strict security rules, make sure that both STT and TTS providers are accessible. Add the IP address ranges of your STT and TTS providers to the firewall's whitelist. This approach ensures the Cognigy.AI server can interact smoothly with both providers, guaranteeing the expected functionality of the Voice Preview feature.

How to Use Voice Preview

Set up a Speech Provider

To set up a speech provider and test your voice agents, follow these steps:

  1. In Manage > Settings, go to the Voice Preview Settings section and select one of the following providers:

    1. Click plus-sign next to the Speech Connection field and enter the following information:
    Field Description
    Connection Enter a unique connection name.
    Api Key Enter an API key for Microsoft Azure Speech Services. Log in to the Azure portal, navigate to your Speech Services resource, and copy the API key labeled as Key1 from the Keys and Endpoint section. For more information, read the Microsoft Azure AI documentation.
    Region This parameter is optional. Enter a specific region if necessary.
    1. Click plus-sign next to the Speech Connection field and enter the following information:
    Field Description
    Connection Enter a unique connection name.
    JSON File Upload the JSON key file that you received from Google Speech Services. To obtain this file, create a service account in the Google Cloud Console under IAM & Admin, assign appropriate roles, generate a JSON key file for the service account, and download it.
    1. Click plus-sign next to the Speech Connection field and enter the following information:
    Field Description
    Connection Enter a unique connection name.
    Access Key ID Enter an Access Key ID. Log in to the AWS Management Console, go to the IAM dashboard, select Users, and choose the IAM user. Navigate to the Security credentials tab, and under Access keys, create a new access key if one hasn't been created. Copy the Access Key ID provided after creation.
    Secret Access Key After creating the access key, you'll be prompted to download a file containing the Access Key ID and the Secret Access Key. Alternatively, you can retrieve the Secret Access Key by navigating to the IAM dashboard, selecting the user, going to the Security credentials tab, and clicking Show next to the Access Key ID to reveal and copy the Secret Access Key.
    Session Token This parameter is optional. If you use temporary security credentials, obtain the token when using AWS STS (Security Token Service) to assume a role or federate users.
    Region This parameter is optional. Enter the AWS region where your Amazon Polly resources are located, for example, us-east-1 for the US East (N. Virginia) region.
    1. Click plus-sign next to the Speech Connection field and enter the following information:
    Field Description
    Connection Enter a unique connection name.
    Api Key Enter an API key for Deepgram. Log in to the Deepgram Console, navigate to the Settings of the Deepgram Project from which you want the API Key, and select API Keys. For more information, read the Deepgram documentation.
  2. (Optional) To check the connection, click Test.

Use Voice Preview

You can access the Voice Preview feature in two different ways:

  • In the Flow editor, click voice-preview.
  • In the Interaction Panel, hover over the AI Agent message in the chat and click voice-preview in the interactive tooltip. The Voice Preview button is displayed only for certain types of output, including regular text output, fallback text, and text or SSML output from channels that support voice.

More Information