← 返回 Skills 市场
devcsde

Oatda Translate Audio

作者 devcsde · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
35
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install oatda-translate-audio
功能描述
Translate foreign-language audio into English text using OATDA's unified audio API. Triggers when the user wants audio translation, spoken-language translati...
使用说明 (SKILL.md)

OATDA Audio Translation

Translate foreign-language audio into English text through OATDA's unified audio API.

API Key Resolution

All commands need the OATDA API key. Resolve it inline for each exec call:

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}"

If the key is empty or null, tell the user to get one at https://oatda.com and configure it.

Security: Never print the full API key. Only verify existence or show first 8 chars.

Model Mapping

User says Provider Model
whisper, whisper-1, openai whisper (default) openai whisper-1
translate audio, audio translation openai whisper-1

Default: openai / whisper-1 if no model specified.

If the user provides provider/model format directly (for example openai/whisper-1), split on /.

⚠️ Models change over time. If a model ID fails, query oatda-list-models with ?type=audio first.

Input Preparation

The translation endpoint supports:

  • multipart/form-data with a local file upload
  • JSON with a base64 data URL in file

Maximum audio file size is 25MB.

For local files, prefer multipart upload because it is simpler and avoids large JSON bodies.

Discovering Audio Model Parameters

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X GET "https://oatda.com/api/v1/llm/models?type=audio" \
  -H "Authorization: Bearer $OATDA_API_KEY" | jq '.audio_models[] | {id, supported_params}'

Look for:

  • audio_modes containing translation
  • supported response_format values
  • optional prompt or filename support

API Call (multipart)

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X POST "https://oatda.com/api/v1/llm/translations" \
  -H "Authorization: Bearer $OATDA_API_KEY" \
  -F "provider=\x3CPROVIDER>" \
  -F "model=\x3CMODEL>" \
  -F "file=@\x3CAUDIO_FILE>" \
  -F "response_format=json"

Alternative API Call (base64 JSON)

AUDIO_DATA_URL="data:audio/mpeg;base64,$(base64 -w 0 audio.mp3)"

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X POST "https://oatda.com/api/v1/llm/translations" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OATDA_API_KEY" \
  -d "$(jq -n \
    --arg provider \"\x3CPROVIDER>\" \
    --arg model \"\x3CMODEL>\" \
    --arg file \"$AUDIO_DATA_URL\" \
    '{provider: $provider, model: $model, file: $file, response_format: \"json\"}')"

Common Parameters

  • prompt: Optional hint for terminology, names, or translation style
  • response_format: json, text, srt, verbose_json, or vtt
  • temperature: 0 to 1
  • filename: Optional filename for JSON uploads

Response Format

The API returns JSON like:

{
  "text": "The English translation...",
  "language": "fr",
  "duration": 42.5,
  "costs": {
    "inputCost": 0,
    "outputCost": 0.0001,
    "totalCost": 0.0001,
    "currency": "USD"
  }
}

Present the text field to the user and mention that the output is English.

Error Handling

HTTP Status Meaning Action
401 Invalid API key Tell user to check their key
402 Insufficient credits Tell user to check balance
400 Bad request / model not supported Check model or file format and query oatda-list-models with type=audio
413 File too large Keep audio under 25MB or split it
429 Rate limited or monthly cap Wait briefly and retry once

Example

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X POST "https://oatda.com/api/v1/llm/translations" \
  -H "Authorization: Bearer $OATDA_API_KEY" \
  -F "provider=openai" \
  -F "model=whisper-1" \
  -F "[email protected]" \
  -F "response_format=json"

Notes

  • Endpoint: /api/v1/llm/translations
  • Translation output is English text
  • Prefer multipart upload for local files
  • Use prompt for names, acronyms, or domain-specific terminology
  • Equivalent capability name: translate_audio
  • Related skills: oatda-transcribe-audio, oatda-generate-speech, oatda-list-models
安全使用建议
This skill will read an OATDA API key from ~/.oatda/credentials.json (or the OATDA_API_KEY env var) and upload audio to oatda.com for translation. Only install if you trust OATDA to process your audio and you are comfortable storing/using an API key from that config file. Recommended precautions: use a scoped/minimal API key if supported, rotate the key if compromised, avoid uploading sensitive audio unless the service's privacy policy is acceptable, and ensure curl/jq are available and from trusted system packages.
功能分析
Type: OpenClaw Skill Name: oatda-translate-audio Version: 1.0.1 The skill provides standard instructions for translating audio files using the OATDA API. It includes logic for resolving API keys from environment variables or a local configuration file (~/.oatda/credentials.json) and uses curl to interact with the legitimate service endpoint (oatda.com). No evidence of malicious intent, data exfiltration to unauthorized parties, or prompt injection was found.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
Name/description match the declared requirements and instructions: the SKILL.md only calls OATDA endpoints, needs curl and jq, and reads the configured OATDA API key. There are no unrelated services or credentials requested.
Instruction Scope
Instructions are narrowly scoped to preparing audio input, resolving the OATDA API key from the declared config path or env var, and POSTing to https://oatda.com/api/v1/llm/translations. The skill does read ~/.oatda/credentials.json to obtain the API key (which is declared as a required config path). It does not instruct the agent to access other system files or external endpoints beyond OATDA.
Install Mechanism
This is an instruction-only skill with no install spec or downloaded code, which minimizes risk. It assumes existing system tools (curl, jq) instead of installing arbitrary packages.
Credentials
Only OATDA_API_KEY and the ~/.oatda/credentials.json path are required, which is proportionate for a wrapper that calls OATDA's API. No unrelated secrets or multiple credential types are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform privileges or modify other skills. Autonomous invocation is allowed by default (normal), but the skill does not combine that with broad or unrelated access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install oatda-translate-audio
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /oatda-translate-audio 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Fix: replaced with correct OpenClaw skill format
v1.0.0
Initial release: Foreign-language audio to English translation via OATDA unified audio API
元数据
Slug oatda-translate-audio
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Oatda Translate Audio 是什么?

Translate foreign-language audio into English text using OATDA's unified audio API. Triggers when the user wants audio translation, spoken-language translati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 Oatda Translate Audio?

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

Oatda Translate Audio 是免费的吗?

是的,Oatda Translate Audio 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Oatda Translate Audio 支持哪些平台?

Oatda Translate Audio 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Oatda Translate Audio?

由 devcsde(@devcsde)开发并维护,当前版本 v1.0.1。

💬 留言讨论