| 1 | /* |
| 2 | * Copyright (C) 2005 to 2010 by Jonathan Duddington |
| 3 | * email: [email protected] |
| 4 | * Copyright (C) 2015-2017 Reece H. Dunn |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, see: <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #ifndef ESPEAK_NG_PHONEME_H |
| 21 | #define ESPEAK_NG_PHONEME_Hcxx . . $ `external/espeak/phoneme.h:21:9`! |
| 22 | |
| 23 | #include "espeak_ng.h"cxx . . $ `<file>/external/espeak/espeak_ng.h`/ |
| 24 | |
| 25 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 26 | extern "C" |
| 27 | { |
| 28 | #endif |
| 29 | |
| 30 | // See docs/phonemes.md for the list of supported features. |
| 31 | typedef enum { |
| 32 | # define FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!(a, b, c) ((a << 16) | (b << 8) | (c)) |
| 33 | // invalid phoneme feature name |
| 34 | inv = 0, |
| 35 | // manner of articulation |
| 36 | nas = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('n', 'a', 's'), |
| 37 | stp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 't', 'p'), |
| 38 | afr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 'f', 'r'), |
| 39 | frc = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('f', 'r', 'c'), |
| 40 | flp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('f', 'l', 'p'), |
| 41 | trl = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('t', 'r', 'l'), |
| 42 | apr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 'p', 'r'), |
| 43 | clk = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('c', 'l', 'k'), |
| 44 | ejc = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('e', 'j', 'c'), |
| 45 | imp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('i', 'm', 'p'), |
| 46 | vwl = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('v', 'w', 'l'), |
| 47 | lat = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'a', 't'), |
| 48 | sib = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 'i', 'b'), |
| 49 | // place of articulation |
| 50 | blb = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('b', 'l', 'b'), |
| 51 | lbd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'b', 'd'), |
| 52 | bld = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('b', 'l', 'd'), |
| 53 | dnt = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('d', 'n', 't'), |
| 54 | alv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 'l', 'v'), |
| 55 | pla = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('p', 'l', 'a'), |
| 56 | rfx = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('r', 'f', 'x'), |
| 57 | alp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 'l', 'p'), |
| 58 | pal = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('p', 'a', 'l'), |
| 59 | vel = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('v', 'e', 'l'), |
| 60 | lbv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'b', 'v'), |
| 61 | uvl = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('u', 'v', 'l'), |
| 62 | phr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('p', 'h', 'r'), |
| 63 | glt = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('g', 'l', 't'), |
| 64 | // voice |
| 65 | vcd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('v', 'c', 'd'), |
| 66 | vls = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('v', 'l', 's'), |
| 67 | // vowel height |
| 68 | hgh = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('h', 'g', 'h'), |
| 69 | smh = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 'm', 'h'), |
| 70 | umd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('u', 'm', 'd'), |
| 71 | mid = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('m', 'i', 'd'), |
| 72 | lmd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'm', 'd'), |
| 73 | sml = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 'm', 'l'), |
| 74 | low = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'o', 'w'), |
| 75 | // vowel backness |
| 76 | fnt = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('f', 'n', 't'), |
| 77 | cnt = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('c', 'n', 't'), |
| 78 | bck = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('b', 'c', 'k'), |
| 79 | // rounding |
| 80 | unr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('u', 'n', 'r'), |
| 81 | rnd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('r', 'n', 'd'), |
| 82 | // articulation |
| 83 | lgl = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'g', 'l'), |
| 84 | idt = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('i', 'd', 't'), |
| 85 | apc = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 'p', 'c'), |
| 86 | lmn = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'm', 'n'), |
| 87 | // air flow |
| 88 | egs = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('e', 'g', 's'), |
| 89 | igs = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('i', 'g', 's'), |
| 90 | // phonation |
| 91 | brv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('b', 'r', 'v'), |
| 92 | slv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 'l', 'v'), |
| 93 | stv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 't', 'v'), |
| 94 | crv = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('c', 'r', 'v'), |
| 95 | glc = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('g', 'l', 'c'), |
| 96 | // rounding and labialization |
| 97 | ptr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('p', 't', 'r'), |
| 98 | cmp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('c', 'm', 'p'), |
| 99 | mrd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('m', 'r', 'd'), |
| 100 | lrd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'r', 'd'), |
| 101 | // syllabicity |
| 102 | syl = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('s', 'y', 'l'), |
| 103 | nsy = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('n', 's', 'y'), |
| 104 | // consonant release |
| 105 | asp = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 's', 'p'), |
| 106 | nrs = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('n', 'r', 's'), |
| 107 | lrs = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'r', 's'), |
| 108 | unx = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('u', 'n', 'x'), |
| 109 | // coarticulation |
| 110 | pzd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('p', 'z', 'd'), |
| 111 | vzd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('v', 'z', 'd'), |
| 112 | fzd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('f', 'z', 'd'), |
| 113 | nzd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('n', 'z', 'd'), |
| 114 | rzd = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('r', 'z', 'd'), |
| 115 | // tongue root |
| 116 | atr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('a', 't', 'r'), |
| 117 | rtr = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('r', 't', 'r'), |
| 118 | // fortis and lenis |
| 119 | fts = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('f', 't', 's'), |
| 120 | lns = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'n', 's'), |
| 121 | // length |
| 122 | est = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('e', 's', 't'), |
| 123 | hlg = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('h', 'l', 'g'), |
| 124 | lng = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('l', 'n', 'g'), |
| 125 | elg = FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`!('e', 'l', 'g'), |
| 126 | # undef FEATURE_Tcxx . . $ `external/espeak/phoneme.h:32:10`! |
| 127 | } phoneme_feature_t; |
| 128 | |
| 129 | phoneme_feature_t phoneme_feature_from_string(const char *feature); |
| 130 | |
| 131 | // phoneme types |
| 132 | #define phPAUSEcxx . . $ `external/espeak/phoneme.h:132:9`! 0 |
| 133 | #define phSTRESScxx . . $ `external/espeak/phoneme.h:133:9`! 1 |
| 134 | #define phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`! 2 |
| 135 | #define phLIQUIDcxx . . $ `external/espeak/phoneme.h:135:9`! 3 |
| 136 | #define phSTOPcxx . . $ `external/espeak/phoneme.h:136:9`! 4 |
| 137 | #define phVSTOPcxx . . $ `external/espeak/phoneme.h:137:9`! 5 |
| 138 | #define phFRICATIVEcxx . . $ `external/espeak/phoneme.h:138:9`! 6 |
| 139 | #define phVFRICATIVEcxx . . $ `external/espeak/phoneme.h:139:9`! 7 |
| 140 | #define phNASALcxx . . $ `external/espeak/phoneme.h:140:9`! 8 |
| 141 | #define phVIRTUALcxx . . $ `external/espeak/phoneme.h:141:9`! 9 |
| 142 | #define phDELETEDcxx . . $ `external/espeak/phoneme.h:142:9`! 14 |
| 143 | #define phINVALIDcxx . . $ `external/espeak/phoneme.h:143:9`! 15 |
| 144 | |
| 145 | // places of articulation (phARTICULATION) |
| 146 | #define phPLACE_BILABIALcxx . . $ `external/espeak/phoneme.h:146:9`! 1 |
| 147 | #define phPLACE_LABIODENTALcxx . . $ `external/espeak/phoneme.h:147:9`! 2 |
| 148 | #define phPLACE_DENTALcxx . . $ `external/espeak/phoneme.h:148:9`! 3 |
| 149 | #define phPLACE_ALVEOLARcxx . . $ `external/espeak/phoneme.h:149:9`! 4 |
| 150 | #define phPLACE_RETROFLEXcxx . . $ `external/espeak/phoneme.h:150:9`! 5 |
| 151 | #define phPLACE_PALATO_ALVEOLARcxx . . $ `external/espeak/phoneme.h:151:9`! 6 |
| 152 | #define phPLACE_PALATALcxx . . $ `external/espeak/phoneme.h:152:9`! 7 |
| 153 | #define phPLACE_VELARcxx . . $ `external/espeak/phoneme.h:153:9`! 8 |
| 154 | #define phPLACE_LABIO_VELARcxx . . $ `external/espeak/phoneme.h:154:9`! 9 |
| 155 | #define phPLACE_UVULARcxx . . $ `external/espeak/phoneme.h:155:9`! 10 |
| 156 | #define phPLACE_PHARYNGEALcxx . . $ `external/espeak/phoneme.h:156:9`! 11 |
| 157 | #define phPLACE_GLOTTALcxx . . $ `external/espeak/phoneme.h:157:9`! 12 |
| 158 | |
| 159 | // phflags |
| 160 | #define phFLAGBIT_UNSTRESSEDcxx . . $ `external/espeak/phoneme.h:160:9`! 1 |
| 161 | #define phFLAGBIT_VOICELESScxx . . $ `external/espeak/phoneme.h:161:9`! 3 |
| 162 | #define phFLAGBIT_VOICEDcxx . . $ `external/espeak/phoneme.h:162:9`! 4 |
| 163 | #define phFLAGBIT_SIBILANTcxx . . $ `external/espeak/phoneme.h:163:9`! 5 |
| 164 | #define phFLAGBIT_NOLINKcxx . . $ `external/espeak/phoneme.h:164:9`! 6 |
| 165 | #define phFLAGBIT_TRILLcxx . . $ `external/espeak/phoneme.h:165:9`! 7 |
| 166 | #define phFLAGBIT_PALATALcxx . . $ `external/espeak/phoneme.h:166:9`! 9 |
| 167 | #define phFLAGBIT_BRKAFTERcxx . . $ `external/espeak/phoneme.h:167:9`! 14 // [*] add a post-pause |
| 168 | #define phARTICULATIONcxx . . $ `external/espeak/phoneme.h:168:9`! 0xf0000 // bits 16-19 |
| 169 | #define phFLAGBIT_NONSYLLABICcxx . . $ `external/espeak/phoneme.h:169:9`! 20 // don't count this vowel as a syllable when finding the stress position |
| 170 | #define phFLAGBIT_LONGcxx . . $ `external/espeak/phoneme.h:170:9`! 21 |
| 171 | #define phFLAGBIT_LENGTHENSTOPcxx . . $ `external/espeak/phoneme.h:171:9`! 22 // make the pre-pause slightly longer |
| 172 | #define phFLAGBIT_RHOTICcxx . . $ `external/espeak/phoneme.h:172:9`! 23 |
| 173 | #define phFLAGBIT_NOPAUSEcxx . . $ `external/espeak/phoneme.h:173:9`! 24 |
| 174 | #define phFLAGBIT_PREVOICEcxx . . $ `external/espeak/phoneme.h:174:9`! 25 // for voiced stops |
| 175 | #define phFLAGBIT_FLAG1cxx . . $ `external/espeak/phoneme.h:175:9`! 28 |
| 176 | #define phFLAGBIT_FLAG2cxx . . $ `external/espeak/phoneme.h:176:9`! 29 |
| 177 | #define phFLAGBIT_LOCALcxx . . $ `external/espeak/phoneme.h:177:9`! 31 // used during compilation |
| 178 | |
| 179 | // phoneme properties |
| 180 | #define phUNSTRESSEDcxx . . $ `external/espeak/phoneme.h:180:9`! (1U << phFLAGBIT_UNSTRESSED) |
| 181 | #define phVOICELESScxx . . $ `external/espeak/phoneme.h:181:9`! (1U << phFLAGBIT_VOICELESS) |
| 182 | #define phVOICEDcxx . . $ `external/espeak/phoneme.h:182:9`! (1U << phFLAGBIT_VOICED) |
| 183 | #define phSIBILANTcxx . . $ `external/espeak/phoneme.h:183:9`! (1U << phFLAGBIT_SIBILANT) |
| 184 | #define phNOLINKcxx . . $ `external/espeak/phoneme.h:184:9`! (1U << phFLAGBIT_NOLINK) |
| 185 | #define phTRILLcxx . . $ `external/espeak/phoneme.h:185:9`! (1U << phFLAGBIT_TRILL) |
| 186 | #define phPALATALcxx . . $ `external/espeak/phoneme.h:186:9`! (1U << phFLAGBIT_PALATAL) |
| 187 | #define phBRKAFTERcxx . . $ `external/espeak/phoneme.h:187:9`! (1U << phFLAGBIT_BRKAFTER) |
| 188 | #define phNONSYLLABICcxx . . $ `external/espeak/phoneme.h:188:9`! (1U << phFLAGBIT_NONSYLLABIC) |
| 189 | #define phLONGcxx . . $ `external/espeak/phoneme.h:189:9`! (1U << phFLAGBIT_LONG) |
| 190 | #define phLENGTHENSTOPcxx . . $ `external/espeak/phoneme.h:190:9`! (1U << phFLAGBIT_LENGTHENSTOP) |
| 191 | #define phRHOTICcxx . . $ `external/espeak/phoneme.h:191:9`! (1U << phFLAGBIT_RHOTIC) |
| 192 | #define phNOPAUSEcxx . . $ `external/espeak/phoneme.h:192:9`! (1U << phFLAGBIT_NOPAUSE) |
| 193 | #define phPREVOICEcxx . . $ `external/espeak/phoneme.h:193:9`! (1U << phFLAGBIT_PREVOICE) |
| 194 | #define phFLAG1cxx . . $ `external/espeak/phoneme.h:194:9`! (1U << phFLAGBIT_FLAG1) |
| 195 | #define phFLAG2cxx . . $ `external/espeak/phoneme.h:195:9`! (1U << phFLAGBIT_FLAG2) |
| 196 | #define phLOCALcxx . . $ `external/espeak/phoneme.h:196:9`! (1U << phFLAGBIT_LOCAL) |
| 197 | |
| 198 | // fixed phoneme code numbers, these can be used from the program code |
| 199 | #define phonCONTROLcxx . . $ `external/espeak/phoneme.h:199:9`! 1 |
| 200 | #define phonSTRESS_Ucxx . . $ `external/espeak/phoneme.h:200:9`! 2 |
| 201 | #define phonSTRESS_Dcxx . . $ `external/espeak/phoneme.h:201:9`! 3 |
| 202 | #define phonSTRESS_2cxx . . $ `external/espeak/phoneme.h:202:9`! 4 |
| 203 | #define phonSTRESS_3cxx . . $ `external/espeak/phoneme.h:203:9`! 5 |
| 204 | #define phonSTRESS_Pcxx . . $ `external/espeak/phoneme.h:204:9`! 6 |
| 205 | #define phonSTRESS_P2cxx . . $ `external/espeak/phoneme.h:205:9`! 7 // priority stress within a word |
| 206 | #define phonSTRESS_PREVcxx . . $ `external/espeak/phoneme.h:206:9`! 8 |
| 207 | #define phonPAUSEcxx . . $ `external/espeak/phoneme.h:207:9`! 9 |
| 208 | #define phonPAUSE_SHORTcxx . . $ `external/espeak/phoneme.h:208:9`! 10 |
| 209 | #define phonPAUSE_NOLINKcxx . . $ `external/espeak/phoneme.h:209:9`! 11 |
| 210 | #define phonLENGTHENcxx . . $ `external/espeak/phoneme.h:210:9`! 12 |
| 211 | #define phonSCHWAcxx . . $ `external/espeak/phoneme.h:211:9`! 13 |
| 212 | #define phonSCHWA_SHORTcxx . . $ `external/espeak/phoneme.h:212:9`! 14 |
| 213 | #define phonEND_WORDcxx . . $ `external/espeak/phoneme.h:213:9`! 15 |
| 214 | #define phonDEFAULTTONEcxx . . $ `external/espeak/phoneme.h:214:9`! 17 |
| 215 | #define phonCAPITALcxx . . $ `external/espeak/phoneme.h:215:9`! 18 |
| 216 | #define phonGLOTTALSTOPcxx . . $ `external/espeak/phoneme.h:216:9`! 19 |
| 217 | #define phonSYLLABICcxx . . $ `external/espeak/phoneme.h:217:9`! 20 |
| 218 | #define phonSWITCHcxx . . $ `external/espeak/phoneme.h:218:9`! 21 |
| 219 | #define phonX1cxx . . $ `external/espeak/phoneme.h:219:9`! 22 // a language specific action |
| 220 | #define phonPAUSE_VSHORTcxx . . $ `external/espeak/phoneme.h:220:9`! 23 |
| 221 | #define phonPAUSE_LONGcxx . . $ `external/espeak/phoneme.h:221:9`! 24 |
| 222 | #define phonT_REDUCEDcxx . . $ `external/espeak/phoneme.h:222:9`! 25 |
| 223 | #define phonSTRESS_TONICcxx . . $ `external/espeak/phoneme.h:223:9`! 26 |
| 224 | #define phonPAUSE_CLAUSEcxx . . $ `external/espeak/phoneme.h:224:9`! 27 |
| 225 | #define phonVOWELTYPEScxx . . $ `external/espeak/phoneme.h:225:9`! 28 // 28 to 33 |
| 226 | |
| 227 | #define N_PHONEME_TABScxx . . $ `external/espeak/phoneme.h:227:9`! 150 // number of phoneme tables |
| 228 | #define N_PHONEME_TABcxx . . $ `external/espeak/phoneme.h:228:9`! 256 // max phonemes in a phoneme table |
| 229 | #define N_PHONEME_TAB_NAMEcxx . . $ `external/espeak/phoneme.h:229:9`! 32 // must be multiple of 4 |
| 230 | |
| 231 | // main table of phonemes, index by phoneme number (1-254) |
| 232 | |
| 233 | typedef struct { |
| 234 | unsigned int mnemonic; // Up to 4 characters. The first char is in the l.s.byte |
| 235 | unsigned int phflags; // bits 16-19 place of articulation |
| 236 | unsigned short program; // index into phondata file |
| 237 | unsigned char code; // the phoneme number |
| 238 | unsigned char type; // phVOWEL, phPAUSE, phSTOP etc |
| 239 | unsigned char start_type; |
| 240 | unsigned char end_type; // vowels: endtype; consonant: voicing switch |
| 241 | unsigned char std_length; // for vowels, in mS/2; for phSTRESS phonemes, this is the stress/tone type |
| 242 | unsigned char length_mod; // a length_mod group number, used to access length_mod_tab |
| 243 | } PHONEME_TAB; |
| 244 | |
| 245 | espeak_ng_STATUS |
| 246 | phoneme_add_feature(PHONEME_TAB *phoneme, |
| 247 | phoneme_feature_t feature); |
| 248 | |
| 249 | // Several phoneme tables may be loaded into memory. phoneme_tab points to |
| 250 | // one for the current voice |
| 251 | extern int n_phoneme_tab; |
| 252 | extern PHONEME_TAB *phoneme_tab[N_PHONEME_TABcxx . . $ `external/espeak/phoneme.h:228:9`!]; |
| 253 | |
| 254 | typedef struct { |
| 255 | char name[N_PHONEME_TAB_NAMEcxx . . $ `external/espeak/phoneme.h:229:9`!]; |
| 256 | PHONEME_TAB *phoneme_tab_ptr; |
| 257 | int n_phonemes; |
| 258 | int includes; // also include the phonemes from this other phoneme table |
| 259 | } PHONEME_TAB_LIST; |
| 260 | |
| 261 | // table of phonemes to be replaced with different phonemes, for the current voice |
| 262 | #define N_REPLACE_PHONEMEScxx . . $ `external/espeak/phoneme.h:262:9`! 60 |
| 263 | typedef struct { |
| 264 | unsigned char old_ph; |
| 265 | unsigned char new_ph; |
| 266 | char type; // 0=always replace, 1=only at end of word |
| 267 | } REPLACE_PHONEMES; |
| 268 | |
| 269 | extern int n_replace_phonemes; |
| 270 | extern REPLACE_PHONEMES replace_phonemes[N_REPLACE_PHONEMEScxx . . $ `external/espeak/phoneme.h:262:9`!]; |
| 271 | |
| 272 | // Table of phoneme programs and lengths. Used by MakeVowelLists |
| 273 | typedef struct { |
| 274 | unsigned int addr; |
| 275 | unsigned int length; |
| 276 | } PHONEME_PROG_LOG; |
| 277 | |
| 278 | #define PhonemeCode2cxx . . $ `external/espeak/phoneme.h:278:9`!(c1, c2) PhonemeCode((c2<<8)+c1) |
| 279 | |
| 280 | extern PHONEME_TAB_LIST phoneme_tab_list[N_PHONEME_TABScxx . . $ `external/espeak/phoneme.h:227:9`!]; |
| 281 | extern int phoneme_tab_number; |
| 282 | |
| 283 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 284 | } |
| 285 | #endif |
| 286 | |
| 287 | #endif |