Skip to main content

Overview

Voice formatting automatically transforms raw text from your language model into a format that sounds natural when spoken by text-to-speech technology. This feature helps your agents communicate more effectively by converting technical text into conversational speech patterns. Voice formatting enables your agents to naturally speak:
  • Numbers and currency (e.g., $42.50 → “forty two dollars and fifty cents”)
  • Phone numbers (e.g., +1234567890 → “plus one two three four five six seven eight nine zero”)
  • Dates, times, and percentages in conversational format. (Currenly this is limited to dates in the format dd/mm/yyyy or dd-mm-yyyy or yyyy-mm-dd or yyyy/mm/dd) (e.g., 10/05/2023 → “May 10th, 2023”)
By default, voice formatting is disabled for new agents. You can enable it in the agent settings to improve the naturalness of your agent’s speech. These work for all languages supported by Oration AI.

How Voice Formatting Works

When enabled, voice formatting processes your agent’s text output through a series of transformations. Each transformation targets specific patterns to make speech sound more natural and conversational.

Formatting Transformations

The formatting system applies these transformations in order:
StepFunctionDescriptionBeforeAfter
1Format currencyConverts dollar amounts to spoken words$42.50forty two dollars and fifty cents
2Format emailsReplaces @ with “at” and . with “dot”john@example.comjohn at example dot com
3Format datesConverts dates into spoken format10-05-2023May tenth, two thousand twenty three
4Format timesTime expressions2:00 PMtwo PM
5Format distancesConverts distance measurements5km5 kilometers
6Format unitsConverts measurement units100g100 grams
7Format percentagesConverts percentage symbols50%50 percent
8Format phone numbersSpaces out digits for clarity+1234567890plus one two three four five six seven eight nine zero
9Remove markdownRemoves markdown symbols like _, `, and ~**Bold** and *italic*Bold and italic
10Format new linesConverts line breaks to periods for smoother speechHello world\nto sayHello world . to say
11Format colonsReplaces : with . for better phrasingprice: $42.50price. forty two dollars and fifty cents
12Handle special charactersSpeaks special characters like / and _5/207five slash two hundred and seven
13Format numbersHandles general numbers appropriately-9, 2.5, 2023minus nine, two point five, two thousand twenty three

Enabling Voice Formatting

Voice formatting is controlled through your agent settings:

In Agent Settings

  1. Navigate to your Agent Settings
  2. Go to the Advanced Settings tab
  3. Find the Voice Formatting toggle
  4. Enable the feature to activate natural speech formatting
When enabled, all text output from your agent will be processed through the formatting system before being converted to speech.

When to Use Voice Formatting

Enable voice formatting when:
  • Your agent handles customer service calls
  • You need natural-sounding currency and number pronunciation
  • Your agent reads addresses, phone numbers, or dates
  • Professional, conversational tone is important
Consider keeping it disabled when:
  • Your agent primarily handles technical support requiring precise terminology
  • You need exact control over pronunciation
  • Your use case involves specialized vocabulary that formatting might alter

Best Practices

Content Writing

  • Write naturally in your prompts—let formatting handle the technical conversion
  • Use standard formats for dates, currency, and numbers.
    • Dates should be in the format dd/mm/yyyy or dd-mm-yyyy or yyyy-mm-dd or yyyy/mm/dd
    • Currency should be in the format $100 or 100 USD
    • Numbers should be in the format 100 or 100.00
    • Phone numbers should be in the format +1234567890
    • Percentages should be in the format 50%
    • Distances should be in the format 5km
    • Units should be in the format 100g
    • Emails should be in the format john@example.com
  • Test your agent’s speech output after enabling formatting
  • Do not mention any specific formatting for numbers, dates, currency, phone numbers, percentages, distances, units, emails, etc. in your agent’s prompts as it may clash with the voice formatting system.
  • In case some numbers are not being formatted correctly, you can use -- to separate the numbers into groups of digits you want to be formatted. For example: Pin code is 123456 can be written as 1--2--3--4--5--6 to make the Agent speak the numbers slowly.

Testing

  • Enable voice formatting in a test environment first
  • Listen to how your agent pronounces different types of content
  • Adjust your content strategy based on formatting results

Summary

Voice formatting transforms your agent’s text output into natural-sounding speech, making conversations more engaging and professional. While disabled by default, enabling this feature significantly improves the user experience for most voice applications. The formatting system handles common patterns automatically, requiring no changes to your agent’s prompts or knowledge base content. Simply enable the feature in your agent settings to start delivering more natural voice interactions.