You are not logged in.

#1 2026-04-16 21:25:19

GscheadaHamme
Member
Registered: 2021-01-12
Posts: 8

pw-play fails to play piped wav

I'm trying to follow the piper-specific instructions for speech-dispatcher.

I succeeded in creating an audio file that can be played back with pw-play with this command:

echo "Arch Linux is the best" | piper-tts -m "/usr/share/piper-voices/en/en_US/ryan/medium/en_US-ryan-medium.onnx" -f test

I dropped the -q option since it does not appear in piper-tts --help.
Also, pw-play manages to play back other wav files stored on disk.

But when I pipe piper-tts output to pw-play this way

echo "Arch Linux is the best" | piper-tts -m "/usr/share/piper-voices/en/en_US/ryan/medium/en_US-ryan-medium.onnx" -f - | pw-play -

I get the error:

sndfile: failed to open audio file "-": Format not recognised.
error: open failed: Eingabe-/Ausgabefehler

Using the --raw option on both piper-tts and pw-play generates audio output, but the playback speed is insane.
Specifying --format wav for pw-play still results in the error above.

Do you have any suggestions how to work around this?

Offline

Board footer

Powered by FluxBB