{"id":50527656,"url":"https://github.com/poyih/bob-plugin-openrouter-tts","last_synced_at":"2026-06-03T09:05:00.025Z","repository":{"id":353785543,"uuid":"1220898732","full_name":"poyih/bob-plugin-openrouter-tts","owner":"poyih","description":"Bob TTS plugin for OpenRouter with Gemini and OpenAI voice selection","archived":false,"fork":false,"pushed_at":"2026-06-03T06:56:44.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T08:31:09.660Z","etag":null,"topics":["bob-plugin","bobplugin","openrouter","tts"],"latest_commit_sha":null,"homepage":"https://github.com/poyih/bob-plugin-openrouter-tts","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poyih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T13:38:34.000Z","updated_at":"2026-06-03T06:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/poyih/bob-plugin-openrouter-tts","commit_stats":null,"previous_names":["poyih/bob-plugin-openrouter-tts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/poyih/bob-plugin-openrouter-tts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyih%2Fbob-plugin-openrouter-tts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyih%2Fbob-plugin-openrouter-tts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyih%2Fbob-plugin-openrouter-tts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyih%2Fbob-plugin-openrouter-tts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poyih","download_url":"https://codeload.github.com/poyih/bob-plugin-openrouter-tts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyih%2Fbob-plugin-openrouter-tts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33856329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bob-plugin","bobplugin","openrouter","tts"],"created_at":"2026-06-03T09:04:59.340Z","updated_at":"2026-06-03T09:05:00.018Z","avatar_url":"https://github.com/poyih.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bob Plugin - OpenRouter TTS\n\n[Bob](https://bobtranslate.com/) 的 OpenRouter TTS 语音合成插件，默认使用 `google/gemini-3.1-flash-tts-preview`，并内置 OpenRouter 上**全部 speech-output 模型**与各自的音色列表。\n\n## 安装\n\n1. 下载最新版本的 `openrouter-tts.bobplugin`\n2. 双击文件即可安装到 Bob\n\n## 支持的模型\n\n每个模型都有一组独立的音色，选中模型后请在对应的 Voice 菜单里挑选音色（Bob 的设置项是静态显示的，所有 Voice 菜单会同时出现，请只调整与当前模型匹配的那一组）。\n\n| 模型 | OpenRouter ID | 对应 Voice 菜单 | 音色数 |\n| --- | --- | --- | --- |\n| Gemini 3.1 Flash TTS Preview | `google/gemini-3.1-flash-tts-preview` | Voice · Gemini | 30 |\n| GPT-4o Mini TTS | `openai/gpt-4o-mini-tts-2025-12-15` | Voice · OpenAI | 13 |\n| MAI-Voice-2 | `microsoft/mai-voice-2` | Voice · Microsoft MAI | 4 |\n| Grok Voice TTS 1.0 | `x-ai/grok-voice-tts-1.0` | Voice · Grok | 5 |\n| Zonos v0.1 Transformer | `zyphra/zonos-v0.1-transformer` | Voice · Zyphra Zonos | 5 |\n| Zonos v0.1 Hybrid | `zyphra/zonos-v0.1-hybrid` | Voice · Zyphra Zonos | 5 |\n| CSM 1B | `sesame/csm-1b` | Voice · Sesame CSM | 7 |\n| Orpheus 3B | `canopylabs/orpheus-3b-0.1-ft` | Voice · Orpheus | 7 |\n| Kokoro 82M | `hexgrad/kokoro-82m` | Voice · Kokoro | 54 |\n| Voxtral Mini TTS | `mistralai/voxtral-mini-tts-2603` | Voice · Voxtral | 30 |\n| 自定义模型 | `Custom Model ID` 填写 | Custom Voice | — |\n\n\u003e 模型列表对应 OpenRouter [output_modalities=speech](https://openrouter.ai/models?output_modalities=speech) 的全部模型。新增模型可直接在 `Custom Model ID` 中填写 ID，并在 `Custom Voice` 里填对应音色。\n\n## 配置\n\n在 Bob 的插件设置中填写以下信息：\n\n| 选项 | 说明 |\n| --- | --- |\n| **API Key** | 你的 OpenRouter API Key，例如 `sk-or-v1-...` |\n| **API URL** | OpenRouter TTS 接口地址，默认 `https://openrouter.ai/api/v1/audio/speech` |\n| **Model** | TTS 模型，默认 `google/gemini-3.1-flash-tts-preview` |\n| **Custom Model ID** | 可选。填写完整模型 ID 时，会覆盖上方预设 |\n| **Voice · 各家族** | 各模型家族的音色菜单，详见上表 |\n| **Custom Voice** | 可选。用于无法自动识别音色家族的自定义模型 |\n| **Audio Format** | 默认 `pcm`，插件会包装成 WAV 给 Bob 播放；也可选 `wav` / `mp3` / `opus` / `flac`（需 provider 支持） |\n| **Speed** | 语速：0.5x ~ 2.0x，仅在非 1.0x 时发送，部分 provider 可能会忽略 |\n| **Instructions / Audio Tags** | 可选。会作为前缀拼到文本前，适合填写 Gemini audio tags 或简短风格提示 |\n\n## Voice 选择规则\n\n插件会根据当前模型 ID 自动选择对应的 Voice 菜单：\n\n| 家族 | 匹配规则 | 使用的配置项 |\n| --- | --- | --- |\n| Gemini | 含 `gemini` | Voice · Gemini |\n| OpenAI | `openai/` 开头、含 `gpt-4o-mini-tts`、`tts-1` 开头 | Voice · OpenAI |\n| Microsoft | `microsoft/` 开头、含 `mai-voice` | Voice · Microsoft MAI |\n| xAI Grok | `x-ai/` 开头、含 `grok-voice` | Voice · Grok |\n| Zyphra | `zyphra/` 开头、含 `zonos` | Voice · Zyphra Zonos |\n| Sesame | `sesame/` 开头、含 `csm` | Voice · Sesame CSM |\n| Canopy Orpheus | `canopylabs/` 开头、含 `orpheus` | Voice · Orpheus |\n| Kokoro | `hexgrad/` 开头、含 `kokoro` | Voice · Kokoro |\n| Voxtral | `mistralai/` 开头、含 `voxtral` | Voice · Voxtral |\n| 其他自定义 | 未匹配到上述任一家族 | Custom Voice，为空时回退到 Gemini 默认音色 |\n\n## OpenRouter 配置示例\n\n### Gemini TTS（默认）\n\n| 选项 | 值 |\n| --- | --- |\n| **API URL** | `https://openrouter.ai/api/v1/audio/speech` |\n| **Model** | `google/gemini-3.1-flash-tts-preview` |\n| **Voice · Gemini** | `Kore` |\n| **Audio Format** | `pcm` |\n\n### Kokoro 82M（多语言、开源、便宜）\n\n| 选项 | 值 |\n| --- | --- |\n| **Model** | `hexgrad/kokoro-82m` |\n| **Voice · Kokoro** | `af_heart`、`zf_xiaoxiao`（中文）、`jf_alpha`（日语）等 |\n| **Audio Format** | `pcm` 或 `mp3` |\n\n### OpenAI GPT-4o Mini TTS\n\n| 选项 | 值 |\n| --- | --- |\n| **Model** | `openai/gpt-4o-mini-tts-2025-12-15` |\n| **Voice · OpenAI** | `marin`、`cedar`、`alloy` 等 |\n| **Audio Format** | `mp3` 或 provider 支持的格式 |\n\n`API URL` 也支持填写：\n\n- `https://openrouter.ai`\n- `https://openrouter.ai/api`\n- `https://openrouter.ai/api/v1`\n- `https://openrouter.ai/api/v1/audio/speech`\n- `https://openrouter.ai/api/v1/tts`（legacy/custom endpoint）\n\n## Audio Tags\n\n`Instructions / Audio Tags` 会作为前缀拼到待合成文本前，例如：\n\n```text\n[excited]\n```\n\n合成 `Hello world` 时，实际请求输入会变成：\n\n```text\n[excited] Hello world\n```\n\n也可以直接在待合成文本里使用标签，例如：\n\n```text\n[whispers] This is a secret. [short pause] Please listen carefully.\n```\n\n## 注意事项\n\n- 单次合成文本长度不能超过 4096 个字符。\n- 插件会按返回音频的实际内容（magic bytes）自动识别格式：真正的 WAV / MP3 / Ogg / FLAC 会原样交给 Bob 播放，只有裸 PCM 才会被包装成 24kHz、16-bit、mono WAV。\n- 如果选择 `mp3` / `wav` 等格式但当前 provider 不支持，OpenRouter 可能会返回错误或退回到默认格式。\n- `Speed` 仅在非 1.0x 时随请求发送，以兼容不支持该参数的模型。\n- 插件会对最近 10 条成功合成结果做内存缓存。\n\n## 支持的语言\n\n自动、中文（简/繁）、英语、日语、韩语、法语、德语、西班牙语、意大利语、葡萄牙语、俄语、阿拉伯语、泰语、越南语、印尼语、马来语、土耳其语、波兰语、荷兰语、瑞典语、丹麦语、挪威语、芬兰语、希腊语、捷克语、罗马尼亚语、匈牙利语、斯洛伐克语、乌克兰语、保加利亚语、克罗地亚语、印地语、孟加拉语、泰米尔语、泰卢固语、马拉雅拉姆语、希伯来语、菲律宾语。\n\n\u003e 各模型实际支持的语言不同（例如 Kokoro / MAI-Voice-2 / Voxtral 为多语言，Zonos / Orpheus 主要为英语），请按所选模型挑选合适的音色。\n\n## 开发\n\n插件由两个核心文件组成：\n\n- `info.json` — 插件元信息与配置项定义\n- `main.js` — TTS 调用逻辑\n\n构建 `.bobplugin` 文件：\n\n```bash\nzip -j openrouter-tts.bobplugin info.json main.js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyih%2Fbob-plugin-openrouter-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoyih%2Fbob-plugin-openrouter-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyih%2Fbob-plugin-openrouter-tts/lists"}