Posts Tagged ‘de’

Schott’s German dictionary 0.2.7

Wednesday, May 25th, 2011

With the style sheet improve-german.xsl, I create Schott's German dictionary version 0.2.7: (more…)

Schott’s German dictionary 0.2.6

Saturday, March 5th, 2011

Here is how I create Schott's German dictionary version 0.2.6. The style sheet improve-german.xsl contains the following transformation rules:

1. Replace 209 matches:

<xsl:when test="contains(lower-case(../grapheme), 'position')"><xsl:value-of select="replace($sierra, 'poːziːt͡sɪoːn','pozit͡si̯oːn')"/></xsl:when>

2. Replace 983 matches:

<xsl:when test="contains(lower-case(../grapheme), 'tion')"><xsl:value-of select="replace($sierra, 't͡sɪoːn','t͡si̯oːn')"/></xsl:when>

3. Replace 107 matches: (more…)

Schott’s German dictionary 0.2.5

Tuesday, February 22nd, 2011

Here is how I create Schott's German dictionary version 0.2.5 (former name: Ralf's German dictionary). Within the XSLT style sheet improve-german.xsl, I implement these transformation rules:

1. About 70 occurences have to be replaced:

<xsl:when test="contains(lower-case(../grapheme), 'alkohol')"><xsl:value-of select="replace($sierra, 'alkoːɔl','alkohoːl')"/></xsl:when>

2. Replace about 50 occurences:

<xsl:when test="contains(lower-case(../grapheme), 'vertret')"><xsl:value-of select="replace($sierra, 'vɐtʀeːt','fɐtʀeːt')"/></xsl:when>

3. Replace 32 matches:

<xsl:when test="contains(lower-case(../grapheme), 'aluminium')"><xsl:value-of select="replace($sierra, 'aluːmiːniːʊm','alumiːni̯ʊm')"/></xsl:when>

4. Replace 386 matches: (more…)

Ralf’s German dictionary 0.2.4

Wednesday, December 1st, 2010

Download Ralf's German dictionary 0.2.4. I generated this dictionary in my Ubuntu terminal:

cat '/media/November2010/201008/german-0.2.1/german-0.2.3.xml' | \
> saxonb-xslt -ext:on -s:- -xsl:'/media/November2010/201008/german-0.2.1/improve-german.xsl' \
> -o:'/home/ubuntu/Documents/german-0.2.4.xml'

Please import the dictionary into simon.

Ralf’s German dictionary 0.2.2

Sunday, September 19th, 2010

How I build Ralf's German dictionary version 0.2.2:

1. Add rule

<xsl:when test="contains(lower-case(../grapheme), 'system')"><xsl:value-of select="replace($sierra, 'systəm','systeːm')"/></xsl:when>

2. Improve about 35 elements:

<xsl:when test="contains(lower-case(../grapheme), 'angestellt')"><xsl:value-of select="replace($sierra, 'aŋɛstɛlt','aŋgɛstɛlt')"/></xsl:when>

3. Improve 131 elements:

<xsl:when test="contains(lower-case(../grapheme), 'brüch')"><xsl:value-of select="replace($sierra, 'bʀyç','bʀʏç')"/></xsl:when>

4. Add rule: (more…)

German speech model ‘bravo’

Sunday, September 12th, 2010

How I create the German speech model 'bravo':

1. Delete old files:

rm -r /home/ubuntu/.kde/share/apps/simon
rm -r /home/ubuntu/.kde/share/apps/simond

2. Start simon. Manage scenarios > New scenario.

3. Import PLS dictionary as active dictionary: /home/ubuntu/Documents/201009/combine-0.2.1/lexicon-bravo.xml

4. Define grammar: Unknown

5. Training > Import training data > Import prompts > /home/ubuntu/Documents/201009/combine-0.2.1/prompts-bravo and STOP. I have to convert the FLAC files into WAV files before I can import them into simon (I didn’t find out how post processing commands works).

6. Ubuntu terminal:

mkdir /home/ubuntu/Documents/201009/combine-0.2.1/wav-bravo
cd /home/ubuntu/Documents/201009/combine-0.2.1/bravo/ && \
for f in *.flac; do sox "$f" "/home/ubuntu/Documents/201009/combine-0.2.1/wav-bravo/${f%.flac}.wav"; done

