Orca support for Piper depends on Spiel which is a more modern speech framework for Linux. This is still experimental, but works well in my use.
This guide was written for Ubuntu 24.04 on July 12 2024.
sudo apt install git
git clone https://gitlab.gnome.org/GNOME/orca/
sudo apt install libatspi2.0-dev cmake at-spi2-core meson libatk-bridge2.0-dev python-gi-dev libgirepository-2.0-0 gettext itstool libgirepository1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-devThis should be done inside the directory where you cloned Orca.
meson subprojects purge --confirm
meson setup --reconfigure --force-fallback-for=spiel -Dspiel=true _build
meson compile --clean -C _build
meson install -C _buildsudo apt install flatpak
flatpak kill ai.piper.Speech.Provider
flatpak kill org.espeak.Speech.Provider
flatpak remote-add --user spiel https://project-spiel.org/flatpaks/spiel-repo.flatpakrepo
flatpak install ai.piper.Speech.Provider
flatpak install ai.piper.Speech.Provider.Voice.en_US-amy-mediumIf this does not work, check https://project-spiel.org/install.html for latest instructions.
You will need to have this running in the background while you use Orca.
flatpak run ai.piper.Speech.Provider
Running meson devenv in the same folder you clone Orca creates an environment that allows you to use the newly built orca which has piper support, not the global system orca
meson devenv -C _build
orca --replace --speech-system=spiel