Method Format
Format(string)
Applies all dictation formatting rules to the input text using default options.
public static string Format(string text)
Parameters
textstringThe raw dictation text to format.
Returns
- string
The formatted text with spoken commands replaced by their corresponding output. Returns the original text if it is
nullor whitespace.
Examples
string input = "Hello comma how are you question mark";
string result = Formatter.Format(input);
// Result: "Hello, how are you?"
Format(string, FormatterOptions)
Applies dictation formatting rules to the input text using the specified options.
public static string Format(string text, FormatterOptions options)
Parameters
textstringThe raw dictation text to format.
optionsFormatterOptionsThe formatting options to use. If
null, default options are applied.
Returns
- string
The formatted text with spoken commands replaced by their corresponding output. Returns the original text if it is
nullor whitespace.
Examples
var options = new FormatterOptions
{
AutoCapitalize = false,
EnabledCategories = { "Punctuation", "LineBreaks" }
};
string result = Formatter.Format("hello comma world", options);
// Result: "hello, world"