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

Issues with headless client #107

Closed birnbeidla closed 3 years ago

birnbeidla commented 3 years ago

First of all, thanks for that great project. I managed to connect the whole thing to my OpenHAB instance and it's really stunning.

After setting up the AndroidApp, I tried to install a headless client on an RasPI 3b. (with respeaker 2 mics) I followed the instructions at https://github.com/SEPIA-Framework/sepia-installation-and-setup/tree/dev/sepia-client-installation/rpi step by step and managed to connect the client to the server. However, I'm having a few issues now.

This is the output of the test command: Broadcaster event: {"broadcast":{"client":"o1_chrome_app_v0.23.0","deviceId":"o1","sepia-speech":{"type":"tts_error","msg":"unknown"}}} Broadcaster event: {"broadcast":{"client":"o1_chrome_app_v0.23.0","deviceId":"o1","sepia-speech":{"type":"tts_error","msg":"unknown"}}}

My settings.js is still at default settings except setting a specific room.

However, this only works in english (also all the default interactions are in english as can be seen in the clexi chat window) The local of the user is german and if I log in as this user via browser, the chat is in german. How can I set the headless client to german?

Please help

birnbeidla commented 3 years ago

I did some research and tests and after I set the system locale to german before installing the sepia client, I can now see the test text in german. However, even after re-installing everything from the scratch, the TTS issue remains.

test command output now is:

Broadcaster event: {"broadcast":{"client":"o2_chrome_app_v0.23.0","deviceId":"o2","sepia-speech":{"type":"tts_error","msg":"unknown"}}} Broadcaster event: {"broadcast":{"client":"o2_chrome_app_v0.23.0","deviceId":"o2","sepia-state":{"state":"idle"}}} Broadcaster event: {"broadcast":{"client":"o2_chrome_app_v0.23.0","deviceId":"o2","sepia-speech":{"type":"tts_speak","msg":"Ja, es funktioniert!"}}} Broadcaster event: {"broadcast":{"client":"o2_chrome_app_v0.23.0","deviceId":"o2","sepia-state":{"state":"loading"}}} Broadcaster event: {"broadcast":{"client":"o2_chrome_app_v0.23.0","deviceId":"o2","test-result":{"isActive":true,"user":"uid1009","next":"sending test message now ..."}}}

463nt-0ran63 commented 3 years ago

hi @birnbeidla i had the same issue and i think what should solve the issue for you is that you need to one time properly "log in" by using "call login userid [user] password [password]" when this is done it had taken the locale for me - take care that you use the same user though - this is a bit irritating that the android app offers way more control like the DIY client as such - i did not find a way to get the same webui opened on the PI with the android webinterface allthough I saw the html files in the folder structure of CLEXI. also check your settings.js later on if you use multiple PIs to connect to the same host and same Clexi server - not sure why this CLEXI server is on each DIY client :)

hope it helps

birnbeidla commented 3 years ago

Thanks for the reply. I tried re-logging the user before I started from the scratch. First time it did nothing, second time, it left the client in a state where no more clexi messages got through. Never figured out why.... Nevertheless, the language issue is solved now after I did the whole setup again on a freshly flashed SD and changed the systems locale to german before installing sepia.

Just the TTS issue remains the same - with the minor difference that it now shows the test text in german...

463nt-0ran63 commented 3 years ago

How does your settings.js look like?

birnbeidla commented 3 years ago

Mostly default. Just changed room name

SepiaFW.settings = { headless: { device: { "host-name": "192.168.123.116", "deviceId": "o2", "deviceLocalSiteData": { "location": "home", "type": "room", "name": "office", "index": "" }, "en-voice": "", "de-voice": "", "wakeWordSensitivity": [0.5] }, user: { "clexiSocketURI": "ws://localhost:8080", "clexiServerId": "clexi-123", "clexiConnect": true, "useRemoteCmdl": true, "speech-voice-engine": "sepia", "speech-asr-engine": "native", "speech-websocket-uri": "ws://localhost:20741/stt/socket", "useGamepads": true, "useBluetoothBeacons": true, "useBluetoothBeaconsInAoModeOnly": false, "useWakeWord": false, "autoloadWakeWord": false, "allowWakeWordDuringStream": false, "activeSkin": "2", "activeAvatar": "0", "proactiveNotes": false, "autoGPS": false }, location: { "latitude": "", "longitude": "" }, broadcast: { "state": true, "login": true, "clientError": true, "accountError": true, "speech": true, "wakeWord": true, "audioPlayer": true, "alarm": true } } };

