『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: anlong

[技术讨论] 基于Edge浏览器的微软TTS插件,无需app_key

  [复制链接]

6

主题

266

帖子

2366

积分

论坛技术达人

积分
2366
金钱
2080
HASS币
90
 楼主| 发表于 2022-5-24 12:46:23 | 显示全部楼层
囧 发表于 2022-5-17 17:23
跟直接访问一下,提示这种,是否正常啊?
Our services aren't available right nowWe're working to re ...

返回这个是正常的,说明网络没问题。具体为什么HA core无法访问就不知道了。
小米MIoT插件:miot-spec.com
回复

使用道具 举报

0

主题

31

帖子

657

积分

高级会员

Rank: 4

积分
657
金钱
626
HASS币
0
发表于 2022-5-20 10:15:42 | 显示全部楼层
超級實用的 感謝分享
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16015
金钱
11304
HASS币
45
发表于 2022-5-17 17:23:04 | 显示全部楼层
anlong 发表于 2022-5-17 12:33
检查下dns和时区。
参考:https://github.com/al-one/hass-xiaomi-miot/issues/500


跟直接访问一下,提示这种,是否正常啊?
<h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>052iDYgAAAADcVGWM0BaxSrwMBqkWnNagSEtHMzBFREdFMDQxNABFZGdl

111.png
回复

使用道具 举报

6

主题

266

帖子

2366

积分

论坛技术达人

积分
2366
金钱
2080
HASS币
90
 楼主| 发表于 2022-5-17 12:33:54 | 显示全部楼层
囧 发表于 2022-5-16 12:00
大佬,俺这一直运行不了,更新了新版也不成,提示如下,求解啊,好像是连接不上speech.platform.bing.com  ...
nslookup speech.platform.bing.com
curl -v https://speech.platform.bing.com

检查下dns和时区。
参考:https://github.com/al-one/hass-xiaomi-miot/issues/500


小米MIoT插件:miot-spec.com
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16015
金钱
11304
HASS币
45
发表于 2022-5-16 12:00:03 | 显示全部楼层
大佬,俺这一直运行不了,更新了新版也不成,提示如下,求解啊,好像是连接不上speech.platform.bing.com 这个网站


Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/edge_tts/tts.py:185
Integration: edge_tts (documentation, issues)
First occurred: 11:57:46 (1 occurrences)
Last logged: 11:57:46

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Cannot connect to host speech.platform.bing.com:443 ssl:default [Try again]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 865, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/resolver.py", line 31, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 856, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 185, in async_say_handle
    url = await tts.async_get_url_path(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 373, in async_get_url_path
    filename = await self.async_get_tts_audio(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 385, in async_get_tts_audio
    extension, data = await provider.async_get_tts_audio(message, language, options)
  File "/config/custom_components/edge_tts/tts.py", line 185, in async_get_tts_audio
    async for i in tts.run(
  File "/usr/local/lib/python3.9/site-packages/edge_tts/communicate.py", line 259, in run
    async with session.ws_connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect
    resp = await self.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host speech.platform.bing.com:443 ssl:default [Try again]

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/edge_tts/tts.py:185
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:57:46 (1 occurrences)
Last logged: 11:57:46

[139867530924768] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 865, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/resolver.py", line 31, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 856, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 185, in async_say_handle
    url = await tts.async_get_url_path(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 373, in async_get_url_path
    filename = await self.async_get_tts_audio(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 385, in async_get_tts_audio
    extension, data = await provider.async_get_tts_audio(message, language, options)
  File "/config/custom_components/edge_tts/tts.py", line 185, in async_get_tts_audio
    async for i in tts.run(
  File "/usr/local/lib/python3.9/site-packages/edge_tts/communicate.py", line 259, in run
    async with session.ws_connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect
    resp = await self.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host speech.platform.bing.com:443 ssl:default [Try again]



回复

使用道具 举报

1

主题

66

帖子

286

积分

中级会员

Rank: 3Rank: 3

积分
286
金钱
220
HASS币
0
发表于 2022-5-15 18:23:29 来自手机 | 显示全部楼层
报错误是什么
回复

使用道具 举报

19

主题

688

帖子

2975

积分

金牌会员

Rank: 6Rank: 6

积分
2975
金钱
2287
HASS币
0
发表于 2022-5-10 16:34:13 | 显示全部楼层
现在是不是不能用了?
回复

使用道具 举报

0

主题

25

帖子

221

积分

中级会员

Rank: 3Rank: 3

积分
221
金钱
196
HASS币
0
发表于 2022-5-9 23:36:52 | 显示全部楼层
谢谢分享,最小白的方法没有之一
回复

使用道具 举报

6

主题

266

帖子

2366

积分

论坛技术达人

积分
2366
金钱
2080
HASS币
90
 楼主| 发表于 2022-4-30 00:01:01 | 显示全部楼层

正常,能用!
小米MIoT插件:miot-spec.com
回复

使用道具 举报

21

主题

553

帖子

2334

积分

金牌会员

Rank: 6Rank: 6

积分
2334
金钱
1781
HASS币
0
发表于 2022-4-28 10:22:48 | 显示全部楼层
还能用吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-27 00:52 , Processed in 4.041514 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表