Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

syncfusion-react-speech-to-textsyncfusion React speech TO text 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,988

周安装

82

GitHub Stars

1

下载量

649
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-react-speech-to-text(syncfusion React speech TO text 前端)
来源仓库:https://github.com/syncfusion/react-ui-components-skills
仓库路径:skills/syncfusion-react-speech-to-text
安装命令:
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-speech-to-text
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-speech-to-text

简介

用于辅助 React 语音转文本功能的开发与维护。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中生成或审查前端交互代码。
  • 通过 GitHub 安装,需结合项目现有设计系统使用。
  • 涉及页面改动时应配合本地预览确认视觉效果。
  • syncfusion-react-speech-to-text 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Syncfusion React SpeechToText Component

Component Overview

The SpeechToText component enables users to convert spoken words into text using the Web Speech API. This skill helps you implement, customize, and troubleshoot speech recognition in React applications. The main component that captures audio from the user's microphone and converts speech to text in real-time using browser APIs.

Key Capabilities

  • Real-time speech recognition
  • Multiple language support
  • Customizable button and tooltip
  • Event-driven architecture
  • Programmatic control via methods
  • Accessibility support (ARIA labels, keyboard navigation)
  • Localization support
  • Error handling and recovery

Documentation

Getting Started

📄 Read: references/getting-started.md

  • Installation via npm
  • Package installation and setup
  • Basic component implementation
  • CSS imports and theme selection
  • First working example
  • TypeScript configuration
  • Disabling the component (disabled property)

Speech Recognition Features

📄 Read: references/speech-recognition-features.md

  • Retrieving transcripts in real-time
  • Setting language for recognition
  • Managing interim results
  • Listening state management with SpeechToTextState enum (Inactive, Listening, Stopped)
  • Reading listeningState from event args and component ref
  • Handling speech-to-text conversion
  • Real-time vs final results

Button and Tooltip Customization

📄 Read: references/button-and-tooltip-customization.md

  • Customizing button content and icons
  • Icon positioning and styling
  • Controlling tooltip visibility (showTooltip property)
  • Tooltip configuration and placement (all 12 TooltipPosition values)
  • CSS class styling (e-primary, e-success, etc.)
  • Button appearance modes
  • Responsive button design

Events and Methods

📄 Read: references/events-and-methods.md

  • Event handling (created, onStart, onStop, onError, transcriptChanged)
  • Correct event argument interfaces (StartListeningEventArgs, StopListeningEventArgs, ErrorEventArgs, TranscriptChangedEventArgs)
  • cancel property to prevent listening start
  • isInteracted to distinguish user vs programmatic triggers
  • errorMessage for human-readable error details
  • isInterimResult for interim vs final transcript results
  • startListening(), stopListening(), and destroy() methods
  • Ref-based component control
  • Programmatic listening management

Globalization and Localization

📄 Read: references/globalization-and-localization.md

  • Localization with L10n.load()
  • Available locale strings and translations
  • Language-specific error messages
  • RTL support for right-to-left languages
  • Accessibility labels and ARIA attributes
  • htmlAttributes for custom HTML/ARIA attributes on the button element
  • Multi-language interface support

Troubleshooting and Security

📄 Read: references/troubleshooting-and-security.md

  • Common issues and solutions
  • Browser compatibility matrix
  • Microphone permission handling
  • Security considerations and best practices
  • Privacy and data transmission
  • Performance optimization
  • Offline fallback strategies

Quick Start Example

import { SpeechToTextComponent, TextAreaComponent, TranscriptChangedEventArgs } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';
import '@syncfusion/ej2-react-inputs/styles/material.css';

function VoiceNoteApp() {
  const [transcript, setTranscript] = useState('');

  const handleTranscriptChanged = (args: TranscriptChangedEventArgs) => {
    setTranscript(args.transcript);
  };

  return (
    <div style={{ padding: '20px' }}>
      <h2>Voice Note Recorder</h2>

      {/* SpeechToText component with microphone button */}
      <SpeechToTextComponent
        id="speechToText"
        transcriptChanged={handleTranscriptChanged}
      />

      {/* Display transcribed text */}
      <TextAreaComponent
        id="noteArea"
        value={transcript}
        resizeMode="None"
        rows={5}
        cols={50}
        placeholder="Your voice will appear here..."
      />
    </div>
  );
}

export default VoiceNoteApp;

Common Patterns

Pattern 1: Voice Form Input

