Voices from Picochess webserver

307 views
Skip to first unread message

clarke baxter

unread,
Feb 23, 2021, 4:42:41 PM2/23/21
to PicoChess

Hi All

I’ve been running a DGT Pi with Picochess v3. With a mini-speaker I hear the Tutor and a voice announcing the engine moves.

I find though that I really like the Picochess Webserver, especially because I get a completely different voice that announces both the engine moves and my moves. So I run the Chrome browser on my PC and unplug the mini-speaker. I like this arrangement so much I decided to put Picochess on a Pi 4b with a mini-touchscreen equipped with a super little speaker. The idea is that Chromium runs at start-up in kiosk mode at 127.0.0.1. I see the Webserver and get announcements for both sides via the browser.

I’ve installed the latest v3 image with Stockfish 13 on a Pi 4 B. The mini-screen (HDMI) with little speaker is installed and it is almost all working beautifully.

On my PC, if I point Chrome at the Picochess webserver on the Pi I get exactly what I want. Moves announced for both sides.

On the Pi  I get the Tutor and Pico voices if I want them. Chromium is pointed at the Webserver (loopback address) and displays the page as it should. The only thing missing is the voice from the browser that announces both the engine and my moves. Sound is working via HDMI. VLC player works fine with sound. Youtube in the Chromium browser works fine with sound, but the Picochess page will not speak to me!

In Chromium settings the Allow sites to play sound is set to On and the Chromium browser tab Is not muted.

I’ve tried using the actual IP address rather than the loopback.

Any suggestions gratefully received.

I am searching for answers on here and elsewhere – honest.

cb

RandyR

unread,
Feb 23, 2021, 4:53:52 PM2/23/21
to PicoChess
I'm not sure Chromium supports it, at least not in its default form. I use Chrome (or Edge iirc) in Windows 10 and I get the moves announced, but not when using Chromium in Linux (Mint) on my laptop. Maybe it's just a setting or plugin but I didn't look into it.

Shiv may have the answer.

Randy

Scally

unread,
Feb 23, 2021, 5:03:57 PM2/23/21
to PicoChess
Hi all,

I’m sure it just works on certain browsers and not on others. Safari on Apple devices also doesn’t support it.

Al.

clarke baxter

unread,
Feb 23, 2021, 5:07:17 PM2/23/21
to PicoChess
Ah, I feel a dampening of my fireworks.

Thanks Randy and Al.

cb

Kyle Washington

unread,
Feb 23, 2021, 5:15:02 PM2/23/21
to PicoChess
It works on Chrome on a PC for me, but it does not work on Chrome with my iPad.  I wish it did - I enjoy that way of listening to the moves as well!

Kyle

Shivkumar Shivaji

unread,
Feb 23, 2021, 5:19:22 PM2/23/21
to pico...@googlegroups.com
I think it was Juergen or Dirk who added voice announcements on the web interface itself. Have to check and code and figure it out.

--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/22c5b13b-23fa-4db3-95e6-98cf9f2d29c7n%40googlegroups.com.

clarke baxter

unread,
Feb 23, 2021, 5:55:26 PM2/23/21
to PicoChess
I tried kweb - no joy there.

I'm assuming it uses text-to-speech. Been looking at browser support for that and I'm way out of my depth... just like playing against Stockfish!

Any help much appreciated.

By the way, when you're looking at the future of Picochess, I have time to spare if there are tasks.

cb

clarke baxter

unread,
Feb 23, 2021, 7:16:57 PM2/23/21
to PicoChess
I tried Firefox - no joy there either.

I now understand this is TTS and requires the browser to support the Web Speech API. It seems there is currently no browser for Raspberry Pi that supports this.

Is there a way to get Picochess voices to announce both sides? It is the audible confirmation that my own move has been registered that I'm looking for. I think this goes back to 1980 (ish) using my Fidelity Voice Chess Challenger. Had to take out a loan to buy it. Good investment though - it still works.

cb

Randy Reade

unread,
Feb 23, 2021, 7:32:28 PM2/23/21
to pico...@googlegroups.com
Enable computer-voice and user-voice in picochess.ini, or use the clock (system/voice) menu.

Randy

You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/3o_KoAU6AkU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/273b1bc1-204b-4d6d-aa26-6135d263e7dfn%40googlegroups.com.

clarke baxter

unread,
Feb 24, 2021, 9:08:44 AM2/24/21
to PicoChess
Thanks Randy. I had tried that using the clock menus, but clearly not properly!

I had another issue with voices over HDMI. Some announcements were missed and some just sounded the tail end of the message. There was also much clicking as if the speaker was being turned off between announcements and then back on, but sometimes too late for the sound.

Anyway it is fixed thanks to one Steven J Murdoch here: Light Blue Touchpaper

"Rather than disabling module-suspend-on-idle, the work-around I arrived on was to set a very long idle timeout. This is done by appending timeout=604800 to the line starting with load-module module-suspend-on-idle in /etc/pulse/default.pa. Now, when there was a format change, the driver is still resumed but the driver will not be suspended until a week (604,800 seconds) after the last audio has been played."

I suspect there are other ways of achieving the same thing, but this works for me. A week between clicks... loads of time to hatch a masterplan.

My Pi 4 with mini-screen setup is sorted. It is like a Centaur, but alive and connected!

Thanks All for your help. 

Randy Reade

unread,
Feb 24, 2021, 9:32:12 AM2/24/21
to pico...@googlegroups.com
Thanks for sharing that workaround, Clarke. I noticed the same thing, but I'm normally headless so don't experience it.

Randy

Chessfriend

unread,
Feb 24, 2021, 10:55:55 AM2/24/21
to PicoChess
Hi Simon,

You Pi with mini scree setup. Is it possible - when you boot that it starts DIRECTLY with the webserver????
That would be cool. Boot - and you see the board/webserver!!!

Peter

clarke baxter

unread,
Feb 24, 2021, 2:16:14 PM2/24/21
to PicoChess
Hi Peter

I have it booting not quite directly to Chromium in kiosk mode showing the Picochess webserver page.

There is a brief display of the Desktop before Chromium launches so I changed the Desktop wallpaper for something more fitting...

wallpaper.jpg

I have not found any real Picochess 'branding'  so I 'borrowed' an image and stuck the writing on. I plan to replace it with a nice arty photograph of my own making. It works nicely in that the wallpaper shows up just in time for the voice that announces "Picochess".

Anyway, this gives me kiosk mode:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

 Mine looked like this:

@lxpanel --profile LXDE-pi

@pcmanfm --desktop --profile LXDE-pi

@xscreensaver -no-splash


I added:

/usr/bin/chromium-browser --kiosk  --disable-restore-session-state http://localhost:80

 Save the file, shutdown and power off, then restart.

I am wondering if full screen mode might be better than kiosk mode. I suppose it depends if one needs other interaction with the Pi. In kiosk mode the only way out as far as I know is ALT F4 and I've no idea how to do that with just a touchscreen. In full screen mode a swipe from the top gives an escape.

cb

Reply all
Reply to author
Forward
0 new messages