brendan_72570
# office-hours
b
@Vapi How can I normalize the TTS? Let's say I'm dealing with a value like $400,000. I want the agent o read it as four hundred thousand instead of four zero zero zero zero zero.
v
@Brendan To normalize text for TTS (Text-to-Speech) so that currency values like $400,000 are read out as "four hundred thousand dollars," you can enable the smart formatting feature. This feature is designed to recognize and properly format numbers, dates, and other entities in a way that sounds natural when spoken. For VAPI, if you're using a transcription service like Deepgram, you can set the
smartFormat
option to
true
to enable this feature. Here's how you can do it:
Copy code
json
{
  "assistant.transcriber.smartFormat": true
}
By setting the
smartFormat
to
true
, the transcriber should automatically convert numerical values into a more human-readable format when generating the TTS output. If you're ready, I can apply this setting for you. Would you like me to proceed with this change?
b
@Vapi where do you set that config?
v
@Brendan The configuration for smart formatting would typically be set in the settings or configuration file of your TTS system, or it might be an option you can set via an API request when you initialize the TTS service. If you're working with a specific TTS API, you would usually find this option in the API documentation where it will guide you on how to include it in your API requests. It could be a parameter that you include in the body of your POST request or as a query parameter in a GET request. For example, if you're using an API, your request might look something like this:
Copy code
json
POST /synthesize
{
  "text": "Your text here",
  "voice": "en-US_AllisonVoice",
  "smartFormat": true
}
If you're using a configuration file, you might add a line like this:
Copy code
json
{
  "tts": {
    "smartFormat": true
  }
}
Please check the documentation of the specific TTS service you're using for the exact method to set this configuration. If you need help with this, please provide me with the name of the TTS service or any additional context, and I'll do my best to assist you further.
s
@Brendan as of now there is no option to disabled number formatting like
zero zero zero zero zero.
but you can ask LLM to generate numbers in this form
four hundred thousand
...
4 Views