Table of Contents

Method Format

Namespace
LMKit.Speech.Dictation
Assembly
LM-Kit.NET.dll

Format(string)

Applies all dictation formatting rules to the input text using default options.

public static string Format(string text)

Parameters

text string

The 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 null or 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

text string

The raw dictation text to format.

options FormatterOptions

The 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 null or whitespace.

Examples

var options = new FormatterOptions
{
    AutoCapitalize = false,
    EnabledCategories = { "Punctuation", "LineBreaks" }
};
string result = Formatter.Format("hello comma world", options);
// Result: "hello, world"