Fixing asyncio.Queue creation and usage by decoupling app, queues, and uvicorn config. This fixes issue #244.
Creating from_user and to_device outside the main coroutine event loop creates futures in another event loop. With this fix the 01OS responds better and with voice using local models.
Tested on Debian 11 with Python versions 3.9.19 and 3.11.9
Fixing
asyncio.Queue
creation and usage by decoupling app, queues, and uvicorn config. This fixes issue #244. Creatingfrom_user
andto_device
outside the main coroutine event loop creates futures in another event loop. With this fix the 01OS responds better and with voice using local models.Tested on Debian 11 with Python versions 3.9.19 and 3.11.9
Resources in regard to this fix: https://stackoverflow.com/questions/53724665/using-queues-results-in-asyncio-exception-got-future-future-pending-attached https://github.com/fastapi-users/fastapi-users/discussions/663#discussioncomment-1025558 https://github.com/tiangolo/fastapi/issues/3854#issuecomment-911570879 https://github.com/tiangolo/fastapi/discussions/6566