Open jerblack opened 9 months ago
The error suggests that the piper executable isn't generating WAV files.
The following troubleshooting changed nothing.
In the end, what fixed it was just restarting Home Assistant on my Pi. Now libritts_r works and the error above no longer occurs. Closing issue.
Update:
Thinking that the problem might be resolved fully by the reboot, I removed the working Docker instance of Piper from the Wyoming integration and moved back to my LXD install of Piper, and the problem occurred again with that FileNotFoundError
error. This persisted even after another HA reboot.
This was my setup process in LXD (which I use just like a regular Linux VM). I am just cloning the repo and running script/setup for each of the three components:
git clone https://github.com/rhasspy/wyoming-faster-whisper.git
cd wyoming-faster-whisper
script/setup
cd ~
git clone https://github.com/rhasspy/wyoming-piper.git
~/wyoming-piper/script/setup
script/setup
cd~
git clone https://github.com/rhasspy/piper.git
~/piper/src/python_run
script/setup
And then from ~/piper/src/python_run
I run the following to verify Piper is working:
echo the time is now 3 15 pm | script/piper --cuda --model /config/piper_data/data/en_US-libritts_r-medium.onnx --output_file time.wav
This works fine, and generates the appropriate wav file, which I verified matches the text I gave, so Piper is definitely able to generate TTS audio. I'm not doing any other special configuration beyond my service file, which looks like this:
# /etc/systemd/system/piper.service
[Unit]
Description=Piper
After=network.target
[Service]
Type=simple
User=jeremy
WorkingDirectory=/home/jeremy/wyoming-piper
ExecStart=/home/jeremy/wyoming-piper/script/run \
--piper '/home/jeremy/piper/src/python_run/script/piper' \
--uri 'tcp://0.0.0.0:10200' \
--data-dir /config/piper_data/data \
--download-dir /config/piper_data/download \
--voice en_US-libritts_r-medium \
--max-piper-procs 16 \
--update-voices
Restart=always
[Install]
WantedBy=multi-user.target
The main difference as far as I understand at the moment is that the older Docker version is running an older version of wyoming-piper that works, and what I'm using in LXD is just the latest from your repo, which is where the FileNoteFoundError is generated. All of this is probably putting the cart before the horse though since the main reason I wanted to do any of this was to get Cuda support in Piper, but the merge request to add it looks like it's been sitting idle waiting on final approval for the last two months now. Why is that by the way?
All of this is probably putting the cart before the horse though since the main reason I wanted to do any of this was to get Cuda support in Piper, but the merge request to add it looks like it's been sitting idle waiting on final approval for the last two months now. Why is that by the way?
I'd love to get CUDA support in, but I have a lot on my TODO list. For wyoming-piper
and CUDA, I think a better approach than https://github.com/rhasspy/wyoming-piper/pull/5 would be to switch over to the Python version of piper
and install onnxruntime-gpu
into the container.
@jerblack
Did you ever figure this out? I am having the same issue. The wav files do not seem to be coming into the /tmp directory as they are supposed to. I followed the same process in my LXC that you did. I believe it worked the first command I sent, but after a couple changes it no longer seems to be working. Another note, from homeassistant > media > TTS > Piper I can send a request like "test". I get the same logs as you with file not found. If I try to send "test" again I don't even get any further logs. I have to change the message to something new, like "testing" to see the file not found error again.
Edit: I guess just not using piper-tts in the python env works fine. For now I will use the binary. Also following on the CUDA support.
FYI @synesthesiam @jerblack here's how I got it to work in our Home Assistant integration project on Jetson devices: https://github.com/dusty-nv/jetson-containers/pull/481/commits/4ba5dc4d20e8fb92f3059e16cc4cfd3648aa88be
I reinstalled the requirements.txt for wyoming-piper last night and it installed a new version of the wyoming package, and now I am no longer able to use TTS from the HA interface and my piper service is logging the following:
Here's the command line I am using in my wyoming-piper service, and I didn't see any other flags to specify another folder, so I don't know what it's looking for in the error. Any ideas? :