Topics

[espeak-ng:master] new issue: A phoneme of a child table is not used if that phoneme is not also defined in its parent table #github

espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Issue Created by BenTalagan:
#679 A phoneme of a child table is not used if that phoneme is not also defined in its parent table

Hi, I'm not totally sure if it's a bug or not, but it's a bit obscure to me. Here is my use case.

For transcription purpose, I'd like to rewrite my own phoneme tables for english, and I've stumbled on the following oddity.

I keep the original en_rules and en_dict files, but I'm rewriting a new english voice, called en-test (file espeak-ng-data/lang/gmw/en-test), with the following content :

name Test English
language en-test  42
language en 42
phonemes en-test
tunes s1 c1 q1 e1

I'm declaring the new phoneme table like this (in the phonemes file) :

file : phonemes

phonemetable en-test base1
include ph_english_test

Note that it does not inherit from the en table, but directly from base1.

Finally, I'm declaring the ph_english_test phoneme file (in phsource/ph_english_test). It's really simple, with only one phoneme (I've reduced the example to a minimal test case to illustrate my problem) :

file : phsource/ph_english_test

phoneme a#
  vwl
  ipa £
endphoneme

Now, if I try to translate the following example, the a# phoneme is not used :

> espeak-ng against -v en-test -X --ipa
Found: 'against' [a#gEnst]
əɡˈənst

The strange thing is, if I add the phoneme to base1 in the phonemes file, like this (note the different ipa character) :

file : phonemes

phoneme a#
  vwl
  ipa $
endphoneme

then the phoneme is used, and it is taken from the child table :

> espeak-ng against -v en-test -X --ipa
Found: 'against' [a#gEnst]
ˈ£ɡənst

Finally, if I remove the a# phoneme from the child table, then the phoneme is still found and used, and it comes from base1, the parent table :

> espeak-ng against -v en-test -X --ipa
Found: 'against' [a#gEnst]
ˈ$ɡənst

To summarize, here are the four possible cases for the parent and child tables :

Parent : not defined, Child : not defined => Not translated (pretty logical) Parent : defined, Child : defined => translated, uses child table definition (pretty logical) Parent : defined, Child : not defined => translated, uses parent table definition (pretty logical) Parent : not defined, Child : defined => Not translated (seems odd)

Is this behavior really normal? I would have expect the a# phoneme to be working without having to define it in the parent table, just in the child table. Is there something I'm doing wrong or is it a bug?