Format configuration
Format configuration defines how specific structures in text will be formatted. For example, you can specify how dates should be formatted or how many spaces there should be after the end of the sentence.
Format configuration is specified within the format
part of the formatting
configuration JSON object (refer to Document Formatting).
Below is an example of format configuration showing all available fields.
In general, format configuration options work such that specifying an option enables the associated formatting, while not specifying it preserves the default Soniox behavior (which may not correspond to any specific value of the option).
End of sentence spacing
This configuration defines the number of spaces after the end of a sentence.
end_of_sentence_spacing - "1"
Use 1 space after each end of sentence (default). - "2"
Use 2 spaces after each end of sentence.
Examples
Formatted output:
Numbers
This configuration defines if numbers should be written in text or numerically.
numbers - "text"
Write numbers in text. - "numeric"
Write numbers using digits.
Formatted output:
Ordinal numbers
This configuration defines if ordinal numbers should be written in text or abbreviated.
ordinal_numbers - "text"
Write ordinal numbers in text. - "abbreviated"
Write ordinal numbers abbreviated.
Examples
Input speech:
Formatted output:
Number ranges
This configuration formats number ranges. Doesn't apply to numbers with units.
number_range - true
Examples
Input speech:
Formatted output:
Digits
This configuration formats sequences of two or more digits or numbers.
digits - true
Examples
Input speech:
Formatted output:
Full date
This configuration defines how a spoken date containing date, month, and year will be formatted.
DMY_date - "as_dictated"
Write as dictated (numbers always with digits). - "Month DD, YYYY"
- "MM/DD/YYYY"
- "MM/DD/YY"
- "DD/MM/YYYY"
- "DD/MM/YY"
Examples
Input speech:
Formatted output:
Month-year
This configuration defines how a spoken date containing only month and year will be formatted.
MY_date - "as_dictated"
Write as dictated (numbers always with digits). - "MM/YYYY"
- "Month YYYY"
Examples
Input speech:
Formatted output:
Day-month
This configuration defines how a spoken date containing only day and month will be written as text.
DM_date - "as_dictated"
Write as dictated (numbers always with digits). - "MM/DD"
- `"DD/MM"``
"Month Dth"
-"Dth of Month"
-"Month D"
-"D Month"
Examples
Input speech:
Formatted output:
Clock time
This configuration formats 12-hour clock times.
clock_time - true
Examples
Input speech:
Formatted output:
Time quantity
This configuration formats time quantities using digits and also abbreviates such ranges using hyphen.
time_quantity - true
Examples
Input speech:
Formatted output:
Metric units
This configuration enables formatting quantities with metric units using abbreviated units and also abbreviates such ranges using hyphen.
metric_units_abbreviated - true
Examples
Input speech:
Formatted output:
Percent symbol
This configuration abbreviates percent quantities using the percent symbol. It also formats percent quantity ranges, adding the percent symbol to the first value if not already present.
percent_symbol - true
Examples
Input speech:
Formatted output:
Height (feet-inches)
This configuration defines how height in feet and inches should be formatted.
height_feet_inches - "as_dictated"
Write as dictated (numbers always with digits). - "symbolic"
Write like F'I"
. - "text"
Write like F feet I inches
.
Examples
Input speech:
Formatted output:
Temperature
This configuration formats temperature measurements by appending "degrees" if needed.
temperature_degrees - true
Examples
Input speech:
Formatted output:
Verbalized punctuation
This configuration enables interpretation of verbalized punctuation symbols and other formatting instructions.
verbalized_punct - true
Examples
Input speech:
Formatted output (:code:\n
means newline):
Cranial nerves
This configuration defines how the cranial nerves are formatted.
cranial_nerve - "arabic"
Write cranial nerves using Arabic numerals. - "roman"
Write cranial nerves using Roman numerals.
Examples
Input speech:
Formatted output:
JCAHO rules
Using this configuration applies JCAHO rules to eliminate dangerous abbreviations.
jcaho_rules - true
Examples
Input speech:
Formatted output: