Skip to content

Generated config is not useable by firefox & derivetives #46

Description

@VoidAndCaffeine

When using the auto-generated config, Firefox (and derivatives such as Zen) does not present the headphone icon in reader view, and websites using the system speech API fail to play.
For some reason changing piper.conf from this:

GenericExecuteSynth "if command -v sox > /dev/null; then\
        PROCESS=\'sox -r 22050 -c 1 -b 16 -e signed-integer -t raw - -t wav - tempo $RATE pitch $PITCH norm\';\
        if command -v paplay > /dev/null; then\
            OUTPUT=\'$PLAY_COMMAND\';\
        else\
            OUTPUT=\'aplay\';\
        fi;\
    elif command -v paplay > /dev/null; then\
        PROCESS=\'cat\'; OUTPUT=\'$PLAY_COMMAND --raw --channels 1 --rate 22050\';\
    else\
        PROCESS=\'cat\'; OUTPUT=\'aplay -t raw -c 1 -r 22050 -f S16_LE\';\
    fi;\
    echo \'$DATA\' | /home/azalea/.var/app/com.mikeasoft.pied/data/pied/piper/piper --model /home/azalea/.var/app/com.mikeasoft.pied/data/pied/models/en_US-amy-medium.onnx -s 0 --output_raw | $PROCESS | $OUTPUT;"
GenericRateAdd 1
GenericPitchAdd 1
GenericVolumeAdd 1
GenericRateMultiply 1
GenericPitchMultiply 1000
AddVoice "en_US" "MALE1" "Piper"

to this:

GenericExecuteSynth "if command -v sox > /dev/null; then\
        PROCESS=\'sox -r 22050 -c 1 -b 16 -e signed-integer -t raw - -t wav - tempo $RATE pitch $PITCH norm\';\
        if command -v paplay > /dev/null; then\
            OUTPUT=\'$PLAY_COMMAND\';\
        else\
            OUTPUT=\'aplay\';\
        fi;\
    elif command -v paplay > /dev/null; then\
        PROCESS=\'cat\'; OUTPUT=\'$PLAY_COMMAND --raw --channels 1 --rate 22050\';\
    else\
        PROCESS=\'cat\'; OUTPUT=\'aplay -t raw -c 1 -r 22050 -f S16_LE\';\
    fi;\
    echo \'$DATA\' | /home/azalea/.var/app/com.mikeasoft.pied/data/pied/piper/piper --model /home/azalea/.var/app/com.mikeasoft.pied/data/pied/models/$VOICE -s 0 --output_raw | $PROCESS | $OUTPUT;"
GenericRateAdd 1
GenericPitchAdd 1
GenericVolumeAdd 1
GenericRateMultiply 1
GenericPitchMultiply 1000
AddVoice "en-US" "female1" "en_US-amy-medium.onnx"
DefaultVoice "en_US-amy-medium.onnx"

fixes the problem. I would submit a pr myself but I don't have the time to find the code that generates the config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions