how can I adjust the prompt to read back phone num...
# support
r
I want it to only read a single digit at the time instead of one-hundred, twenty, three
v
To make Vapi read phone numbers digit by digit, adjust the
numberToDigitsCutoff
setting in your assistant's voice configuration:
Copy code
json
{
  "voice": {
    "chunkPlan": {
      "formatPlan": {
        "numberToDigitsCutoff": 1 // Set to a very low value
      }
    }
  }
}
This forces numbers to be read as individual digits rather than as whole numbers. [Source](https://discord.com/channels/1211482211119796234/1342349738032500736) Source: - [Discord discussion about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1342349738032500736)
r
what about if I have some digits that I want to be fully read out, like 2000 for the year? How to handle both?
@Vapi Support Bot what about if I have some digits that I want to be fully read out, like 2000 for the year? How to handle both that and the phone number read out?
v
Based on the information I found, the
numberToDigitsCutoff
setting controls whether numbers are read as individual digits or as whole numbers. Setting it to a very low value (like 1) makes all numbers read digit by digit. I couldn't find a direct solution for handling both scenarios simultaneously. Are you looking to implement this in a single conversation flow, or would it be feasible to use different assistant configurations for different parts of your application? Source: - [Discord discussion about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1342349738032500736)
Based on the information I found, the
numberToDigitsCutoff
setting controls whether numbers are read as individual digits or as whole numbers. Setting it to a very low value (like 1) makes all numbers read digit by digit. I couldn't find a direct solution for handling both scenarios simultaneously. Are you looking to implement this in a single conversation flow, or would it be feasible to use different assistant configurations for different parts of your application? Source: - [Discord discussion about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1342349738032500736)
r
hmm, I think it'd need to be the same flow
@Vapi Support Bot it'd need to be the same flow
v
Based on the information I found, there's no direct way to handle both digit-by-digit reading for phone numbers and whole number reading for years in the same flow using just the
numberToDigitsCutoff
setting. Could you share more details about your specific use case? For example, are you trying to implement a prompt that explicitly identifies when to read numbers as digits versus whole numbers, or are you looking for an automatic solution that can detect the context? Source: - [Discord discussion about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1342349738032500736)
Based on the information I found, there's no direct way to handle both digit-by-digit reading for phone numbers and whole number reading for years in the same flow using just the
numberToDigitsCutoff
setting. Could you share more details about your specific use case? For example, are you trying to implement a prompt that explicitly identifies when to read numbers as digits versus whole numbers, or are you looking for an automatic solution that can detect the context? Source: - [Discord discussion about numberToDigitsCutoff](https://discord.com/channels/1211482211119796234/1342349738032500736)
r
@Vapi Support Bot I'm confirming the details of an appointment and reading out 1. the phone number and 2. the year and mileage of the car i.e. 2005 miata with 20,000 miles
v
Based on the information I found, the
numberToDigitsCutoff
setting in Vapi determines whether numbers are spoken as digits or words. While there's no direct way to handle both scenarios simultaneously, you can configure this setting in your voice configuration:
Copy code
json
{
  voice: {
    chunkPlan: {
      formatPlan: {
        numberToDigitsCutoff: 100000 // Set higher for years/mileage as words
      }
    }
  }
}
For your appointment system, you might need to implement custom logic in your application to handle phone numbers separately. Sources: - [Discord message](https://discord.com/channels/1211482211119796234/1342349738032500736) - [Vapi documentation](https://docs.vapi.ai/assistants/voice-formatting-plan)
Based on the information I found, the
numberToDigitsCutoff
setting in Vapi determines whether numbers are spoken as digits or words. While there's no direct way to handle both scenarios simultaneously, you can configure this setting in your voice configuration:
Copy code
json
{
  voice: {
    chunkPlan: {
      formatPlan: {
        numberToDigitsCutoff: 100000 // Set higher for years/mileage as words
      }
    }
  }
}
For your appointment system, you might need to implement custom logic in your application to handle phone numbers separately. Sources: - [Discord message](https://discord.com/channels/1211482211119796234/1342349738032500736) - [Vapi documentation](https://docs.vapi.ai/assistants/voice-formatting-plan)
r
@Vapi Support Bot is there a way to run a simple script or processing code on the LLM generated text to adjust the words/filter things before sending it to be spoken?
v
You can use a custom LLM integration to modify text before it's spoken. Set up your own server as an OpenAI-compatible endpoint:
Copy code
javascript
// In your custom LLM server
app.post('/chat/completions', async (req, res) => {
  const openAIResponse = await openai.chat.completions.create(requestArgs);
  
  for await (const chunk of openAIResponse) {
    // Modify text here - e.g., format phone numbers as digits
    const modifiedChunk = formatPhoneNumbers(chunk);
    res.write(`data: ${JSON.stringify(modifiedChunk)}\n\n`);
  }
});
Then configure Vapi to use your custom endpoint instead of calling OpenAI directly. Sources: - [Custom LLM Integration](https://docs.vapi.ai/customization/custom_llm/fine-tuned-openai-models) - [Using Your Server](https://docs.vapi.ai/customization/custom_llm/using-your-server) - [Custom LLM Tool Calling Integration](https://docs.vapi.ai/documentation/advanced-concepts/customization/custom-llm/custom-llm-tool-calling-integration)
You can use a custom LLM integration to modify text before it's spoken. Set up your own server as an OpenAI-compatible endpoint:
Copy code
javascript
// In your custom LLM server
app.post('/chat/completions', async (req, res) => {
  const openAIResponse = await openai.chat.completions.create(requestArgs);
  
  for await (const chunk of openAIResponse) {
    // Modify text here - e.g., format phone numbers as digits
    const modifiedChunk = formatPhoneNumbers(chunk);
    res.write(`data: ${JSON.stringify(modifiedChunk)}\n\n`);
  }
});
Then configure Vapi to use your custom endpoint instead of calling OpenAI directly. Sources: - [Custom LLM Integration](https://docs.vapi.ai/customization/custom_llm/fine-tuned-openai-models) - [Using Your Server](https://docs.vapi.ai/customization/custom_llm/using-your-server) - [Custom LLM Tool Calling Integration](https://docs.vapi.ai/documentation/advanced-concepts/customization/custom-llm/custom-llm-tool-calling-integration)
r
@Vapi Support Bot okay next question, how can I develop confidence in a user's first name
v
# Improving Name Recognition Confidence To develop confidence in a user's first name, implement a confirmation step where you ask users to spell their name and then repeat it back for verification:
Copy code
javascript
// Example implementation in Vapi
assistant.onIntent("getName", async (conv) => {
  const name = await conv.ask("May I have your name, please?");
  const confirmedName = await conv.ask(`I heard ${name}. To confirm, could you spell that for me?`);
  await conv.say(`Thanks, ${name}. I've confirmed your name.`);
});
This approach significantly improves transcription accuracy, especially for foreign names that might otherwise receive low confidence scores. Sources: - [Improving Transcription Accuracy](https://discord.com/channels/1211482211119796234/1331353180570914878) - [Challenges with Transcribing Foreign Names](https://discord.com/channels/1211482211119796234/1333510134617604147)
# Improving Name Recognition Confidence To develop confidence in a user's first name, implement a confirmation step where you ask users to spell their name and then repeat it back for verification:
Copy code
javascript
// Example implementation in Vapi
assistant.onIntent("getName", async (conv) => {
  const name = await conv.ask("May I have your name, please?");
  const confirmedName = await conv.ask(`I heard ${name}. To confirm, could you spell that for me?`);
  await conv.say(`Thanks, ${name}. I've confirmed your name.`);
});
This approach significantly improves transcription accuracy, especially for foreign names that might otherwise receive low confidence scores. Sources: - [Improving Transcription Accuracy](https://discord.com/channels/1211482211119796234/1331353180570914878) - [Challenges with Transcribing Foreign Names](https://discord.com/channels/1211482211119796234/1333510134617604147)
k
checking if this is resolved/solved for you?
r
ehh kinda, basically only way to solve the first challenge is to implement own server it seems
k
Did it work for you?
r
I haven't had time to implement it yet haha
I just started this AM
but also am curious about other side effects from using a custom LLM (latency, cost, etc.)
c
checking if this is resolved/solved for you?
15 Views