Text to Speech not saying what is returned in the ...
# support
i
Tool call Result is a mix of numbers and strings. It is received properly but while speaking the agent is speaking, it is randomly skipping numbers and just saying the text. When I see the message log, the numbers are being converted to Asterisk and dashes. Its a transient agent.
v
Hi there! 👋 I see you're having issues with your Text-to-Speech not properly handling numbers in tool call results. I don't have specific information about why numbers are being converted to asterisks and dashes in your message log, or if there are specific compatibility issues with transient agents. However, I can definitely help explain why your TTS might be skipping numbers and only speaking the text. Based on the information I've found, there are several potential causes for this behavior: 1. **Voice Formatting Plan**: The
voice.chunkPlan.formatPlan
configuration might be causing the TTS to skip numbers. This is a common issue that affects how numbers are processed before being sent to the TTS engine. [According to a Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334184334361628734), this can cause numbers to be skipped. 2. **`numberToDigitsCutoff` Setting**: If this setting is too low, numbers may be converted to individual digits instead of being spoken as words. You can adjust this in your configuration:
Copy code
json
{
  voice: {
    chunkPlan: {
      formatPlan: {
        numberToDigitsCutoff: 100000 // Set this higher than your largest expected number
      }
    }
  }
}
[This solution was shared in a Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342349738032500736). 3. **Voice Input Formatting**: The "Voice Input Formatted" function, which is enabled by default, transforms numbers before they're passed to the TTS engine. [According to Vapi's documentation](https://docs.vapi.ai/assistants/voice-formatting-plan), this feature cleans up raw text to make it more readable for TTS, but it might be causing your issue. You can try turning this feature off.
4. **Dynamic Content Handling**: There might be a formatting issue or a problem with how dynamic content (including numbers) is being passed to the TTS engine. [As mentioned in a Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334190896090058894), this can happen when working with data from external sources. 5. **Transcription Issues**: The transcriber itself could be the source of the issue. [One suggestion from Discord](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334184334361628734) is to use
modelOutputInMessages
instead of transcribed output. Would you like me to provide more details on any of these potential solutions or help troubleshoot further? Sources: - [Discord Thread about Voice Formatting Plan](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334184334361628734) - [Discord Thread about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342349738032500736) - [Vapi Documentation on Voice Formatting Plan](https://docs.vapi.ai/assistants/voice-formatting-plan) - [Discord Thread about Dynamic Content Handling](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334190896090058894)
i
022893ff-19a2-4c6e-95fa-a52f0f580fc8 this is the call id
k
This is happening because of Voice Formatting Plan which means right before sending your output to the Voice provider we apply some formatting to the LMM output and during this we remove by default markdown syntax contained content or other special characters so that the content which goes to the voice provider is of high quality and its easy to produce a better sounding sound. Under your voice settings you can toggle LLM output formatting utilities functions. This can only be done using the API, so let me know if you require any further help with this.
i
Thanks Shubham will try playing with it..also do you have suggestions for text to Voice Punjabi language model?
k
looking into it.
i
THe model introduces asterics and eats up my numbers along with it
if i just use markdown it speaks out asterics asterics 40 asterics "then some text" then asterics asterics and numbers
if i format asterics then numbers vanish
i need to give a demo to my execs and i cannot get a consistent output 😦
k
can you try out new call with following voice config:
Copy code
json
{
  "voice": {
    "provider": "VOICE_PROVIDERS.VAPI", // or whatever provider you're using
    "voiceId": "your-voice-id",
    "chunkPlan": {
      "enabled": true,
      "formatPlan": {
        "enabled": true,
        "formattersEnabled": [
          "markdown",
          "asterisk",
          "number"
        ]
      }
    }
  }
}
let me know how it goes for you.
i
I think this works, will keep testing thanks
k
Hi, checking if this is resolved/solved for you?
26 Views