birnbeidla commented 3 years ago

In the mean time, I also tried to activate the mary tts extension on server. No Luck... Is there a proper documentation how TTS works now after the 2.5 release?

463nt-0ran63 commented 3 years ago

//Settings primarily for headless mode and setup (URL parameter: 'isHeadless=true') SepiaFW.settings = { headless: { device: { "host-name": "192.168.2.31", "deviceId": "o2", "deviceLocalSiteData": { "location": "home", "type": "room", "name": "unassigned", "index": "" }, "en-voice": "en-GB marytts f", "de-voice": "de-DE marytts f", "wakeWordSensitivity": [0.5] }, user: { "clexiSocketURI": "ws://192.168.2.28:9090/clexi", "clexiServerId": "clexi-123", "clexiConnect": true, "useRemoteCmdl": true, "speech-voice-engine": "sepia", "speech-asr-engine": "native", "speech-websocket-uri": "ws://localhost:20741/stt/socket", "useGamepads": true, "useBluetoothBeacons": true, "useBluetoothBeaconsInAoModeOnly": false, "useWakeWord": true, "autoloadWakeWord": true, "allowWakeWordDuringStream": false, "activeSkin": "2", "activeAvatar": "0", "proactiveNotes": false, "autoGPS": false }, location: { "latitude": "", "longitude": "" }, broadcast: { "state": true, "login": true, "clientError": true, "accountError": true, "speech": true, "wakeWord": true, "audioPlayer": true, "alarm": true } } }; These I have set to the language and the speech synthesis system

"en-voice": "", "de-voice": "",

Those to true "useWakeWord": false, "autoloadWakeWord": false

birnbeidla commented 3 years ago

So I take it that you also use mary tts extension. Did you change anything in the core settings after you activated it?

BTW.. adopted your settings to my client. no change...

463nt-0ran63 commented 3 years ago

Regarding marytts I got it to work on a raspberry pi 4 and now on a windows machine. Only issue is that the server does not allow access from another ip then itself. So marytts has to be installed where the main server is. Basically what I did is on the pi: Run the diy setup install the speech synthesis stuff. Restart so the Marytts is running out of the extension folder automatically. Then in the hub you have a tts setting marytts_server=http\://127.0.0.1\:59125 On a windows machine you have to install Java etc and run the batch but core settings are to do the same way. When that and the settings.js match it should work. Assuming that you ran all the steps from the diy installation guide as well

463nt-0ran63 commented 3 years ago

So I take it that you also use mary tts extension. Did you change anything in the core settings after you activated it?

BTW.. adopted your settings to my client. no change...

Did you copy paste? I initially had a typo in my first settings.js

birnbeidla commented 3 years ago

Also running on a windows machine. I followed the installation guide, settings are on localhost and server is running on the same machine.

I even turned of windows firewall just in case 😕

birnbeidla commented 3 years ago

So I take it that you also use mary tts extension. Did you change anything in the core settings after you activated it? BTW.. adopted your settings to my client. no change...

Did you copy paste? I initially had a typo in my first settings.js

Nah - I'm a developer for too long to just copy paste stuff ;)

birnbeidla commented 3 years ago

what are your other tts related core settings

module_tts= tts_engine_name=Mary-TTS tts_enabled=true marytts_server=http://127.0.0.1:59125

here on my side....

birnbeidla commented 3 years ago

finally got it working after restoring those settings to defaults:

module_tts=net.b07z.sepia.server.assist.tts.TtsOpenEmbedded tts_engine_name=Open Embedded tts_enabled=true

I was sure I already tried that combination but I must have made a mistake somewhere.

Thanks a lot for all your help.