rhasspy / wyoming-faster-whisper

Wyoming protocol server for faster whisper speech to text system
MIT License
91 stars 33 forks source link

asyncio error #11

Open krusse opened 1 year ago

krusse commented 1 year ago

I get the following error in docker logs when pushing the button or using the wakeword with the Atom Echo, and then nothing happens:

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=JSONDecodeError('Extra data: line 1 column 19 (char 18)')>
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 48, in async_read_event
    event_dict = json.loads(json_line)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 19 (char 18)

Everything in home assistant is set up according to the guide. I am running the following docker stack:

  wyoming-whisper:
    image: rhasspy/wyoming-whisper:latest
    container_name: ha-whisper
    ports:
      - "10301:10300"
    volumes:
      - ./whisper:/data
    # command: --model tiny-int8 --language en
    command: --model tiny --language en
    restart: unless-stopped
    environment:
      - TZ=$TZ

  wyoming-piper:
    container_name: ha-piper
    image: rhasspy/wyoming-piper:1.3.2
    command: '--voice en_US-lessac-medium'
    volumes:
      - ./piper-data:/data
    environment:
      - TZ=$TZ
    restart: unless-stopped
    ports:
      - 10200:10200

  wyoming-openwakeword:
    image: rhasspy/wyoming-openwakeword
    container_name: ha-wakeword
    command: [  "--preload-model", "ok_nabu"  ]
    volumes:
      - "./openwakeword/custom-models:/custom"
    environment:
      - TZ=$TZ
    restart: unless-stopped
    ports:
        - 10400:10400

Any help is appreciated.

chpego commented 11 months ago

Hi @krusse Maybe you've a bad indention in your container for openwakeword, in port section, nope ?

leranp commented 10 months ago

Same here

synesthesiam commented 8 months ago

Looks like bad data coming in over the TCP port

c1pher-cn commented 8 months ago

I have the same error But the error just come when i use atom-echo listening

ERROR:asyncio:Task exception was never retrieved future: <Task finished name='wyoming event handler' coro=<AsyncEventHandler.run() done, defined at /usr/local/lib/python3.9/dist-packages/wyoming/server.py:28> exception=AssertionError()> Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/wyoming/server.py", line 35, in run if not (await self.handle_event(event)): File "/usr/local/lib/python3.9/dist-packages/wyoming_faster_whisper/handler.py", line 58, in handle_event assert self._wav_file is not None AssertionError