Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Discussion options

You must be logged in to vote

The output is always a WAV file, even if you name it .mp3. You can convert on the fly to MP3 using ffmpeg like this:

cat sample.txt | piper -m en_GB-southern_english_female-low.onnx --output-raw | \
    ffmpeg -f s16le -ar 16000 -ac 1 -i 'pipe:' -f mp3 -q:a 0 piper_output.mp3

Adjust -q:a 0 to change the quality level.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by omega3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants