home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.05k stars 29.71k forks source link

wyoming_faster_whisper - Detected blocking call to open #120421

Open StefanoGiu opened 2 months ago

StefanoGiu commented 2 months ago

The problem

2024-06-25 15:29:56.417 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('XXX.homeassistant\faster_whisper\tiny-int8\vocabulary.txt',) in XXX.homeassistant\deps\Python312\site-packages\wyoming_faster_whisper\faster_whisper\transcribe.py, line 68: with open(os.path.join(model_path, "vocabulary.txt"), encoding="utf8") as vocab_file: inside the event loop Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "ZZZ\Python\Python312\Lib\site-packages\homeassistant__main.py", line 223, in sys.exit(main()) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 672, in run_until_complete self.run_forever() File "ZZZ\Python\Python312\Lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 639, in run_forever self._run_once() File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 1985, in _run_once handle._run() File "ZZZ\Python\Python312\Lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "XXX.homeassistant\custom_components\faster_whisper__init.py", line 11, in async_setup_entry await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 2032, in async_forward_entry_setups await asyncio.gather( File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 2034, in create_eagertask( File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\util\async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\components\stt\init__.py", line 145, in async_setup_entry return await component.async_setup_entry(entry) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\helpers\entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\helpers\entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\helpers\entity_platform.py", line 363, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\util\async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "XXX.homeassistant\custom_components\faster_whisper\stt.py", line 21, in async_setup_entry async_add_entities([FasterWhisperSTT(hass, config_entry)]) File "XXX.homeassistant\custom_components\faster_whisper\stt.py", line 28, in init__ self.model = WhisperModel( File "XXX.homeassistant\deps\Python312\site-packages\wyoming_faster_whisper\faster_whisper\transcribe.py", line 68, in init with open(os.path.join(model_path, "vocabulary.txt"), encoding="utf8") as vocab_file:

What version of Home Assistant Core has the issue?

core-2024.6.3

What was the last working version of Home Assistant Core?

core-2024.4.0

What type of installation are you running?

Home Assistant Core

Integration causing the issue

faster whisper

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

mib1185 commented 2 months ago

Hi custom_components\faster_whisper_init is a custom component, which is not maintained by the HA core project. Please report your issue to the maintainer or in the source repository of this custom component. Thx 👍