piper icon indicating copy to clipboard operation
piper copied to clipboard

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

Open jason-rietzke opened this issue 1 year ago • 4 comments
trafficstars

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 avatar Mar 25 '24 13:03 jason-rietzke

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 :)

jason-rietzke avatar Mar 25 '24 16:03 jason-rietzke

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)

jn64 avatar Mar 26 '24 05:03 jn64

Ok I understand - thanks you very much 🙂

jason-rietzke avatar Mar 26 '24 12:03 jason-rietzke

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.

xandark avatar Apr 21 '24 21:04 xandark