firefly_0206
02/21/2025, 4:18 AMyandos666
02/21/2025, 10:57 AMVapi
02/22/2025, 10:43 AMlogs
🔵 08:46:10:186 Voice Input Formatted: "You're welcome, Marie! With over 2 0 0 0 0 entries,", Original: "You're welcome, Marie! With over 20,000 entries,"
The number formatting behavior is controlled by the formatNumbers function and its configuration. The function decides whether to format numbers as words or digits based on several factors, including:
\- The numberToDigitsCutoff setting
\- The number of non-zero digits
\- Whether it looks like an ID or special number
How to Fix It:
To make the assistant say "twenty thousand" instead of "two zero zero zero zero", you need to adjust the formatPlan in your assistant's voice configuration. The key setting is numberToDigitsCutoff.
You can modify your assistant's voice configuration to include:
{
voice: {
chunkPlan: {
formatPlan: {
numberToDigitsCutoff: 100000 // Set this higher than your largest expected number
}
}
}
}
Why This Is The Right Solution:
The documentation for this setting can be found in:
/\*\*
\* This is the cutoff after which a number is converted to individual digits instead of being spoken as words.
\*
\* Example:
\* - If cutoff 2025, "12345" is converted to "1 2 3 4 5" while "1200" is converted to "twelve hundred".
\*
\* Usage:
\* - If your use case doesn't involve IDs like zip codes, set this to a high value.
\* - If your use case involves IDs that are shorter than 5 digits, set this to a lower value.
\*
\* @default 2025
\*/
@IsOptional()
@IsNumberWithHelpfulError()
@IsInt()
@Min(0)
@ApiPropertyOptional({ example: 2025 })
numberToDigitsCutoff?: number;
This shows that numberToDigitsCutoff determines when numbers should be spoken as digits versus words. By setting it higher than 20,000, you ensure numbers like 20,000 will be converted to words instead of individual digits.Hamza
02/23/2025, 6:11 PMVapi
02/26/2025, 1:06 AM