Ralf’s Haitian Creole dictionary 0.1

October 21st, 2012

This article explains how I create the dictionary.

1. Get a Haitian Creole spelling dictionary.
2. Language code of Haitian Creole is ht.
3. License is GPLv3.
4. Encoding of ht_HT.dic and ht_HT.aff is UTF-8.
5. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/haitian-creole/dictionaries
unmunch ht_HT.dic ht_HT.aff > haitian-wordlist

6. Add speak tags at the beginning and the end of haitian-wordlist.
7. Terminal:

saxonb-xslt -ext:on -s:haitian-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:haitian-speak-audio

Which language is similar to Haitian Creole? I think that I should use French fr.

8. Terminal:

espeak -f haitian-speak-audio -m -v fr -q -x --ipa --phonout="haitian-espeak"

9. Add <lexicon> tags to the file haitian-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).
10. Create phoneme elements:

saxonb-xslt -ext:on -s:haitian-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:haitian-phoneme-elements

11. Combine grapheme and phoneme elements:

paste haitian-speak-audio haitian-phoneme-elements > haitian-creole-dictionary.xml

12. Download Ralf’s Haitian Creole dictionary 0.1 (contains IPA phonemes).

Ralf’s West Frisian dictionary 0.1

October 20th, 2012

This article explains how I create Ralf’s West Frisian dictionary 0.1.

1. Get a Frisian spelling dictionary. It seems that this spelling dictionary covers the West Frisian language.
2. License is GPLv2.
3. Encoding of the files fy_NL.dic and fy_NL.aff is ISO8859-1.
4. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/frisian
unmunch fy_NL.dic fy_NL.aff > frisian-wordlist

The resulting document is ISO8859-1 encoded. Convert it to UTF-8:

iconv -f ISO-8859-1 -t UTF-8 < frisian-wordlist > frisian-wordlist-utf8

5. Add speak tags at the beginning and the end of frisian-wordlist-utf8.
6. Terminal:

saxonb-xslt -ext:on -s:frisian-wordlist-utf8 -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:frisian-speak-audio
espeak -f frisian-speak-audio -m -v de -q -x --ipa --phonout="frisian-espeak"

I am not sure whether -v de (= German voice) is the best choice. I choose it anyway.

7. Add <lexicon> tags to the file frisian-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).

8. Create phoneme elements:

saxonb-xslt -ext:on -s:frisian-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:frisian-phoneme-elements

9. Combine grapheme and phoneme elements:

paste frisian-speak-audio frisian-phoneme-elements > west-frisian-dictionary.xml

10. Download Ralf’s West Frisian dictionary 0.1 (contains IPA phonemes).

Ralf’s South African English dictionary 0.1

October 20th, 2012

This article explains how I create Ralf’s South African English dictionary 0.1.

1. Get spelling dictionaries for different English dialects.
2. License is LGPL.
3. Encoding of the files en_ZA.dic and en_ZA.aff is UTF-8.
4. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/english-diverse
unmunch en_ZA.dic en_ZA.aff > southafrican-wordlist

5. Add speak tags at the beginning and the end of southafrican-wordlist.
6. Terminal:

saxonb-xslt -ext:on -s:southafrican-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:southafrican-speak-audio
espeak -f southafrican-speak-audio -m -v en -q -x --ipa --phonout="southafrican-espeak"

7. Add <lexicon> tags to the file southafrican-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).
8. Create phoneme elements:

saxonb-xslt -ext:on -s:southafrican-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:southafrican-phoneme-elements

9. Combine grapheme and phoneme elements:

paste southafrican-speak-audio southafrican-phoneme-elements > south-african-english-dictionary.xml

10. Download Ralf’s South African English dictionary 0.1 (contains IPA phonemes).

Ralf’s New Zealand English dictionary 0.1

October 19th, 2012

This article explains how I create Ralf’s New Zealand English dictionary 0.1.
1. Get a spelling dictionary for New Zealand English.
2. License is LGPL.
3. Encoding of the files en_NZ.dic and en_NZ.aff is ISO8859-1. I should convert both files to UTF-8, and change the SET line in en_NZ.aff accordingly. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/new-zealand-english
iconv -f ISO-8859-1 -t UTF-8 < en_NZ.dic > newzealand-utf8.dic
iconv -f ISO-8859-1 -t UTF-8 < en_NZ.aff > newzealand-utf8.aff

4. Terminal:

unmunch newzealand-utf8.dic newzealand-utf8.aff > newzealand-wordlist

5. Add speak tags at the beginning and the end of newzealand-wordlist.
6. Terminal:

