Click here to register.

German

Flat
Testing german with pocketsphinx, hardly no hits
User: Sebbi
Date: 1/18/2013 9:03 am
Views: 17189
Rating: 6

Hi everybody.

I am developing a little app on Android which should partially be controlled by voice commands. As I would like to have offline recognition i've chosen pocketsphinx as my engine. The demo app is up and running and works quite well in English. But as I need german voice commands I put in the apropriate files for german recognition which I found here:

http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/German%20Voxforge/

This also works some kind of, but the system hardly recognizes anything.

I replaced the lm file by a small gram-file looking like this:

______________________________________________

#JSGF V1.0;

/******************************

Grammar generated automatically

******************************/

grammar commands;

public <test> = ( JA | NEIN | WEITER | ZURÜCK | ABBRECHEN ) ;

_________________________________________________

 

 

The corrosponding dictionary file looks like this:

 

_________________________________________________

JA  j aa: 

NEIN  n ai n 

WEITER  v ai t ei 

ZURÜCK  qq t s u:   qq r y:   s e: k aa: 

_________________________________________________

Recognition rate is almost zero.
Does anybody have an idea what I am doing wrong?
Greets, Sebastian

 

 

Re: Testing german with pocketsphinx, hardly no hits
User: nsh
Date: 1/18/2013 9:46 am
Views: 149
Rating: 6

This model is 16khz model

You need to modify demo sources to record audio at 16khz instead of 8khz

You can uncomment rawlogdir in order to store raw files you are trying to recognize to debug accuracy issues.

For more information see the tutorial

http://cmusphinx.sourceforge.net/wiki/tutorial

and the FAQ:

http://cmusphinx.sourceforge.net/wiki/faq

Re: Testing german with pocketsphinx, hardly no hits
User: Visitor
Date: 1/21/2013 12:59 am
Views: 115
Rating: 5

Hi,

thanks for your reply.

Recording is set to 16kHz. (c.setFloat("-samprate", 16000.0);)

OK, as you are directing me directly to the cmusphinx project I assume that you think it is a sphinx specific problem. I'll ask there.

Thank you. 

Re: Testing german with pocketsphinx, hardly no hits
User: nsh
Date: 1/21/2013 2:05 am
Views: 49
Rating: 5

> Recording is set to 16kHz. (c.setFloat("-samprate", 16000.0);)

It is not enough, you also need to set 16khz in microphone recording properties

> as you are directing me directly to the cmusphinx project I assume that you think it is a sphinx specific problem. I'll ask there.

Ok

 

Re: Testing german with pocketsphinx, hardly no hits
User: Visitor
Date: 1/21/2013 4:55 am
Views: 121
Rating: 5

Thanks for that tip. While analyzing the raw files i just found that out by myself.

After changing the recording to the correct sample rate it started to work much better. ;)

this.rec = new AudioRecord(
   MediaRecorder.AudioSource.DEFAULT, 
   16000,
   AudioFormat.CHANNEL_IN_MONO,
   AudioFormat.ENCODING_PCM_16BIT, 16384);

Now it recognizes the words "NEIN", "ZURÜCK" and "WEITER" without problems, but the word "JA" is impossible to hit.

Here my complete configs: http://pastebin.com/rvauhR3L

Logfile output: http://pastebin.com/ywJQ0aDB

Any ideas?

 

 

Re: Testing german with pocketsphinx, hardly no hits
User: nsh
Date: 1/21/2013 5:23 am
Views: 81
Rating: 6

You need to share raw files, not just the log

Accuracy can be usually improved by verifying the dictionary and with adapation of the acoustic model. Most likely the dictionary entry for JA is not correct.

Overall, German Voxforge model is not of the best quality, it can be retrained for improved accuracy.

 

Re: Testing german with pocketsphinx, hardly no hits
User: Visitor
Date: 1/21/2013 6:38 am
Views: 127
Rating: 5

Hi,

here you can download a bunch of raw files just recorded. Not even one "JA" was recognized.

They are 16 Bit signed, Little Endian 16kHz sample rate.

https://rapidshare.com/files/1252972892/Rawlog.zip

Re: Testing german with pocketsphinx, hardly no hits
User: nsh
Date: 1/21/2013 1:20 pm
Views: 122
Rating: 6

Please share the dictionary and the grammar you are using

 

Re: Testing german with pocketsphinx, hardly no hits
User: Sebbi
Date: 1/22/2013 12:20 am
Views: 121
Rating: 7

What you see in the first post is all I have in my .dic and .gram file.

 

/Edit: Sorry, remove the word "ABBRECHEN" in the grammar file and you have it.

Re: Testing german with pocketsphinx, hardly no hits
User: Sebbi
Date: 1/22/2013 4:17 am
Views: 121
Rating: 7

OK, I just put together a complete package of what I am doing at the moment. I ran it under Linux for testing, result is the same as on Android, "JA" is not recognized at all

You can find the package here:

https://rapidshare.com/files/721115359/pocketsphinx_testing.zip

There is a .sh shell script which holds the command that was executed. The other file contains the complete output of the console.

The recording quality of the speech is not very good, it's actually what I get from the internal microphone of the tablet. But recognition rate is still quite slick for the low SNR of the files. (There are just a few that don't get recognized, but listening to them separately shows, that they are extremly low amplitude, so no problem here, except that word "JA"...)

Hope this helps

PreviousNext