Posts Tagged ‘saxonb-xslt’

Clear button; improve phoneme

Wednesday, February 3rd, 2010

1. This is what I did a couple of minutes ago:

$ cd Documents/201001/speech2text
$ git pull origin master
$ ./build_ubuntu.sh

After starting simon, I can see that a Clear button is available:

clear

It should now be possible to delete the active dictionary.

2. Let me make an additional remark about the phonemes of Ralf's German dictionary. The phonemes

S t E n d e: k E m pf @
S t E n d e: O R g a n i: z a ts I o: n

are not optimal. e: indicates a long vowel. Instead, there should be the short vowel @. When you watch the video 200 German words, then you can listen how I pronounce these words. I pronounce them with e: (long e) instead of @ (short e). Such problems occur often in Ralf's German dictionary.

How do I modify Ralf's German dictionary? I use the Ubuntu terminal:

$ saxonb-xslt -ext:on -s:german-dictionary-0.1.7.xml -xsl:modify-german-dictionary.xsl -o:prepare-0.1.8.xml

To avoid a special java heap space error, I run VisualVM in the background. The result is that it is possible to modify Ralf's German dictionary with the XSLT style-sheet.

Why am I telling you these details that are not directly related to simon? Because you need a pronunciation dictionary if you want to use simon for dictation. And it is necessary to improve the quality of the phonemes that are contained in Ralf's German dictionary.

3. It is possible to modify phonemes with simon using the Edit Word button. My approach with saxonb-xslt is necessary for dictionary development because this way it is possible to modify lots of <lexeme> elements.

4. I removed the active and the shadow dictionary using the Clear button. What about an Export dictionary button? If someone edits the dictionary with simon (Edit Word button), he may want to export the dictionary.

Import of prompts 01 failed

Tuesday, October 13th, 2009

This is what I am currently doing: I checked out revision 1040.

I want to import the prompts 01 into simon. First, I had to convert the 40 flac files into wav files with the following command:

liberty@liberty-desktop:~/200910/editing-ralfherzog/01$ for f in *.flac; do sox "$f" -t wav -r 16000 -s -c 1 "subfolder/${f%.flac}.wav"; done

Then I transformed the file http://script.blau.in/german/01/prompts.xml into (almost) HTK compatible format with the following command:

liberty@liberty-desktop:~/200910/editing-ralfherzog/01$ saxonb-xslt -ext:on -o:PROMPTS01 -xsl:transform-ssml-prompts.xsl -s:prompts.xml

The stylesheet transform-ssml-prompts.xsl has the following content:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- 20091013; license: GPL -->
<xsl:output method="text"/>
<xsl:template match="speak">
<xsl:for-each select="audio">
<xsl:value-of select="replace(@src, 'flac','wav')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

I think that I found an error. I forgot to capitalize the prompts with the XPath expression upper-case(). I will have to correct the stylesheet. Probably that is the reason why the Import Trainingsdata function didn’t work out.

Creating Ralf’s German dictionary

Tuesday, September 22nd, 2009

To get an impression how I create the German PLS dictionary, watch the video (19.2 MB, WMV):

[20100101: video removed]

Currently, I am preparing a new version of Ralf’s German dictionary. The dictionary should be 100% simon compatible (version 0.1 contains some minor mistakes).

This is what I did yesterday:
1. I created more than 80.000 pronunciations with eSpeak from a set of 300.000 words. Not all words were transcribed, I don’t know what went wrong.
2. Then I created an XSLT stylesheet to transform the eSpeak phoneset into IPA with saxonb-xslt.
3. The result was that I had a list of the phonemes, but the graphemes are missing. What can I do? I decided to start dictating the missing graphemes with DNS 9.5. You can see the dictation process in the video.