Haspell is in an early stage of development and therefore there are many ways to break it. Here are the ones we know about:
We have not added handling exceptions yet, so if you want to spell stuff in languages that aren't in your directory, you are in for a nasty surprise.
Languages should be stored in a directory with the name of the language. In that directory should be .wav files with all phones the language utilizes, as well as the .hsp file with the same name as the directory. The .hsp file must have following segments, separated by following tags in separate lines, in the following order:
Here is the full name of the language
Here you write down how letters of the text should be transitioned into phones. You do it like this:
regular_expression_in_text -> series,of,the,phones,separated,by,commas
Names of the phones should be corresponding to the names of your .wav files.
d -> d
dż -> drz
Here you can give aliases to sets of phones of your choice. You can then use those aliases in aliasrules. Again, names of the phones should be corresponding to the names of your .wav files.
<tag1> -> a,b
<tag2> -> c,d,
Here you can make rules of transitions of some regular expressions of phones between other expressions of phones.
In this example, consider <tag1>
and <tag2>
introduced earlier:
Following aliasrule:
<tag1>,k,<tag2> -> $0, g, $1
means that Haspell will make transitions between regular expressions into other expressions:
a,k,c -> a,g,c
b,k,c -> b,g,c
a,k,d -> a,g,d
b,k,d -> b,g,d
$0
on the right side means that Phonemizer will place the value of the 0th (actually first - we are indexing from 0) tag from the left side (in this case - <tag1>
) in place of $0
For some reason Powershell and .cmd code non-english characters differently than files, so phonemizer treats thaem as different characters. Use Linux instead :)