Skip to content

Wyoming Piper not speaking: FileNotFoundError: [Errno 2] No such file or directory: #20

@yachts-quad

Description

@yachts-quad

Hey - I'm trying really hard to get Wyoming Piper working but after many hours I'm stuck. Any advice is extremely appreciated here, I think Piper is awesome and has such great potential. I'm not a gifted coder like many of you but I've beein working with Claude to cover off as much as possible.
Cheers

Context

  • Wyoming Piper in venv inside WSL (whisper and ollama run on same machine, it has an RTX3090, whisper runs fine with Wyoming)
  • Home Assistant is running in VM on Prox Mox. No issues with Wyoming Faster Whisper.
  • Piper works fine locally in the venv, I can create test .wavs and play them back using aplay
  • Piper connects with HA via Wyoming integration seemingly fine, but fails everytime it's time to speak.

Versions

5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Python 3.12.3 
piper_phonemize_cross     1.2.1
piper-tts                 1.2.0
wyoming                   1.5.3
wyoming_piper             1.5.0  (I have tried 1.3.0, 1.3.2 1.4.0 1.5.0)

Logs

Feb 21 13:08:36 bonobo bash[93307]: DEBUG:wyoming_piper.handler:input: {'text': "I'm here, alive and kicking (or rather, processing). What's on your mind? Don't expect a fancy introduction or anything. Just ask me something already."}
Feb 21 13:08:36 bonobo bash[93307]: DEBUG:wyoming_piper.handler:
Feb 21 13:08:36 bonobo bash[93307]: ERROR:asyncio:Task exception was never retrieved
Feb 21 13:08:36 bonobo bash[93307]: future: <Task finished name='wyoming event handler' coro=<AsyncEventHandler.run() done, defined at /home/mark/piper/piper_env/lib/python3.12/site-packages/wyoming/server.py:31> exception=FileNotFoundError(2, 'No such file or directory')>
Feb 21 13:08:36 bonobo bash[93307]: Traceback (most recent call last):
Feb 21 13:08:36 bonobo bash[93307]:   File "/home/mark/piper/piper_env/lib/python3.12/site-packages/wyoming/server.py", line 41, in run
Feb 21 13:08:36 bonobo bash[93307]:     if not (await self.handle_event(event)):
Feb 21 13:08:36 bonobo bash[93307]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 21 13:08:36 bonobo bash[93307]:   File "/home/mark/piper/piper_env/lib/python3.12/site-packages/wyoming_piper/handler.py", line 53, in handle_event
Feb 21 13:08:36 bonobo bash[93307]:     raise err
Feb 21 13:08:36 bonobo bash[93307]:   File "/home/mark/piper/piper_env/lib/python3.12/site-packages/wyoming_piper/handler.py", line 48, in handle_event
Feb 21 13:08:36 bonobo bash[93307]:     return await self._handle_event(event)
Feb 21 13:08:36 bonobo bash[93307]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 21 13:08:36 bonobo bash[93307]:   File "/home/mark/piper/piper_env/lib/python3.12/site-packages/wyoming_piper/handler.py", line 108, in _handle_event
Feb 21 13:08:36 bonobo bash[93307]:     wav_file: wave.Wave_read = wave.open(output_path, "rb")
Feb 21 13:08:36 bonobo bash[93307]:                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 21 13:08:36 bonobo bash[93307]:   File "/usr/lib/python3.12/wave.py", line 649, in open
Feb 21 13:08:36 bonobo bash[93307]:     return Wave_read(f)
Feb 21 13:08:36 bonobo bash[93307]:            ^^^^^^^^^^^^
Feb 21 13:08:36 bonobo bash[93307]:   File "/usr/lib/python3.12/wave.py", line 282, in __init__
Feb 21 13:08:36 bonobo bash[93307]:     f = builtins.open(f, 'rb')
Feb 21 13:08:36 bonobo bash[93307]:         ^^^^^^^^^^^^^^^^^^^^^^
Feb 21 13:08:36 bonobo bash[93307]: FileNotFoundError: [Errno 2] No such file or directory: ''

It's not a permissions issue and the temp folders are being created.

systemd file

[Unit]
Description=Piper Wyoming Service
After=network.target

[Service]
Type=simple
User=mark
WorkingDirectory=/home/mark/piper
ExecStart=/bin/bash -c "source /home/mark/piper/piper_env/bin/activate && \
    python -m wyoming_piper \
    --piper /home/mark/piper/piper_env/bin/piper \
    --voice en_US-ljspeech-medium \
    --update-voices \
    --uri 'tcp://0.0.0.0:10200' \
    --data-dir /home/mark/piper/models \
    --download-dir /home/mark/piper/models \
    --debug"
Restart=on-failure
RestartSec=10
Environment="PATH=/home/mark/piper/piper_env/bin:$PATH"
Environment="VIRTUAL_ENV=/home/mark/piper/piper_env"
Environment="TMPDIR=/home/mark/piper/tmp"
Environment="TEMP=/home/mark/piper/tmp"
Environment="TMP=/home/mark/piper/tmp"
Environment=PULSE_SERVER=unix:/mnt/wslg/PulseServer
Environment=WAYLAND_DISPLAY=wayland-0
Environment=DISPLAY=:0
Environment=XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
Environment=PYTHONUNBUFFERED=1
[Install]`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions