Kicou

Random thoughts and ramblings

Sometimes I want to listen to written news articles, because I am doing several things at the same time and I don't want to be stuck reading the content of one unique tab.

Firefox has a Reader View mode that is pleasing to the eye, and that can also read text aloud using the speech-dispatcher TTS (text to speech) service provided by Linux.

Speech-dispatcher can use a multitude of TTS engines, but the ones historically available in Linux sounded unnatural. Until recently.

The robotic voice days are over, and natural sounding speech synthesis is now available to Linux users without the need to connect to online services like Google Translate's engine.

Nabu Casa, the company behind Home Assistant, is sponsoring Piper, an open source TTS engine under MIT Licence, so that the Home Assistant automation system can have its own voice assistant.

There is also Mycroft's Mimic3 engine, but for the time being it is only available as a cloud option, so I am ruling it out. There will be an offline version available at some point in time.

Both Piper and Mimic3 came from the need to integrate voice assistants running on a Raspberry Pi, so they can run on low spec systems.

I installed Piper on my Fedora 39 laptop and I am very satisfied with the results.

Here is how I did it:

Download latest release from the Piper project page: https://github.com/rhasspy/piper

Releases are here: https://github.com/rhasspy/piper/releases
Get the package that corresponds to your CPU architecture. For instance, if on an Intel/AMD architecture:

wget https://github.com/rhasspy/piper/releases/download/2023.9.27-1/piper_linux_x64.tar.gz

Extract the package in /opt.

cd /opt
tar xvf /path/to/piper_linux_x64.tar.gz

Listen to voice models and download the ones you like from https://rhasspy.github.io/piper-samples/

Piper is more than just a TTS engine, but this is how I am going to use it, so all I need is existing pre-trained voice models.

Download the onnx and onnx.jason files that correspond to the voices you have selected. For instance, if you want an English US (North American accent) and a French voice, you could pick: Lessac (en_US)

wget https://huggingface.co/rhasspy/piper-voices/blob/main/en/en_US/lessac/high/en_US-lessac-medium.onnx
wget https://huggingface.co/rhasspy/piper-voices/blob/main/en/en_US/lessac/high/en_US-lessac-medium.onnx.json

and UPMC Jessica (fr_FR)

wget https://huggingface.co/rhasspy/piper-voices/blob/main/fr/fr_FR/upmc/medium/fr_FR-upmc-medium.onnx
https://huggingface.co/rhasspy/piper-voices/blob/main/fr/fr_FR/upmc/medium/fr_FR-upmc-medium.onnx.json

Place model files in /opt/piper/models (you may have to create this directory manually).

Create local speech-dispatcher configuration

As a regular desktop user (i.e. not root), create the directory ~/.conf/speech-dispatcher and subdirectory ~/.conf/speech-dispatcher/modules.

Create the file ~/.conf/speech-dispatcher/modules/piper.conf with the following content:

#English US
AddVoice	"en"			"FEMALE1"	"en_US-lessac-medium"
AddVoice	"en_US"		"FEMALE1"	"en_US-lessac-medium"

#French FR
AddVoice	 "fr"			"FEMALE1"	"fr_FR-upmc-medium"
AddVoice	 "fr_FR"		"FEMALE1"	"fr_FR-upmc-medium"

DefaultVoice "en_US-lessac-medium"

GenericExecuteSynth "echo \'$DATA\' | /opt/piper/piper --model /opt/piper/models/$VOICE.onnx --output_raw | aplay -r 22050 -f S16_LE -t raw - "

Create the file ~/.conf/speech-dispatcher/speechd.conf with the following content:

AddModule "piper" "sd_generic" "/home/username/.config/speech-dispatcher/modules/piper.conf"

DefaultModule piper
AudioOutputMethod "pulse"
AudioPulseDevice "default"

Don't forget to replace username with the actual user name.

Reboot

This may not be needed but it could save you some headaches.

