dshbase

插件目录 / Automation / dsh-audio-dub

dsh-audio-dub

已验证 · 实测可装 pinch-eng

✓ 持续维护 基于 2 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-audio-dub — DSH 插件(编排)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-audio-dub — DSH 插件(编排) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-audio-dub

中文

DSH dubbing plugin — dub a video or audio file into another language while keeping the original speaker's voice (AI voice cloning). Turn a Chinese video into an English one in a single tool call, or the other way round.

License
topic

You:   dub ./demo.mp4 into English
Agent: [dub_media] Job 8f3a… — completed
       zh → en · duration 154s · cost $1.28
       Download: https://…/dubbed.mp4

Motivation

Agents handle text translation well, but "make an English version of this video" falls outside the toolchain: either you upload it to a web app by hand, or you wire up ffmpeg + ASR + translation + TTS + alignment yourself.

This plugin collapses that into one tool call: give it a local path or a direct media URL, get back a finished dub. Transcription, translation, voice cloning and timing all happen server-side; the agent just waits for the result.

Install

Install into your profile (headless here; web / tui work the same way):

dsh plugin --profile headless add github:pinch-eng/dsh-audio-dub

It registers itself on install — no cordis.yml edit needed. Then set an API key (create one at portal.startpinch.com; it looks like pk_…):

export PINCH_API_KEY=pk_xxx

Try it:

dsh --profile headless "dub ./demo.mp4 into English"

Config

Field Type Default Description
apiKey string process.env.PINCH_API_KEY API key. Prefer the environment variable over writing it into cordis.yml
baseUrl string https://portal.startpinch.com Override for self-hosted or staging
pollIntervalMs integer 15000 Status poll interval while waiting; floor 5000

Tools

dub_media

Parameter Type Required Description
source string ✅ Local file path (./talk.mp4) or a direct link to a media file. Page URLs (YouTube, Bilibili, social posts) are not media files and are rejected
target_lang string ✅ Language to dub into — see the table below
source_lang string Spoken language of the source. Default auto
reduce_accent boolean More native-sounding target pronunciation, at a small cost to voice similarity. Leave unset for the service default
wait boolean Wait for the result. Default true
wait_seconds integer Wait budget; default 600, max 1800. Rule of thumb: allow 1–2× the media duration

Local files are streamed to a presigned upload target before the job is submitted — a 2 GB mp4 never lands in memory.

Running out of wait budget is not a failure: the job continues server-side, and the returned job_id can be handed to dub_status.

dub_status

Parameter Type Required Description
job_id string ✅ Job id returned by dub_media
wait boolean Wait for completion instead of returning the current status. Default false
wait_seconds integer As above

dub_languages

No parameters. Local lookup — no network call, no cost.

Supported languages

Code Language Code Language
zh Chinese pt Portuguese
en English ru Russian
es Spanish ja Japanese
fr French ko Korean
de German it Italian

The source language may additionally be auto.

Pricing and limits

  • $0.50 per minute of media
  • Max 60 minutes and 2 GB per file
  • Download links are valid for 48 hours; call dub_status again for a fresh one

On an empty balance the tool returns insufficient_balance together with the top-up URL, so the agent can tell you exactly what to do.

Security model

  • The API key is sent as an Authorization header to baseUrl and never appears in a tool result — but tool arguments are written to the session log, so don't paste keys into prompts. A key reaches dubbing endpoints only; it cannot mint further keys.
  • Reads the file at source when it's a local path, and nothing else. Network access is limited to baseUrl and the presigned storage target it hands back.

Or use MCP

If you'd rather not install a plugin, the same service is available as a hosted MCP server via the official bridge:

- id: mcp-pinch
  name: '@deepseek-ai/dsh-mcp-client'
  config:
    serverName: pinch
    transport: streamable-http
    url: https://portal.startpinch.com/api/mcp
    headers:
      Authorization: !!js `Bearer ${process.env.PINCH_API_KEY}`

The difference: MCP exposes the full API surface (uploads, subtitles, balance, job listing), which is more tools and finer grained. This plugin is three task-shaped tools with direct local-file upload and results trimmed for the model. Use the plugin for everyday dubbing, MCP when you need the whole API.

Development

npm install
npm run check   # typecheck + test + build

Documentation

Full parameter reference, language support and API details: startpinch.com/docs

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-audio-dub」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:pinch-eng/dsh-audio-dub

Headless(CLI)profile:

dsh plugin --profile headless add github:pinch-eng/dsh-audio-dub

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

自动化一项重复工作——调度、串联任务或响应事件——不用你亲手启动。

适合谁

有周期性工作、想 cron 式无人值守而非手动触发的人。

二次开发建议

触发器和任务模板是缝——加事件驱动或文件监听触发,以及更丰富的流程编排。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Automation 里更多

浏览全部 7797 个插件 →