Profile save's aren't working

I’m having issues getting either the Advanced tab to accurately load the information I’ve configured. I have tried both modifying with the WebGUI and the files themselves. I’ve verified with a json linter and everything appears to checkout. This makes it infinitely difficult for integrations as profile changes do not stick.

I usually copy modifications to the files via the docker cp command

# cat profiles/defaults.json
{
        "microphone": {
                "arecord": {
                        "device": "sysdefault:CARD=sndrpigooglevoi"
                },
                "system": "arecord"
        },
        "sounds": {
                "aplay": {
                        "device": "sysdefault:CARD=sndrpigooglevoi"
                }
        },
        "text_to_speech": {
                "system": "espeak",
                "espeak": {
                        "voice": "en"
                }
        },
        "wake": {

                "system": "porcupine",
                "porcupine": {
                        "library_path": "porcupine/libpv_porcupine.so",
                        "model_path": "porcupine/porcupine_params.pv",
                        "keyword_path": "porcupine/jarvis_linux.ppn",
                        "sensitivity": 0.5
                },

                "snowboy": {
                        "model": "snowboy/snowboy.umdl,snowboy/jarvis.umdl",
                        "model_settings": {
                                "snowboy/snowboy.umdl": {
                                        "sensitivity": "0.5",
                                        "audio_gain": 1,
                                        "apply_frontend": false
                                },
                                "snowboy/jarvis.umdl": {
                                        "sensitivity": "0.5,0.5",
                                        "audio_gain": 1,
                                        "apply_frontend": false
                                }
                        }
                }
        },
        "rhasspy": {
                "listen_on_start": true
        }
}
# cat profiles/en/profile.json
{
    "microphone": {
        "arecord": {
            "device": "sysdefault:CARD=sndrpigooglevoi"
        },
        "system": "arecord"
    },
    "sounds": {
        "aplay": {
            "device": "sysdefault:CARD=sndrpigooglevoi"
        }
    },
    "text_to_speech": {
        "espeak": {
            "voice": "en"
        }
    },
    "wake": {
        "system": "porcupine",
        "porcupine": {
            "keyword_path": "porcupine/jarvis_linux.ppn"
        }
    }
}

The Advanced tab always shows:

{
    "microphone": {
        "arecord": {
            "device": "sysdefault:CARD=sndrpigooglevoi"
        },
        "system": "arecord"
    },
    "sounds": {
        "aplay": {
            "device": "sysdefault:CARD=sndrpigooglevoi"
        }
    },
    "text_to_speech": {
        "espeak": {
            "voice": "en"
        }
    },
    "wake": {
        "system": "snowboy",
        "snowboy": {
            "model": "snowboy/jarvis.umdl",
            "sensitivity": "0.5"
        }
    }
}

Then yours shows more than mine. There is a note above the advanced tab that states that only differences to the default are displayed in the gui. For me this meant that I pasted my homeassistant config in there, saved and reloaded rhasspy and it was not in there anymore but my configured values where in the settings tab.

I just started to ignore the advanced tab and open the file with a text editor if I want to make changes to it, way less confusing.

right - and that’s generally what I’ve been doing as well, but did you notice that I’ve set the system to porcupine in the profile.json and defaults.json files but it’s not being picked up by the web gui at all?

No, I missed that. Reading code blocks on my mobile is hard because they don’t fit right, I must have missed that.

No problem, when you get to a machine please review. I don’t know what could be missed…? both files are identical profile.json and defaults.json but the changes are not being picked up. Even when I add the hassio secret key. Not sure what I may be missing.

First of, I don’t have a defaults.json anywhere, so it might be something that is no longer in use. I also just copied the porcupine part of your profile.json into mine via advanced tab, restarted and it offered to download porcupine for me so that part seems fine also. I did not test further because I only have a German profile and porcupine does not support German language.

Is the # cat line actually in the file? If yes, try without it, it might be throwing rhasspy off.

Am I supposed to be modifying the profiles located in / or /usr/share/rhasspy/profiles? It seems originally I was modifying the one in / but now the ones in /usr/share/rhasspy/profiles/en are being loaded.

