多语种音频翻译助手

v2.1.0

多语种语音翻译技能。支持URL或本地文件输入,自动识别源语言,翻译为目标语言,并生成目标语言的语音文件。支持中文、英文、日文、法文、西班牙文等多种语言互译。

0· 180·0 current·0 all-time
byJasper.W@okgptai

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for okgptai/audio-translator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "多语种音频翻译助手" (okgptai/audio-translator) from ClawHub.
Skill page: https://clawhub.ai/okgptai/audio-translator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install audio-translator

ClawHub CLI

Package manager switcher

npx clawhub@latest install audio-translator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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).
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

audiovk979n3m7vf7r7kx9h058f6ea0n836g48latestvk979n3m7vf7r7kx9h058f6ea0n836g48multilingualvk979n3m7vf7r7kx9h058f6ea0n836g48speechvk979n3m7vf7r7kx9h058f6ea0n836g48translationvk979n3m7vf7r7kx9h058f6ea0n836g48
180downloads
0stars
2versions
Updated 1mo ago
v2.1.0
MIT-0

多语种音频翻译助手

支持 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=<文本>&langpair=<源>|<目标>"

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

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

目标语言TTS 语音
enen-US-AriaNeural
zhzh-CN-XiaoxiaoNeural
jaja-JP-NanamiNeural
frfr-FR-DeniseNeural
eses-ES-ElviraNeural
dede-DE-KatjaNeural
koko-KR-SunHiNeural
ruru-RU-SvetlanaNeural
itit-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

Comments

Loading comments...