{"id":24044459,"url":"https://github.com/netcookies/edge-tts-proxy","last_synced_at":"2026-05-20T14:36:48.689Z","repository":{"id":267247795,"uuid":"899064828","full_name":"netcookies/Edge-TTS-Proxy","owner":"netcookies","description":"Edge-TTS-Proxy 插件将 Microsoft Edge TTS（文本到语音）服务集成到 Home Assistant 中。通过代理服务，该插件利用 read-aloud API 实现语音合成功能，为 Home Assistant 提供基于 Microsoft Edge 的文本到语音支持。","archived":false,"fork":false,"pushed_at":"2025-01-02T05:43:58.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T08:46:43.384Z","etag":null,"topics":["home-assistant","homeassistant","homeassistant-integration","microsoft","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netcookies.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-12-05T14:59:26.000Z","updated_at":"2025-01-02T05:44:00.000Z","dependencies_parsed_at":"2024-12-09T09:32:16.667Z","dependency_job_id":"77768396-6265-4679-aefe-170b8856487b","html_url":"https://github.com/netcookies/Edge-TTS-Proxy","commit_stats":null,"previous_names":["netcookies/edge-tts-proxy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/netcookies/Edge-TTS-Proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FEdge-TTS-Proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FEdge-TTS-Proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FEdge-TTS-Proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FEdge-TTS-Proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netcookies","download_url":"https://codeload.github.com/netcookies/Edge-TTS-Proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FEdge-TTS-Proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264321084,"owners_count":23590575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["home-assistant","homeassistant","homeassistant-integration","microsoft","tts"],"created_at":"2025-01-08T23:31:12.192Z","updated_at":"2026-05-20T14:36:48.640Z","avatar_url":"https://github.com/netcookies.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Edge-TTS-Proxy 插件\n\n### 1. 插件介绍\n\n`Edge-TTS-Proxy` 插件将 Microsoft Edge TTS（文本到语音）服务集成到 Home Assistant 中。通过代理服务，该插件利用 [read-aloud API](https://github.com/yy4382/read-aloud) 实现语音合成功能，为 Home Assistant 提供基于 Microsoft Edge 的文本到语音支持。\n\n### 2. 插件功能\n\n- 使用 Microsoft Edge 提供的 TTS 引擎进行语音合成。\n- 支持通过 Home Assistant 发送语音通知。\n- 提供缓存功能，提升语音播放效率。\n- 支持两种使用方式：通过语音助手选择或通过 `tts.speak` 调用指定实体。\n- 后端通过 [read-aloud API](https://github.com/yy4382/read-aloud) 调用 Microsoft Edge TTS 服务。\n\n### 3. 安装与配置\n\n#### 安装步骤\n\n1. 通过 HACS（Home Assistant Community Store）进行安装：\n   - 在 Home Assistant 中打开 HACS。\n   - 搜索 `Edge TTS Proxy` 插件并点击安装。\n   - 安装完成后，重新启动 Home Assistant。\n\n#### 配置\n\n安装完成后，可以通过 Home Assistant 的 UI 配置流程（`config_flow`）来设置插件：\n\n1. 在 Home Assistant UI 中，转到 **设置** \u003e **集成**。\n2. 点击右下角的 **+ 添加集成**。\n3. 搜索 `Edge TTS Proxy` 并选择它。\n4. 按照向导完成配置\n\n完成配置后，插件会自动进行设置并准备就绪。\n\n### 4. 使用方法\n\n插件提供两种使用方式：\n\n#### 方式一：通过语音助手配置\n\n1. 在 Home Assistant 的 **设置** \u003e **语音助手** 中选择您配置的语音助手。\n2. 在语音助手的配置中，选择使用 `Edge TTS Proxy` 作为语音引擎。\n3. 配置完成后，语音助手会使用 Microsoft Edge TTS 进行语音合成并播放。\n\n#### 方式二：通过 `tts.speak` 服务调用\n\n您还可以通过 `tts.speak` 服务来指定具体的 TTS 实体（如 `tts.edge_tts_proxy_entity`），例如：\n\n```yaml\nservice: tts.speak\ndata:\n  entity_id: tts.edge_tts_proxy_entity  # 选择您的 TTS 实体\n  message: \"Hello, this is a test of Edge TTS Proxy!\"\n```\n\n通过这种方式，您可以在任何自动化或脚本中使用 Edge TTS。\n\n### 5. 后端技术说明\n\n`Edge-TTS-Proxy` 插件的语音合成是通过调用 [read-aloud API](https://github.com/yy4382/read-aloud) 实现的，该 API 提供了对 Microsoft Edge TTS 服务的代理接口。`read-aloud` 是一个基于 Node.js 的项目，通过 Microsoft Edge 和 Azure 的语音服务进行文本到语音合成。\n\n- **read-aloud API**：该 API 提供了通过 HTTP 请求将文本转换为语音文件的功能，支持多种语言和语音模型。\n- 插件通过此 API 调用来处理文本转语音请求，返回的语音文件可以缓存并在 Home Assistant 中播放。\n\n### 6. 支持的语言与语音\n\n插件支持通过 Microsoft Edge TTS API 提供的多种语言和语音模型。您可以在配置过程中选择所需的语言和语音。例如：\n\n- **中文（简体）**：`zh-CN`\n\n更多语言和语音模型的选择，请参考 [Microsoft Edge TTS API 文档](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/voices).\n\n### 7. 更新与维护\n\n- 插件支持通过 HACS 自动更新，确保您获得最新的功能和修复。\n- 定期检查 HACS 中的插件更新，保持插件为最新版本。\n\n### 8. 问题排查\n\n- **无法播放语音**：检查插件配置中的语言和语音设置，确保您选择了有效的语音模型。\n- **缓存问题**：如果启用了缓存并且遇到问题，尝试清空缓存目录并重新启动 Home Assistant。\n- **API 配置错误**：确保您的网络环境可以访问 Microsoft Edge TTS API 和 [read-aloud API](https://github.com/yy4382/read-aloud)。\n\n### 9. 贡献与开发\n\n如果您希望为插件贡献代码，请按照以下步骤：\n\n1. Fork 本仓库。\n2. 创建新分支：`git checkout -b feature/your-feature`。\n3. 提交更改：`git commit -m 'Add new feature'`。\n4. 推送至 GitHub：`git push origin feature/your-feature`。\n5. 提交 Pull Request。\n\n### 10. 许可证\n\n本插件采用 [MIT 许可证](https://opensource.org/licenses/MIT)，可以自由修改和分发。\n\n---\n\n## 代码分析\n\n- **核心功能**：插件通过代理服务与 [read-aloud API](https://github.com/yy4382/read-aloud) 交互，调用 Microsoft Edge TTS 服务进行语音合成。插件支持缓存机制以提高多次调用时的效率。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcookies%2Fedge-tts-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetcookies%2Fedge-tts-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcookies%2Fedge-tts-proxy/lists"}