7. Prompts base directory: /home/ubuntu/Documents/201009/combine-0.2.1/wav-bravo

8. Add dictation plug-in. Start ksimond. Press Connect button. Press Synchronize. Press Activate, the following message appears:

The recognition reported the following error:
The recognition could not be started because your model contains words that consists of sounds that are not covered by your acoustic model.

You need to either remove those words, transcribe them differently or train them.

Warning: The latter will not work if you are using static base models!

This could also be a sign of a base model that uses a different phoneme set than your scenario vocabulary.

The following words are affected (list may not be complete):
Betätigen, diejenigen

The following phonemes are affected (list may not be complete):
I-g+N=,

OK, I will move the two words Betätigen, diejenigen from the Unknown to the Unused terminal, and then compile again.

9. Press Activate. Dictate a few words into Firefox:

ausbildungsadäquate ausbildungsadäquatem ausbildungsfreundliche ausbildungsfreundlichem ausblendete ausblieb ausboote ausborgst ausbringendes ausbürstende ausdehnendem ausdehnenden ausdehnender ausdiskutiere ausdorrender ausdorrten ausdrucksfähigen

All words above were recognized correctly.

10. Download the German speech model 'bravo'.

Ralf’s German dictionary 0.2.1

Monday, August 30th, 2010

How I build Ralf's German dictionary version 0.2.1: (more…)

Symbol of the “Ach-Laut”

Monday, August 23rd, 2010

Ralf's German dictionary uses the normal [x] as sign for the Ach-Laut. According to the Wiktionary, the Ach-Laut is represented by [χ] (U+03C7):

lachen /[ˈlaχn̩]/, Dach /[daχ]/, Bucht /[bʊχt]/, doch /[dɔχ]/, auch /[aʊ̯χ]/

The current development version of simon doesn’t accept the [χ]. I would like to transform the [x] into [χ] in a future version of Ralf's German dictionary.

Ralf’s German dictionary 0.2

Saturday, August 21st, 2010

How I create Ralf's German dictionary version 0.2:

1. Add this rule to improve-german.xsl:

<xsl:when test="contains(lower-case(../grapheme), 'prüf')"><xsl:value-of select="replace($sierra, 'pʀyf','pʀyːf')"/></xsl:when>

2. Add rule: (more…)

Phonemes of “Packpapieren”

Sunday, July 25th, 2010

Take a look into Ralf's German dictionary:

<lexeme role="Substantiv">
<grapheme>Packpapieren</grapheme>
<phoneme>pakpapiːʀən</phoneme>
<phoneme>pakpapiːɐ̯n</phoneme>
</lexeme>

Take a look into the corresponding section of ralfdic-scenario-20100725.xml:

<word>
<name>Packpapieren</name>
<pronunciation>p a kp a p i: R @ n</pronunciation>
<terminal>Substantiv</terminal>
</word>
<word>
<name>Packpapieren</name>
<pronunciation>p a kp a p i: ah n</pronunciation>
<terminal>Substantiv</terminal>
</word>

What is wrong? The phoneme kp should be written as two separate phonemes.

Only a subset is recognized

Sunday, July 25th, 2010

