rhasspy / piper

A fast, local neural text to speech system
https://rhasspy.github.io/piper-samples/
MIT License
4.38k stars 297 forks source link

AttributeError: 'list' object has no attribute 'values' #444

Closed jason-rietzke closed 2 weeks ago

jason-rietzke commented 1 month ago

I'm trying to run piper on an Ubuntu22.04 LTS server and am running Python3.11 but it doesn't seem to work and crashes with the following error:

Screenshot 2024-03-25 at 14 19 25

I already ran piper successfully on a different machine once but I'm a little lost on what the problem might be. Any ideas?

Thanks

jason-rietzke commented 1 month ago

It seems to work just fine with v1.1.0 - I think this was the version I tested a while ago. Would be nice to know which requirements changed :)

jn64 commented 1 month ago

Can't repro with piper-tts 1.2.0 and Python 3.11 in a Ubuntu 22.04 LTS image.

Try using a venv, don't use system-wide pip (even with --user). It's too easy to mess up.

mkdir new-piper-project
cd new-piper-project
python3.11 -v venv .venv
. .venv/bin/activate
pip install piper-tts
echo 'Welcome to the world of speech synthesis!' | piper --model en_US-lessac-medium --output_file welcome.wav

welcome.wav is created successfully.


Note that when you install Python 3.11 on Ubuntu 22.04, the system Python is still an older version (3.10.12?).

You may need to install python3.11-venv via apt if you previously only installed python3.11 or python3.11-minimal (and not python3.11-full)

jason-rietzke commented 1 month ago

Ok I understand - thanks you very much 🙂

xandark commented 3 weeks ago

An easier way to install piper into a virtual environment and make it instantly accessible on $PATH:

pip  install pipx
pipx install piper-tts --include-deps

then simply run it:

echo 'Welcome to the world of speech synthesis!' | piper --model en_US-lessac-medium --output_file welcome.wav

pipx is great for this kind of package.