rhasspy / wyoming-addons

Docker builds for Home Assistant add-ons using Wyoming protocol
MIT License
60 stars 21 forks source link

Can't run wyoming-whisper amd64 on Debian #2

Closed Nulldev128 closed 1 year ago

Nulldev128 commented 1 year ago

Hi,

Firstly I want to thank you for your work on this, it is absolutely amazing to have accurate local STT & integrated with HA makes it even better.

I ran the docker command below on my RPi4 & it worked perfectly. There was a noticeable delay on the conversion but that's to be expected with low power hardware.

I then ran it on an Intel PC running 64bit Debian & got the error below, repeating every second. No matter what I do I can't get it to run like it does on the RPi4.

I would be happy to help debug & troubleshoot this, just let me know how I can help. Also, any chance we can get GPU support to speed things up further?

The command:

docker run -it -p 10300:10300 -v /home/rod/docker/whisper:/data rhasspy/wyoming-whisper --model tiny-int8 --language en

The log:

INFO:__main__:Downloading FasterWhisperModel.TINY_INT8 to /data
INFO:__main__:Ready
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-5' coro=<AsyncEventHandler.run() done, defined at /usr/local/lib/python3.9/dist-packages/wyoming/server.py:26> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/wyoming/server.py", line 28, in run
event = await async_read_event(self.reader)
File "/usr/local/lib/python3.9/dist-packages/wyoming/event.py", line 44, in async_read_event
json_line = await reader.readline()
File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
line = await self.readuntil(sep)
File "/usr/lib/python3.9/asyncio/streams.py", line 632, in readuntil
await self._wait_for_data('readuntil')
File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-8' coro=<AsyncEventHandler.run() done, defined at /usr/local/lib/python3.9/dist-packages/wyoming/server.py:26> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/wyoming/server.py", line 28, in run
event = await async_read_event(self.reader)
File "/usr/local/lib/python3.9/dist-packages/wyoming/event.py", line 44, in async_read_event
json_line = await reader.readline()
File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
line = await self.readuntil(sep)
File "/usr/lib/python3.9/asyncio/streams.py", line 632, in readuntil
await self._wait_for_data('readuntil')
File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
Nulldev128 commented 1 year ago

I changed the exposed port to 10301 & it worked. I stopped it & changed back to 10300 & it worked. Not sure what the issue was but it appears to be working now.