This is the current situation: I increased the size of the active vocabulary from 18000 to 300000. When I export my current scenario, I get an XML file of 58 MB with the name ralfdic-scenario-20100725.xml (please compare this value with the size of my phonetic dictionary: Ralf's German dictionary 0.1.9.9 has a size of 45 MB). This means that almost all words that are included in Ralf's German dictionary are included in my current simon scenario. Only the words that are affected are excluded from the active vocabulary (just about 1000 words are affected. This means that almost all words that you can find in Ralf's German dictionary can be found in ralfdic-scenario-20100725.xml (license: GPLv3).

But what happens when I dictate? simon obviously recognizes only a subset of 18000 words (only words that are included in Ralf's German IPA FLAC files). Why is that?

Take a look into file:///home/ubuntu/.kde/share/apps/simon/model/prompts (license of this file is GPLv3). My current prompts file contains only 18000 words, and not 300000 words. But my German scenario file ralfdic-scenario-20100725.xml contains 300000 words. And when I dictate, simon only recognizes words that are included in the prompts file. simon doesn’t recognize the other words that are part of the active vocabulary.

My current prompts file is a subset of my current active vocabulary.
My current active vocabulary is a superset of my current prompts file.

How can I solve this issue? I want that simon recognizes words that haven’t been trained before. Even words that are marked in red color in the active vocabulary should be recognized. I don’t want to record all 300000 words. This issue should be solvable, but how?

Increasing German speech model

Friday, July 23rd, 2010

At the moment, Ralf’s German speech model 0.1.3 is installed on my computer (as user generated model). I would like to increase the vocabulary size (from 18000 words to 300000 words). So I am trying the following: I import Ralf's German dictionary 0.1.9.9. This will create of course a lot of duplicate entries in the active vocabulary.

This is what I am doing after the import of the dictionary:
- add terminals to the grammar (Adjektiv, Substantiv, Verb),
- press the Synchronize button.

So this is the situation at the moment:
Ralf's German speech model 0.1.3 contains 18000 words (it has been trained with 18000 audio files). I want to see how many additional words I have to train to cover all words that are contained in Ralf's German dictionary.

Then the following error message appears:

generate-monophonesI could use a hint what I should do to increase the vocabulary size without having to train all the words. Do you have any suggestions?

Edit: I try the following: I clear the whole active vocabulary. Then I import Ralf's German dictionary 0.1.9.9 again (as active vocabulary). Then I disconnect simon. Then I restart ksimond. Then I press the simon connect button. Then I press the Synchronize button.

Now I have to wait a few minutes or so. The computer reacts pretty slowly because obviously simon is using a lot of processing capacity.

It was possible to compile the speech model. Now I press the Activate button. Then the following error message appears:

The recognition reported the following error:
The recognition could not be started because your model contains words that consits of sounds that are not covered by your acoustic model.

You need to either remove those words, transcribe them differently or train them.

Warning: The latter will not work if you are using static base models!

This could also be a sign of a base model that uses a different phoneme set than your scenario vocabulary.

The following words are affected (list may not be complete):
abelschen, abelschen, abonnierbaren, abonnierbaren, abonnierende, abonnierende, abonnierendem, abonnierendem, abonnierender, abonnierender, abonnierendes, abonnierendes, adressatengerechten, adressate…

The following phonemes are affected (list may not be complete):
*-C+e or biphone C+e, *-EI+ts or biphone EI+ts, @-l+gls, @-ts+E, C-a:+R, C-e+m, C-n=+s, E-C+n=, E-N+N=, E-S+n=, E-b+m=, E-k+N=, E-p+m=, E-x+t, E:-ah+t, E:-d+n=, E:-f+m=, E:-f+t, E:-g+N=, EI-C+k, EI-ts…

It would be interesting to get a complete list of all words that are missing. Then I could train or remove these words efficiently.

Ralf’s German dictionary 0.1.9.9

Friday, July 23rd, 2010

How I am developing Ralf's German dictionary version 0.1.9.9:

1. Improve phoneme quality:

<xsl:when test="contains(lower-case(../grapheme), 'möglichkeit')"><xsl:value-of select="replace($sierra, 'mœglɪçkaɪ̯t','møːglɪçkaɪ̯t')"/></xsl:when>

2. Check whether the object dictionary contains møːglɪçkaɪ̯t instead of mœglɪçkaɪ̯t:

ubuntu@ubuntu-desktop:~$ saxonb-xslt -ext:on -s:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.8.xml' -xsl:'/home/ubuntu/Documents/201005/german-0.1.9.4/improve-german.xsl' -o:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.9.xml'

3. Improve phoneme quality:

<xsl:when test="contains(lower-case(../grapheme), 'benzin')"><xsl:value-of select="replace($sierra, 'bɛnt͡sɪn','bɛnt͡siːn')"/></xsl:when>

(more…)

German 500+ words speech models

Saturday, July 17th, 2010

My goal is to offer several German speech models that are derived from Ralf's German IPA FLAC files. The speech models will have the names xaa, xab, xac, etc.. Each model will have 500+ German words.

This will be a test series. I can’t guarantee that it will work out. But I think that my concept should work. At least, I hope so.

One note to the simon developers: Could you please modify the dictation plug-in so that it inserts a space after each word? That would be fine because I would like to produce one or several videos, and I don’t want to hit the space bar after each word that has been recognized.

I have prepared the special style-sheet compare.xsl for this test series. This style-sheet compares Ralf's German dictionary (source file #1) with Ralf's German IPA FLAC files (section xaa) (source file #2), and outputs two result documents: A small PLS dictionary that I will import as active dictionary into simon (result file #1), and a prompts file in HTK compatible format (result file #2) so that I can use the simon import training data function.

The style-sheet is invoked in the Ubuntu terminal:

$ saxonb-xslt -ext:on -s:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.8.xml' -xsl:'/home/ubuntu/Documents/201007/ipa-prompts/compare.xsl' -o:'/home/ubuntu/Documents/201006/audacity/xaa-folder/dummy.xml'

I hope that it will work as expected.

Ralf’s German speech model 0.1

Thursday, July 15th, 2010

Ralf's German speech model (license: GPLv3) consists of the following five files: ralfs-german-scenario.xml, hmmdefs.bz2, tiedlist, macros, stats.

If you are a German native speaker, and your voice is similar to my voice (similar dialect, male speaker), you can try the following:

1. Download Ralf’s German scenario, and import it into simon via manage scenarios.
2. Download hmmdefs.bz2, and extract it.
static-model3. Take a look at the picture. Select the option Static model. Then load the path to hmmdefs.
4. Download tiedlist, and set the path to this file.
5. Download macros, and set the path.
6. Download stats, and set the path.

7. I didn’t test whether it works. I will test it later. If it works, you should be able to dictate the words that I am dictating in the Video: Recognize 200 German words. This means that with Ralf's German speech model you should be able to dictate 200 different German words.

8. You don’t need to install HTK. This means that you only need to install simon on your computer.

9. The terminology is as follows:
Ralf’s German speech model = Ralf’s German scenario + Ralf’s German base model
Ralf’s German base model = hmmdefs.bz2 + tiedlist + macros + stats

Could not adapt the base model

Tuesday, July 13th, 2010

This is what I did yesterday:
- I used the Voxforge German acoustic model (voxforge_de_simon-2010-04-23.tar.bz2) as static base model.
- Used the German Tastatur scenario.
- From the shadow dictionary (Ralf’s German dictionary) I trained the word angehören.
- Selected the option adapted base model (instead of static base model).
- Then an error message appeared:

As the server compiled the model the following error occurred:
Could not adapt the base model. Please check your paths to HERest (/usr/local/bin/HERest).

Here is what I am doing right now: I want to take a closer look at the error message: (more…)

Ralf’s German dictionary 0.1.9.8

Saturday, June 26th, 2010

How I am preparing Ralf's German dictionary version 0.1.9.8:

1. Add the rule to improve-german.xsl:

<xsl:when test="ends-with(../grapheme, 'zustand')
or ends-with (../grapheme, 'zustands')"><xsl:value-of select="replace($sierra, 't͡sʊstant', 't͡suːʃtant')"/></xsl:when>

2. Add the rule:

<xsl:when test="ends-with(../grapheme, 'ständen')"><xsl:value-of select="replace($sierra, 'stɛnd', 'ʃtɛnd')"/></xsl:when>

3. Add rule:

<xsl:when test="contains(../grapheme, 'spiel')"><xsl:value-of select="replace($sierra, 'spiːl', 'ʃpiːl')"/></xsl:when>

4. Add rule:

<xsl:when test="contains(../grapheme, 'angebot')"><xsl:value-of select="replace($sierra, 'aŋeːboːt', 'aŋgeːboːt')"/></xsl:when>

5. Add rule:

<xsl:when test="contains(lower-case(../grapheme), 'stöcke')"><xsl:value-of select="replace($sierra, 'stœk', 'ʃtœk')"/></xsl:when>

6. I want only one terminal per role attribute, not several terminals. This rule removes the other terminals except the first terminal:

<xsl:when test="contains($terminal, ' ')"><xsl:sequence select="substring-before($terminal, ' ')"/></xsl:when>

7. Add rule:

<xsl:when test="starts-with(../grapheme, 'vorz')
and starts-with($sierra, 'foːʀt͡s')"><xsl:value-of select="replace($sierra, 'foːʀt͡s', 'foːɐ̯t͡s')"/></xsl:when>

8. Add additional phoneme element:

<xsl:when test="contains(lower-case(../grapheme), 'angabe')"><xsl:value-of select="replace($sierra, 'aŋgaːb', 'angaːb')"/></xsl:when>

9. Improve phoneme quality:

<xsl:when test="contains(lower-case(../grapheme), 'graphik')"><xsl:value-of select="replace($sierra, 'gʀafiːk','gʀafɪk')"/></xsl:when>

10. Generate version 0.1.9.8 via Ubuntu terminal:

ubuntu@ubuntu-desktop:~$ saxonb-xslt -ext:on -s:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.7.xml' -xsl:'/home/ubuntu/Documents/201005/german-0.1.9.4/improve-german.xsl' -o:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.8.xml'

Some phoneme elements will be duplicated. This issue will be fixed later.

11. Download Ralf's German dictionary 0.1.9.8, and import it into simon. Suggestions for improvement are welcome.

Ralf’s German IPA FLAC audio files

Saturday, June 19th, 2010

Ralf’s German IPA FLAC audio files serve as an extension to Ralf’s German dictionary. The audio files have a specific structure, e.g.: ʃʀaɪ̯baʀbaɪ̯tn̩.flac. Take a look into the dictionary:

<lexeme role="Substantiv">
<grapheme>Schreibarbeiten</grapheme>
<phoneme>ʃʀaɪ̯baʀbaɪ̯tən</phoneme>
<phoneme>ʃʀaɪ̯baʀbaɪ̯tn̩</phoneme>
</lexeme>

You can see that there are two <phoneme> elements. I want to use the audio file ʃʀaɪ̯baʀbaɪ̯tn̩.flac for training. The question is: how can I do that? Maybe I should write an XSLT style-sheet that produces renaming rules for the Ubuntu terminal. The renaming rule could look like this: mv ʃʀaɪ̯baʀbaɪ̯tn̩.flac Schreibarbeiten.flac

Ralf’s German acoustic model

Friday, June 18th, 2010

My current speech model has been trained with one single word (see the previous 5 tutorials). It is the German Substantiv Sonnenoberfläche. I would like to offer an acoustic model (base model). Where can I find the necessary files? These files are necessary: hmmdefs, tiedlist, macros, stats. What is the path to these files? My guess is as follows:

file:///home/ubuntu/.kde/share/apps/simon/model/hmmdefs
file:///home/ubuntu/.kde/share/apps/simon/model/tiedlist
file:///tmp/kde-ubuntu/simond/default/compile/hmm24/macros
file:///tmp/kde-ubuntu/simond/default/compile/stats

Is this correct? Can I pack these four files into one folder (.tar.bz2), and offer it as base model? Voxforge offers simon base models. I want to offer my own base model (static model).

static-modelI will just do it. Here is my first base model (acoustic model): ralfs-acoustic-model.tar.bz2. I don’t know whether this would work as static model.

I would like to know more about the internal structure. Maybe I should read modelcompilationmanager.cpp to get a better understanding of what happens behind the scenes.

ralfs-acoustic-model.tar.bz2 contains information for only one word: Sonnenoberfläche.

What else is needed? I have exported the simon scenario that contains the word Sonnenoberfläche, and the information about the dictation plug-in. Here is this scenario: sonnenoberfläche-scenario.

So if someone has a simon installation with no user data, he could try the following:
1. simon > Settings > Configure simon... > Model settings > Static model. Then point to hmmdefs, tiedlist, macros, stats that are contained in ralfs-acoustic-model.tar.bz2.
2. simon > Manage scenarios > Import > Import from file. Then select sonnenoberfläche-scenario.

After he has done these 2 steps, he should be able to use simon for the recognition of the German noun Sonnenoberfläche.

I will have to test whether this works.

Edit: Yes, it works. I have tested it.

Tutorial: train a German word

Friday, June 18th, 2010

This article explains how to train the German word Sonnenoberfläche.

word-011. Click on the word Sonnenoberfläche and press the Add to training button.

word-022. Simon displays the Substantiv Sonnenoberfläche in the right area. Press the Train selected words button.

word-033. Press the Yes button.

word-044. Simon displays the SAMPA transcription of this Substantiv. Press the Next button.

word-055. Test the sound level of your microphone. If the volume is correct press the Next button.

word-066. Press the Record button.

word-077. Please speak the word into your microphone. Then press the Record button again.

word-088. Press the Play button to check whether the recording sounds OK. Then press the Next button.

word-099. Select the Active vocabulary tab.

word-1010. The Substantiv is now part of the Active vocabulary.

Conclusion: Now you know how to train a German Substantiv with simon.