Skill 详情

syncfusion-react-speech-to-text

实现 Syncfusion React SpeechToText 组件,用于实时语音识别、麦克风输入和语音表单。

匹配类型可能匹配已针对 音频与语音 审核
来源syncfusion/​react-ui-components-skills外部来源
报告安装量627仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: syncfusion-react-speech-to-text
description: Implement the Syncfusion React SpeechToText component. Use this skill to convert speech to text, manage microphone input, control listening states, process speech events, customize UI, support accessible voice-enabled forms, and handle globalization and security in React applications.
metadata:
  author: "Syncfusion Inc"
  version: "34.1.29"
---

# 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](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](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](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](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](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](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

```tsx
import { SpeechToTextComponent, TextAreaComponent, TranscriptChangedEventArgs } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';
import "@syncfusion/ej2-tail
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作