saxonb-xslt -ext:on -s:newzealand-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:newzealand-speak-audio
espeak -f newzealand-speak-audio -m -v en -q -x --ipa --phonout="newzealand-espeak"

7. Add <lexicon> tags to the file newzealand-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).
8. Create phoneme elements:

saxonb-xslt -ext:on -s:newzealand-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:newzealand-phoneme-elements

9. Combine grapheme and phoneme elements:

paste newzealand-speak-audio newzealand-phoneme-elements > new-zealand-english-dictionary.xml

10. Download Ralf’s New Zealand English dictionary 0.1 (contains IPA phonemes).

Ralf’s Australian English dictionary 0.1

October 19th, 2012

This article explains how I create Ralf’s Australien English dictionary 0.1.

1. Get spelling dictionaries for different English dialects.
2. License is GPLv2.
3. Encoding of the files en_AU.dic and en_AU.aff is UTF-8.
4. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/english-diverse
unmunch en_AU.dic en_AU.aff > australian-wordlist

5. Add speak tags at the beginning and the end of australian-wordlist.
6. Terminal:

saxonb-xslt -ext:on -s:australian-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:australian-speak-audio
espeak -f australian-speak-audio -m -v en -q -x --ipa --phonout="australian-espeak"

7. Add <lexicon> tags to the file australian-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).
8. Create phoneme elements:

saxonb-xslt -ext:on -s:australian-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:australian-phoneme-elements

9. Combine grapheme and phoneme elements:

paste australian-speak-audio australian-phoneme-elements > australian-english-dictionary.xml

10. Download Ralf’s Australian English dictionary 0.1 (contains IPA phonemes).

Ralf’s American English dictionary 0.1

October 19th, 2012

This article explains how I create Ralf’s American English dictionary 0.1. The creation is similar to the creation of Schott’s General American dictionary 0.2. Here is what I do:

1. Get an American English spelling dictionary with 390.000 words.
2. License is GPLv2.
3. Encoding of the files en_US.dic and en_US.aff is UTF-8.
4. Linux Mint 12 terminal:

cd /home/linuxmint/Documents/american-english-notgeneral
sudo apt-get install hunspell-tools
unmunch en_US.dic en_US.aff > american-wordlist

5. Add speak tags at the beginning and the end of american-wordlist.

6. Terminal:

saxonb-xslt -ext:on -s:american-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:american-speak-audio
espeak -f american-speak-audio -m -v en-us -q -x --ipa --phonout="american-espeak"

7. Add <lexicon> tags to the file american-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).

8. Create phoneme elements:

saxonb-xslt -ext:on -s:american-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:american-phoneme-elements

9. Combine grapheme and phoneme elements:

paste american-speak-audio american-phoneme-elements > american-english-dictionary.xml

10. Download Ralf’s American English dictionary 0.1 (contains IPA phonemes).

Schott’s General American dictionary 0.2

May 1st, 2012

About two years ago, I published Ralf’s General American dictionary version 0.1.1. I decided to develop the next version 0.2 of this dictionary from scratch. The dictionary gets a new name: Schott's General American dictionary instead of Ralf's General American dictionary. This article explains the creation of the dictionary:

1. Get an American English spelling dictionary with 390.000 words.

2. License is GPL version 2.
3. Encoding of the files en_US.dic and en_US.aff is UTF-8.
4. Linux Mint terminal:

cd /home/ubuntu/Documents/american-english
unmunch en_US.dic en_US.aff > american-wordlist

5. Add speak tags at the beginning and the end of american-wordlist.
6. Linux Mint terminal:

espeak -f american-speak-audio -m -v en-us -q -x --phonout="american-espeak"

7. Adding <lexicon> tags to the file american-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).
8. Linux Mint terminal:

saxonb-xslt -ext:on -s:american-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:american-phoneme-elements
mkdir espeak
paste american-speak-audio american-phoneme-elements > espeak/general-american-dictionary.xml

9. Download the dictionary (eSpeak edition).

10. I am planning to release an IPA version of this dictionary.

Ralf’s Canadian English dictionary 0.1

April 28th, 2012

This article explains the creation of Ralf’s Canadian English dictionary version 0.1.

1. Get a Canadian spelling dictionary with 390.000 words.
2. License is GPL.
3. Encoding of the files en_CA.dic and en_CA.aff is UTF-8.
4. Linux Mint terminal:

cd /home/ubuntu/Documents/canadian-english
unmunch en_CA.dic en_CA.aff > canadian-wordlist

5. Add tags at the beginning and at the end of canadian-wordlist.
6. Linux Mint terminal:

