Browse Source

Use an explicit is phoneme type constant to specify the type-based conditions.

master
Reece H. Dunn 8 years ago
parent
commit
f0d4a98b96
3 changed files with 10 additions and 9 deletions
  1. 7
    7
      src/libespeak-ng/compiledata.c
  2. 1
    1
      src/libespeak-ng/synthdata.c
  3. 2
    1
      src/libespeak-ng/synthesize.h

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

@@ -103,13 +103,13 @@ static keywtab_t k_conditions[] = {
};

static keywtab_t k_properties[] = {
{ "isPause", 0, phPAUSE },
{ "isVowel", 0, phVOWEL },
{ "isNasal", 0, phNASAL },
{ "isLiquid", 0, phLIQUID },
{ "isUStop", 0, phSTOP },
{ "isVStop", 0, phVSTOP },
{ "isVFricative", 0, phVFRICATIVE },
{ "isPause", 0, CONDITION_IS_PHONEME_TYPE | phPAUSE },
{ "isVowel", 0, CONDITION_IS_PHONEME_TYPE | phVOWEL },
{ "isNasal", 0, CONDITION_IS_PHONEME_TYPE | phNASAL },
{ "isLiquid", 0, CONDITION_IS_PHONEME_TYPE | phLIQUID },
{ "isUStop", 0, CONDITION_IS_PHONEME_TYPE | phSTOP },
{ "isVStop", 0, CONDITION_IS_PHONEME_TYPE | phVSTOP },
{ "isVFricative", 0, CONDITION_IS_PHONEME_TYPE | phVFRICATIVE },

{ "isPalatal", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_PALATAL },
{ "isLong", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_LONG },

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

@@ -630,7 +630,7 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,

switch (instn & 0xe0)
{
case 0x00:
case CONDITION_IS_PHONEME_TYPE:
// phoneme type, vowel, nasal, fricative, etc
return ph->type == data;
case 0x20:

+ 2
- 1
src/libespeak-ng/synthesize.h View File

@@ -332,7 +332,8 @@ typedef struct {
// place of articulation
#define i_isVel 0x28

#define CONDITION_IS_PHFLAG_SET 0x40
#define CONDITION_IS_PHONEME_TYPE 0x00
#define CONDITION_IS_PHFLAG_SET 0x40

#define i_StressLevel 0x800


Loading…
Cancel
Save