Home alarm clock update – now with streaming audio

As mentioned in Home alarm clock update, I’d like to work with Snapcast.

Well, right off the bat, all the instructions for getting the Snapcast client to work automatically, did not. When I say “automatically” I mean that after I reboot the machine, I simply want the Snapcast client running without me having to do anything else. There were suggestions about making it a system service, and a user service, and none of those worked. I’m pretty sure it has something to do with my logged-in user having an environment which is different from what systemd or cron sees.

KAlarm to the rescue!

It has an option to launch stuff after reboot. That’s what I needed.

snapclient --host <IP address of MPD server goes here>

It does take a few seconds after reboot for KAlarm to figure out to run this command. But as soon as it does, my machine (whichever machine) taps into the stream, and music starts playing out. But because KAlarm doesn’t launch until after everything in KDE is up and running, I’m not having these weird errors where the Snapcast client cannot see the stream or the audio devices to play it out.

This is great.

However, what about my alarms? Those are music files too (well, sometimes a TTS wave file). The multiplexing nature of computer audio would have the two playing simultaneously. That is less than ideal.

Turns out that VLC has an option for exiting nicely after playing a file. Add a couple of MPC commands, and we’re golden. The magic command for VLC is rc --play-and-exit

I did have to install the MPC client (for controlling MPD servers) on my machines.

But now my KAlarm commands look like this:

mpc --host <IP address> pause
vlc --intf rc --play-and-exit /path/to/friday_morning.pls
mpc --host <IP address> play

I can queue up a whole stream of music files as background music, using Cantata, and when it comes time for my alarm to fire, to let me know it is time for the next event, the background music pauses through the whole house, the alarm does its thing, and then the background music resumes.

This is so neat. I am having fun with my computers again. 🙂

And I enjoy hearing the London Philharmonic Orchestra playing Sonic the Hedgehog: a Symphonic Suite and Elder Scrolls – Skyrim: Far Horizons. The Elder Scrolls V: Skyrim: Original Game Soundtrack has some great orchestral music. And now my whole house is filled with it.

The surveillance state makes things screwy

One of my volunteer service opportunities is to record speakers at meetings and then put the recordings on a website. I use the Sony ICD-UX570 Digital Voice Recorder, which I’ve talked about before. I take the MP3 file and edit it using Audacity, trimming off everything before and after the speaker. Then I export the audio with a smaller bitrate to make a smaller file. Lastly, I rename it and upload it.

Today, a friend called me, and asked if I could burn a recording to CD. His friend, the gentleman who spoke, is almost 80 years old, and he would be best served with a physical CD – none of this Podcast Feed nonsense or USB stick which his truck may or may not be able to use. Sure, I said. This should be easy.

Okay, first I tried Fedora Workstation KDE Spin and got errors. I tried Brasero first, but it was super grumpy. Then I tried K3B which is my old favorite, and it was grumpy too.

I gave up and went to a Windows laptop. Did I want to use Microsoft Windows Media Player or Apple iTunes?

I went with iTunes because I’m not a fan of anything Microsoft.

Freaking iTunes worked, but….

What the hell is the name on this CD?

audiocd:/Philip Kerr – 01 – Game Over – Track 01.wav?device=/dev/sr0

At 80 years old, I’d be acutely aware of my mortality.

Oh! That is certainly what I want this 80-year-old man to see when he pops this gift CD into his truck CD player display:

Philip Kerr - 01 - Game Over

If I’m him, there’s no way I don’t think to myself: What the hell? And then he’d have to say some Hail Mary’s to apologize to God for the cursing.

This gentleman’s name is not Philip Kerr. I did write his name in the various properties fields in iTunes. None of those appear to have come over.

I know that the music industry wants to keep tabs on every sound file ever, so they can in theory collect royalties. But this was my recording, done live and in-person.

This is just screwy.

And apparently, this isn’t a problem on the CD, it is a problem in Fedora. I didn’t know that yet. All I got was the Orwellian vibes.


