Giter Club home page Giter Club logo

Comments (9)

nimroddolev avatar nimroddolev commented on July 28, 2024 1

The fix has been included in the latest stable release, v1.1.0.

from chime_tts.

def1149 avatar def1149 commented on July 28, 2024

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.

nimroddolev avatar nimroddolev commented on July 28, 2024

I have released a new version, v1.1.0-beta10, which should address the issue.

from chime_tts.

pepe59 avatar pepe59 commented on July 28, 2024

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.

nimroddolev avatar nimroddolev commented on July 28, 2024

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.

pepe59 avatar pepe59 commented on July 28, 2024

No there are no problems just these warnings in the HA log.
Thank you for a great component works perfectly.

from chime_tts.

nimroddolev avatar nimroddolev commented on July 28, 2024

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.

pepe59 avatar pepe59 commented on July 28, 2024

I can confirm that the warning issue is fixed v1.1.0-beta11.
Thanks

from chime_tts.

fragolinux avatar fragolinux commented on July 28, 2024

confirm working on 1.1.0-beta13

from chime_tts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.