Log back in

Test speech synthesis with default voice: spd-say "This is a speech synthesis test"

If this worked, then start Firefox, open a news article in Reader View, and press 'N' to listen to it. You should now be able to have nice quality TTS for articles in French and English.

“I don't get it, you could make $200k a year if you put some effort into it”

Well, perhaps we have different priorities in life and do not define success in the same manner.

Maybe we need a little bit of personal history here:

  • I was abused from age 5 to 15+
  • the abuse was constant, it was mostly physical and psychological
  • I also suffered abuse of sexual nature, but the way it happened was not systemic and was perpetrated by a different abuser —somehow it did not cause as much trauma
  • I was homeless at 15 and managed to make it through high-school without my teachers or schoolmates knowing about it (or at least I like to think that I successfully concealed my situation at the time); I remember it as a happy part of my life because it was also a period of great freedom

As a result of this far-from-ideal start in life, I suffer from physical and psychological consequences that still affect my daily life as of today.

Read more...

I ordered the Purism Librem 5 Linux phone in January 2019 and it finally arrived, just shy of four years later.

When I placed my order I already knew it would be an under-spec'd device compared to any other 2018-2019 Android or Apple device, but the gap is even wider as 2023 is on the horizon.

However, a low-performance device is not necessarily a bad thing: Linux on a consumer-grade mobile is still a very new concept, and running a usable phone is still new territory for Linux.

Although the Librem 5 is a decently built device with “good enough” specifications on paper, the challenge of developing a platform suitable as a daily driver for a pocket multi-function device (let's face it: it's still called a phone, but that is not its main usage anymore) is to meet the increasingly demanding expectations of modern-day users, especially in comparison to the two prominent mobile competing platforms: Alphabet's Android and Apple's iOS/iPadOS.

Linux is a good multipurpose OS: it shines on servers. Linux probably runs 99% of the internet, enjoys a quasi-monopoly in cloud computing, and is also leading in the embedded/IoT arena.

The problem with Linux on “smart” phones is twofold:

  1. In order to be good, both in terms of processing power and energy efficiency, the operating system needs to be tightly integrated with the hardware. Up until now, a very select number of chip makers like Qualcomm are dominating the scene; their technologies are not only proprietary, but they also don't have open specifications. This means that they are black boxes with very controlled access points, which goes against the libre software philosophy, and raises questions regarding the user's privacy: who knows what really happens behind the scenes? So the nascent market of Linux phones had to settle for components that were open, both in specs and in licencing. This first point means that —at least for this first generation of hardware— there is a trade-off both in terms of performance and power consumption: we are still at the foundation level where the “Linux for phone devices” stack is being built and integrated with components that are specific to a battery-powered hand-held device.

  2. The user interface for a 6” inch touch-screen device does not exist yet (at least it did not exist in 2018-2019). The PinePhone and even more so the Purism Librem5 initiatives have helped Open Source software make great strides in a matter of four years, and we are starting to see working proofs-of-concept such as the PinePhone Pro and the Librem5 that run OSes like Purism OS or Postmarket OS, with libraries like Purism-backed Phosh, as well as integration with the imaging and radio modules. There is still work to do, especially with hardware acceleration and full hardware support, but I would say that at the eve of 2023 we have reached a stage where we can consider these devices as “working and somewhat usable prototypes”.

I bought a Pinephone BraveHeart edition when it came out (the very first version that looked like a phone) but I didn't have much time to play with it; making it work was very involved (very similar to fiddling with a PinebookPro, with which it shares a lot of similarities), and I have to say that it is under-powered. I see it more like a development platform than a potential daily driver.

I already knew that when I bought it, but as a non-developer let's say that it is my way to help the cause of privacy-conscious Open Source operating systems on mobile devices. In the meantime the Pinephone Pro was released, but since I already had a Librem 5 on order, I did not even bother: both the Librem 5 and the Pinephone Pro, despite being different in design, are very similar in terms of hardware specifications and expectations.

