Browse Source

phoneme_add_feature: support the lat and sib phonemes.

master
Reece H. Dunn 8 years ago
parent
commit
56b9eeeb72
2 changed files with 9 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/compiledata.c
  2. 8
    0
      src/libespeak-ng/phoneme.c

+ 1
- 1
src/libespeak-ng/compiledata.c View File

{ "wavef", tPHONEME_FLAG, phWAVE }, { "wavef", tPHONEME_FLAG, phWAVE },
{ "unstressed", tPHONEME_FLAG, phUNSTRESSED }, { "unstressed", tPHONEME_FLAG, phUNSTRESSED },
{ "fortis", tPHONEME_FLAG, phFORTIS }, { "fortis", tPHONEME_FLAG, phFORTIS },
{ "sibilant", tPHONEME_FLAG, phSIBILANT },
{ "sibilant", tPHONEME_FLAG, phSIBILANT }, // TODO (deprecated): use 'sib' instead
{ "nolink", tPHONEME_FLAG, phNOLINK }, { "nolink", tPHONEME_FLAG, phNOLINK },
{ "trill", tPHONEME_FLAG, phTRILL }, // TODO (deprecated): use 'trl' instead { "trill", tPHONEME_FLAG, phTRILL }, // TODO (deprecated): use 'trl' instead
{ "vowel2", tPHONEME_FLAG, phVOWEL2 }, { "vowel2", tPHONEME_FLAG, phVOWEL2 },

+ 8
- 0
src/libespeak-ng/phoneme.c View File

ejc, ejc,
imp, imp,
vwl, vwl,
lat,
sib,
}; };


static MNEM_TAB features[] = { static MNEM_TAB features[] = {
{ "ejc", ejc }, { "ejc", ejc },
{ "imp", imp }, { "imp", imp },
{ "vwl", vwl }, { "vwl", vwl },
{ "lat", lat },
{ "sib", sib },
// invalid phoneme feature // invalid phoneme feature
{ NULL, inv }, { NULL, inv },
}; };
case clk: case clk:
case ejc: case ejc:
case imp: case imp:
case lat:
// Not supported by eSpeak. // Not supported by eSpeak.
break; break;
case vwl: case vwl:
phoneme->type = phVOWEL; phoneme->type = phVOWEL;
break; break;
case sib:
phoneme->phflags |= phSIBILANT;
break;
// invalid phoneme feature // invalid phoneme feature
default: default:
return create_name_error_context(context, ENS_UNKNOWN_PHONEME_FEATURE, feature); return create_name_error_context(context, ENS_UNKNOWN_PHONEME_FEATURE, feature);

Loading…
Cancel
Save