saxonb-xslt -ext:on -s:canadian-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:canadian-speak-audio
espeak -f canadian-speak-audio -m -v en -q -x --phonout="canadian-espeak"

7. Adding <lexicon> tags to the file canadian-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).

8. Create elements:

saxonb-xslt -ext:on -s:canadian-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:canadian-phoneme-elements

9. Combine and elements:

mkdir espeak
paste canadian-speak-audio canadian-phoneme-elements > espeak/canadian-english-dictionary.xml

10. Download the dictionary (eSpeak edition).

I am planning to create an IPA version of this dictionary.

Ralf’s British English dictionary 0.1

April 28th, 2012

This article explains the creation of a British English pronunciation dictionary.

1. Download the 390.000 words version of the dictionary.

2, License is GPL.
3. Linux Mint terminal:

cd /home/ubuntu/Documents/british

4. Now I install Geany because I want to check the encoding of the files en_GB.aff and en_GB.dic: sudo apt-get install geany
The encoding of both files is UTF-8.

5. Linux Mint terminal:

sudo apt-get install hunspell-tools
cd /home/ubuntu/Documents/british
unmunch en_GB.dic en_GB.aff > british-wordlist
sudo apt-get install espeak

I need to know which voice I should use.
Linux Mint terminal:

espeak --voices

I will use en-uk. What is the proper command? I had generated US English phonemes. The command was:

espeak -f english-grapheme -m -v en-us -q -x --phonout="english-espeak"

I will have to markup the dictionary file with speak and audio tags.

6. Now I install saxonb-xslt with the following command:

sudo apt-get install libsaxonb-java

7. Add speak tags at the beginning and at the end of the file british-wordlist.
8. Linux Mint terminal:

saxonb-xslt -ext:on -s:british-wordlist -xsl:'http://spirit.blau.in/simon/files/2010/04/create-audio-elements.xsl' -o:british-speak-audio
espeak -f british-speak-audio -m -v en-uk -q -x --phonout="british-espeak"

9. Adding <lexicon> tags to the file british-espeak (<lexicon> at the beginning of the file; </lexicon> at the end of the file).

10. Create phoneme elements (compare with this article):

saxonb-xslt -ext:on -s:british-espeak -xsl:'http://spirit.blau.in/simon/files/2010/04/replace-newline-newline-space-by-phoneme-element.xsl' -o:british-phoneme-elements

11. Combine grapheme elements with phoneme elements:

paste british-speak-audio british-phoneme-elements > british-dictionary-espeak.xml

12. Download the dictionary (eSpeak edition).

I am planning to create an IPA version of this PLS dictionary.

Compare graphemes of two dictionaries

December 5th, 2011

Here is the concept of a script that can compare two dictionaries with each other. The first dictionary uses grapheme elements which are in upper case letters, the second dictionary distinguishes between upper case and lower case. If there is a corresponding entry in the second dictionary, the entry of the first dictionary will be set to lower case in the resulting output tree. Here is the script:

<?php
// Compare the grapheme elements of two dictionaries

if (file_exists(‘general-american-dictionary.xml’)) {
$xml = simplexml_load_file(‘general-american-dictionary.xml’);
$english = simplexml_load_file(‘english-dictionary.xml’);

foreach ($xml->lexeme as $lexeme) {
$grapheme = $lexeme->grapheme;
foreach ($english->lexeme as $lexemeenglish) {
$graphemeenglish = $lexemeenglish->grapheme;
if ($grapheme == strtoupper($graphemeenglish)) {
$grapheme = $graphemeenglish;
}
}
echo $grapheme, ‘    ‘, $lexeme->phoneme, PHP_EOL;
}
} else {
exit(‘Failed to open general-american-dictionary.xml.’);
}
?>

Of course, this script is not yet finished. This script is working very slow, but never mind.

What are amplitude, frequency, wavelength?

August 30th, 2009

I think that 16 kHz / 16 bit recordings should be sufficient for the development of a speech model. But what does that mean? A good article explains the differences between amplitude (16 bit recordings are more precise than 8 bit recordings), and frequency, wavelength (the human ear can distinguish up to 20 kHz; you need the double amount of kHz for recording; 16 kHz means that 8 kHz are distinguished – should be sufficient for speech).

Replacing HTK by Sphinx?

August 28th, 2009

You need to install HTK if you want to run simon with the whole functionality. HTK is not included, it has to be downloaded from a different source (registration required). From my point of view, this information could hint people who are familiar with Sphinx and Qt into the right direction:

