找回密码
 立即注册

微信扫码登录

搜索
查看: 261|回复: 17

[技术探讨] 现在还有用小度音箱tts的吗?或者小雅音箱

[复制链接]

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
发表于 4 天前 | 显示全部楼层 |阅读模式
现在还有用小度音箱tts的吗?或者小雅音箱

官方版本升级以后,小度音箱的tts就不能用,都是结巴的朗读。而且会无限循环重复。
小雅有的版本也是
群里面现在还有在用小度音箱tts+最新版本的home assistant,你们都是怎么解决这个问题的?
回复

使用道具 举报

Uwen 手机认证

0

主题

10

回帖

59

积分

注册会员

积分
59
金钱
49
HASS币
0
发表于 4 天前 | 显示全部楼层
设置等待时间+停止播放
回复

使用道具 举报

81

主题

1426

回帖

3万

积分

元老级技术达人

积分
30090
金钱
28543
HASS币
290
发表于 4 天前 | 显示全部楼层
本帖最后由 dscao 于 2025-8-12 12:05 编辑

https://bbs.hassbian.com/thread-16562-1-1.html
这个最新版试过了吗?
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
dscao 发表于 2025-8-12 12:02
https://bbs.hassbian.com/thread-16562-1-1.html
这个最新版试过了吗?

非常感谢你,我还一直以为是官方的问题。我想要再请教你一个问题,如果我不用这个第三方插件,好像用官方原版的tts也是不行的对吧
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
dscao 发表于 2025-8-12 12:02
https://bbs.hassbian.com/thread-16562-1-1.html
这个最新版试过了吗?

我安装了升级到8.1,但是好像说话还是会结巴。有什么方法可以解决吗?
ha升级到今天的8.1
然后用了你的插件,还是没有声音出来。2025.3.4就可以
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
norikohxb 发表于 2025-8-12 14:59
我安装了升级到8.1,但是好像说话还是会结巴。有什么方法可以解决吗?
ha升级到今天的8.1
然后用了你的插 ...

好像好了我是在老的版本上先升级插件的。然后再升级ha,
但是有时候好像又无法通过音箱tts出来。请问版主是什么原因
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
什么错误啊,帮我看看老板

日志记录器: homeassistant.util.loop
来源: util/loop.py:137
首次出现: 15:15:06 (4 次出现)
上次记录: 15:15:48

