MCPInstall

syncfusion-javascript-speech-to-text

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.

Installs
59
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-speech-to-text
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-javascript-speech-to-text automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Syncfusion JavaScript SpeechToText Component

Overview

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:

  • Real-time speech transcription with interim and final results
  • Configurable language support (en-US, fr-FR, de-DE, etc.)
  • Customizable button appearance, icons, and content
  • Tooltip configuration for start and stop states
  • Event-driven architecture (onStart, onStop, onError, transcriptChanged)
  • Programmatic control via startListening() and stopListening() methods
  • Localization support for 14+ UI text keys
  • RTL (Right-to-Left) layout support
  • Error handling for 8 common speech recognition errors
  • Security considerations for voice data privacy

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

Start here for initial setup and basic implementation:

  • Installing dependencies (@syncfusion/ej2-inputs)
  • Setting up development environment
  • Importing CSS styles and themes
  • Creating basic SpeechToText button
  • Adding button content for start/stop states
  • Handling transcriptChanged event
  • Running your first speech recognition example

Speech Recognition Features

📄 Read: references/speech-recognition.md

Core speech recognition functionality and configuration:

  • Retrieving transcripts from spoken audio
  • Setting recognition language (lang property)
  • Allowing interim results vs final results only
  • Managing listening states (Inactive, Listening, Stopped)
  • Showing or hiding tooltips
  • Disabling the component
  • Setting HTML attributes on the button element
  • Error handling for 8 error types (no-speech, audio-capture, not-allowed, etc.)
  • Browser support matrix and compatibility

Events

📄 Read: references/events.md

Event handling for speech recognition lifecycle:

  • created event - Component initialization complete
  • onStart event - Speech recognition begins (StartListeningEventArgs)
  • onStop event - Speech recognition stops (StopListeningEventArgs)
  • onError event - Error occurs during recognition (ErrorEventArgs)
  • transcriptChanged event - Transcript updates (TranscriptChangedEventArgs)
  • Event configuration examples and patterns

Methods

📄 Read: references/methods.md

Programmatic control of speech recognition:

  • startListening() - Initiate speech recognition programmatically
  • stopListening() - Terminate speech recognition programmatically
  • Using methods with custom buttons and controls
  • Method usage patterns and best practices

Appearance Customization

📄 Read: references/appearance.md

Customizing button and tooltip appearance:

  • Button content (content, stopContent properties)
  • Button icons (iconCss, stopIconCss properties)
  • Icon positioning (top, bottom, left, right)
  • Primary button styling (isPrimary property)
  • Tooltip content and positioning
  • Applying CSS classes (e-primary, e-outline, e-info, e-success, e-warning, e-danger)
  • Custom styling with cssClass property

Globalization

📄 Read: references/globalization.md

Localization and internationalization support:

  • Localization using L10n.load method
  • Default text identifiers (14 keys for error messages, tooltips, ARIA labels)
  • Configuring locale property
  • RTL (Right-to-Left) support with enableRtl property
  • RTL layout implementation for Arabic, Hebrew, Persian languages

Security Considerations

📄 Read: references/security.md

Security and privacy best practices:

  • Online dependency requirements
  • Potential security risks (data transmission, privacy, MITM attacks)
  • Browser permission exploits
  • Mitigation strategies (HTTPS, trusted environments, explicit consent)
  • Data processing by third-party services

Quick Start Example

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>

Common Patterns

Pattern 1: Custom Button with Language Support

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.

Pattern 2: Event-Driven State Management

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.

Pattern 3: Programmatic Control with Custom Triggers

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.

Pattern 4: Final Results Only (No Interim)

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.

Key Properties

PropertyTypeDescriptionDefault
transcriptstringGets or sets the transcribed text''
langstringRecognition language (e.g., 'en-US', 'fr-FR')'en-US'
allowInterimResultsbooleanEnable real-time interim resultstrue
listeningStateSpeechToTextStateCurrent state (Inactive, Listening, Stopped)Inactive
showTooltipbooleanShow tooltip on button hovertrue
disabledbooleanDisable the componentfalse
enablePersistencebooleanPersist component state across page reloadsfalse
buttonSettingsButtonSettingsModelButton customization options{}
tooltipSettingsTooltipSettingsModelTooltip customization options{}
cssClassstringCustom CSS class for styling''
localestringLocalization culture (e.g., 'en-US', 'de')'en-US'
enableRtlbooleanEnable Right-to-Left layoutfalse

