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

}; };


static keywtab_t k_properties[] = { 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 }, { "isPalatal", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_PALATAL },
{ "isLong", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_LONG }, { "isLong", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_LONG },

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



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

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

// place of articulation // place of articulation
#define i_isVel 0x28 #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 #define i_StressLevel 0x800



Loading…
Cancel
Save