|
已经升级成最新版插件 edge-tts==6.1.15" 还是调用时报错
Logger: homeassistant.components.automation.zheng_dian_bao_shi
Source: custom_components/edge_tts/tts.py:408
Integration: 自动化 (documentation, issues)
First occurred: 11:00:01 (2 occurrences)
Last logged: 11:00:01
整点报时: Error executing script. Unexpected error for call_service at pos 2: 403, message='Invalid response status', url=URL('wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=1505e40d7ff74e81a48f4b3090140e57')
While executing automation automation.zheng_dian_bao_shi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 147, in async_say_handle
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/mpd/media_player.py", line 443, in async_play_media
play_item = await media_source.async_resolve_media(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 159, in async_resolve_media
return await item.async_resolve()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 83, in async_resolve
return await self.async_media_source().async_resolve_media(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/media_source.py", line 118, in async_resolve_media
url = await manager.async_get_url_path(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 522, in async_get_url_path
filename = await self._async_get_tts_audio(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 645, in _async_get_tts_audio
return await audio_task
^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 604, in get_tts_data
extension, data = await engine_instance.async_get_tts_audio(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/edge_tts/tts.py", line 408, in async_get_tts_audio
async for chunk in tts.stream():
File "/usr/local/lib/python3.11/site-packages/edge_tts/communicate.py", line 498, in stream
async for message in self.__stream():
File "/usr/local/lib/python3.11/site-packages/edge_tts/communicate.py", line 365, in __stream
async with aiohttp.ClientSession(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 795, in _ws_connect
raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url=URL('wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=1505e40d7ff74e81a48f4b3090140e57')
|
|