Granted, these phones are not state-of-the-art and lack in performance, but as I said earlier: it is a good thing when it comes to programming a new stack for them, because code will thus have to be optimised to run well, which means that in the end it will fly when it has to run on more powerful hardware.

So here I am, now the proud owner of a brand new four-year-old device that I just received yesterday. I have already started playing with it a little bit, and here are my first impressions:

  1. It is bulky, but not outrageously so: it feels like a current phone with a shock-proof case. Except that it has no case.

  2. It feels well built. Although being very plasticky, it feels much sturdier than the Pinephone. But we are not comparing apples to apples: the Pinephone costs USD$199, the Librem 5 USD$899 (I purchased it when it was USD$699).

  3. It feels like it could become my main device with the current hardware. There is sill work to do on the software side, especially in terms of UI, but it runs decently and the underlying OS feels very capable and familiar.

  4. At its current stage, the Librem5 feels more like a full-featured small computer in the shape of the phone, which is both good and bad. It is good because I can ssh into it and I immediately feel like I am on one of my servers, with all the tools and package presents: this will be easy to manage. The bad is that it feels like a computer, and not like a phone: the interface is OK, but not suitable for daily usage in the palm of your hands. You still feel like if you want to accomplish anything you need to take your laptop and ssh into the phone.

I have barely touched it so far, but here are my first remarks:

  • I ran an apt update, apt upgrade to have the base OS up to date
  • I installed and enabled openssh-server
  • The touch keyboard is OK as long as you don't want to type accented characters—I wasn't able to find how to input éàÇÊö without switching to an AZERTY layout, except that I do not wish to use the French AZERTY keyboard
  • I have read reports that you must not insert/remove your SIM card while the power is on, or it will fry your card —I'll remember not to do that
  • I installed and enabled tuned, and run it in powersave mode to help with battery usage
  • I set up email (IMAP/S, SMTP/S) with no issues (the mail client is Geary)
  • In the “Calls” app, I set up my VoIP account (voip.ms, with SIP, TLS) and it kind of works —more on this in a later post
  • Playing Youtube videos in Firefox just works. I think the videos are hardware-accelerated: they were smooth and did not stutter
  • The UI is responsive, but feels a bit laggy at times. It also shows that this is a desktop UI adapted to mobile. It is getting better, but we are not 100% there yet

So basically I can already use it to place/take calls, and to send and receive email. This is already an excellent start.

