Browse Source

phoneme_add_feature: rename phFORTIS to phVOICELESS to reflect its actual usage.

master
Reece H. Dunn 8 years ago
parent
commit
93fd4caf19
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      src/libespeak-ng/phoneme.c
  2. 1
    1
      src/libespeak-ng/phoneme.h
  3. 3
    3
      src/libespeak-ng/setlengths.c

+ 2
- 2
src/libespeak-ng/phoneme.c View File

case vcd: case vcd:
phoneme->phflags |= phVOICED; phoneme->phflags |= phVOICED;
break; break;
case vls: // FIXME: This should be a phVOICELESS (!phVOICED) flag. Fortis/lenis are a different thing.
phoneme->phflags |= phFORTIS;
case vls:
phoneme->phflags != phVOICELESS;
break; break;
// invalid phoneme feature // invalid phoneme feature
default: default:

+ 1
- 1
src/libespeak-ng/phoneme.h View File

#define phARTICULATION 0xf0000 #define phARTICULATION 0xf0000
#define phWAVE 0x01 #define phWAVE 0x01
#define phUNSTRESSED 0x02 #define phUNSTRESSED 0x02
#define phFORTIS 0x08
#define phVOICELESS 0x08
#define phVOICED 0x10 #define phVOICED 0x10
#define phSIBILANT 0x20 #define phSIBILANT 0x20
#define phNOLINK 0x40 #define phNOLINK 0x40

+ 3
- 3
src/libespeak-ng/setlengths.c View File

p->prepause = 15; p->prepause = 15;
} }


if (next->type == phPAUSE && prev->type == phNASAL && !(p->ph->phflags&phFORTIS))
if (next->type == phPAUSE && prev->type == phNASAL && !(p->ph->phflags&phVOICELESS))
p->prepause = 25; p->prepause = 25;


if (prev->ph->phflags & phBRKAFTER) if (prev->ph->phflags & phBRKAFTER)
if (prev->type == phNASAL) if (prev->type == phNASAL)
p->prepause = 12; p->prepause = 12;


if (prev->type == phSTOP && !(prev->ph->phflags & phFORTIS))
if (prev->type == phSTOP && !(prev->ph->phflags & phVOICELESS))
p->prepause = 0; p->prepause = 0;
} }
} }
} else { } else {
length_mod = tr->langopts.length_mods[next2type *10+ next->ph->length_mod]; length_mod = tr->langopts.length_mods[next2type *10+ next->ph->length_mod];


if ((next->type == phNASAL) && (next2->type == phSTOP || next2->type == phVSTOP) && (next3->ph->phflags & phFORTIS))
if ((next->type == phNASAL) && (next2->type == phSTOP || next2->type == phVSTOP) && (next3->ph->phflags & phVOICELESS))
length_mod -= 15; length_mod -= 15;
} }



Loading…
Cancel
Save