Speech Services - Cognigy Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Speech Services

Speech services integrate Speech-to-Text (STT) or Text-to-Speech (TTS) vendors in the Voice Gateway Self-Service Portal. To ensure the AI Agent gets a voice, a speech service must be selected within the Application. By connecting with a speech vendor of your choice, you can select between multiple voices, genders, accents, and languages. You can add multiple speech vendors to the Voice Gateway Self-Service Portal, or install multiple configurations of one speech vendor, to quickly switch between different setups. Voice Gateway supports the following speech vendor configurations:

For the list of supported vendors and their Speech-To-Text and Text-To-Speech capabilities, see the TTS and STT Vendors reference.

Cloud-Based Speech Services

To configure the connection for a cloud-based speech service:

  1. In the left-side menu of the Voice Gateway Self-Service Portal, select Speech.

  2. Click Add Speech Service and select your preferred vendor.

  3. Select the account you want to use it with.

  4. (Optional) If you need to create multiple speech services from the same vendor, use the Label field to create a unique speech service.

  5. Select Speech-To-Text, Text-To-Speech or both, depending on your use case.

  6. (Optional) If you enable TTS, the Enable text-to-speech streaming option appears. Activate this option to enable TTS streaming for your voice AI Agent. Note that some providers might not support TTS streaming. For more information, see TTS Streaming.

  7. Follow further instructions according to your selected vendor:

To use Amazon Polly as a TTS service, you need at least the following IAM policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "polly:SynthesizeSpeech",
        "polly:DescribeVoices"
      ],
      "Resource": "*"
    }
  ]
}

Where:

To use Amazon Polly’s speech services, you need to configure Amazon Transcribe’s STT policy to allow real-time streaming transcription. To do so, configure at least the following IAM policies:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "transcribe:StartStreamTranscription",
        "transcribe:StartStreamTranscriptionWebSocket"
      ],
      "Resource": "*"
    }
  ]
}

Where:

  1. Enter the Access Key in the Access key ID field. For more information on AWS Access Keys, read the Amazon AWS documentation.
  2. Enter the Secret Access Key in the Secret access key field.
  3. Select a region from the Region list.

Use Deepgram for TTS. For STT capabilities, use Deepgram Flux, which is optimized for transcription accuracy, real-time streaming, and processing large volumes of audio.

On-Premises Speech Services

  1. In the left-side menu of the Voice Gateway Self-Service Portal, select Speech.
  2. Click Add Speech Service and select your preferred vendor.
  3. Select the account you want to use it with.
  4. (Optional) If you need to create multiple speech services from the same vendor, use the Label field to create a unique speech service.
  5. Select Speech-To-Text, Text-To-Speech or both, depending on your use case.
  6. (Optional) If you enable TTS, the Enable text-to-speech streaming option appears. Activate this option to enable TTS streaming for your voice AI Agent. Note that some providers might not support TTS streaming. For more information, see TTS Streaming.

To add a custom speech vendor, follow these steps:

  1. In the left-side menu of the Voice Gateway Self-Service Portal, select Speech.
  2. On the Speech services page, click Add speech service.
  3. On the Add a speech service page, select Custom from the Vendor list.
  4. In the Name field, specify a unique name for your provider. You need to reuse this name in the Node configuration.
  5. From the Account list, select a specific account or leave the All accounts value if you want the custom speech provider to be available for all accounts.
  6. In the Label field, create a label only if you need to create multiple speech services from the same vendor. Then, in your application, use the label to specify which service to use.
  7. Activate the Use for text-to-speech setting to use this provider as a TTS vendor. Enter the TTS HTTP URL of the server where your custom vendor is deployed.
  8. Activate the Use for speech-to-text setting to use this provider as an STT vendor. Enter the STT WebSocket URL of the server where your custom vendor is deployed.
  9. In the Authentication Token field, enter the key that you get from your TTS or STT vendor to set up a connection.
  10. Click Save.

More Information