同步融合 aspnetcore 语音到文本

SKILL音频生成

原名 syncfusion-aspnetcore-speech-to-text

音频生成 浏览器控制 许可证不明确 CodexClaudeCursorGemini CLI
安装这个技能

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

累计安装 220 本周 9
GitHub 星标 未标注 仓库 aspnetcore-ui-components-skills
下载量 71 技能市场下载数
权限级别 浏览器控制 安装前请确认风险范围
许可证 许可证不明确 unknown

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
npx skills add https://github.com/syncfusion/aspnetcore-ui-components-skills --skill syncfusion-aspnetcore-speech-to-text

技能档案

音频生成
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方syncfusion仓库 aspnetcore-ui-components-skills · 版本 未标注
宿主客户端Codex、Claude、Cursor、Gemini CLI技能可被这些客户端加载
安装方式GitHub 仓库安装包 syncfusion/aspnetcore-ui-components-skills
权限级别浏览器控制安装前请确认风险范围
许可证unknown许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-05-01上游最后核验时间 · 数据更新 未标注
正文体量9.3 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

4 项能力
上游给出的能力概览与适用场景
  • 按任务关键词查找相关 Skills
  • 展示可复制的安装命令
  • 保留来源站点、仓库和原始说明,方便继续核验
  • 展示第三方安全扫描或审计结果
用户想查找某类 Agent Skill 时需要根据任务场景推荐可安装能力包时需要对比不同来源的安装命令和来源信息时

权限与风险

浏览器控制
装之前先读完这段

安装与使用指南

安装步骤

本站只展示命令,不托管安装包,也不自动执行。

怎么用

安装后应在对应宿主中按原始 README 的触发条件使用;当前草稿只做目录说明,具体调用方式由规则抽取,异常条目再复核。

SKILL.md 全文

9.3 KB
模型实际读到的说明书原文,来自技能仓库

Syncfusion ASP.NET Core SpeechToText Control

Overview

The SpeechToText control enables users to convert spoken words into text using the Web Speech API in ASP.NET Core applications. This skill helps you implement, customize, and troubleshoot speech recognition using Razor Tag Helpers.

The main Razor Tag Helper that captures audio and converts speech to text in real-time using browser APIs.

Key Features:

  • Real-time speech recognition via Web Speech API
  • Multiple language support
  • Customizable button and tooltip via tag helper attributes
  • Event-driven architecture
  • Programmatic control via JavaScript methods
  • Accessibility support (ARIA labels, keyboard navigation)
  • Localization support
  • Error handling and recovery
  • ASP.NET Core binding

Documentation

Getting Started

📄 Read: references/getting-started.md

  • Installation via NuGet
  • ASP.NET Core project setup
  • Razor Tag Helper registration
  • Basic control implementation
  • CSS imports and theme selection
  • First working example
  • Script manager configuration

Speech Recognition Features

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

  • Retrieving transcripts in real-time
  • Setting language for recognition
  • Managing interim results
  • Listening state management
  • Handling speech-to-text conversion
  • Real-time vs final results
  • Multi-language support

Button and Tooltip Customization

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

  • Button customization via tag helper attributes
  • Icon customization using CSS classes
  • Icon positioning
  • Tooltip configuration
  • Primary button styling
  • CSS class styling (e-primary, e-success, etc.)
  • Responsive design

Events and Methods

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

  • Event binding in Razor (onStart, onStop, onError, transcriptChanged)
  • Event handling in script tag
  • Error types and error handling
  • startListening() and stopListening() methods
  • Programmatic control via JavaScript
  • Getting component instance with ej.base.getComponent()
  • Event workflows and patterns

Globalization and Localization

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

  • Localization with L10n.load()
  • Available locale strings
  • Language-specific error messages
  • RTL support via enableRtl attribute
  • Accessibility labels and ARIA attributes
  • Multi-language interface examples

Troubleshooting and Security

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

  • Common issues and solutions
  • Browser compatibility matrix
  • Microphone permission handling
  • Security considerations for ASP.NET Core
  • Privacy and data transmission
  • Performance optimization
  • Offline fallback strategies

Quick Start Example

@using Syncfusion.EJ2.Inputs

<div id='speechtotext-container'>
    <ejs-speechtotext id="speech-to-text" transcriptChanged="onTranscriptChanged"></ejs-speechtotext>
    <ejs-textarea id="output-textarea" rows="5" cols="50" value="" resizeMode="None" placeholder="Transcribed text will be shown here..."></ejs-textarea>
</div>

<script>
    function onTranscriptChanged(args) {
        var textareaObj = ej.base.getComponent(document.getElementById("output-textarea"), "textarea");
        textareaObj.value = args.transcript;
    }
</script>

<style>
    #speechtotext-container {
        gap: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
</style>

Common Patterns

