Skip to main content
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:
create-app.js
And now, let’s create a simple voice application using the Say verb:
voice-server.js
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:
voice-server.js
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.