首页龙虾技能列表 › U2-audio-file-transcriber — 云知声音频转写

U2-audio-file-transcriber — 云知声音频转写

v1.0.1

通过云知声(UniSound)UniCloud ASR 语音识别API转写音频文件。支持WAV、MP3、M4A、FLAC、OGG等多种音频格式,针对金融、客服等场景优化,最长支持2小时、100MB的音频文件转写。

0· 328·0 当前·0 累计
by @aaiccee·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/15
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
安全
high confidence
该技能的代码、声明的需求和运行时指令与上传音频到 UniSound/UniCloud ASR 并返回转写结果的封装器一致;包中没有任何内容表明存在无关或隐藏的行为。
评估建议
该包是一个简单的 UniSound ASR 客户端。安装前:(1) 仅提供来自可信 UniSound 账户的 UNISOUND_APPKEY/UNISOUND_SECRET,避免使用生产敏感音频进行测试;(2) 如需使用生产端点而非内置 UAT 主机,请验证或设置 UNISOUND_BASE_URL;(3) 理解该技能将音频上传到 UniSound 服务器(SKILL.md 不允许本地转写或回退);(4) 如需更严格的隐私控制,请审查脚本(例如更改端点、移除硬编码的 vocab_id,或添加传输加密)。如果以上任何一项不可接受(将敏感音频上传到外部 ASR),请勿使用该技能。...
详细分析 ▾
用途与能力
名称和描述(UniSound ASR 音频转写器)与包含的脚本和声明的需求(python3 和 UniSound API 凭据)相匹配。脚本仅与 UniSound 端点(可配置的 base_url)通信,并实现了符合所述目的的上传→转写→轮询工作流程。
指令范围
SKILL.md 限制代理只能调用提供的脚本,不得尝试本地转写或替代服务;这与强制使用 UniSound API 的策略一致,但具有强制性。SKILL.md 和脚本都将音频上传到 UniSound 服务器(文档声明不使用第三方端点)。说明故意阻止回退/本地处理——这不是安全漏洞,而是用户应理解的操作限制。
安装机制
注册表元数据中没有安装程序(仅限指令)。README 指示用户 pip install 小的 requirements.txt(requests 和 urllib3)——这是来自知名 Python 包的标准、低风险依赖安装。
凭证需求
声明的必需环境变量是 UNISOUND_APPKEY 和 UNISOUND_SECRET(primaryEnv = UNISOUND_SECRET),这对于 API 客户端是合适的。运行时代码可能还会读取可选环境变量,如 UNISOUND_BASE_URL、UNISOUND_USERID、UNISOUND_AUDIOTYPE 和 UNISOUND_USE_HOT_DATA;这些是合理的,但未列在 requires.env 中。所需变量的数量和敏感度与任务相称。
持久化与权限
该技能不请求持久/始终在线包含(always:false),也不修改其他技能或系统级设置。它只是在调用时运行 CLI 脚本。
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/12

# v1.0.1 变更日志 - 移除所有文档和参考文件:README.md 及 references/ 目录下的所有内容。 - SKILL.md 现为主要且唯一的文档,包含必要的使用和配置信息。 - 对运行时使用或 API 行为没有面向用户的更改;更新仅限文档。 - 减少冗余或示例指导——相关说明现已整合。

● 可疑

安装命令 点击复制

官方npx clawhub@latest install u2-audio-file-transcriber
镜像加速npx clawhub@latest install u2-audio-file-transcriber --registry https://cn.clawhub-mirror.com

技能文档

云知声语音转写

调用云知声(UniSound)语音识别服务转写音频文件。支持多种音频格式,适用于金融、客服等场景。

Transcribe audio files using UniCloud ASR service. Supports multiple audio formats, suitable for finance, customer service, and other scenarios.

When to Use This Skill

Use UniSound ASR for:

  • Transcribing pre-recorded audio files (WAV, MP3, M4A, FLAC, OGG)
  • Converting customer service recordings to text
  • Processing financial audio records
  • Audio file transcription up to 2 hours, 100MB
  • Domain-specific transcription (finance, customer service, general)

Do NOT use for:

  • Real-time/streaming speech recognition
  • Text-to-speech (TTS) synthesis
  • Live captioning or real-time transcription
  • Voice conversation or dialogue systems

Use when:

The user needs to transcribe recorded audio files, or asks for UniSound/云知声 audio file transcription.

不适用于: 实时语音识别、语音合成(TTS)或直播字幕。

Installation

Install Python dependencies before using this skill. From the skill directory (skills/asr-file-transfer-tools):

pip install -r scripts/requirements.txt

Requires Python 3.8+.

How to Use This Skill

⛔ MANDATORY RESTRICTIONS - DO NOT VIOLATE ⛔

  • ONLY use UniSound ASR API - Execute the script python3 scripts/transcribe.py
  • NEVER transcribe audio directly - Do NOT attempt local transcription
  • NEVER offer alternatives - Do NOT suggest "I can try another method" or similar
  • IF API fails - Display the error message and STOP immediately
  • NO fallback methods - Do NOT attempt audio transcription any other way