Pattern 1: Voice Form with Multiple Fields

@using Syncfusion.EJ2.Inputs

<div class="form-group">
    <label>Name (speak):</label>
    <ejs-speechtotext id="name-voice" transcriptChanged="onNameTranscript"></ejs-speechtotext>
    <ejs-textbox id="name-field"></ejs-textbox>
</div>

<div class="form-group">
    <label>Message (speak):</label>
    <ejs-speechtotext id="message-voice" transcriptChanged="onMessageTranscript"></ejs-speechtotext>
    <ejs-textarea id="message-field" rows="4"></ejs-textarea>
</div>

<script>
    function onNameTranscript(args) {
        var nameField = ej.base.getComponent(document.getElementById("name-field"), "textbox");
        nameField.value = args.transcript;
    }

    function onMessageTranscript(args) {
        var messageField = ej.base.getComponent(document.getElementById("message-field"), "textarea");
        messageField.value = args.transcript;
    }
</script>

Pattern 2: Programmatic Control

@using Syncfusion.EJ2.Inputs

<ejs-speechtotext id="speech-control"></ejs-speechtotext>

<div>
    <button onclick="startVoiceInput()">Start Recording</button>
    <button onclick="stopVoiceInput()">Stop Recording</button>
</div>

<script>
    function startVoiceInput() {
        var speechComponent = ej.base.getComponent(
            document.getElementById("speech-control"),
            "speechtotext"
        );
        speechComponent.startListening();
    }

    function stopVoiceInput() {
        var speechComponent = ej.base.getComponent(
            document.getElementById("speech-control"),
            "speechtotext"
        );
        speechComponent.stopListening();
    }
</script>

Pattern 3: Error Handling

@using Syncfusion.EJ2.Inputs

<ejs-speechtotext id="error-speech"
    onError="handleError"
    onStart="handleStart"
    onStop="handleStop">
</ejs-speechtotext>

<div id="error-message" style="display:none; color: red; padding: 10px;"></div>

<script>
    function handleError(args) {
        var errorDiv = document.getElementById("error-message");
        errorDiv.style.display = "block";

        var errorMessages = {
            'no-speech': '🔇 No speech detected. Please try again.',
            'audio-capture': '🎙️ Microphone not found.',
            'not-allowed': '🔒 Microphone permission denied.',
            'network': '🌐 Network error occurred.'
        };

        errorDiv.textContent = errorMessages[args.error] || 'Error: ' + args.error;
        setTimeout(() => { errorDiv.style.display = "none"; }, 5000);
    }

    function handleStart() {
        console.log('🎤 Listening started');
    }

    function handleStop() {
        console.log('⏹️ Listening stopped');
    }
</script>

Key Properties

Property Type Description
lang string Language code (e.g., 'en-US', 'fr-FR')
transcript string Current transcribed text
allowInterimResults boolean Show real-time results (default: true)
listeningState enum Current state (Inactive, Listening, Stopped)
cssClass string CSS classes (e-primary, e-success, etc.)
enableRtl boolean Enable right-to-left layout
locale string Localization language code

Tag Helper Attributes

<ejs-speechtotext
    id="speechId"
    lang="en-US"
    allowInterimResults="true"
    cssClass="e-primary"
    enableRtl="false"
    locale="en-US"
    transcriptChanged="onTranscriptChanged"
    onStart="onStartListening"
    onStop="onStopListening"
    onError="onError"
    created="onCreated">

    <e-speechtotext-buttonSettings
        content="Start Listening"
        stopContent="Stop Listening"
        iconCss="e-icons e-play"
        stopIconCss="e-icons e-pause"
        iconPosition="Right"
        isPrimary="true">
    </e-speechtotext-buttonSettings>

    <e-speechtotext-tooltipSettings
        position="TopCenter"
        content="Click to start"
        stopContent="Click to stop">
    </e-speechtotext-tooltipSettings>
</ejs-speechtotext>

Event Handlers

Event Args Description
created - Fired when control is initialized
onStart StartListeningEventArgs Fired when listening begins
onStop StopListeningEventArgs Fired when listening ends
onError ErrorEventArgs Fired when error occurs
transcriptChanged TranscriptChangedEventArgs Fired when transcript updates

Methods

Method Description
startListening() Begin speech recognition
stopListening() Stop speech recognition

Troubleshooting

Control not rendering

Solution: Check that <ejs-scripts></ejs-scripts> is in layout and CSS is imported

Events not firing

Solution: Verify event handlers are valid JavaScript functions in global scope

Microphone permission denied

Solution: Allow microphone access in browser settings

Speech not recognized

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

安全信息

审计结论
未标注不代表已通过审计
安全审计Gen Agent Trust Hub、Socket、Snyk第三方安全审计平台给出的结论

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-05-01。