The only profile I’m seeing loaded now is:

{
    "language": "en",
    "name": "en",
    "locale": "en_US",
    "speech_to_text": {
        "system": "pocketsphinx",
        "dictionary_casing": "lower",
        "kaldi": {
            "base_dictionary": "kaldi/base_dictionary.txt",
            "base_language_model": "kaldi/base_language_model.txt",
            "base_language_model_fst": "kaldi/base_language_model.fst",
            "compatible": true,
            "custom_words": "kaldi_custom_words.txt",
            "dictionary": "kaldi/dictionary.txt",
            "graph": "graph",
            "language_model": "kaldi/language_model.txt",
            "model_dir": "kaldi/model",
            "unknown_words": "kaldi/unknown_words.txt",
            "mix_fst": "kaldi/mixed.fst",
            "g2p_model": "kaldi/g2p.fst",
            "phoneme_examples": "kaldi/phoneme_examples.txt",
            "phoneme_map": "kaldi/espeak_phonemes.txt"
        }
    },
    "intent": {
        "flair": {
            "embeddings": [
                "news-forward-0.4.1.pt",
                "news-backward-0.4.1.pt"
            ]
        }
    },
    "text_to_speech": {
        "wavenet": {
            "language_code": "en-US"
        },
        "marytts": {
            "locale": "en-US"
        }
    },
    "download": {
        "conditions": {
            "speech_to_text.system": {
                "pocketsphinx": {
                    "acoustic_model": "cmusphinx-en-us-5.2.tar.gz:cmusphinx-en-us-5.2",
                    "base_dictionary.txt": "en-g2p.tar.gz:base_dictionary.txt",
                    "g2p.fst": "en-g2p.tar.gz:g2p.fst"
                },
                "kaldi": {
                    "kaldi": "en_kaldi-zamia.tar.gz:kaldi"
                }
            },
            "speech_to_text.kaldi.open_transcription": {
                "True": {
                    "kaldi/model/base_graph": "en_kaldi-zamia-base_graph.tar.gz:base_graph"
                }
            },
            "speech_to_text.pocketsphinx.mix_weight": {
                ">0": {
                    "base_language_model.txt": "en-70k-0.2-pruned.lm.gz:en-70k-0.2-pruned.lm"
                }
            },
            "intent.system": {
                "flair": {
                    "flair/cache/embeddings/news-forward-0.4.1.pt": "news-forward-0.4.1.pt",
                    "flair/cache/embeddings/news-backward-0.4.1.pt": "news-backward-0.4.1.pt"
                }
            }
        },
        "files": {
            "cmusphinx-en-us-5.2.tar.gz": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/cmusphinx-en-us-5.2.tar.gz"
            },
            "en-70k-0.2-pruned.lm.gz": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-70k-0.2-pruned.lm.gz"
            },
            "en-g2p.tar.gz": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-g2p.tar.gz"
            },
            "news-forward-0.4.1.pt": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/news-forward-0.4.1.pt",
                "cache": false
            },
            "news-backward-0.4.1.pt": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/news-backward-0.4.1.pt",
                "cache": false
            },
            "en_kaldi-zamia.tar.gz": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en_kaldi-zamia.tar.gz"
            },
            "en_kaldi-zamia-base_graph.tar.gz": {
                "url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en_kaldi-zamia-base_graph.tar.gz"
            }
        }
    }
}

I edit the one I pointed rhasspy to when I first installed my docker. For me it is /home/myuser/rhasspy/profiles/de but the default that is in the docker command on the homepage it is in /home/myuser/.config/rhasspy/profiles/de or something like that. I just removed the config part of it. That is the one that is in /profiles/de from inside the container.

The one that is in /usr/share/rhasspy seems to be a default profile that also points to the downloads and should not be loaded. If it is, my guess is that something is wrong with the one it normally loads and it uses those as a backup profile to start. No guarantee on that thought, I am just guessing here.

Couldn’t figure it out. Ended up doing a wipe and ignoring what’s displayed in the ADVANCED tab. Thanks for helping!