I want to use
piper
for text to voice. Am using Ubuntu 22.04 LTS
and have installed it using the command
sudo apt install piper
Now running
echo 'Hello world' | piper --model en_US-lessac-medium
gives me
Unknown option --model
dpkg -l piper
gave a short description of the package installed, "GTK application to configure gaming devices."
I then installed piper-tts
with pip
, and restarted the machine.
pip3 install piper-tts
Running the command again
echo 'Hello world' | piper
Traceback (most recent call last):
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/_core/__init__.py", line 22, in
from . import multiarray
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/_core/multiarray.py", line 11, in
from . import _multiarray_umath, overrides
ImportError: libz.so.1: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/__init__.py", line 112, in
from numpy.__config__ import show_config
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/__config__.py", line 4, in
from numpy._core._multiarray_umath import (
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/_core/__init__.py", line 48, in
raise ImportError(msg) from exc
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.11 from "/gnu/store/n8fxwzkq2bkg55p5s0x1largmmd1fyw4-python-3.11.11/bin/python3.11"
* The NumPy version is: "2.3.2"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libz.so.1: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/hagbard/.local/bin/piper", line 5, in
from piper.__main__ import main
File "/home/hagbard/.local/lib/python3.11/site-packages/piper/__init__.py", line 4, in
from .voice import AudioChunk, PiperVoice
File "/home/hagbard/.local/lib/python3.11/site-packages/piper/voice.py", line 13, in
import numpy as np
File "/home/hagbard/.local/lib/python3.11/site-packages/numpy/__init__.py", line 117, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Asked by Filangieri
(179 rep)
Jul 25, 2025, 05:16 PM
Last activity: Jul 25, 2025, 09:10 PM
Last activity: Jul 25, 2025, 09:10 PM