
iFlytek Translate
SkillOfficial iFlytek skill that translates text or text files via iFlytek's machine translation API across Chinese, English, Japanese, Korean, French, Spanish, Arabic and more, up to 4,096 bytes per call. Needs Python 3 and iFlytek open platform credentials; paid beyond the free quota.
iFly Translate
基于讯飞机器翻译 API,在多语言之间做文本翻译。对应脚本为 scripts/translate.py,纯 Python 标准库实现,无需安装第三方依赖。
前置条件
export IFLY_APP_ID="your_app_id"
export IFLY_API_KEY="your_api_key"
export IFLY_API_SECRET="your_api_secret"
兼容说明:设置任意
IFLY_*凭证变量(包括空值)后,仅使用该组,缺项报错;未设置标准组时,依次尝试XFYUN_*、XFEI_*,不跨组拼接。旧前缀会在 stderr 输出一次不含凭证值的迁移提示。
快速开始
# 默认中译英
python3 scripts/translate.py "你好世界"
# 指定源语言和目标语言
python3 scripts/translate.py -s en -t cn "Hello world"
# 从标准输入读取
echo "こんにちは" | python3 scripts/translate.py - -s ja -t cn
# 从文件翻译
python3 scripts/translate.py -f ./document.txt -s cn -t en
# 输出语言标签
python3 scripts/translate.py -v "你好"
# 输出原始 JSON
python3 scripts/translate.py --raw "测试翻译"
参数说明
| 参数 | 说明 | 默认值 |
|---|---|---|
text | 待翻译文本;传 - 表示从标准输入读取 | - |
--file, -f | 从文件读取文本 | 不传 |
--from, -s | 源语言代码 | cn |
--to, -t | 目标语言代码 | en |
--verbose, -v | 输出源/目标语言标签 | 关闭 |
--raw | 输出原始 JSON 响应 | 关闭 |
限制说明
- 单次文本长度不超过
4096字节。 - 鉴权方式为
HMAC-SHA256,并带Digest请求头。 - 脚本允许传
auto作为源语言;实际是否可用取决于讯飞账号和接口能力。 - 完整语种列表见官方文档。
- 完整文档与错误码说明见
SKILL.md。
参考链接
- 官方文档:https://www.xfyun.cn/doc/nlp/xftrans/API.html
- 控制台:https://console.xfyun.cn/services/its
- 价格说明:https://www.xfyun.cn/services/xftrans?target=price
扩展说明
常用语言代码
| 代码 | 语言 | 代码 | 语言 |
|---|---|---|---|
cn | 中文 | en | 英语 |
ja | 日语 | ko | 韩语 |
fr | 法语 | de | 德语 |
es | 西班牙语 | ru | 俄语 |
ar | 阿拉伯语 | th | 泰语 |
vi | 越南语 | pt | 葡萄牙语 |
it | 意大利语 | tr | 土耳其语 |
支持常见别名,例如 zh -> cn、english -> en、japanese -> ja。
Ressources associées

iFly-Skills
SkillOfficial iFlytek skills: machine translation, video translation and dubbing, Chinese document proofreading, PDF, image and invoice OCR, speech-to-text and TTS, plus contract review (lawyer check needed). Needs iFlytek open platform services and keys; contract review also needs OCR and LLM APIs.
iflytek/iFly-Skills212
LanguageTool
CLIOpen-source grammar, spelling and style checker for 20+ languages including English, German, French, Spanish and Portuguese. Proofread drafts in bulk from the CLI or run a local HTTP checking server for agents. For writers, translators and language teachers. Needs Java 17 (Homebrew includes it).
languagetool-org/languagetool15.1k
iFlytek Video Translate
SkillOfficial iFlytek skill (beta): translates and AI-dubs videos between Chinese, English, Japanese, Korean, Russian, French, Spanish, Arabic and Cantonese, tracks jobs, fetches subtitles and video. Needs iFlytek API keys and Python 3; input must be an online MP4 (Alibaba OSS per docs), up to 5 min.
iflytek/iFly-Skills212
DeepL MCP Server
MCPDeepL's official MCP: translate text and documents (PDF, DOCX, PPTX, XLSX and more) and rephrase or polish writing, using the glossaries and style rules in your account. Needs a DeepL API key.
DeepL/deepl-mcp-server118
Lara Translate MCP Server
MCPTranslated's official MCP for its Lara translation model: language detection, context-aware translation in faithful, fluent or creative styles, plus translation memories and glossaries. Needs a Lara Translate account (browser sign-in on first use); the free plan has a monthly quota.
translated/lara-mcp100
DeepL CLI
CLIDeepL's official CLI: translate text and PDF, Word, PowerPoint and Excel documents while keeping formatting, with glossaries and translation memory. Needs a DeepL API key (free plan available); install from source with Node.js 24.15+. Have legal translations reviewed.
DeepL/deepl-cli46