Error when running Piper TTS using Fusion Hat+

To whom it may concern,

When I’m learning the TTS with Piper and OpenAI with my Fusion HAT, I meet an error says “ImportError: cannot import name’espeakbridge’ from ‘Piper’. I tried to re-installed the fusion-hat module, and I’m sure that I installed the right system (the bookworm one). What’s more, it can run Espeak and Pico2wave and Vosk perfectly, so I really have no idea about this problem. I’m actually a beginnner of this. Anyone help :sob:

We have not been able to reproduce the issue you encountered.
Could you please try following the steps below to see if it resolves the problem?

:white_check_mark: Fix Steps (All steps are required)
:one: Uninstall the conflicting piper packages (This is critical)

python3 -m pip uninstall -y piper piper-tts
sudo python3 -m pip uninstall -y piper piper-tts
:warning: You must run the commands both as a regular user AND with sudo.
This is because the customer likely ran their script using sudo python3 xxx.py.

:two: Confirm that the Python piper package is completely removed from the system.

python3 - <<‘PY’
import importlib.util
print(importlib.util.find_spec(“piper”))
PY

The expected correct result is:
None

If a file path is printed instead → It means the package is not fully removed :cross_mark:.

:three: Reinstall / Update fusion-hat to ensure consistency.
python3 -m pip install -U fusion-hat
sudo python3 -m pip install -U fusion-hat

:four: Run your original code again (No changes needed).
from fusion_hat.tts import Piper
tts = Piper()
tts.set_model(“en_US-amy-low”)
tts.say(“Hello! I’m Piper TTS.”)

:five: For Maintainers: “The One-Line Diagnostic Rule”
In the future, when encountering similar customer reports, you can make a direct judgment based on this:

If the traceback contains:
from piper import espeakbridge
ImportError

:backhand_index_pointing_right: Then it is 100% because the customer installed the PyPI piper or piper-tts package.
:backhand_index_pointing_right: The issue is not related to hardware, the system, or the example code.