syncfusion-blazor-speech-to-text
Implement speech-to-text voice input in Blazor applications using Syncfusion SpeechToText component. ALWAYS use this when users need voice input, speech recognition, audio transcription, or implementing the SpeechToText component in Blazor. Trigger for Syncfusion.Blazor.Inputs, microphone input, voice-to-text conversion, language support, transcript binding, listening states, error handling, browser speech API, or any speech recognition requirements.
What this skill does
# Syncfusion Blazor Speech To Text
A comprehensive guide for implementing voice input and speech recognition using the Syncfusion Blazor SpeechToText component. This component captures audio from the user's microphone and converts it to text in real time.
## Component Overview
The **SpeechToText** component provides voice input capabilities by leveraging the browser's Speech Recognition API. It automatically handles microphone access, captures audio, transcribes speech, and manages the listening lifecycle.
**Key Features:**
- Real-time speech-to-text conversion
- Multi-language support (en-US, fr-FR, de-DE, and 100+ languages)
- Listening state management (Inactive, Listening, Stopped)
- Interim results for real-time feedback
- Error handling for various microphone/network issues
- Browser compatibility detection
- Customizable tooltips and disabled states
- Event callbacks for lifecycle hooks
## Documentation and Navigation Guide
### Getting Started
๐ **Read:** [references/getting-started.md](references/getting-started.md)
- Installation via NuGet package
- Basic component setup and configuration
- Property binding and two-way data binding
- CSS styling and theming
- Integration with TextArea for display
- Minimal working example
### Transcript and Language
๐ **Read:** [references/transcript-and-language.md](references/transcript-and-language.md)
- Retrieving transcribed text with Transcript property
- Binding transcript to input fields
- Setting language preferences (en-US, fr-FR, etc.)
- Supported language codes and locales
- Real-world multi-language examples
- Language switching patterns
### Button Customization
๐ **Read:** [references/button-customization.md](references/button-customization.md)
- SpeechToTextButtonSettings configuration
- Button text customization (start and stop states)
- Icon CSS classes and icon positioning
- Icon position values (Left, Right, Top, Bottom)
- Primary button styling (IsPrimary property)
- Dynamic button customization patterns
- Icon library integration (Syncfusion, Font Awesome, Bootstrap)
- Multi-language button text examples
### Tooltip Configuration
๐ **Read:** [references/tooltip-configuration.md](references/tooltip-configuration.md)
- SpeechToTextTooltipSettings configuration
- Tooltip text customization for different states
- Tooltip positioning (12 position options available)
- Position reference guide and best practices
- ShowTooltip property control
- Dynamic tooltip enabling/disabling
- Multi-language tooltip support
- Accessibility considerations for tooltips
### Listening States
๐ **Read:** [references/listening-states.md](references/listening-states.md)
- Understanding ListeningState property
- State values: Inactive, Listening, Stopped
- Event handling: SpeechRecognitionStarted, SpeechRecognitionStopped
- State-based UI updates and visual feedback
- Waveform animations during listening
- Status indicators and user guidance
### Interim Results and Configuration
๐ **Read:** [references/interim-results-and-options.md](references/interim-results-and-options.md)
- AllowInterimResults property for real-time updates
- Difference between interim and final results
- ShowTooltip property and tooltip customization
- Disabled state configuration
- HTML attributes for custom styling
- Control panel options and UI customization
### Public Methods
๐ **Read:** [references/methods.md](references/methods.md)
- StartListeningAsync() - Start speech recognition
- StopListeningAsync() - Stop speech recognition
- Method signatures and return types
- Exception handling patterns
- Complete control examples with start/stop buttons
- State management and button disabling
### Error Handling and Troubleshooting
๐ **Read:** [references/error-handling.md](references/error-handling.md)
- Error types: no-speech, aborted, audio-capture, not-allowed, network, etc.
- Error handling patterns and recovery
- User feedback mechanisms for errors
- Network and service availability issues
- Microphone permission troubleshooting
- Browser compatibility checking
### Browser Support and API Limitations
๐ **Read:** [references/browser-support.md](references/browser-support.md)
- Browser compatibility matrix
- Version requirements for Chrome, Edge, Safari, Opera
- Unsupported browsers (Firefox)
- Feature detection and polyfills
- Graceful degradation for unsupported browsers
## Quick Start Example
Here's a minimal example to get started with SpeechToText:
```razor
@using Syncfusion.Blazor.Inputs
<div style="display: flex; flex-direction: column; gap: 20px; align-items: center; padding: 20px;">
<h3>Voice to Text Converter</h3>
<SfSpeechToText @bind-Transcript="@transcript"></SfSpeechToText>
<SfTextArea
RowCount="5"
ColumnCount="50"
@bind-Value="@transcript"
ResizeMode="Resize.None"
Placeholder="Transcribed text will appear here...">
</SfTextArea>
</div>
@code {
private string transcript = "";
}
```
**What this does:**
1. Renders a microphone button from SpeechToText
2. Binds the transcribed text to the `transcript` variable
3. Displays the transcript in a TextArea for editing
4. Uses two-way binding to keep both in sync
## Common Patterns
### Pattern 1: Real-Time Transcription Display
Display interim results as the user speaks (not just final results):
```razor
<SfSpeechToText
AllowInterimResults="true"
@bind-Transcript="@transcript">
</SfSpeechToText>
<p>@transcript</p>
```
### Pattern 2: Multi-Language Support
Allow users to switch between languages:
```razor
<select @onchange="@((ChangeEventArgs e) => selectedLanguage = e.Value.ToString())">
<option value="en-US">English</option>
<option value="fr-FR">French</option>
<option value="de-DE">German</option>
</select>
<SfSpeechToText
Language="@selectedLanguage"
@bind-Transcript="@transcript">
</SfSpeechToText>
@code {
private string selectedLanguage = "en-US";
private string transcript = "";
}
```
### Pattern 3: Listen for State Changes
Provide visual feedback based on listening state:
```razor
<SfSpeechToText
ListeningState="@listeningState"
SpeechRecognitionStarted="@OnListeningStarted"
SpeechRecognitionStopped="@OnListeningStopped">
</SfSpeechToText>
<div style="margin-top: 15px;">
@if (listeningState == SpeechToTextState.Listening)
{
<span style="color: green;">๐ค Listening...</span>
}
else if (listeningState == SpeechToTextState.Stopped)
{
<span style="color: orange;">โธ Stopped</span>
}
else
{
<span style="color: gray;">โ Ready to listen</span>
}
</div>
@code {
private SpeechToTextState listeningState = SpeechToTextState.Inactive;
private void OnListeningStarted(SpeechRecognitionStartedEventArgs args)
{
listeningState = args.State;
}
private void OnListeningStopped(SpeechRecognitionStoppedEventArgs args)
{
listeningState = args.State;
}
}
```
### Pattern 4: Error Handling
Gracefully handle errors and inform users:
```razor
<SfSpeechToText
SpeechRecognitionError="@OnSpeechError"
@bind-Transcript="@transcript">
</SfSpeechToText>
@if (!string.IsNullOrEmpty(errorMessage))
{
<div style="color: red; margin-top: 10px;">
โ ๏ธ @errorMessage
</div>
}
@code {
private string transcript = "";
private string errorMessage = "";
private void OnSpeechError(SpeechRecognitionErrorEventArgs args)
{
errorMessage = args.Error switch
{
"no-speech" => "No speech detected. Please try again.",
"audio-capture" => "No microphone found. Check your device.",
"not-allowed" => "Microphone access denied. Check browser permissions.",
"network" => "Network error. Check your connection.",
_ => $"Error: {args.Error}"
};
}
}
```
## Key Properties
| Property | Type | Default | Purpose |
|----------|------|---------|---------|
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product โ visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".