Documentation

Plugin

Dictation

Speech-to-text via the Web Speech API. A toolbar microphone button toggles listening; interim transcripts render live under the cursor. No external service — audio is processed by whatever speech-recognition vendor the browser uses.

Opt-in

The feature is intentionally opt-in — even on supported browsers the toolbar button is hidden unless you enable the plugin. Microphone permission is sensitive; we don’t want a mic icon appearing by default.

var cfg = {
    dictationEnabled: true,
    dictationLang: "en-US",              // BCP-47
    dictationContinuous: true,
    dictationInterimResults: true,
    dictationAutoPunctuation: true
};
new RichTextEditor("#editor", cfg);

In the ASP.NET Core Tag Helper:

<richtextbox asp-for="Body" toolbar="default"
             enable-dictation="true"
             dictation-lang="en-US"
             dictation-continuous="true"
             dictation-auto-punctuation="true" />

JavaScript API

editor.dictation.start();
editor.dictation.stop();
editor.dictation.toggle();
editor.dictation.isListening();     // boolean
editor.dictation.isSupported();     // false on Firefox

Browser support

  • Chrome, Edge, Opera — supported (uses Google’s cloud speech service)
  • Safari 14.1+ (macOS), iOS 14.5+ — supported (on-device or cloud depending on OS)
  • Firefoxno SpeechRecognition; plugin detects this and hides the button.

First click prompts for microphone permission. Users can revoke it any time via browser site settings. The onerror handler shows a user-friendly message on not-allowed.

Options

OptionDefaultNotes
dictationEnabledfalseGate the feature. Without this, plugin stays dormant.
dictationLangnavigator.languageBCP-47 language tag: en-US, es-ES, zh-CN, ja-JP, etc.
dictationContinuoustrueIf false, stops after one utterance.
dictationInterimResultstrueShow a faded preview of what the browser is still hearing.
dictationAutoPunctuationtrueCapitalize each final chunk and append a period if none.