That's it for now, I'll come back with more at a later time (or maybe not, don't hold your breath.)

#Life #MentalHealth #SocialMedia

Five years ago I was in a mental institution, undergoing treatment. It was an eight-week inpatient program for people with PTSD.

I was about half-way through it and was already starting to feel positive changes. I was on my laptop, trying to figure out how to get rid of the toxicity in my life.

Work was an obvious one. It had been a dream job for 12 years, but a year prior the company had “merged” with a bigger one located 350 kilometres away, and things had been going south since then. But I was on medical leave, so now was not the time to deal with it. I had plans, but they could wait.

One more immediate concern was social media and the stress it brought to my life. I was not an avid user but there is this push-pull relationship with Twitter and Facebook. You are force-fed posts according to algorithms that are designed to elicit “engagement” through strong emotions like admiration, envy, shock, outrage —mostly shock and outrage. So there is this urge to react to other people's posts, but also to share “interesting” things about your own life with the hope to get some feedback in return, either in the form of praise or dissent.

Read more...

#Windows #Linux #KVM #Libvirt

This procedure has been tested in Arch Linux. Other distributions may have slightly different package requirements or naming conventions.

Required packages

  • swtpm — provides TPM 2.0
  • edk2-ovmf — provides EFI/Secureboot filesystem image

ISO images needed

Extract Windows OEM product key from host system

If the system was shipped with a pre-installed Windows OS, it has the Windows licencing information in BIOS

$ sudo strings /sys/firmware/acpi/tables/MSDM
MSDMU
TLENOVOTP-N32  p
PTEC
AAAA1-AAAAA-AAAA1-1A1AA-11AA1 ← not my real product key

The last line is the product key

Read more...

The abuse lasted 15 years and this is why my head is so messed up today. I was only a kid. I had no point of reference, I didn't know right from wrong. I didn't think my life was unusual because it was all I knew.

I won't recount what was done to me, this is not the place. If you want to have a glimpse, check the ACE (Adverse Childhood Experiences) scale: it ranges from 0 to 10 —0 being no form of abuse and 10 being the worst. A score of 4 ore more is considered very serious and at the source of long-term health effects in adult life.

I have a score of 8.

The wildest thing is that I only realised that I had suffered severe childhood abuse when I reached the age of 40. At which point my world collapsed.

Read more...

We have a thermometer/hygrometer kit to keep track data:

  • outside (sensor is under the deck)
  • in the greenhouse
  • in the garage (we had a third sensor, so we might as well put it somewhere)
  • inside (the display base has internal sensors)

Home Assistant temperature tile

It is actually easy to capture and decode RF signals using a DVB-T USB dongle, the RTL-SDR driver and the RTL-433 decoding software.

Read more...

Mrs Kicou was getting a bit antsy: having lost her job and being stuck at home, she needed something to keep herself busy. So she drew plans for a greenhouse and looked up buiding supplies all the while trying to keep cost down. With lock-down restrictions we weren't able to check the lumber in person, so we ordered everything on line.

To avoid the need for a building permit we made it just under 100 sq ft: technically the greenhouse is a free-standing garden shed, i.e. it is structurally independent from the house. The only thing that is attached to the house is some flashing tape to close the gap between the garage wall and the greenhouse roof.

We didn't go crazy with the polycarbonate: there is no way we can insulate the greenhouse properly against the Winter cold, so we just went for regular corrugated panels.

Read more...

In the Spring of 1992 I was a student and I wanted to learn about UNIX systems. I was looking for Minix, found 386BSD and Linux. Most of my fellow students adopted 386BSD because we used Sony NewsOS (a BSD-flavour UNIX) stations at school but 386BSD required SCSI disks, I couldn't afford a SCSI controller + hard drive.

So I downloaded the Boot and Root floppy images of Linux 0.95 and this is how I became a Linux user.

Currently, my daily desktop distributions are Pop!_OS (an Ubuntu derivative) and Manjaro ARM64. I have used SLS, Slackware, Debian, Yggdrasil, Mandrake, Fedora, RedHat. I tend to distro-hop a lot less nowadays. For production systems I deploy Ubuntu and Redhat/CentOS.

I have worked for several IT services companies, large and small: I prefer small ones because they are run by humans.

The last company I worked for was a small shop specialising in Linux and Open Source solutions. But the founders retired and sold to a larger MSP that only does Windows, and from then on things went downhill.

After 12 years I resigned and became self-employed. So far I have no regrets.

#JitsiMeet #Videoconferencing

2022-03 update: This post is now obsolete. Current versions of Jitsi Meet now display participants' names as expected. I am leaving this post up because it may provide hints as to how to customise the display of your Jitsi instance.

When using the tile view in a Jitsi Meet video-conference, I find it annoying that you cannot see people's names unless you hover over the person's tile with the mouse cursor.

I mean, it is OK for a 5-person conference where you know everybody, but when communicating with 20 people at once it is nice to be able to tell who is who at a glance. Hovering over thumbnails is not very practical.

I don't understand why Jitsi Meet does not make names visible at all times. It would be nice if it was at least a server setting. Alas it is not.

But all hope is not lost: there is an easy way to enable permanent name display without having to rebuild Jitsi Meet. All it takes is a couple of CSS file edits on the server:

Read more...