Mbrola – etwas bessere Sprachsynthese

ESpeak kennt Ihr sicher alle. Diese Roboterstimme, die beim Desktop dabei ist, damit sehbehinderte Menschen einen Bildschirmleser haben können. Jetzt ist espeak aber nicht wirklich toll 🙂

Mbrola – etwas bessere Sprachsynthese

Mbrola wird in einigen Distors, wie bspw. Fedora, nicht ausgeliefert, da die Lizenzen und deren Verständnis dies nicht zu lassen. Wer das selbst austesten möchte, kann sich die nötigen Files hier runterziehen:

https://github.com/numediart/MBROLA

https://github.com/numediart/MBROLA-voices

Mbrola muß kurz kompiliert werden, aber das ist selbst für Anfänger leicht zu meistern, weil es kein kompliziertes Buildsystem gibt und man eigentlich nur den GCC Compiler und CMAKE auf dem Rechner installiert haben muß. Ich bin mir ganz sicher, daß Ihr das alleine schafft 🙂

Nicht? na ok: „cd MBROLA-master; make; cp Bin/mbrola /usr/local/sbin/“ das wars 😀

Die Stimmen kommen nach /usr/shar/mbrola/ , die muß man nicht extra kompilieren.

Um espeak kommt man leider nicht rum

Da mbrola keine Übersetzung von geschriebenem Text in Phonetische Abbildungen macht, muß man das espeak machen lassen. Damit Euch das nicht über den Kopf wächst, habe ich da mal was vorbereitet:

/usr/local/sbin/say:

#!/bin/bash

if [ „$VOICE“ == „“ ]; then
      VOICE=“de5″
fi

if [ ! -f „$1“ ]; then
      espeak -v mb-$VOICE -q –pho –phonout=/tmp/out.pho „$1“
else
      A=$(cat „$1“)
      espeak -v mb-$VOICE -q –pho –phonout=/tmp/out.pho „$A“
fi

mbrola -t 1.2 -f 0.8 /usr/share/mbrola/$VOICE/$VOICE /tmp/out.pho -.au | aplay 1>/dev/null 2>/dev/null
rm -f /tmp/out.pho

Die Datei noch mit chmod 755 aufrufbar machen und wir sind fertig.

Um die Anwendung zu vereinfachen kann man entweder eine Datei als Argument angeben oder den Text:

say „Ich bin ein Roboter.“

say Bunte-Schafe-von-Arthur-Miller.txt

Die Stimme ist auf die de5 Stimme voreingestellt, es geht aber auch jede andere Sprache:

env VOICE=de7 say text

Die Aussprache kann man noch stark verbessern. Beispiel: Das Wort „Zumutung“.Versucht mal diesen Satz:

say „Dies ist eine Zumutung“

und dann schreibt ihn mal so:

say „Diehs ihst eine Zumuhtung“

Ihr werdet den Unterschied heraushören können. Genauso ist es mit „gähnt“ und „gehnt“, weil das „ä“ überbetont wird. Es klingt wirklich besser es pauschal mit „e“ zu ersetzen. Wenn man sich dann erst einmal eine Datenbank mit „besseren“ Worten zusammen gesetzt hat, kann man das Script so erweitern, daß vor dem espeak aufruf, erst noch die Ersetzung passiert. Von einer SED Orgie kann ich aber nur abraten. Lasst dies besser ein spezialisiertes Programm wie „replace“ machen oder schreibt gleich ein eigenes kleines C Tool, daß sich eine Art Datenbank einliest.

Viel Spaß damit 😀

Heißt es bald „Fedora Linux“?

Matthew Miller, seines Zeichens Fedora Project Leader, hat heute einen Änderungsantrag eingebracht, daß „Fedora“ ab Fedora 35 „Fedora Linux“ heißen soll.

Heißt es bald „Fedora Linux“?

Z.Z. ist es nur ein Antrag, aber Ihr könnt Euch sicher denken, daß es einige Pro’s und Contra’s auf der Entwickler Liste von Fedora gibt, ja gibt, denn noch ist die Diskussion in der Anfangsphase.

Die These lautet:

„Fedora“ is the name of our project. Our general-purpose Linux distribution is „Fedora Linux“. Let’s refer to it that way in the OS itself.

Meint also, Fedora bezeichnet alles was im Fedora Projekt gemacht wird, und die Linux Distribution Fedora ist ein Teil vom Projekt, deswegen müßte dieser Teil einen Zusatz haben um das anzuzeigen.

Note: Fedora is made of people! When used by itself, the term „Fedora“ refers to the Fedora Project. When referring to our work, please use either a specific name like Fedora Workstation, Fedora CoreOS, or Fedora KDE Plasma Desktop; or use Fedora Linux to refer to the OS distribution as a whole.

Die Änderung an sich wäre übrigens nur minimal sichtbar, z.b. im Loginprompt in der Konsole, im Text der /etc/os-release Information und ggf. in dem einen oder anderen Logo.

Was ich nicht ganz verstehe an der Argumentation oben ist, daß wenn doch alle Teile von Fedora auf eine Distribution abzielen, z.B. der KDE Desktop Teil, das CoreOS usw., warum sollte dann die Distribution nicht den Namen nehmen, der für all das steht?

Eine Reaktion wollte ich Euch nicht vorenthalten, die halte ich auch für valide:

This doesn’t seem to solve any real world problem, there is nothing wrong with just leaving it as is.

Den ganzen Änderungsantrag kann man hier einsehen:

https://fedoraproject.org/wiki/Changes/Fedora_Linux_in_os-release

PS: Muß ich dann eigentlich meine Kategorie im Blog auf „Fedora Linux“ ändern? Nicht lachen, daß wird gerade für getfedora.org gefragt, und da ist tatsächlich was dran, weil wenn schon, dann richtig.

Pinephone: Breakthrou on Fedora Pinephones

For all my normal readers, these are exceptional news, so we have to use english 😉

As you may know, Matrix is a chatprotocol which you can used with various clients, even as webapplications. As a webapplication you can make use of webfeatures like WEBRTC to open audio & video chats with End-2-EndCryption ( E2EC in matrix terms ).

On my tests to get a fully featured matrix client for the Pinephone, I had the idea to simply use firefox and chromium to access a self-hosted webinstance of the element-web client. It’s basically the same idea that Schildichat and others are using in form of an electron application, which you can install on your pc. Electron apps ship a special version of the Chromium browser with some html and javascript files as a package, i.e. inside a flatpak.

Pinephone: Breakthrou on Fedora Pinephones

As to the current date, no tested application on the normal Fedora aarch64 repo was capable of accessing the video cameras on the Pinephone, besides the specially crafted megapixels. Megapixels just takes pictures atm, so we had no working video solution.

Firefox makes a good matrix webclient ui and I knew from earlier tests, that in a WEBRTC session audio works good. Firefox can easily be made a clickable „Matrix“ icon the desktop by creating a matching desktopfile in :

    [Desktop Entry]
    Version=1.0
    Name=Matrix Web
    Comment=Directlink
    GenericName=Matrix Web
    Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox-wayland %U https://HOMESERVERNAME/web/
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=/home/pine/images/matrix-logo.png
    Categories=Network;WebBrowser;
    MimeType=text/html;
    StartupWMClass=chromium-browser
    Keywords=web;browser;internet;
    X-Desktop-File-Install-Version=0.26

The URL needs to point to the web client and Javascript needs to be enabled. You may notice the V4L2 env vars, they are step one to enable gpu acceleration. If you run NoScript in your Firefox make the necessary adjustments and your on track. I tested audio calls and they worked as expected, so I thought to myself: „why not“ and hit the video call button.

It does not only sound like an accident, it was 🙂 To our all very great surprise the Pinephone cameras went on and presented a live YUYV image from the ov5640 camera chip. There is a theory how Firefox did it, but that needs further investigations 😉

You can mark the 4th of march, 2021 11:07 CET as the time and date, that first video call (we know of) was done \o/

The other side of such a call looked like this, and actually this also was a surprise, as we got full colors from the image:

The first reaction on the global Pinephone chat was amazing:

aluizioneto

Marius
Breaking News .. Video Chat via Matrix from Pinephone WORKING 😆
Very nice!!! That would solve everything for me. Where is my PP CE?? 😃

A great moment for Pinephone users 🙂

But, there is still much to be done here. Firefox on Pinephone does not have hw acceleration in use yet, so it took all 4 cpu cores on the phone to do that call and it was still not enough processing power, as the audio part was interrupted and lagging behind. Atm Mr. Stransky is helping out to fully enable the allwinner GPU for Firefox. You need to now, that we already have a working libva driver for the Allwinner soc, called libva-request.

MPV is already using this lib to decode FullHD MP4 movies on my Pinephone with next to 0 frame drops. The amount of power consumption has dropped significantly too, so it’s possible to watch a full length movie without running out of juice. The Pinephone is using 3.6 Watt if all cpu cores are running, which results in app. 2 hours until the battery is drained. With the help of the gpu this is no longer the case, as the power consumption got down to around 2 Watt, doubling the life time of a full battery charge.

When Firefox is using the gpu and we have a better performance, it will be possible to make a videocall and leave the house without a mobile powerbank 😉

We have to thank many contributors to made this happen, in special the Fedora SIG Mobility team members who are massively testing and updating packages for Pinephone and PineTab.

I hope, that we all can see us in a Pinephone driven smooth Videoconference soon 😉

if you wanne see a video taped in the pine, check this article on the bottom:

Pinephone: Willkommen bei Element