“simon uses the NON-FREE HTK for that. Only _one_ class in simon comes into contact with the HTK. The model compilation manager. This class: http://speech2text.svn.sourceforge.net/viewvc/speech2text/trunk/simonlib…. Those 1200 lines (including other, julius related stuff) are everything that links simon to the HTK. The class could very, very easily be replaced with one that uses something else.”

simon should continue to make use of HTK because there are things that you never should do:

“They did it by making the single worst strategic mistake that any software company can make:

They decided to rewrite the code from scratch.”

Well, but maybe there is someone out there who would want to start a fork of simon, and replace HTK by Sphinx? Of course, this would be a completely different project.

I think that Sphinx could use a GUI.

Sound frames – a, e, i, o, u, b(e)

July 18th, 2009

Let’s take a look at a few sound frames (click picture to enlarge):

sound-a

U+0061 (a), U+02D0
The sounds in this article correspond to the German pronunciation.

sound-e
U+0065 (e), U+02D0

sound-i
U+0069 (i), U+02D0

sound-o
U+006F (o), U+02D0

sound-u
U+0075 (u), U+02D0

sound-be
First part: U+0062 (b) – second part: U+0065 (e), U+02D0

Julius package for Ubuntu

June 18th, 2009

Soon, there should be an updated Julius package for Ubuntu (4.0.2 -> 4.1.2).

Characteristics of the sound “a”

May 20th, 2009

Let’s take a look at the characteristics of the sound “a” (spoken like in father). Here is a screenshot of Audacity which shows the repetitive pattern of the sound “a”:

waveform-a

I have marked the different waves with numbers 1, 2, 3, 4, 5. The waves with the same number are slightly different one from another, but they are similar. It is a repetitive pattern. Let’s extract a complete frame of the sound “a”:

waveform-a-small

The above picture shows the first frame. Let’s compare the first frame with the second frame:

waveform-a-small2

Take a look at the yellow marked area, and compare it with the corresponding area of the previous picture. It is slightly diffent.

This was a short introduction into signal processing. These sound waves can be analysed by software like the HTK toolkit.

Installing simon-juliusd-0.1-alpha2.exe

June 22nd, 2008

I just downloaded the obviously recently released program simon-juliusd-0.1-alpha2.exe. Before running the program, I checked it with ClamWin (I always do that before I install new software). It is OK, so I will install this program on my computer. The program is licensed under the GPL. On my computer, the program simon.exe was installed on the location “H:\Program Files\simon\simon-0.1-alpha-2.”

Here is a screenshot:

Simon configuration

But now, it is beginning to get complicated. Take a look at the next screenshot:

Simon checklist

So to use this program successfully, there are several additional programs needed. I need the HTK toolkit, and Julius. And there are further components necessary. I think I will stop the installation now. Or should I continue? At the moment, I am not sure. I think, that I will hit the next button.

I won’t publish a screenshot from the next step. But it is about HTK programs HDman, HCopy, and several other programs. I think (but I am not sure) that it is necessary to tell Simon the path on which location those programs are installed. A few months ago, I made some first steps with HTK and Julius, but everything was pretty complicated. At the moment, I am reading a few pages in the HTK book, everything is very abstract. And it takes a lot of time to get involved. But it is possible! You just have to stay focused.

VoxForge dictionary isn’t encoded in UTF-8

June 21st, 2008

I just downloaded the VoxForge dictionary (2.6 MB), and opened it with Notepad++. Obviously, it is encoded in ANSI, not in UTF-8. That’s OK because it does contain just standard characters. I am guessing that this dictionary is compatible with ASCII. But I would suggest that future versions should be published in UTF-8.

Switching from Arpabet to IPA

June 21st, 2008

Obviously, the CMU pronouncing dictionary is using the Arpabet. The Arpabet has the advantage that it is possible

“to represent phonemes with ASCII characters.”

But today, the UTF-8 standard is becoming more and more common. In my opinion, there should be a discussion to switch from Arpabet/ASCII to IPA/UTF-8. The IPA is easier to read than the Arpabet. And UTF-8 should be backwards compatible to ASCII (at least, as far as I know).

RFC 4267: VoiceXML, PLS, SSML, SRGS, CCXML

June 19th, 2008

Recently, I read the document RFC 4267. In my opinion, this framework is something very interesting.

learning sphinx automatic speech recognition

March 24th, 2008

You can learn to use the CMU Sphinx automatic speech recognition system. I followed several steps of this tutorial, but I didn’t succeed. I used Ubuntu Linux. What was the problem? Well, there occurred several smaller problems. I could solve a few of them, but not all. I will try again.

2008-04-01: Doubt about sphinx3 installation


Bad Behavior has blocked 126 access attempts in the last 7 days.