Revision [2034]

This is an old revision of ReconnaissanceVocaleEnregistrement made by BenoitAudouard on 2008-07-23 23:34:51.

 

ReconnaissanceVocale > enregistrement

Pour enregistrer sa voix, rien de tel que

Utilisation de microphone pour enregistrer sa voix

Dommage, le microphone associé à la webcam sur mon portable ne semble pas reconnu :/ (ah bin si en fait ça a l'air de fonctionner avec qaRecord... il n'apparaissait pas avec lspci ni lspcidrake, comme quoi avoir plusieurs outils dont un avec une représentation graphique permet de voir le niveau sonore).
Je n'ai pas de micro (ou de casque+micro), donc pas de possibilité de le brancher sur la prise jack à l'avant du clavier (de toute façon la prise pour des écouteurs ne marche déjà pas, donc j'ai des doutes).

Heureusement, il me reste une logitech QuickCam Pro 4000 qui a un micro intégré et qui est reconnu, au branchement il apparaît dans /var/log/messages :
usbcore: registered new driver snd-usb-audio

et il est listé par les différents outils, cf. ci-dessous

Bon finalement, trop difficile de sélectionner le micro de la webcam en utilisant la conf' ALSA (sans doute pas super bien supportée par les différents logiciels...), donc comme le micro intégré au portable a l'air de fonctionner correctement, c'est ce que j'utilise. Il me faudrait des écouteurs audios qui fonctionnent (pour éviter l'effet larsen par exemple).

Voir § Réussite de l'enregistrement ci-dessous, utiliser gnome-volume-manager pour activer le micro (muet par défaut au profit de Line-1 va savoir pourquoi...), cela marche tout de suite mieux. Grâce à cela, arecord, audacity, AudioTool, ... fonctionnent .
Un petit script pour vérifier que cela fonctionne (sinon activer le micro... ou diagnostiquer quel programme le bloque)
#!/bin/bash
echo "parler pendant 2s"
arecord -d 2 -f cd -t wav test_son1.wav
aplay test_son1.wav
echo "vous avez entendu quelquechose ou pas ?"


Script de diagnostic du microphone et des haut-parleurs

Mise à jour : il y a un outil speaker-test qui existe, l'installer au besoin : cela joue en permanence en son, ce qui permet de vérifier les branchements déjà, puis au besoin les différents modules (des fichiers .wav sont directement intégrés, ce qui est plus simple que de se baser sur l'installation de supertux).
Vous pouvez aussi utiliser ce script de diagnostic pour afficher plus d'informations. Si nécessaire, en tant que root par (su -) vous pouvez arrêter/relancer le système de gestion du son Vous pouvez avoir les erreurs suivantes : autres tests possibles et quelques explications :
edit : l'utilisation de la webcam est possible en OSS (avec ALSA faudra que je trouve comment :/) et le son est d'un niveau bien plus élevé (pas besoin de retraitement derrière) que le microphone intégré. Il suffit d'utiliser /dev/dsp1 au lieu de /dev/dsp, avec adintool, définir export AUDIODEV=/dev/dsp1 avant de lancer la commande build-bin/adintool -48 -lv 25000 -nosegment -in mic -out file -filename essai6_julius_phone

Outils pour l'enregistrement

Bon, ce qui est bizarre c'est que autant gnome-alsamixer voit bien qu'il y a un périphérique usb permettant d'enregistrer, gnome-sound-recorder n'a pas l'air de savoir le sélectionner :/ donc j'ai regardé avec d'autres outils :
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: HDA Generic [HDA Generic]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: U0x46d0x8b2 [USB Device 0x46d:0x8b2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
default:CARD=Intel
	HDA Intel, HDA Generic
	Default Audio Device
front:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	Front speakers
surround40:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
	HDA Intel, HDA Generic
	7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
	HDA Intel
	IEC958 (S/PDIF) Digital Audio Output
null
	Discard all samples (playback) or generate zero samples (capture)
$ amixer -c 1 # pour la carte 1 (correspondant à l'usb en l'occurence)
Simple mixer control 'Mic',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 3
  Mono: Capture 2 [67%] [50.00dB] [on]
Mixer[0]: "Intel [plughw:0,0]"
	Description: Direct Audio Device: HDA Intel, HDA Generic, HDA Generic
	SourceLineInfo (e.g., speakers):
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, big-endian
	TargetLineInfo (e.g., microphones):
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, big-endian
Mixer[1]: "Java Sound Audio Engine"
	Description: Software mixer and synthesizer
	SourceLineInfo (e.g., speakers):
	    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame, 
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
	    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
	TargetLineInfo (e.g., microphones):
	    none
Mixer[2]: "Port Intel [hw:0]"
	Description: HDA Intel, Generic 14f1 ID 5045
	SourceLineInfo (e.g., speakers):
	    Line source port
	    Mic source port
	TargetLineInfo (e.g., microphones):
	    Master target port


outils testés

Comparer à http://www.01audio-video.com/freeware_editeur_audio.htm

Réussite de l'enregistrement

La configuration du micro doit être correcte dans le contrôleur de volume : sélectionner Mic et non Line-in (qui doit être muet). Contrôleur de volume
la commande amixer montre :
Simple mixer control 'Line',0
Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Limits: Capture 0 - 23
Front Left: Capture 18 [78%] [27.00dB] [off]
Front Right: Capture 18 [78%] [27.00dB] [off]
Simple mixer control 'Mic',0
Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Limits: Capture 0 - 23
Front Left: Capture 18 [78%] [27.00dB] [on]
Front Right: Capture 18 [78%] [27.00dB] [on]

et cela donne comme résultat : AudioTool

Il est possible de configurer le périphérique utilisé avec l'option -Dmicrophone[selectMixer]=0 (pour la carte 0, qui correspond à l'option par défaut) et lancer la commande java -Dmicrophone[selectMixer]=0 -jar bin/AudioTool.jar (remplacer le 0 par 1 ou 2 ou plus selon la carte que vous souhaitez sélectionner).

Pour tester la reconnaissance sur une phrase simple, voir les exemples fournis http://cmusphinx.sourceforge.net/sphinx4/index.html#demos
exécuter java -jar bin/HelloWorld.jar et parler, en disant par exemple "hello rita".

La démo live http://cmusphinx.sourceforge.net/sphinx4/tests/live/README.html peut prendre beaucoup de mémoire (java quoi :/) la lancer par cd sphinx4/tests/live ; ant live après l'avoir compilé par ant (possibilité de modifier le build.xml pour allouer plus de mémoire si nécessaire : j'ai mis maxmemory="500m")




Points à revoir ultérieurement

vol 91, 91
igain 96, 96

et d'autres fois
vol 79, 79
line 100, 100, P
mic 100, 100, R

va comprendre Charles Je ne suis pas le seul à galérer un peu avec le son, quelques remarques pertinentes sur les configurations globales / par application sur :

Autres outils à regarder

c'est plutôt connexe à la ReconnaissanceVocale, simplement parce que je suis tombé dessus en cherchant...
extace
fsv a file system visualizer in cyberspace. It lays out files and directories in three dimensions
Ocrad is an OCR (Optical Character Recognition) program
dasher an information-efficient text-entry interface, driven by natural continuous pointing gestures, competitive text-entry system wherever a full-size keyboard cannot be used
csound jcsound soundspace tritonus (java applications)

CategoryLangFr CategoryHobby
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki