bablokb / pi-webradio

An Internet-Radio built around a Waveshare 7.9" Display
GNU General Public License v3.0
11 stars 3 forks source link

Some questions and some help :-) #3

Open fquirin opened 2 years ago

fquirin commented 2 years ago

Hi,

I just saw this project on Vosk's Twitter and had a closer look :slightly_smiling_face: , good work :+1: .

There are a few parallels as far as I can tell to my SEPIA Open Assistant project, so I thought we could maybe transfer some knowledge :smiley: .

I'll start with some links (while shamelessly advertising my own projects :yum: ):

Some other things I was wondering about:

Let me know if you have any questions or ideas, cu, Florian

bablokb commented 2 years ago

Very interesting, I will need some time to have a look and then I will report back.

Just two notes: I don't use pulseaudio on headless systems. And I mute the radio after detecting the wake-word. This is actually only (and definitely) necessary if somebody is talking on the radio, but since you never know, I implemented it that way.

fquirin commented 2 years ago

I don't use pulseaudio

I had to switch to Pulseaudio eventually, it was getting more and more troublesome without it especially since Chrome 92+. At first I was I afraid ... now I'm actually pretty happy with it ^^.

And I mute the radio after detecting the wake-word

That's what I do as well, but I'm more concerned about the wake-word precision while radio is running. When SEPIA isn't playing any music ww-detection is pretty good, as soon as I start radio etc. ww-detection accuracy drops to frustration level :-/. Do you have the speakers right next to the microphone as well?

bablokb commented 2 years ago

Chrome does not run on headless systems. A PiOS lite is about 900MB without pulseaudio, with it about 1,4GB.

I don't use a special wake-word engine. Vosk does a good job of only detecting the words/phrases I predefine. This simpifies everything. SEPIA is a generic solution, therefore has more problems. Vosk has no problems with music at all, only if a speaker in the radio uses the wake-word. My default is "radio", which is a very bad choice btw, but it surprisingly works very good anyhow.

The speaker is only next to the microphone in my (small) test-setup. My "production" radio is attached to an AV-receiver, the respeaker on a dedicated system. A Pi-Zero-2 is enough and mostly idle.

BTW: I will link to your station-list in my Readme, so users can copy urls they want to have.

Controlling Pi-Webradio from SEPIA should be straightforward, since the API is very simple.

fquirin commented 2 years ago

Chrome does not run on headless systems.

I'm not sure if I follow here :thinking: . I'm using Chrome headless on RPi3 and RPi4 via Xvfb and it even works on Zero (though I recommend Zero 2 ^^). About Pulseaudio. Ultimately I decided to switch because it can handle simultaneous input/output much better (and Bluetooth). Besides that I was starting to get problems related to ALSA somewhere between Chrome 87 and 92, maybe because it became the new default for Raspberry Pi OS last year, though this refers only to the desktop version.

SEPIA is a generic solution, therefore has more problems

True, but less vocabulary also usually means higher risk of false positives because its more likely to match similar words :-/. Well its a tricky beast :sweat_smile:

My "production" radio is attached to an AV-receiver, the respeaker on a dedicated system

I think this will actually improve ASR considerably depending on the distance (and objects in between) :slightly_smiling_face:

BTW: I will link to your station-list in my Readme, so users can copy urls they want to have.

:slightly_smiling_face: :+1:

Controlling Pi-Webradio from SEPIA should be straightforward, since the API is very simple.

Btw, what to you use to communicate between the web interface and the hardware? For SEPIA I wrote CLEXI a Node.js WebSocket server to control the headless client remotely ... well initially it was just for Bluetooth LE beacon support but now it handles a bunch of tasks including LED control since v0.9.0 :slightly_smiling_face: