ELECINF344/381

Partie interactive du site pédagogique ELECINF344/ELECINF381 de Télécom ParisTech (occurrence 2011).

Catégories

[Casper] Audio in/out on the beagleboard, and drivers

Audio in/out

As I said in a previous post, we are now able to synthesize speech from a text input, and play the result directly on the audio output jack using a home-made interface between the synthesis engine and alsa.

We had also to port our speech recognition hello-world on the beagleboard. We first compiled the CMU Pocketsphinx library for the board, that is to say for an arm target, and then the hello-world program.

The program successfully recognized commands we recorded and played on the laptop, while having the beagleboard’s audio input connected to the laptop’s headset output by an appropriate cable.

We now have to interface electronically our microphones to the beagleboard’s audio input.

 

Drivers

Apart from the progress in the audio, we also managed to compile a linux kernel module hello world on the board, despite the current custom kernel’s lack of certain header files.
The helloworld ran properly, and we were able to write a string to it, and read it back.

The next step will be to start developing our custom linux device driver, responsible for casper’s mechanical control.

[CASPER] : text-to-speech on the beagleboard

Here is a little summary of what has been done today, regarding the text-to-speech on the beagleboard.

Audio with alsa on the beagleboard

First, I would like to explain the step we followed to get the audio output to work on the beagleboard without damaging the TPS6595, which manages the audio, but also the power supply (now I am sure that you understand the reason why we should not burn this one down).

We have on our SD card a bootstrapped version of the ubuntu linux distribution, with alsa installed.

To get alsa to work without being the superuser, you have to add the normal user to the audio group, and reboot the beagleboard.

Then, open the alsamixer program.

Here is was you SHOULD NOT do, despite it is being advised on some forums : enable each and every device in alsamixer.
This will cause the TPS6595 chip to overheat, and may damage it.

 

What you should do is enable only what is necessary :

  • Increase the volume of the DAC2 analog; DAC2 digital coarse and DAC2 digital fine.
  • Increase the volume of the headset
  • Enable headsetL2 and headsetR2

You should now have a working audio output.

 

Text-to-speech

In order for our whole application to work properly on the board, we decided not to use pulseaudio (which requires up to 40% of the CPU on the board). We decided to implement our own interface for the audio output, which would handle all the write requests from internal threads such as the text-to-speech engine’s thread. This interface would store the corresponding samples, pre-process them in order to fit alsa’s interleaved pcm format, and play them on the audio output.

We were able to test successfully this interface today, by synthesizing speech with SVOX pico on the beagleboard, and playing it simultaneously on the audio output.

The whole process requires 30% of the cpu during a short period (synthesis/samples post) and then 0/0.7% of the CPU during the rest of the the process, which is good news compared to the 40% CPU minimum required during the whole process in our previous experiments.

The next step will be to port the CMU Sphinx recognition helloworld we designed to the beagleboard.

[CASPER] Reconnaissance vocale et synthèse

Bonjour à tous.

Comme vous le savez déjà pour la plupart, nous avons montré Mercredi que nous étions désormais capables d’effectuer une reconnaissance vocale performante en Anglais, en utilisant la librairie CMU Pocketsphinx.

Cette librairie permet la reconnaissance de phrases complètes, ce qui permet de bénéficier d’une bonne qualité de détection en prenant mieux en compte la nature du langage. Afin d’améliorer la détection des commandes, nous avons généré à partir des outils fournis avec pocketsphinx un dictionnaire et un modèle de langage qui ne contiennent que les mots dont nous avons besoin.

Nous souhaiterions générer ce type de dictionnaire/modèle de langage pour le Français, ce qui s’avère plus compliqué étant donné qu’il n’existe pas encore d’outils réalisant ce travail.

 

En ce qui concerne la synthèse vocale, notre choix s’est porté sur l’excellente librairie SVOX Pico, qui fait déjà ses preuves sur les téléphones Android (avis aux amateurs voulant l’essayer).

La voix est, en comparaison avec d’autres solutions libres, naturelle et fluide. Cette bibliothèque supporte l’anglais (US et GB), l’allemand, le français, l’espagnol et l’italien. Nous avons à présent un Hello world fonctionnel qui synthétise la voix correspondant à un texte (stocké en dur dans le code pour le moment) et qui envoie les échantillons directement à pulseaudio pour une lecture sur haut parleur.

Cette bibliothèque nous laisse entrevoir la possibilité de lire des messages dans les 5 langues précédemment citées, ce qui pourrait donner une valeur ajoutée intéressante au projet.

 

Il nous reste à porter tous ces programmes sur la beagleboard et mesurer leurs performances respectives, en terme d’occupation mémoire et de temps de calcul.