Skip to content

Custom Audio

You can also synthesise your own audio speech using TTS. This guide shows you how to set up such a test. The test scenario is called "Media Analysis for Audio Call - Calling Party with TTS". We will call the test Test TTS - Calling Party for now.

Define Test Information

The basic setup is almost the same as the 'Media Analysis for Audio Call' test scenario. There are three main differences: 1. We only need to configure the caller side. 2. There is a special area where you can write your own text. 3. The called side must be configured separately.

Configuration Caller Side

As already mentioned, the configuration is almost identical to the 'Media Analysis for Audio Call'. We will only focus on how to add a custom text to the TTSengine Polly. The "Set options for performing outbound calls to called party" pannel looks slightly different than before

Create Test - part 2

Info

Don't forget to provide the credentials and the dial destination i.e a telephone number to the called party

In the Custom Text-to-Speech Audio Content option, you can write your own text. You will see that there are some tags that look like HTML or markup tags. These are called Speech Synthesis Markup Language (SSML) tags. These tags can be used to control aspects such as pronunciation, speed or prosody. The tags in this example are: 1. <break time="1s"/>: a pause of 1 second is added at the beginning 2. <prosody pitch="high" volume="loud"> ... </prosody> everthing inbetween those two tags has a slightly higher pitch and is also louder.

Note

There are many parameters to customise and make the spoken text more natural, which are not covered here. For more information, the Amazon Polly documentation is a good resource, especially the chapter on Using SMLL. For a full list of supported SSML tags and what they are used for, see here.

Configuration Callee Side

In the last section we set up a test for TTS on the calling side. If we were to start the test now, it would fail because we are missing a called party. So we will create another test. In this case we have chosen the test scenario "Media analysis for audio call - called party only". We will name the test Test TTS - Called Party.

callee-step-3

As with the test configuration from earlier, we need to provide credentials.

callee-step-4

Start Tests

In your project, you should have two tests

tests

In order to see if everything is working, you need to start the Test TTS - Called Party command first and then the Test TTS - Calling Party command.