piper icon indicating copy to clipboard operation
piper copied to clipboard

unrecognized arguments: --json-input demo.json

Open omega3 opened this issue 2 years ago • 5 comments

piper -m /home/user/en_GB-southern_english_female-low.onnx --json-input demo.json
usage: piper [-h] -m MODEL [-c CONFIG] [-f OUTPUT_FILE] [-d OUTPUT_DIR] [--output-raw] [-s SPEAKER]
             [--length-scale LENGTH_SCALE] [--noise-scale NOISE_SCALE] [--noise-w NOISE_W] [--cuda]
             [--sentence-silence SENTENCE_SILENCE] [--data-dir DATA_DIR] [--download-dir DOWNLOAD_DIR] [--update-voices]
             [--debug]
piper: error: unrecognized arguments: --json-input demo.json

At the moment I have both installed piper from Manjaro repo and from pipx. Operating System: Manjaro Linux KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.11 Kernel Version: 6.5.5-1-MANJARO (64-bit) Graphics Platform: X11

Confirmed by another user: reference use case and demo.json https://github.com/rhasspy/piper/discussions/238

omega3 avatar Oct 17 '23 16:10 omega3

You don't pass the jsonl file as a parameter. You have to use something to feed it to stdin.

Something like this should work, assuming your json file is correct:

cat demo.json | piper -m /home/user/en_GB-southern_english_female-low.onnx --json-input

StoryHack avatar Oct 17 '23 20:10 StoryHack

I'm not the person that opened the issue, but I tried to help them in a discussion about this. The issue isn't about how to feed the json file to Piper, but that the version of Piper that gets installed via pip doesn't recognise the --json-input argument at all. When calling piper -h, json-input doesn't even show in the list of arguments.

I had the same issue and solved it by building piper from source, but for someone without the know-how, that's more problematic.

Sanglyon avatar Oct 17 '23 23:10 Sanglyon

I confirm that this command also gives the same error. And the version available in AUR isn't the latest. So please, fix pip installation.

omega3 avatar Oct 18 '23 07:10 omega3

I'm not the person that opened the issue, but I tried to help them in a discussion about this. The issue isn't about how to feed the json file to Piper, but that the version of Piper that gets installed via pip doesn't recognise the --json-input argument at all. When calling piper -h, json-input doesn't even show in the list of arguments.

I had the same issue and solved it by building piper from source, but for someone without the know-how, that's more problematic.

This worked for me as well, where I tried using the pip install first (which at the time of writing is also at version 1.2.0)

rslangl avatar Feb 16 '24 10:02 rslangl

I'm not the person that opened the issue, but I tried to help them in a discussion about this. The issue isn't about how to feed the json file to Piper, but that the version of Piper that gets installed via pip doesn't recognise the --json-input argument at all. When calling piper -h, json-input doesn't even show in the list of arguments.

I had the same issue and solved it by building piper from source, but for someone without the know-how, that's more problematic.

Could you gave a quick hint how to build it from source?

LukasM937 avatar Jul 05 '24 08:07 LukasM937