import { SpeechToTextComponent, TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';

function VoiceForm() {
  const [formData, setFormData] = useState({
    name: '',
    message: ''
  });

  const handleNameTranscript = (args: any) => {
    setFormData(prev => ({ ...prev, name: args.transcript }));
  };

  const handleMessageTranscript = (args: any) => {
    setFormData(prev => ({ ...prev, message: args.transcript }));
  };

  return (
    <div>
      <label>Name (speak):</label>
      <SpeechToTextComponent transcriptChanged={handleNameTranscript} />
      <TextBoxComponent value={formData.name} />

      <label>Message (speak):</label>
      <SpeechToTextComponent transcriptChanged={handleMessageTranscript} />
      <TextBoxComponent value={formData.message} />
    </div>
  );
}

Pattern 2: Programmatic Control

import { SpeechToTextComponent } from '@syncfusion/ej2-react-inputs';
import { useRef } from 'react';

function VoiceControlApp() {
  const speechRef = useRef<SpeechToTextComponent>(null);

  const startVoiceInput = () => {
    speechRef.current?.startListening();
  };

  const stopVoiceInput = () => {
    speechRef.current?.stopListening();
  };

  return (
    <div>
      <SpeechToTextComponent ref={speechRef} />
      <button onClick={startVoiceInput}>Start Recording</button>
      <button onClick={stopVoiceInput}>Stop Recording</button>
    </div>
  );
}

Pattern 3: Error Handling

import { SpeechToTextComponent, ErrorEventArgs } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';

function VoiceWithErrorHandling() {
  const [error, setError] = useState('');
  const [isListening, setIsListening] = useState(false);

  const handleError = (args: ErrorEventArgs) => {
    // args.errorMessage is the human-readable description; args.error is the error code
    setError(args.errorMessage || `Error: ${args.error}`);
  };

  const handleStart = () => {
    setIsListening(true);
    setError('');
  };

  const handleStop = () => {
    setIsListening(false);
  };

  return (
    <div>
      <SpeechToTextComponent
        onError={handleError}
        onStart={handleStart}
        onStop={handleStop}
      />
      {isListening && <p>🎤 Listening...</p>}
      {error && <p style={{ color: 'red' }}>{error}</p>}
    </div>
  );
}

Key Props

PropTypeDescription
langstringLanguage for speech recognition (e.g., 'en-US', 'fr-FR')
transcriptstringCurrent transcribed text
allowInterimResultsbooleanShow real-time results (default: true)
listeningStateSpeechToTextStateCurrent listening state (Inactive, Listening, Stopped)
buttonSettingsButtonSettingsModelCustomize button appearance and content
tooltipSettingsTooltipSettingsModelConfigure tooltip display
showTooltipbooleanWhether to display the tooltip on hover (default: true)
cssClassstringApply CSS classes for styling
disabledbooleanDisable all component interaction (default: false)
htmlAttributes{[key: string]: string}Additional HTML attributes (ARIA, data-*, etc.) for the root button element
localestringLocalization language code
enableRtlbooleanEnable right-to-left layout
enablePersistencebooleanPersist component state between page reloads via localStorage

Event Handlers

EventArgsDescription
created-Fired when component is initialized
onStartStartListeningEventArgsFired when speech recognition begins. Args: cancel, event, isInteracted, listeningState, name
onStopStopListeningEventArgsFired when speech recognition ends. Args: event, isInteracted, listeningState, name
onErrorErrorEventArgsFired when an error occurs. Args: error, errorMessage, event, name
transcriptChangedTranscriptChangedEventArgsFired when transcription updates. Args: transcript, isInterimResult, event, name

Methods

MethodDescription
startListening()Begin speech recognition programmatically
stopListening()Stop speech recognition programmatically
destroy()Destroy the component instance and release all resources

Troubleshooting

Microphone permission denied

Solution: Check browser permissions settings and allow microphone access in security settings

Speech not recognized

Solution: Check microphone volume, speak clearly, verify correct language setting

Component not rendering

Solution: Ensure CSS imports are included and license key is registered

Browser not supported

Solution: Check if browser supports Web Speech API (Chrome, Edge, Safari support it)

Related Components

  • TextArea: For displaying transcribed text
  • TextBox: For input fields with voice capabilities
  • Button: For custom voice control buttons
  • Tooltip: For contextual help on voice features

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.43%
按下载量换算236

Claude

31.22%
按下载量换算203

Cursor

18.36%
按下载量换算119

Gemini CLI

9.47%
按下载量换算61

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills