SEPIA-Framework / sepia-docs

Documentation and Wiki for SEPIA. Please post your questions and bug-reports here in the issues section! Thank you :-)
https://sepia-framework.github.io/
236 stars 16 forks source link

rpi4 client not logged in and wakeword inactive after reboot #197

Closed narf0815 closed 2 years ago

narf0815 commented 2 years ago

Describe the bug the client doesn't automatically connect to the sepia hub and the wake word isn't active after reboot.

SEPIA client and server versions rpi4 client

To Reproduce Steps to reproduce the behavior:

  1. reboot

Expected behavior user is logged wakeword active

Additional context after call login user [id] password [pwd] and set wakeword state on client works as expected.

settings.js:

//Settings primarily for headless mode and setup (URL parameter: 'isHeadless=true')
//Some examples: https://github.com/SEPIA-Framework/sepia-html-client-app/blob/master/Settings.md
SepiaFW.settings = {
    headless: {
        device: {
            "host-name": "sepi",
            "deviceId": "r1",
            "environment": "default",   //e.g.: default, speaker, smart_display
            "deviceLocalSiteData": {
                "location": "home",
                "type": "room",
                "name": "unassigned",
                "index": ""
            },
            "mediaDevices": {
                "mic": {},
                "player": {},
                "tts": {},
                "fx": {}
            },
            "playerVolume": 7.0,
            "microphoneSettings": {
                "gain": 1.0,
                "noiseSuppression": true,
                "autoGainControl": false,
                "echoCancellation": false,
                "resamplerQuality": 3,
                "tryNativeResampling": false
            },
            "deviceSounds": {
                "micConfirm": "sounds/coin.mp3",
                "alarm": "sounds/alarm.mp3"
            },
            "wakeWordNames": ["Computer", "Jarvis"],
            "wakeWordVersion": "1.9",
            "wakeWordRemoteUrl": "<assist_server>/files/wake-words/porcupine/",
//          "wakeWordNames": "Hey SEPIA",
//          "wakeWordVersion": "1.4",
            "voiceEngine": "sepia",
//          "voiceCustomServerURI": "",
            "en-voice": "",
            "de-voice": "",
            "asrEngine": "native",
            "asrServerURI": "http://localhost:20726/sepia/stt",
            "asrServerUser": "any",
            "asrServerToken": "test1234",
            "en-asrModel": "",
            "de-asrModel": "",
            "big-screen-mode": true,
            "virtualKeyboard": false,
            "clexiGpioInterface": {
                "buttons": [{
                    "id": "hw-mic-button",
                    "pin": 17
                }],
                "leds": [{
                    "id": "state-led-1",
                    "pin": null,
                    "state": "listening"
                }],
                "items": [{
                    "id": "led-array",
                    "file": "rpi-respeaker-mic-hat-leds",
                    "options": {
                        "model": "2mic"
                    },
                    "modes": {
                        "idle": [{"ledIndex": 1, "red": 0, "green": 0, "blue": 0}],
                        "listening": [{"ledIndex": 1, "red": 150, "green": 0, "blue": 0}],
                        "speaking": [{"ledIndex": 1, "red": 0, "green": 0, "blue": 150}],
                        "awaitDialog": [{"ledIndex": 1, "red": 100, "green": 100, "blue": 0}],
                        "loading": [{"ledIndex": 1, "red": 10, "green": 10, "blue": 10}],
                        "wakeWordActive": [{"ledIndex": 2, "red": 5, "green": 0, "blue": 5}],
                        "wakeWordInactive": [{"ledIndex": 2, "red": 0, "green": 0, "blue": 0}],
                        "eventEffectsOn": [],
                        "eventEffectsOff": []
                    }
                }]
            }
        },
        user: {
            "clexiSocketURI": "ws://localhost:8080",
            "clexiServerId": "clexi-123",
            "clexiConnect": true,
            "useRemoteCmdl": true,
            "useGamepads": true,
            "useBluetoothBeacons": true,
            "useBluetoothBeaconsInAoModeOnly": false,
            "knownBluetoothBeaconAddresses": [],
            "useWakeWord": true,
            "autoloadWakeWord": true,
            "allowWakeWordDuringStream": false,
            "activeSkin": "2",
            "activeAvatar": "0",
            "proactiveNotes": false,
            "autoGPS": false,
            "embeddedPlayerSettings": {
                "canEmbedYouTube": true,
                "canEmbedSpotify": false,
                "canEmbedAppleMusic": false
            }
        },
        location: {
            "latitude": "",
            "longitude": ""
        },
        broadcast: {
            "state": true,
            "login": true,
            "clientError": true,
            "accountError": true,
            "speech": true,
            "wakeWord": true,
            "audioPlayer": true,
            "alarm": true,
            "info": false
        }
    }
};

i used the clexiGpioInterface settings for respeaker (2mic), in the meantime i'm not using that anymore but an old ps camera (usb), i don't think that's related, is it?

best regards

fquirin commented 2 years ago

Hi Peter :-)

so over at openHAB you've mentioned that the client is starting after reboot, but it just forgets the login correct? Do you hear the sentence "ready for setup" every time after a reboot?

Did you install the SEPIA client on a fresh Raspberry Pi 4 or was there anything else installed previously? Is this "headless" mode (without display)?

My fist guess is that for some reason the client cache is deleted after every reboot :thinking: .

in the meantime i'm not using that anymore but an old ps camera (usb), i don't think that's related, is it?

This should not be related but I recommend to remove the 2mic HAT settings or the client will still try to send GPIO control commands.

narf0815 commented 2 years ago

so over at openHAB you've mentioned that the client is starting after reboot, but it just forgets the login correct?

exactly.

Do you hear the sentence "ready for setup" every time after a reboot? apparently it's the day for second chances. i've just shut down the pi and connected the respeaker hat again and after boot the client logged in correctly ("Hello friend, i'll be right there, just a second").

shutdown again, off with the reaspeaker hat and on with the ps cam, boot > login ok. another reboot > login ok. i'm pretty confused now -.-

and also the wakeword was active this time after boot.

Did you install the SEPIA client on a fresh Raspberry Pi 4 or was there anything else installed previously? Is this "headless" mode (without display)?

yes to both questions.

i guess i should close this?

just a last (not related) question. how can i change the voice on the diy client? on android there's a nice woman who speaks german pretty good but on the raspberry there's a guy that sounds like Lothar Matthäus... is this a device thing or can i fix this with the settings (couldn't find very much information on the diy settings...).

fquirin commented 2 years ago

shutdown again, off with the reaspeaker hat and on with the ps cam, boot > login ok. another reboot > login ok. i'm pretty confused now -.- ... and also the wakeword was active this time after boot.

:sweat_smile: ok, no problem. You can close this issue and reopen it in case the problem comes back ;-)

how can i change the voice on the diy client?... (couldn't find very much information on the diy settings...).

Most likely you are using the Android platform voice. Unfortunately this cannot be used on Raspberry Pi but there are some alternatives available which you might need to install on the SEPIA server first. The most natural open-source TTS voices are unfortunately still a bit too challenging for the Raspberry Pi to run in real-time but I like txt2pho for example. You can test the voices inside the Android app and then use the settings export function (settings - account - Device & App Settings) to look at the JSON file to copy over the correct settings for the DIY.

there's a guy that sounds like Lothar Matthäus

:laughing:

narf0815 commented 2 years ago

I'll look into that, thank you!