Common Use Cases

Use Case 1: Voice-Enabled Form Input

Enable users to fill form fields using voice input instead of typing, improving accessibility and speed for data entry tasks.

Use Case 2: Real-Time Transcription App

Build note-taking or meeting transcription applications that convert spoken words to text in real-time with language support.

Use Case 3: Voice Commands Interface

Implement voice command recognition for controlling application features, navigation, or triggering actions based on spoken keywords.

Use Case 4: Accessibility Enhancement

Provide voice input alternatives for users with mobility limitations who cannot easily type on keyboards.

Use Case 5: Multilingual Support

Support speech recognition in multiple languages for global applications, allowing users to speak in their preferred language.

Use Case 6: Voice Search Feature

Add voice search capabilities to applications, enabling users to search content by speaking queries instead of typing.

Best Practices

  1. Always handle errors gracefully - Implement onError event to catch and display user-friendly error messages for microphone access, network issues, or unsupported browsers.

  2. Request permissions explicitly - Inform users why microphone access is needed before triggering speech recognition to improve trust and permission grant rates.

  3. Use HTTPS in production - Speech recognition requires secure contexts; ensure your application is served over HTTPS to avoid security errors.

  4. Provide visual feedback - Use listening state events to show users when the component is actively listening, stopped, or inactive.

  5. Check browser compatibility - Verify browser support (Chrome 25+, Edge 79+, Safari 12+) and provide fallback UI for unsupported browsers.

  6. Configure appropriate language - Set the lang property to match your user's expected language for better recognition accuracy.

  7. Consider interim results - Use allowInterimResults:true for real-time feedback or false for final results only, depending on your use case.

  8. Implement privacy notices - Inform users that voice data may be processed by third-party services (Google, Microsoft) for speech recognition.

Related Components

  • TextArea - Often used together to display transcribed text
  • Button - Provides the base button functionality
  • Tooltip - Used for displaying helpful text on hover

Browser Support

BrowserSupported Versions
Chrome25+
Edge79+
FirefoxNot Supported
Safari12+
Opera30+

FAQ

What does the syncfusion-javascript-speech-to-text skill do?

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.

How do I install syncfusion-javascript-speech-to-text?

Run npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-speech-to-text in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-javascript-speech-to-text/ (personal) or .claude/skills/syncfusion-javascript-speech-to-text/ (project).

Which AI agents can use syncfusion-javascript-speech-to-text?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-javascript-speech-to-text safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-javascript-speech-to-text?

It is published by syncfusion in syncfusion/javascript-ui-controls-skills. It has 59 recorded installs.

More from syncfusion/javascript-ui-controls-skills

View all →

syncfusion-javascript-grid

syncfusion/javascript-ui-controls-skills

Implements Syncfusion JavaScript Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.

syncfusion-javascript-common

syncfusion/javascript-ui-controls-skills

Common utilities and features for Syncfusion JavaScript controls. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion JavaScript controls.

syncfusion-javascript-dropdowns

syncfusion/javascript-ui-controls-skills

Comprehensive guide for implementing Syncfusion TypeScript dropdown components including AutoComplete, ComboBox, Mention, Dropdownlist, Multiselect, ListBox, and MultiColumn ComboBox. Use this when building selection interfaces, data binding, filtering, cascading dropdowns, dual list transfer, custom templates, and accessible dropdown experiences.

syncfusion-javascript-tab

syncfusion/javascript-ui-controls-skills

This skill enables creating and customizing Syncfusion TypeScript Tab components, including tab navigation, tab headers, styling, responsive layouts, dynamic content loading, animations, and multi-panel organization.

syncfusion-javascript-license

syncfusion/javascript-ui-controls-skills

Open the skill to read its SKILL.md instructions.

syncfusion-javascript-popups

syncfusion/javascript-ui-controls-skills

Open the skill to read its SKILL.md instructions.

Popular media & creative skills

View category →

hyperframes

heygen-com/hyperframes

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

Media & Creative1.2M installs

media-use

heygen-com/hyperframes

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

Media & Creative1.1M installs

hyperframes-registry

heygen-com/hyperframes

About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.

Media & Creative1M installs

hyperframes-creative

heygen-com/hyperframes

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

Media & Creative916.5K installs

ai-video-generation

101-skills/superpowers

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

Media & Creative881.5K installs

ai-image-generation

101-skills/superpowers

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

Media & Creative880.3K installs