mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 14:04:27 +00:00
Use an explicit is phoneme type constant to specify the type-based conditions.
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user