Okay, back to Fedora KDE Spin.

Ooooooooffffffff.

Thank goodness for Perplexity.AI. It turns out to only be an 8 step problem.

One: Check group memberships – must be a member of cdrom – I’m good

Two: Adjust K3B settings

K3B > Settings > Configure K3B > Programs > Permissions > Change Permissions > Apply

Three: Add a system policy

sudo vim /etc/polkit-1/rules.d/85-cdrecord.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
subject.isInGroup("cdrom")) {
return polkit.Result.YES;
}
});

Four: Restart services

sudo systemctl restart polkit

Five: Update udev rules

sudo vim /etc/udev/rules.d/99-cd-burner.rules
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", MODE="0660", GROUP="cdrom"

Six: Reload udev rules

sudo udevadm control --reload-rules

Seven: reboot the computer.

Eight: try to burn the CD with K3B.

Thank goodness it worked.

I had forgotten that CDs are as small as they are. The older gentleman actually had two recordings on file, one for 45 minutes and another for 55 minutes. That’s too much for a single audio CD. Heh.

AI is getting good

Perplexity AI is proving to be a much better search engine than Google. It is astonishing.

For several years now, Google has been shooting themselves in the foot by trying to reform society through tainting search results. Accordingly, their search results have gone to shit. There are numerous examples of A/B tests against Google search: getting uplifting / supportive results when the female gender is the search, but getting condemning / demoralizing results when the male gender is the search. Ditto A/B test searches for Democrats versus Republicans, and Hillary Clinton versus Donald Trump.

Okay, I’m done: I have replaced my search engine in all my browsers with Perplexity AI.

So while Google was going to shit, Large Language Models became capable. Jeff Bezos of Amazon spun up his own, trained it, and is now putting it out there as Perplexity AI. They have a commercial license for $20 per month, which is too rich for my blood. If they had a $5 per month plan, I’d pay for it now.

But currently, I’m freeloading. I do pay for Twitter, so I might start using Grok (Grok3 just came out) instead. I prefer to spread my activity over different services. Yet, I feel that freeloading is something I don’t like in other people; therefore, if I want to live a high integrity life, I shouldn’t be a freeloader. Anyway….

Today I get to do the minutes for a monthly meeting that I am Recording Secretary for.

On my Windows machine that plays nice with the Sony ICD-UX570 Digital Voice Recorder, I uploaded the recorded MP3 file to Nextcloud. It syncs to the server, and the file ends up in my folder where all these recorded MP3s go. That folder syncs to my main machine I’m working on now.

I had that moment of inspiration that finding these files / messing with the folders is more trouble than it should be. I’m in these folders a lot. Windows has a “Favorites” feature, surely KDE has such too?

Asking of Perplexity AI “does KDE Dolphin have a Favorites feature” instantly took me to a page which presented a ZD Net article “How to use KDE Plasma Places for a much more efficient desktop“. This is precisely what I was looking for, yet I had no idea that it was called Places.

This is great. Google search might have gotten me to this page eventually, but I doubt that I’d have gotten to it without going through many different page views (thereby increasing Google’s ad revenue).

And yes, I’ve asked Perplexity AI to generate a Perl program for reading a Nextcloud calendar, and it took no time at all to do it. Now, the program did not work….

But troubleshooting the problem with Perplexity AI was pretty easy. It suggested I try curl and that worked perfectly.

As it turns out, Nextcloud doesn’t play nice with Net::CalDAVTalk.

Whether this is a problem with Nextcloud (which doesn’t try to do anything on its own – it uses SaberDAV underneath) or this is a problem with Net::CalDAVTalk isn’t a terribly fruitful pursuit. What is almost trivial to do is to ask Perplexity AI to generate the Perl program without Net::CalDAVTalk. The whole thing can be done with HTTP::Request, LWP::UserAgent, and XML::LibXML.

It is astonishing how well this is working, and how quickly this change is taking place.