Comments (9)
The fix has been included in the latest stable release, v1.1.0.
from chime_tts.
I have similar warnings on startup.
HAOS 2024.5.5
Chime TTS v1.1.0-beta6
2024-05-25 12:29:59.675 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.chime_tts',) in /usr/src/homeassistant/homeassistant/loader.py, line 1046: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop
2024-05-25 12:29:59.681 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=chime_tts, service=say>
2024-05-25 12:29:59.682 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=chime_tts, service=say_url>
2024-05-25 12:29:59.682 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=chime_tts, service=clear_cache>
2024-05-25 12:29:59.683 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/asyncio/base_events.py:1989: RuntimeWarning: coroutine 'ChimeTTSQueueManager.queue_processor' was never awaited
handle = None # Needed to break cycles when an exception occurs.
2024-05-25 12:29:59.701 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=chime_tts>
from chime_tts.
I have released a new version, v1.1.0-beta10, which should address the issue.
from chime_tts.
I don't know if this is related, but after updating HA version 2024.6 and updating Chime 1.1.0-beta10, I get errors every time I activate voice notification
Logger: homeassistant.util.loop
Zdroj: util/loop.py:84
První výskyt: 20:00:01 (18 výskyty)
Naposledy logováno: 21:00:05
Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 157: audio.export(audio_full_path, format="mp3") (offender: /usr/local/lib/python3.12/site-packages/pydub/audio_segment.py, line 962: with open(os.devnull, 'rb') as devnull:), please create a bug report at https://github.com/nimroddolev/chime_tts/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/__init__.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/__init__.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/__init__.py", line 695, in async_get_playback_audio_path output_audio = await async_process_segments(hass, File "/config/custom_components/chime_tts/__init__.py", line 916, in async_process_segments tts_audio = helpers.change_speed_of_audiosegment(tts_audio, segment_tts_speed, temp_folder) File "/config/custom_components/chime_tts/helpers/helpers.py", line 506, in change_speed_of_audiosegment return self.ffmpeg_convert_from_audio_segment(audio_segment=audio_segment, File "/config/custom_components/chime_tts/helpers/helpers.py", line 358, in ffmpeg_convert_from_audio_segment temp_audio_file = filesystem_helper.save_audio_to_folder(audio=audio_segment, File "/config/custom_components/chime_tts/helpers/filesystem.py", line 157, in save_audio_to_folder audio.export(audio_full_path, format="mp3")
Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/helpers.py, line 374: ret_val = AudioSegment.from_file(str(converted_audio_file)) (offender: /usr/local/lib/python3.12/site-packages/pydub/utils.py, line 60: fd = open(fd, mode=mode)), please create a bug report at https://github.com/nimroddolev/chime_tts/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/__init__.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/__init__.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/__init__.py", line 695, in async_get_playback_audio_path output_audio = await async_process_segments(hass, File "/config/custom_components/chime_tts/__init__.py", line 916, in async_process_segments tts_audio = helpers.change_speed_of_audiosegment(tts_audio, segment_tts_speed, temp_folder) File "/config/custom_components/chime_tts/helpers/helpers.py", line 506, in change_speed_of_audiosegment return self.ffmpeg_convert_from_audio_segment(audio_segment=audio_segment, File "/config/custom_components/chime_tts/helpers/helpers.py", line 374, in ffmpeg_convert_from_audio_segment ret_val = AudioSegment.from_file(str(converted_audio_file))
Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 144: audio.export(audio_full_path, format="mp3") (offender: /usr/local/lib/python3.12/site-packages/pydub/utils.py, line 60: fd = open(fd, mode=mode)), please create a bug report at https://github.com/nimroddolev/chime_tts/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/__init__.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/__init__.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/__init__.py", line 717, in async_get_playback_audio_path new_audio_file = filesystem_helper.save_audio_to_folder(output_audio, _data.get(initial_save_folder_key, None)) File "/config/custom_components/chime_tts/helpers/filesystem.py", line 144, in save_audio_to_folder audio.export(audio_full_path, format="mp3")
Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 144: audio.export(audio_full_path, format="mp3") (offender: /usr/local/lib/python3.12/site-packages/pydub/audio_segment.py, line 962: with open(os.devnull, 'rb') as devnull:), please create a bug report at https://github.com/nimroddolev/chime_tts/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/__init__.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/__init__.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/__init__.py", line 717, in async_get_playback_audio_path new_audio_file = filesystem_helper.save_audio_to_folder(output_audio, _data.get(initial_save_folder_key, None)) File "/config/custom_components/chime_tts/helpers/filesystem.py", line 144, in save_audio_to_folder audio.export(audio_full_path, format="mp3")
Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/__init__.py, line 733: duration = len(AudioSegment.from_file(new_audio_file)) / 1000.0 (offender: /usr/local/lib/python3.12/site-packages/pydub/utils.py, line 60: fd = open(fd, mode=mode)), please create a bug report at https://github.com/nimroddolev/chime_tts/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/__init__.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/__init__.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/__init__.py", line 733, in async_get_playback_audio_path duration = len(AudioSegment.from_file(new_audio_file)) / 1000.0
from chime_tts.
Thank you @pepe59. I have found and fixed these issues and they'll be part of the next release.
Do you experience any issues as a result of these warnings?
from chime_tts.
No there are no problems just these warnings in the HA log.
Thank you for a great component works perfectly.
from chime_tts.
Thank you 🙏 I’m glad to hear it’s working well for you!
I just released another beta version, v1.1.0-beta11, which includes fixes for the cause of the warnings you shared.
from chime_tts.
I can confirm that the warning issue is fixed v1.1.0-beta11.
Thanks
from chime_tts.
confirm working on 1.1.0-beta13
from chime_tts.
Related Issues (20)
- Chime TTS: Say - Audio cut off HOT 3
- Configuration Screen Causes Home Assistant to Freeze HOT 19
- Setting `cache: true` causing 'NoneType' object has no attribute 'get' error HOT 5
- Service call times out. Announce stops working until HA restart. HOT 2
- doesn't play anything HOT 2
- OpenAI TTS API Key HOT 1
- Plays default chime AND custom chime HOT 3
- Add individual volume on each segment HOT 1
- Warnings in Log "Detected blocking call to open inside the event loop by custom integration 'chime_tts' " HOT 1
- not working if template containes round or int or the likes HOT 8
- chime_tts.say_url "...does not support 'response_variable'..." HOT 1
- Error "No TTS platforms were detected" when saving any configuration HOT 3
- Stopped working since a few days HOT 12
- Latest Update ignores volume setting when announce is set true HOT 3
- Every ChimeTTS use through MPD integration results in ban attempt HOT 3
- chime_tts.say_url eventually fails and won't continue until Home Assistant is restarted HOT 12
- Use public URL path with cast and Sonos media_players instead of the media content id HOT 8
- Unable to save reference to cache in v1.1.4-beta4 HOT 2
- Announcements to resume previous playback after chime finishes on Google Cast
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chime_tts.