Detected blocking call to open with args ('/config/tts/ed6ac686915addd24df7fab5c8a6a0c875c714f1_zh-cn_-_edge_tts.mp3', 'rb') inside the event loop by custom integration 'dlna_dmr_xiaodu' at custom_components/dlna_dmr_xiaodu/media_player.py, line 721: shutil.copy(source_path, dest_path) (offender: /usr/local/lib/python3.13/shutil.py, line 260: with open(src, 'rb') as fsrc, please report it to the author of the 'dlna_dmr_xiaodu' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 156, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 91, in wrapper return await func(self, *args, **kwargs) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 721, in async_play_media shutil.copy(source_path, dest_path)
Detected blocking call to open with args ('/config/www/tts/ed6ac686915addd24df7fab5c8a6a0c875c714f1_zh-cn_-_edge_tts.mp3', 'wb') inside the event loop by custom integration 'dlna_dmr_xiaodu' at custom_components/dlna_dmr_xiaodu/media_player.py, line 721: shutil.copy(source_path, dest_path) (offender: /usr/local/lib/python3.13/shutil.py, line 262: with open(dst, 'wb') as fdst, please report it to the author of the 'dlna_dmr_xiaodu' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 156, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 91, in wrapper return await func(self, *args, **kwargs) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 721, in async_play_media shutil.copy(source_path, dest_path)
Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f1874cebad0>, '/usr/local/lib/python3.13/site-packages/certifi/cacert.pem', None, None) inside the event loop by custom integration 'edge_tts' at custom_components/edge_tts/tts.py, line 408: async for chunk in tts.stream(): (offender: /usr/local/lib/python3.13/ssl.py, line 717: context.load_verify_locations(cafile, capath, cadata)), please create a bug report at https://github.com/hasscc/hass-edge-tts/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 156, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_step_choose await self._async_run_script(script) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 637, in _async_run_script self._hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 829, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1836, in async_run return await asyncio.shield(create_eager_task(run.async_run())) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_step_choose await self._async_run_script(script) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 637, in _async_run_script self._hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 829, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1836, in async_run return await asyncio.shield(create_eager_task(run.async_run())) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1013, in _async_step_call_service self._hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 829, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call response_data = await coro File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service return await target(service_call) File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 155, in async_say_handle await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call response_data = await coro File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service return await target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 850, in entity_service_call single_response = await _handle_entity_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 914, in _handle_entity_call task = hass.async_run_hass_job(job) File "/usr/src/homeassistant/homeassistant/core.py", line 940, in async_run_hass_job return self._async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 755, in _async_add_hass_job task = create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/group/media_player.py", line 373, in async_play_media await self.hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2828, in async_call self._hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 829, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/core.py", line 2855, in _run_service_call_catch_exceptions await coro_or_task File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service return await target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 850, in entity_service_call single_response = await _handle_entity_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 914, in _handle_entity_call task = hass.async_run_hass_job(job) File "/usr/src/homeassistant/homeassistant/core.py", line 940, in async_run_hass_job return self._async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 755, in _async_add_hass_job task = create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 91, in wrapper return await func(self, *args, **kwargs) File "/config/custom_components/dlna_dmr_xiaodu/media_player.py", line 622, in async_play_media sourced_media = await media_source.async_resolve_media(self.hass, media_id) File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 189, in async_resolve_media return await item.async_resolve() File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 97, in async_resolve return await self.async_media_source().async_resolve_media(self) File "/usr/src/homeassistant/homeassistant/components/tts/media_source.py", line 146, in async_resolve_media stream.async_set_message(parsed["message"]) File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 513, in async_set_message self._manager.async_cache_message_in_memory( File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 866, in async_cache_message_in_memory self.hass.async_create_background_task( File "/usr/src/homeassistant/homeassistant/core.py", line 861, in async_create_background_task task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 44, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 886, in _load_data_into_cache data = await cache.async_load_data() File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 165, in async_load_data async for chunk in self._data_gen: File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 984, in _async_generate_tts_audio extension, data = await engine_instance.async_internal_get_tts_audio( File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 266, in async_internal_get_tts_audio return await self.async_get_tts_audio(message, language, options) File "/config/custom_components/edge_tts/tts.py", line 408, in async_get_tts_audio async for chunk in tts.stream():
Detected blocking call to open with args ('/root/.netrc',) inside the event loop by integration 'tts' at homeassistant/components/tts/legacy.py, line 266: return await self.async_get_tts_audio(message, language, options) (offender: /usr/local/lib/python3.13/netrc.py, line 74: with open(file, encoding="utf-8") as fp, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tts%22 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 156, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 886, in _load_data_into_cache data = await cache.async_load_data() File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 984, in _async_generate_tts_audio extension, data = await engine_instance.async_internal_get_tts_audio( File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 266, in async_internal_get_tts_audio return await self.async_get_tts_audio(message, language, options)

回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
Detected that custom integration 'localtuya' calls async_dispatcher_send from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_dispatcher_send at custom_components/localtuya/common.py, line 351: async_dispatcher_send(self._hass, signal, self._status). Please create a bug report at https://github.com/rospogrigio/localtuya/issues
Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(. Please create a bug report at https://github.com/LAB02-Research/HASS.Agent-Integration/issues
Detected that custom integration 'dlna_dmr_xiaodu' calls media_source.async_resolve_media without passing an entity_id at custom_components/dlna_dmr_xiaodu/media_player.py, line 622: sourced_media = await media_source.async_resolve_media(self.hass, media_id). Please report it to the author of the 'dlna_dmr_xiaodu' custom integration
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
好像是edge的tts不能用了。需要用谷歌的tts,我一直觉得edge tts(微软的tts速度比较好听)
回复

使用道具 举报

88

主题

300

回帖

1708

积分

金牌会员

积分
1708
金钱
1320
HASS币
0
 楼主| 发表于 4 天前 | 显示全部楼层
dscao 发表于 2025-8-12 12:02
https://bbs.hassbian.com/thread-16562-1-1.html
这个最新版试过了吗?

请教一下版主,是不是改版了以后message就无法用长的变量了,这个命令好像已经无法tts出来了

action: tts.speak
metadata: {}
data:
  cache: false
  media_player_entity_id: media_player.gong_shu_fang_yin_xiang
  message: >-
    {% set east1_power = states('sensor.cmpower_7ab772_24') | float %} {% set
    west1_power = states('sensor.cmpower_7ab8cc_24') | float %} {% set
    east2_power = states('sensor.cmpower_270071_24') | float %} {% set
    west2_power = states('sensor.cmpower_7aaf91_24') | float %} {% set
    west3_power = states('sensor.cmpower_26fe4d_24') | float %} {% set fo1_power
    = states('sensor.cmpower_26fa3b_24') | float %} {% set fo2_power =
    states('sensor.cmpower_7aaf94_24') | float %} {% set messages = [] %} {% if
    east1_power < 0.2 %}{% set messages = messages + ['东光伏1路异常'] %}{% endif %}
    {% if west1_power < 0.2 %}{% set messages = messages + ['西光伏1路异常'] %}{%
    endif %} {% if east2_power < 0.2 %}{% set messages = messages + ['东光伏2路异常']
    %}{% endif %} {% if west2_power < 0.2 %}{% set messages = messages +
    ['西光伏2路异常'] %}{% endif %} {% if west3_power < 0.2 %}{% set messages =
    messages + ['西光伏3路异常'] %}{% endif %} {% if fo1_power < 0.2 %}{% set messages
    = messages + ['光伏佛1路异常'] %}{% endif %} {% if fo2_power < 0.2 %}{% set
    messages = messages + ['光伏佛2路异常'] %}{% endif %} {% if messages %} {{
    messages | join(';') }},请检查光伏逆变器 {% else %} {% endif %}
  language: zh-CN
target:
  entity_id: tts.google_en_com



是不是message里面的信息太长了?
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-8-16 14:09 , Processed in 0.762240 second(s), 5 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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