← Back to Skills Marketplace
okgptai

多语种音频翻译助手

by Jasper.W · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ✓ Security Clean
182
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install audio-translator
Description
多语种语音翻译技能。支持URL或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。支持中文、英文、日文、法文、西班牙文等多种语言互译。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install audio-translator
  3. After installation, invoke the skill by name or use /audio-translator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.1.0
- 新增对音频URL输入的支持:可直接翻译在线音频文件,无需手动下载。 - 安装脚本与主流程更新,自动检测输入类型并处理音频下载。 - 参数说明和使用示例补充,明确支持本地文件与URL输入。 - 更新依赖与工具要求,说明需支持curl下载音频。 - 适应性提升,输入格式与触发请求更丰富。
v2.0.0
多语种语音翻译技能,支持中英日法德等10种语言互译,自动识别源语言,生成目标语言语音和文本
Metadata
Slug audio-translator
Version 2.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 多语种音频翻译助手?

多语种语音翻译技能。支持URL或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。支持中文、英文、日文、法文、西班牙文等多种语言互译。 It is an AI Agent Skill for Claude Code / OpenClaw, with 182 downloads so far.

How do I install 多语种音频翻译助手?

Run "/install audio-translator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 多语种音频翻译助手 free?

Yes, 多语种音频翻译助手 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 多语种音频翻译助手 support?

多语种音频翻译助手 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 多语种音频翻译助手?

It is built and maintained by Jasper.W (@okgptai); the current version is v2.1.0.

💬 Comments