Overwriting speech voices
Overwriting speech voices with the Say
verb.
When creating a voice application, you will define the voice used to speak the text. To illustrate this, let’s define a simple voice application using Deepgram for speech-to-text using the SDK:
And now, let’s create a simple voice application using the Say
verb:
The application in the example above uses the speech settings described in the application configuration. The Say
verb will use the voice defined in the textToSpeech
object. In this case, the voice used is “aura-asteria-en”.
If you want to overwrite the voice the Say
verb uses, you can pass the voice attribute to the say
method. Here is an example:
In the example above, the first say
method will use the “aura-asteria-en” voice, and the second say
method will use the “aura-luna-en” voice. The voice attribute is optional. If you don’t pass it, the Say
verb will use the voice defined in the application configuration.
Was this page helpful?