/syncfusion-javascript:syncfusion-javascript-speech-to-textfrom Syncfusion JavaScript UI Controls
Implements the Syncfusion JavaScript SpeechToText control. Use this skill ALWAYS immediately for speech-to-text functionality, voice recognition, speech transcription, or microphone-based input in JavaScript applications. This skill provides guidance for implementing the SpeechToText control to transcribe spoken audio to text, handle speech recognition events, customize button appearance, set language options, manage listening states, and apply security best practices for voice input features.
Ships in Syncfusion JavaScript UI Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Syncfusion JavaScript SpeechToText component is a button-based control that initiates speech recognition when clicked. It captures audio from the user's microphone, processes it through the browser's speech recognition service, and provides transcribed text through events and properties.
Key capabilities:
📄 Read: references/getting-started.md
Start here for initial setup and basic implementation:
📄 Read: references/speech-recognition.md
Core speech recognition functionality and configuration:
📄 Read: references/events.md
Event handling for speech recognition lifecycle:
📄 Read: references/methods.md
Programmatic control of speech recognition:
📄 Read: references/appearance.md
Customizing button and tooltip appearance:
📄 Read: references/globalization.md
Localization and internationalization support:
📄 Read: references/security.md
Security and privacy best practices:
import { SpeechToText, TextArea, TranscriptChangedEventArgs } from "@syncfusion/ej2-inputs";
// Initialize SpeechToText component
const speechToText: SpeechToText = new SpeechToText({
transcriptChanged: (args: TranscriptChangedEventArgs) => {
// Update textarea with transcribed text
textareaObj.value = args.transcript;
}
});
// Render the component
speechToText.appendTo('#speechtotext_default');
// Create textarea for displaying transcription
const textareaObj: TextArea = new TextArea({
rows: 5,
cols: 50,
value: '',
resizeMode: 'None',
placeholder: 'Transcribed text will be shown here...'
});
textareaObj.appendTo('#textareaInst');
<!DOCTYPE html>
<html lang="en">
<head>
<title>SpeechToText Example</title>
<link href="https://cdn.syncfusion.com/ej2/32.1.19/ej2-base/styles/fluent2.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/32.1.19/ej2-buttons/styles/fluent2.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/32.1.19/ej2-popups/styles/fluent2.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/32.1.19/ej2-inputs/styles/fluent2.css" rel="stylesheet" />
</head>
<body>
<div id="container">
<button id="speechtotext_default"></button>
<textarea id="textareaInst"></textarea>
</div>
</body>
</html>
const speechToText: SpeechToText = new SpeechToText({
lang: 'fr-FR', // French language recognition
buttonSettings: {
content: 'Commencer',
stopContent: 'Arrêter',
isPrimary: true
},
transcriptChanged: (args: TranscriptChangedEventArgs) => {
console.log('Transcript:', args.transcript);
}
});
speechToText.appendTo('#speechtotext');
When to use: Internationalized applications requiring speech recognition in specific languages.
const speechToText: SpeechToText = new SpeechToText({
onStart: (args: StartListeningEventArgs) => {
console.log('Started listening, state:', args.listeningState);
// Update UI to show listening indicator
},
onStop: (args: StopListeningEventArgs) => {
console.log('Stopped listening, state:', args.listeningState);
// Update UI to hide listening indicator
},
onError: (args: ErrorEventArgs) => {
console.error('Speech recognition error:', args.error);
// Show error message to user
},
transcriptChanged: (args: TranscriptChangedEventArgs) => {
// Real-time transcript updates
document.getElementById('output').textContent = args.transcript;
}
});
speechToText.appendTo('#speechtotext');
When to use: Applications requiring visual feedback and error handling during speech recognition.
const speechToText: SpeechToText = new SpeechToText({
transcriptChanged: (args: TranscriptChangedEventArgs) => {
textArea.value = args.transcript;
}
});
speechToText.appendTo('#speechtotext');
// Start listening when form field gains focus
document.getElementById('inputField').addEventListener('focus', () => {
speechToText.startListening();
});
// Stop listening when form field loses focus
document.getElementById('inputField').addEventListener('blur', () => {
speechToText.stopListening();
});
When to use: Integrating speech recognition with custom UI elements or form workflows.
const speechToText: SpeechToText = new SpeechToText({
allowInterimResults: false, // Only final results
transcriptChanged: (args: TranscriptChangedEventArgs) => {
// Transcript only updates when recognition is complete
textArea.value = args.transcript;
}
});
speechToText.appendTo('#speechtotext');
When to use: Applications requiring complete sentences or phrases rather than real-time word-by-word transcription.
| Property | Type | Description | Default |
|---|---|---|---|
transcript | string | Gets or sets the transcribed text | '' |
lang | string | Recognition language (e.g., 'en-US', 'fr-FR') | 'en-US' |
allowInterimResults | boolean | Enable real-time interim results | true |
listeningState | SpeechToTextState | Current state (Inactive, Listening, Stopped) | Inactive |
showTooltip | boolean | Show tooltip on button hover | true |
disabled | boolean | Disable the component | false |
enablePersistence | boolean | Persist component state across page reloads | false |
buttonSettings | ButtonSettingsModel | Button customization options | {} |
tooltipSettings | TooltipSettingsModel | Tooltip customization options | {} |
cssClass | string | Custom CSS class for styling | '' |
locale | string | Localization culture (e.g., 'en-US', 'de') | 'en-US' |
enableRtl | boolean | Enable Right-to-Left layout | false |
Enable users to fill form fields using voice input instead of typing, improving accessibility and speed for data entry tasks.
Build note-taking or meeting transcription applications that convert spoken words to text in real-time with language support.
Implement voice command recognition for controlling application features, navigation, or triggering actions based on spoken keywords.
Provide voice input alternatives for users with mobility limitations who cannot easily type on keyboards.
Support speech recognition in multiple languages for global applications, allowing users to speak in their preferred language.
Add voice search capabilities to applications, enabling users to search content by speaking queries instead of typing.
Always handle errors gracefully - Implement onError event to catch and display user-friendly error messages for microphone access, network issues, or unsupported browsers.
Request permissions explicitly - Inform users why microphone access is needed before triggering speech recognition to improve trust and permission grant rates.
Use HTTPS in production - Speech recognition requires secure contexts; ensure your application is served over HTTPS to avoid security errors.
Provide visual feedback - Use listening state events to show users when the component is actively listening, stopped, or inactive.
Check browser compatibility - Verify browser support (Chrome 25+, Edge 79+, Safari 12+) and provide fallback UI for unsupported browsers.
Configure appropriate language - Set the lang property to match your user's expected language for better recognition accuracy.
Consider interim results - Use allowInterimResults:true for real-time feedback or false for final results only, depending on your use case.
Implement privacy notices - Inform users that voice data may be processed by third-party services (Google, Microsoft) for speech recognition.
| Browser | Supported Versions |
|---|---|
| Chrome | 25+ |
| Edge | 79+ |
| Firefox | Not Supported |
| Safari | 12+ |
| Opera | 30+ |
references/appearance.md (opens in a new tab)references/events.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/globalization.md (opens in a new tab)references/methods.md (opens in a new tab)references/security.md (opens in a new tab)references/speech-recognition.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-javascript67 skills in this plugin
/syncfusion-javascript-3d-chartCreate interactive 3D charts in Syncfusion TypeScript and JavaScript. Immediately use this skill when user needs to build 3D visualizations, render 3D column/bar charts, configure 3D rotation and depth, visualize data in three dimensions, customize 3D chart appearance, handle 3D interactions, or implement advanced 3D features. Works with TypeScript (webpack/module-based) and JavaScript (CDN/ES5)./syncfusion-javascript-accordionBuild collapsible navigation panels with the Syncfusion TypeScript Accordion component. Use this skill when implementing vertical accordion menus, expanding/collapsing content panels, multi-step wizards, data-driven panels with dynamic content, tabbed navigation alternatives, or nested hierarchical content structures. Covers initialization, expand modes, animations, icons, templates, styling, data binding, and advanced use cases like form wizards./syncfusion-javascript-accumulation-chartImplements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).Other plugins' skills for the same job