Skip to content

Commit

Permalink
phoneme_add_feature: support the lat and sib phonemes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Jan 25, 2017
1 parent c203f51 commit 56b9eee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libespeak-ng/compiledata.c
Expand Up @@ -298,7 +298,7 @@ static keywtab_t keywords[] = {
{ "wavef", tPHONEME_FLAG, phWAVE },
{ "unstressed", tPHONEME_FLAG, phUNSTRESSED },
{ "fortis", tPHONEME_FLAG, phFORTIS },
{ "sibilant", tPHONEME_FLAG, phSIBILANT },
{ "sibilant", tPHONEME_FLAG, phSIBILANT }, // TODO (deprecated): use 'sib' instead
{ "nolink", tPHONEME_FLAG, phNOLINK },
{ "trill", tPHONEME_FLAG, phTRILL }, // TODO (deprecated): use 'trl' instead
{ "vowel2", tPHONEME_FLAG, phVOWEL2 },
Expand Down
8 changes: 8 additions & 0 deletions src/libespeak-ng/phoneme.c
Expand Up @@ -42,6 +42,8 @@ enum feature_t {
ejc,
imp,
vwl,
lat,
sib,
};

static MNEM_TAB features[] = {
Expand All @@ -57,6 +59,8 @@ static MNEM_TAB features[] = {
{ "ejc", ejc },
{ "imp", imp },
{ "vwl", vwl },
{ "lat", lat },
{ "sib", sib },
// invalid phoneme feature
{ NULL, inv },
};
Expand Down Expand Up @@ -91,11 +95,15 @@ phoneme_add_feature(PHONEME_TAB *phoneme,
case clk:
case ejc:
case imp:
case lat:
// Not supported by eSpeak.
break;
case vwl:
phoneme->type = phVOWEL;
break;
case sib:
phoneme->phflags |= phSIBILANT;
break;
// invalid phoneme feature
default:
return create_name_error_context(context, ENS_UNKNOWN_PHONEME_FEATURE, feature);
Expand Down

0 comments on commit 56b9eee

Please sign in to comment.