← 返回 Skills 市场
okgptai

多语种音频翻译助手

作者 Jasper.W · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ✓ 安全检测通过
182
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install audio-translator
功能描述
多语种语音翻译技能。支持URL或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。支持中文、英文、日文、法文、西班牙文等多种语言互译。
使用说明 (SKILL.md)

多语种音频翻译助手

支持 URL 或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。

触发条件

当用户提出以下请求时激活此技能:

  • "翻译语音文件"
  • "翻译这个音频"
  • "把语音翻译成XX语"
  • "下载并翻译音频"
  • "translate audio from url"
  • "翻译在线音频"

参数定义

input_path(必需)

  • 类型: string
  • 描述: 输入音频文件路径或URL
  • 支持类型:
    • 本地文件: /Users/winer/Downloads/audio.mp3
    • URL: https://example.com/audio.mp3
  • 示例:
    • "/Users/winer/Downloads/录音.mp3"
    • "https://example.com/voice.m4a"

target_lang(必需)

  • 类型: string
  • 描述: 目标语言代码
  • 可选值:
    • en - 英文
    • zh - 中文
    • ja - 日文
    • fr - 法文
    • es - 西班牙文
    • de - 德文
    • ko - 韩文
    • ru - 俄文
    • it - 意大利文

output_path(可选)

  • 类型: string
  • 描述: 输出语音文件路径(默认:自动生成)
  • 示例: "/Users/winer/Downloads/结果.mp3"

source_lang(可选)

  • 类型: string
  • 描述: 源语言代码(默认自动检测)

执行流程

步骤1: 输入处理

  • 检测输入是 URL 还是本地文件
  • URL: 使用 curl 下载到临时目录
  • 本地文件: 直接使用

步骤2: 语音识别(Whisper 自动检测语言)

from faster_whisper import WhisperModel

model = WhisperModel("tiny", device="cpu", compute_type="int8")
segments, info = model.transcribe(audio_path)
source_language = info.language

步骤3: 翻译(MyMemory API)

curl -s "https://api.mymemory.translated.net/get?q=\x3C文本>&langpair=\x3C源>|\x3C目标>"

步骤4: 目标语言语音合成(edge-tts)

根据目标语言选择对应的 TTS 语音:

目标语言 TTS 语音
en en-US-AriaNeural
zh zh-CN-XiaoxiaoNeural
ja ja-JP-NanamiNeural
fr fr-FR-DeniseNeural
es es-ES-ElviraNeural
de de-DE-KatjaNeural
ko ko-KR-SunHiNeural
ru ru-RU-SvetlanaNeural
it it-IT-ElsaNeural

使用示例

示例1: 本地文件翻译

翻译 /Users/winer/录音.mp3 到英文

示例2: URL音频翻译

翻译 https://example.com/voice.m4a 到中文

示例3: 指定输出路径

翻译 /Users/winer/audio.mp3 en /Users/winer/result.mp3

示例4: URL到指定输出

翻译 https://example.com/speech.mp3 zh /Users/winer/speech_zh.mp3

注意事项

  • 自动语言检测: Whisper 会自动检测源语言
  • 免费使用: Whisper(本地)、MyMemory API、edge-tts 均免费
  • 网络需求: 翻译和TTS需要网络连接;URL输入需要网络下载
  • 支持的输入格式: mp3, wav, m4a, aac, ogg, flac, wma
  • Python 版本: 使用 Python 3.11
安全使用建议
This skill appears to do what it says, but review these points before installing: (1) The recognized text is sent to public translation (MyMemory) and TTS (Microsoft/edge-tts) services — do not use with sensitive audio you cannot share. (2) It expects Python 3.11 and ffmpeg; the install script exits if these are absent and installs via system package managers and pip (standard but you should inspect/approve pip installs). (3) faster-whisper requires model weights (large files) which may be downloaded or needed locally — check disk/network impact. (4) The scripts sanitize filenames and avoid symlinks, but confirm behavior in your environment (hardcoded python path may need adjustment). If those tradeoffs are acceptable, the skill is coherent and install behavior is proportional.
功能分析
Type: OpenClaw Skill Name: audio-translator Version: 2.1.0 The audio-translator skill is a legitimate utility for transcribing, translating, and synthesizing speech using Whisper, the MyMemory API, and edge-tts. The implementation in `scripts/translate.sh` and `scripts/install_deps.sh` includes several security hardening practices, such as sanitizing filenames and output paths, validating file extensions against a whitelist, and explicitly checking for and rejecting symbolic links to prevent path traversal. No evidence of data exfiltration, persistence, or malicious command execution was found.
能力评估
Purpose & Capability
Name/description match the files and runtime instructions. The script uses faster-whisper for ASR, MyMemory for text translation, and edge-tts for TTS — all coherent with an audio translation assistant. Declared dependencies (faster-whisper, edge-tts, ffmpeg, Python 3.11) are expected.
Instruction Scope
Runtime instructions and translate.sh operate only on the provided input (local path or downloaded URL), perform format/size checks, transcribe, translate, and synthesize audio. They do transmit recognized text to external services (MyMemory and Microsoft via edge-tts) — which is expected for this function but has privacy implications.
Install Mechanism
No opaque download/install URL or extracted archive; install_deps.sh relies on system package managers and pip. The script does not curl|bash remote code. Using pip to install packages from PyPI is normal but is a supply-chain consideration (expected for Python-based skills).
Credentials
The skill requests no environment variables or credentials, which is proportionate. However, it sends transcribed text to public services (MyMemory API via unauthenticated URL and Microsoft via edge-tts), so user data (recognized text) will leave the host — acceptable for a translator but a privacy/leakage risk for sensitive audio.
Persistence & Privilege
No always:true, no modifications to other skills or system-wide settings. The skill runs on-demand and cleans up temporary files (trap removes temp dir).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install audio-translator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /audio-translator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.0
- 新增对音频URL输入的支持:可直接翻译在线音频文件,无需手动下载。 - 安装脚本与主流程更新,自动检测输入类型并处理音频下载。 - 参数说明和使用示例补充,明确支持本地文件与URL输入。 - 更新依赖与工具要求,说明需支持curl下载音频。 - 适应性提升,输入格式与触发请求更丰富。
v2.0.0
多语种语音翻译技能,支持中英日法德等10种语言互译,自动识别源语言,生成目标语言语音和文本
元数据
Slug audio-translator
版本 2.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

多语种音频翻译助手 是什么?

多语种语音翻译技能。支持URL或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。支持中文、英文、日文、法文、西班牙文等多种语言互译。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 182 次。

如何安装 多语种音频翻译助手?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install audio-translator」即可一键安装,无需额外配置。

多语种音频翻译助手 是免费的吗?

是的,多语种音频翻译助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

多语种音频翻译助手 支持哪些平台?

多语种音频翻译助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 多语种音频翻译助手?

由 Jasper.W(@okgptai)开发并维护,当前版本 v2.1.0。

💬 留言讨论