Sentences.ini broken

Hello,

I’ve just made a fresh install of rhasspy and tried to add my sentences, but there is no file sentences.ini. Nothing happens, when I type in a name (sentences.ini) and click on new file. I even tryed to add sentences.ini manually.
I can strangly select one of many numbers up to 1790.

Each one of those files only contain one character: The first file a [, the second file a G
When I type in my Sentences, i get the error 'str' object has no attribute 'items'

Log shows:

[ERROR:744927] __main__: 'str' object has no attribute 'items'
Traceback (most recent call last):
  File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1471, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1519, in dispatch_request
    return await handler(**request_.view_args)
  File "app.py", line 477, in api_sentences
    for sentences_path, sentences_text in sentences_dict.items():
AttributeError: 'str' object has no attribute 'items'

Here is my advanced configuration:

{
    "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"
            }
        }
    }
}

Anyone has a possible solution?

Thank you very much

Are you sure it is a fresh (as in using latest version) install? Do I read version 2.4.13 in the navbar?

Thank you for your response.

You are right, I thought it was a the lastest version, as i installed it on a new Debian System, following the instructions on https://rhasspy.readthedocs.io/en/latest/installation/#docker

Now I’ve tried to update it with:
https://rhasspy.readthedocs.io/en/latest/installation/#updating-docker-image
docker pull synesthesiam/rhasspy-server:latest
removing the old container:
docker rm <container-name>
and starting the image:

docker run -d -p 12101:12101 \
      --restart unless-stopped \
      -v "$HOME/.config/rhasspy/profiles:/profiles" \
      --device /dev/snd:/dev/snd \
      synesthesiam/rhasspy-server:latest \
      --user-profiles /profiles \
      --profile en

Seems like that fixed it :slight_smile:

1 Like