If the script execution fails (API not configured, network error, etc.):

  • Show the error message to the user
  • Do NOT offer to help using your audio analysis capabilities
  • Do NOT ask "Would you like me to try transcribing it?"
  • Simply stop and wait for user to fix the configuration

Basic Workflow

  • Execute audio transcription:
python3 scripts/transcribe.py /path/to/audio.wav

Command options:

  • --format FORMAT - Audio format (wav, mp3, m4a, flac, ogg)
  • --domain DOMAIN - Recognition domain (finance, customer_service, other)
  • --out FILE - Save output to file instead of stdout
  • --json - Output JSON format with full result
  • --userid ID - Custom user ID
  • Output:
  • Default: Text transcript printed to stdout
  • With --out: Transcript saved to specified file
  • With --json: Full JSON result with metadata

Understanding the Output

Text Format:

  • Plain transcript of the audio content
  • Sentence segmentation preserved
  • Timestamps included in JSON mode

JSON Format:

  • Complete transcription result with metadata
  • Confidence scores for each segment
  • Timestamp information
  • Recognition details

Usage Examples

Example 1: Quick Transcription

python3 scripts/transcribe.py recording.wav

Output: Transcript text printed to console

Example 2: Save to File

python3 scripts/transcribe.py interview.mp3 --format mp3 --out transcript.txt

Output: Transcript saved to transcript.txt

Example 3: JSON Output with Metadata

python3 scripts/transcribe.py audio.m4a --json --out result.json

Output: Complete JSON result with timestamps and confidence scores

Example 4: Domain-Specific Transcription

python3 scripts/transcribe.py financial_call.wav --domain finance

Output: Transcript optimized for financial terminology

How It Works

The script uses the UniCloud ASR API with the following workflow:

  • Initialize upload — Get a task ID from the API / 初始化上传,获取任务ID
  • Upload audio file — Upload the audio file to the server / 上传音频文件到服务器
  • Start transcription — Submit the transcription task / 提交转写任务
  • Poll for results — Wait for transcription to complete (typically 10-60 seconds) / 轮询等待转写完成(通常10-60秒)
  • Return transcript — Output the recognized text / 输出识别文本
Privacy: Audio files are uploaded directly to UniCloud servers. No data is sent to third-party services.
>
隐私说明:音频文件直接上传到云知声服务器。不会将数据发送到第三方服务。

Supported Formats

Supported file types:

  • WAV
  • MP3
  • M4A
  • FLAC
  • OGG

Limits:

  • Maximum duration: 2 hours
  • Maximum file size: 100MB

Use the --format flag to specify the format if auto-detection fails:

python3 scripts/transcribe.py audio.mp3 --format mp3

First-Time Configuration

When API is not configured:

The error will show:

CONFIG_ERROR: UNISOUND_APPKEY or UNISOUND_SECRET not configured.

Obtaining Credentials

To use this skill, you need API credentials from UniCloud (云知声):

您需要从云知声获取 API 凭据:

  • Contact UniCloud to obtain your API credentials 联系云知声获取您的 API 凭据
  • You will receive: 您将收到:
- AppKey: Application key / 应用密钥 - Secret: Secret key for authentication / 认证密钥 - UserId: Your user identifier / 用户标识 - Base URL: API endpoint URL / API 端点地址

Test Credentials (UAT Environment)

For testing and evaluation only (用于测试和评估):

AppKey: 681e01d78d8a40e8928bc8268020639b
Secret: d7b2980cb61843d69fdab5e99deafcdf
UserId: unisound-python-demo
Base URL: http://af-asr.uat.hivoice.cn
⚠️ Important Security Notice / 重要安全提示
>
- Test environment only — These credentials are for UAT testing only
- 仅测试环境 — 这些凭据仅用于 UAT 测试
- No sensitive data — Never use with production or sensitive audio files
- 勿用于敏感数据 — 切勿用于生产或敏感音频文件
- Get your own credentials — For production use, contact UniCloud
- 获取自己的凭据 — 生产环境请联系云知声
- Data privacy — Audio files are uploaded to UniSound servers
- 数据隐私 — 音频文件将上传至云知声服务器

Configuration Steps

Guide the user to configure securely:

  • Recommend configuring through environment variables or .env file
  • Recommend using the host application's configuration method when possible
  • Warn about sharing credentials in chat (may be stored in conversation history)

Required environment variables:

VariableRequiredDescriptionDefault
UNISOUND_APPKEYYesApplication key / 应用密钥-
UNISOUND_SECRETYesSecret key / 认证密钥-
UNISOUND_USERIDNoUser identifier / 用户标识unisound-python-demo
UNISOUND_BASE_URLNoAPI base URL / API 基础地址http://af-asr.uat.hivoice.cn
UNISOUND_DOMAINNoRecognition domain / 识别领域other
UNISOUND_AUDIOTYPENoDefault audio format / 默认音频格式wav
Configuration examples:

Linux/macOS:

export UNISOUND_APPKEY="681e01d78d8a40e8928bc8268020639b"
export UNISOUND_SECRET="d7b2980cb61843d69fdab5e99deafcdf"
export UNISOUND_USERID="unisound-python-demo"

Windows (PowerShell):

$env:UNISOUND_APPKEY="681e01d78d8a40e8928bc8268020639b"
$env:UNISOUND_SECRET="d7b2980cb61843d69fdab5e99deafcdf"
$env:UNISOUND_USERID="unisound-python-demo"

Using .env file (Recommended):

UNISOUND_APPKEY=681e01d78d8a40e8928bc8268020639b
UNISOUND_SECRET=d7b2980cb61843d69fdab5e99deafcdf
UNISOUND_USERID=unisound-python-demo
Security Note: Never commit .env files or actual credentials to version control.
>
安全提示:切勿将 .env 文件或实际凭据提交到版本控制系统。

Error Handling

Authentication failed:

API returned error: 401

→ AppKey or Secret is invalid, reconfigure with correct credentials → AppKey 或 Secret 无效,请重新配置正确的凭据

Network error:

Connection timeout

→ Check network connectivity to UniCloud API → 检查到云知声 API 的网络连接

Audio file not found:

错误: 音频文件不存在

→ Check the file path, use absolute path if needed → 检查文件路径,必要时使用绝对路径

Transcription timeout:

转写超时

→ Transcription is taking longer than expected (server may be busy) → 转写时间过长(服务器可能繁忙) → Try again later / 稍后重试 → Check if the audio file is too large / 检查音频文件是否过大

Unsupported audio format:

Unsupported audio format

→ The audio format is not supported by the API → API 不支持该音频格式 → Convert to a supported format (WAV recommended) / 转换为支持的格式(推荐 WAV) → Use --format flag to explicitly specify the format / 使用 --format 参数显式指定格式

# Convert using ffmpeg / 使用 ffmpeg 转换
ffmpeg -i input.mp3 -ar 16000 -ac 1 output.wav

API quota exceeded:

API returned error: 429

→ Too many requests, wait before retrying → 请求过多,请稍后重试

Important Notes

  • Requires network connectivity to UniCloud ASR API
需要网络连接到云知声 ASR API
  • Cloud-based processing - Audio files are uploaded to UniSound servers
云端处理——音频文件会上传到云知声服务器
  • File size limits: Maximum 2 hours duration, 100MB file size
文件大小限制:最长 2 小时,最大 100MB
  • Domain optimization: Use appropriate --domain for better accuracy
领域优化:使用适当的 --domain 以获得更高的准确率
  • Test credentials: UAT environment credentials are for testing only
测试凭据:UAT 环境凭据仅供测试使用

Security Best Practices

For production deployment / 生产部署:

  • Obtain your own credentials from UniCloud / 云知声
从云知声获取您自己的凭据
  • Use environment variables — Never embed production credentials in scripts or configuration files
使用环境变量——切勿在脚本或配置文件中嵌入生产凭据
  • Review privacy policy — Audio files are uploaded to UniSound servers; review their privacy policy
审查隐私政策——音频文件会上传到云知声服务器;请查看其隐私政策
  • Test with non-sensitive data first — Always test with non-sensitive audio files first
首先使用非敏感数据进行测试——始终先使用非敏感音频文件进行测试

Troubleshooting

Issue: Script fails with import error

→ Ensure dependencies are installed: pip install -r scripts/requirements.txt → Ensure using Python 3.8 or later / 确保使用 Python 3.8 或更高版本

Issue: Cannot connect to API server 无法连接到 API 服务器

→ Check network connectivity / 检查网络连接 → Verify API endpoint URL is correct / 验证 API 端点 URL 是否正确 → Try using a different network / 尝试使用其他网络

Issue: Poor transcription quality

→ Check audio quality (background noise, clarity) / 检查音频质量(背景噪音、清晰度) → Try using appropriate --domain parameter / 尝试使用适当的 --domain 参数 → Ensure audio format is correct / 确保音频格式正确

Getting Help

If you encounter issues not covered here:

如果遇到未涵盖的问题:

  • Check the UniCloud ASR documentation for the latest API changes
查看云知声 ASR 文档了解最新的 API 变更
  • Verify your network connection to the API server
验证到 API 服务器的网络连接
  • Check the error message details for specific error codes
检查错误消息详情以获取特定错误代码
  • Ensure you're using Python 3.8 or later
确保使用 Python 3.8 或更高版本

# Check Python version / 检查 Python 版本
python3 --version
Note: API capabilities and supported formats are determined by your UniCloud ASR API service configuration.
>
注意:API 功能和支持的格式由您的云知声 ASR API 服务配置决定。

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务