Debian Codegraph @

external/espeak/synthdata.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2005 to 2014 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 #include "espeak__config.h"cxx . . $ `<file>/external/espeak/espeak__config.h`/
21
22 #include <ctype.h>
23 #include <errno.h>
24 #include <stdbool.h>
25 #include <stdint.h>
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <string.h>
29
30 #include "espeak_ng.h"cxx . . $ `<file>/external/espeak/espeak_ng.h`/
31 #include "speak_lib.h"cxx . . $ `<file>/external/espeak/speak_lib.h`/
32 #include "encoding.h"cxx . . $ `<file>/external/espeak/encoding.h`/
33
34 #include "synthdata.h"cxx . . $ `<file>/external/espeak/synthdata.h`/
35 #include "common.h"cxx . . $ `<file>/external/espeak/common.h`/ // for GetFileLength
36 #include "error.h"cxx . . $ `<file>/external/espeak/error.h`/ // for create_file_error_context, crea...
37 #include "phoneme.h"cxx . . $ `<file>/external/espeak/phoneme.h`/ // for PHONEME_TAB, PHONEME_TAB_LIST
38 #include "speech.h"cxx . . $ `<file>/external/espeak/speech.h`/ // for path_home, PATHSEP
39 #include "mbrola.h"cxx . . $ `<file>/external/espeak/mbrola.h`/ // for mbrola_name
40 #include "soundicon.h"cxx . . $ `<file>/external/espeak/soundicon.h`/ // for soundicon_tab
41 #include "synthesize.h"cxx . . $ `<file>/external/espeak/synthesize.h`/ // for PHONEME_LIST, frameref_t, PHONE...
42 #include "translate.h"cxx . . $ `<file>/external/espeak/translate.h`/ // for Translator, LANGUAGE_OPTIONS
43 #include "voice.h"cxx . . $ `<file>/external/espeak/voice.h`/ // for ReadTonePoints, tone_points, voice
44
45 #include "espeak_praat.h"cxx . . $ `<file>/external/espeak/espeak_praat.h`/ // for theEspeakPraatFileInMemorySet
46
47 int n_tunescxx . . $ n_tunes. = 0;
48 TUNE *tunescxx . . $ tunes. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
49
50 const int version_phdatacxx . . $ version_phdata. = 0x014801;
51
52 // copy the current phoneme table into here
53 int n_phoneme_tabcxx . . $ n_phoneme_tab.;
54 static int current_phoneme_tablecxx . . $ current_phoneme_table.;
55 PHONEME_TAB *phoneme_tabcxx . . $ phoneme_tab.[N_PHONEME_TABcxx . . $ `external/espeak/phoneme.h:228:9`!];
56
57 static unsigned short *phoneme_indexcxx . . $ phoneme_index. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
58 static char *phondata_ptrcxx . . $ phondata_ptr. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
59 unsigned char *wavefile_datacxx . . $ wavefile_data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
60 static unsigned char *phoneme_tab_datacxx . . $ phoneme_tab_data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
61
62 static int n_phoneme_tablescxx . . $ n_phoneme_tables.;
63 PHONEME_TAB_LIST phoneme_tab_listcxx . . $ phoneme_tab_list.[N_PHONEME_TABScxx . . $ `external/espeak/phoneme.h:227:9`!];
64 int phoneme_tab_numbercxx . . $ phoneme_tab_number. = 0;
65
66 int seq_len_adjustcxx . . $ seq_len_adjust.;
67
68 static espeak_ng_STATUS ReadPhFilecxx . . $ ReadPhFile(fef83da179d5eeae).(void **ptr, const char *fname, int *size, espeak_ng_ERROR_CONTEXT *context)
69 {
70 if (!ptr) return static_cast<espeak_ng_STATUS> (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!);
71
72 FileInMemorycxx . . $ FileInMemory# f_in;
73 int length;
74 char buf[sizeof(path_home)+40];
75
76 sprintf(buf, "%s%c%s", path_home, PATHSEPcxx . . $ `external/espeak/speech.h:71:9`!, fname);
77 length = GetFileLengthcxx . . $ GetFileLength(5c4306d8553b3696).(buf);
78 if (length < 0) // length == -errno
79 return create_file_error_context(context, static_cast<espeak_ng_STATUS> (-length), buf);
80
81 if ((f_in = FileInMemorySet_fopencxx . . $ FileInMemorySet_fopen(3c6da2b95de6d644).(theEspeakPraatFileInMemorySetcxx . . $ theEspeakPraatFileInMemorySet(e171e0b8438add33).(), buf, "rb")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
82 return create_file_error_context(context, static_cast<espeak_ng_STATUS> (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!), buf);
83
84 if (*ptr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
85 freecxx . . $ free(bd21765a0afc8e3c).(*ptr);
86 *ptr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
87 }
88
89 if (length == 0) {
90 *ptr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
91 return static_cast<espeak_ng_STATUS> (0);
92 }
93
94 if ((*ptr = malloccxx . . $ malloc(9f008b2a9698428b).(length)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
95 FileInMemory_fclosecxx . . $ FileInMemory_fclose(18557d97a31d1c3b).(f_in);
96 return static_cast<espeak_ng_STATUS> (ENOMEMcxx . . $ `<external>/8987895939074593727/errno-base.h:16:9`!);
97 }
98 if (FileInMemory_freadcxx . . $ FileInMemory_fread(44d619d1f1a9ecd5).(*ptr, 1, length, f_in) != length) {
99 int error = errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!;
100 FileInMemory_fclosecxx . . $ FileInMemory_fclose(18557d97a31d1c3b).(f_in);
101 freecxx . . $ free(bd21765a0afc8e3c).(*ptr);
102 *ptr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
103 return create_file_error_context(context, static_cast<espeak_ng_STATUS> (error), buf);
104 }
105
106 FileInMemory_fclosecxx . . $ FileInMemory_fclose(18557d97a31d1c3b).(f_in);
107 if (size != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
108 *size = length;
109 return ENS_OK;
110 }
111
112 espeak_ng_STATUS LoadPhDatacxx . . $ LoadPhData(6faa46105df3d911).(int *srate, espeak_ng_ERROR_CONTEXT *context)
113 {
114 int ix;
115 int version;
116 int length = 0;
117 int rate;
118 unsigned char *p;
119
120 espeak_ng_STATUS status;
121 if ((status = ReadPhFilecxx . . $ ReadPhFile(fef83da179d5eeae).((void **)&phoneme_tab_datacxx . . $ phoneme_tab_data., "phontab", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, context)) != ENS_OK)
122 return status;
123 if ((status = ReadPhFilecxx . . $ ReadPhFile(fef83da179d5eeae).((void **)&phoneme_indexcxx . . $ phoneme_index., "phonindex", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, context)) != ENS_OK)
124 return status;
125 if ((status = ReadPhFilecxx . . $ ReadPhFile(fef83da179d5eeae).((void **)&phondata_ptrcxx . . $ phondata_ptr., "phondata", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, context)) != ENS_OK)
126 return status;
127 if ((status = ReadPhFilecxx . . $ ReadPhFile(fef83da179d5eeae).((void **)&tunescxx . . $ tunes., "intonations", &length, context)) != ENS_OK)
128 return status;
129 wavefile_datacxx . . $ wavefile_data. = (unsigned char *)phondata_ptrcxx . . $ phondata_ptr.;
130 n_tunescxx . . $ n_tunes. = length / sizeof(TUNE);
131
132 // read the version number and sample rate from the first 8 bytes of phondata
133 version = 0; // bytes 0-3, version number
134 rate = 0; // bytes 4-7, sample rate
135 if (wavefile_datacxx . . $ wavefile_data.) {
136 for (ix = 0; ix < 4; ix++) {
137 version += (wavefile_datacxx . . $ wavefile_data.[ix] << (ix*8));
138 rate += (wavefile_datacxx . . $ wavefile_data.[ix+4] << (ix*8));
139 }
140 }
141
142 if (version != version_phdatacxx . . $ version_phdata.)
143 return create_version_mismatch_error_context(context, path_home, version, version_phdatacxx . . $ version_phdata.);
144
145 // set up phoneme tables
146 p = phoneme_tab_datacxx . . $ phoneme_tab_data.;
147 n_phoneme_tablescxx . . $ n_phoneme_tables. = p[0];
148 p += 4;
149
150 for (ix = 0; ix < n_phoneme_tablescxx . . $ n_phoneme_tables.; ix++) {
151 int n_phonemes = p[0];
152 phoneme_tab_listcxx . . $ phoneme_tab_list.[ix].n_phonemes = p[0];
153 phoneme_tab_listcxx . . $ phoneme_tab_list.[ix].includes = p[1];
154 p += 4;
155 memcpy(phoneme_tab_listcxx . . $ phoneme_tab_list.[ix].name, p, N_PHONEME_TAB_NAMEcxx . . $ `external/espeak/phoneme.h:229:9`!);
156 p += N_PHONEME_TAB_NAMEcxx . . $ `external/espeak/phoneme.h:229:9`!;
157 phoneme_tab_listcxx . . $ phoneme_tab_list.[ix].phoneme_tab_ptr = (PHONEME_TAB *)p;
158 p += (n_phonemes * sizeof(PHONEME_TAB));
159 }
160
161 if (phoneme_tab_numbercxx . . $ phoneme_tab_number. >= n_phoneme_tablescxx . . $ n_phoneme_tables.)
162 phoneme_tab_numbercxx . . $ phoneme_tab_number. = 0;
163
164 if (srate != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
165 *srate = rate;
166 return ENS_OK;
167 }
168
169 void FreePhDatacxx . . $ FreePhData(49f6e7a06ebc5aa8).(void)
170 {
171 freecxx . . $ free(bd21765a0afc8e3c).(phoneme_tab_datacxx . . $ phoneme_tab_data.);
172 freecxx . . $ free(bd21765a0afc8e3c).(phoneme_indexcxx . . $ phoneme_index.);
173 freecxx . . $ free(bd21765a0afc8e3c).(phondata_ptrcxx . . $ phondata_ptr.);
174 freecxx . . $ free(bd21765a0afc8e3c).(tunescxx . . $ tunes.);
175 phoneme_tab_datacxx . . $ phoneme_tab_data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
176 phoneme_indexcxx . . $ phoneme_index. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
177 phondata_ptrcxx . . $ phondata_ptr. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
178 tunescxx . . $ tunes. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
179 current_phoneme_tablecxx . . $ current_phoneme_table. = -1;
180 }
181
182 int PhonemeCodecxx . . $ PhonemeCode(4c679297bf94b9eb).(unsigned int mnem)
183 {
184 int ix;
185
186 for (ix = 0; ix < n_phoneme_tabcxx . . $ n_phoneme_tab.; ix++) {
187 if (phoneme_tabcxx . . $ phoneme_tab.[ix] == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
188 continue;
189 if (phoneme_tabcxx . . $ phoneme_tab.[ix]->mnemonic == mnem)
190 return phoneme_tabcxx . . $ phoneme_tab.[ix]->code;
191 }
192 return 0;
193 }
194
195 int LookupPhonemeStringcxx . . $ LookupPhonemeString(5c4306d8553b3696).(const char *string)
196 {
197 int ix;
198 unsigned int mnem;
199
200 // Pack up to 4 characters into a word
201 mnem = 0;
202 for (ix = 0; ix < 4; ix++) {
203 if (string[ix] == 0) break;
204 unsigned char c = string[ix];
205 mnem |= (c << (ix*8));
206 }
207
208 return PhonemeCodecxx . . $ PhonemeCode(4c679297bf94b9eb).(mnem);
209 }
210
211 frameref_t *LookupSpectcxx . . $ LookupSpect(95be7f7818559e17).(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist)
212 {
213 int ix;
214 int nf;
215 int nf1;
216 int seq_break;
217 frameref_t *frames;
218 int length1;
219 SPECT_SEQ *seq, *seq2;
220 SPECT_SEQK *seqk, *seqk2;
221 frame_t *frame;
222 static frameref_t frames_buf[N_SEQ_FRAMEScxx . . $ `external/espeak/synthesize.h:37:9`!];
223
224 MAKE_MEM_UNDEFINEDcxx . . $ `external/espeak/speech.h:39:13`!(&frames_buf, sizeof(frames_buf));
225
226 seq = (SPECT_SEQ *)(&phondata_ptrcxx . . $ phondata_ptr.[fmt_params->fmt_addr]);
227 seqk = (SPECT_SEQK *)seq;
228 nf = seq->n_frames;
229
230 if (nf >= N_SEQ_FRAMEScxx . . $ `external/espeak/synthesize.h:37:9`!)
231 nf = N_SEQ_FRAMEScxx . . $ `external/espeak/synthesize.h:37:9`! - 1;
232
233 seq_len_adjustcxx . . $ seq_len_adjust. = fmt_params->fmt2_lenadj + fmt_params->fmt_length;
234 seq_break = 0;
235
236 for (ix = 0; ix < nf; ix++) {
237 if (seq->frame[0].frflags & FRFLAG_KLATTcxx . . $ `external/espeak/synthesize.h:41:9`!)
238 frame = &seqk->frame[ix];
239 else
240 frame = (frame_t *)&seq->frame[ix];
241 frames_buf[ix].frame = frame;
242 frames_buf[ix].frflags = frame->frflags;
243 frames_buf[ix].length = frame->length;
244 if (frame->frflags & FRFLAG_VOWEL_CENTREcxx . . $ `external/espeak/synthesize.h:42:9`!)
245 seq_break = ix;
246 }
247
248 frames = &frames_buf[0];
249 if (seq_break > 0) {
250 if (which == 1)
251 nf = seq_break + 1;
252 else {
253 frames = &frames_buf[seq_break]; // body of vowel, skip past initial frames
254 nf -= seq_break;
255 }
256 }
257
258 // do we need to modify a frame for blending with a consonant?
259 if ((this_ph->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!) && (fmt_params->fmt2_addr == 0) && (fmt_params->use_vowelin))
260 seq_len_adjustcxx . . $ seq_len_adjust. += FormantTransition2(frames, &nf, fmt_params->transition0, fmt_params->transition1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, which);
261
262 length1 = 0;
263 nf1 = nf - 1;
264 for (ix = 0; ix < nf1; ix++)
265 length1 += frames[ix].length;
266
267 if (fmt_params->fmt2_addr != 0) {
268 // a secondary reference has been returned, which is not a wavefile
269 // add these spectra to the main sequence
270 seq2 = (SPECT_SEQ *)(&phondata_ptrcxx . . $ phondata_ptr.[fmt_params->fmt2_addr]);
271 seqk2 = (SPECT_SEQK *)seq2;
272
273 // first frame of the addition just sets the length of the last frame of the main seq
274 nf--;
275 for (ix = 0; ix < seq2->n_frames; ix++) {
276 if (seq2->frame[0].frflags & FRFLAG_KLATTcxx . . $ `external/espeak/synthesize.h:41:9`!)
277 frame = &seqk2->frame[ix];
278 else
279 frame = (frame_t *)&seq2->frame[ix];
280
281 frames[nf].length = frame->length;
282 if (ix > 0) {
283 frames[nf].frame = frame;
284 frames[nf].frflags = frame->frflags;
285 }
286 nf++;
287 }
288 }
289
290 if (length1 > 0) {
291 int length_factor;
292 if (which == 2) {
293 // adjust the length of the main part to match the standard length specified for the vowel
294 // less the front part of the vowel and any added suffix
295
296 int length_std = fmt_params->std_length + seq_len_adjustcxx . . $ seq_len_adjust. - 45;
297 if (length_std < 10)
298 length_std = 10;
299 if (plist->synthflags & SFLAG_LENGTHENcxx . . $ `external/espeak/synthesize.h:55:9`!)
300 length_std += (phoneme_tabcxx . . $ phoneme_tab.[phonLENGTHENcxx . . $ `external/espeak/phoneme.h:210:9`!]->std_length * 2); // phoneme was followed by an extra : symbol
301
302 // can adjust vowel length for stressed syllables here
303
304 length_factor = (length_std * 256)/ length1;
305
306 for (ix = 0; ix < nf1; ix++)
307 frames[ix].length = (frames[ix].length * length_factor)/256;
308 } else {
309 if (which == 1) {
310 // front of a vowel
311 if (fmt_params->fmt_control == 1) {
312 // This is the default start of a vowel.
313 // Allow very short vowels to have shorter front parts
314 if (fmt_params->std_length < 130)
315 frames[0].length = (frames[0].length * fmt_params->std_length)/130;
316 }
317 } else {
318 // not a vowel
319 if (fmt_params->std_length > 0)
320 seq_len_adjustcxx . . $ seq_len_adjust. += (fmt_params->std_length - length1);
321 }
322
323 if (seq_len_adjustcxx . . $ seq_len_adjust. != 0) {
324 length_factor = ((length1 + seq_len_adjustcxx . . $ seq_len_adjust.) * 256)/length1;
325 for (ix = 0; ix < nf1; ix++)
326 frames[ix].length = (frames[ix].length * length_factor)/256;
327 }
328 }
329 }
330
331 *n_frames = nf;
332 return frames;
333 }
334
335 const unsigned char *GetEnvelopecxx . . $ GetEnvelope(9df202a74afba7ac).(int index)
336 {
337 if (index == 0) {
338 fprintf(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "espeak: No envelope\n");
339 return envelope_data[0]; // not found, use a default envelope
340 }
341 return (unsigned char *)&phondata_ptrcxx . . $ phondata_ptr.[index];
342 }
343
344 static void SetUpPhonemeTablecxx . . $ SetUpPhonemeTable(d4f767463ce0a6b3).(int number)
345 {
346 int ix;
347 int includes;
348 PHONEME_TAB *phtab;
349
350 if ((includes = phoneme_tab_listcxx . . $ phoneme_tab_list.[number].includes) > 0) {
351 // recursively include base phoneme tables
352 SetUpPhonemeTablecxx . . $ SetUpPhonemeTable(d4f767463ce0a6b3).(includes - 1);
353 }
354
355 // now add the phonemes from this table
356 phtab = phoneme_tab_listcxx . . $ phoneme_tab_list.[number].phoneme_tab_ptr;
357 for (ix = 0; ix < phoneme_tab_listcxx . . $ phoneme_tab_list.[number].n_phonemes; ix++) {
358 int ph_code = phtab[ix].code;
359 phoneme_tabcxx . . $ phoneme_tab.[ph_code] = &phtab[ix];
360 if (ph_code > n_phoneme_tabcxx . . $ n_phoneme_tab.) {
361 memset(&phoneme_tabcxx . . $ phoneme_tab.[n_phoneme_tabcxx . . $ n_phoneme_tab.+1], 0, (ph_code - (n_phoneme_tabcxx . . $ n_phoneme_tab.+1)) * sizeof(*phoneme_tabcxx . . $ phoneme_tab.));
362 n_phoneme_tabcxx . . $ n_phoneme_tab. = ph_code;
363 }
364 }
365 }
366
367 void SelectPhonemeTablecxx . . $ SelectPhonemeTable(d4f767463ce0a6b3).(int number)
368 {
369 if (current_phoneme_tablecxx . . $ current_phoneme_table. == number) return;
370 n_phoneme_tabcxx . . $ n_phoneme_tab. = 0;
371 MAKE_MEM_UNDEFINEDcxx . . $ `external/espeak/speech.h:39:13`!(&phoneme_tab, sizeof(phoneme_tab));
372 SetUpPhonemeTablecxx . . $ SetUpPhonemeTable(d4f767463ce0a6b3).(number); // recursively for included phoneme tables
373 n_phoneme_tabcxx . . $ n_phoneme_tab.++;
374 current_phoneme_tablecxx . . $ current_phoneme_table. = number;
375 }
376
377 int LookupPhonemeTablecxx . . $ LookupPhonemeTable(5c4306d8553b3696).(const char *name)
378 {
379 int ix;
380
381 for (ix = 0; ix < n_phoneme_tablescxx . . $ n_phoneme_tables.; ix++) {
382 if (strcmp(name, phoneme_tab_listcxx . . $ phoneme_tab_list.[ix].name) == 0) {
383 phoneme_tab_numbercxx . . $ phoneme_tab_number. = ix;
384 break;
385 }
386 }
387 if (ix == n_phoneme_tablescxx . . $ n_phoneme_tables.)
388 return -1;
389
390 return ix;
391 }
392
393 int SelectPhonemeTableNamecxx . . $ SelectPhonemeTableName(5c4306d8553b3696).(const char *name)
394 {
395 // Look up a phoneme set by name, and select it if it exists
396 // Returns the phoneme table number
397 int ix;
398
399 if ((ix = LookupPhonemeTablecxx . . $ LookupPhonemeTable(5c4306d8553b3696).(name)) == -1)
400 return -1;
401
402 SelectPhonemeTablecxx . . $ SelectPhonemeTable(d4f767463ce0a6b3).(ix);
403 return ix;
404 }
405
406 static void InvalidInstncxx . . $ InvalidInstn(2cd598dcb76e4a7e).(PHONEME_TAB *ph, int instn)
407 {
408 char buf[5];
409 fprintf(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Invalid instruction %.4x for phoneme '%s'\n", instn, WordToString(buf, ph->mnemonic));
410 }
411
412 static bool StressConditioncxx . . $ StressCondition(c57810b7ba89883c).(Translator *tr, PHONEME_LIST *plist, int condition, int control)
413 {
414 int stress_level;
415 PHONEME_LIST *pl;
416 static const int condition_level[4] = { 1, 2, 4, 15 };
417
418 if (phoneme_tabcxx . . $ phoneme_tab.[plist[0].phcode]->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!)
419 pl = plist;
420 else {
421 // consonant, get stress from the following vowel
422 if (phoneme_tabcxx . . $ phoneme_tab.[plist[1].phcode]->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!)
423 pl = &plist[1];
424 else
425 return false; // no stress elevel for this consonant
426 }
427
428 stress_level = pl->stresslevel & 0xf;
429
430 if (tr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
431 if ((control & 1) && (plist->synthflags & SFLAG_DICTIONARYcxx . . $ `external/espeak/synthesize.h:56:9`!) && ((tr->langopts.param[LOPT_REDUCEcxx . . $ `external/espeak/translate.h:319:9`!] & 1) == 0)) {
432 // change phoneme. Don't change phonemes which are given for the word in the dictionary.
433 return false;
434 }
435
436 if ((tr->langopts.param[LOPT_REDUCEcxx . . $ `external/espeak/translate.h:319:9`!] & 0x2) && (stress_level >= pl->wordstress)) {
437 // treat the most stressed syllable in an unstressed word as stressed
438 stress_level = STRESS_IS_PRIMARYcxx . . $ `external/espeak/synthesize.h:313:9`!;
439 }
440 }
441
442 if (condition == STRESS_IS_PRIMARYcxx . . $ `external/espeak/synthesize.h:313:9`!)
443 return stress_level >= pl->wordstress;
444
445 if (condition == STRESS_IS_SECONDARYcxx . . $ `external/espeak/synthesize.h:312:9`!) {
446 if (stress_level > STRESS_IS_SECONDARYcxx . . $ `external/espeak/synthesize.h:312:9`!)
447 return true;
448 } else {
449 if (stress_level < condition_level[condition])
450 return true;
451 }
452 return false;
453
454 }
455
456 static int CountVowelPositioncxx . . $ CountVowelPosition(2bd07e5cc7c389a8).(PHONEME_LIST *plist)
457 {
458 int count = 0;
459
460 for (;;) {
461 if (plist->ph->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!)
462 count++;
463 if (plist->sourceix != 0)
464 break;
465 plist--;
466 }
467 return count;
468 }
469
470 static bool InterpretConditioncxx . . $ InterpretCondition(7e6a5d1ae5d78926).(Translator *tr, int control, PHONEME_LIST *plist, unsigned short *p_prog, WORD_PH_DATA *worddata)
471 {
472 unsigned int data;
473 int instn;
474 int instn2;
475
476 // instruction: 2xxx, 3xxx
477
478 // bits 8-10 = 0 to 5, which phoneme, =6 the 'which' information is in the next instruction.
479 // bit 11 = 0, bits 0-7 are a phoneme code
480 // bit 11 = 1, bits 5-7 type of data, bits 0-4 data value
481
482 // bits 8-10 = 7, other conditions
483
484 instn = (*p_prog) & 0xfff;
485 data = instn & 0xff;
486 instn2 = instn >> 8;
487
488 if (instn2 < 14) {
489 PHONEME_LIST *plist_this;
490 plist_this = plist;
491 int which = (instn2) % 7;
492
493 if (which == 6) {
494 // the 'which' code is in the next instruction
495 p_prog++;
496 which = (*p_prog);
497 }
498
499 if (which == 4) {
500 // nextPhW not word boundary
501 if (plist[1].sourceix)
502 return false;
503 }
504 if (which == 5) {
505 // prevPhW, not word boundary
506 if (plist[0].sourceix)
507 return false;
508 }
509 if (which == 6) {
510 // next2PhW, not word boundary
511 if (plist[1].sourceix || plist[2].sourceix)
512 return false;
513 }
514
515 bool check_endtype = false;
516 switch (which)
517 {
518 case 0: // prevPh
519 case 5: // prevPhW
520 plist--;
521 check_endtype = true;
522 break;
523 case 1: // thisPh
524 break;
525 case 2: // nextPh
526 case 4: // nextPhW
527 plist++;
528 break;
529 case 3: // next2Ph
530 case 6: // next2PhW
531 plist += 2;
532 break;
533 case 7:
534 // nextVowel, not word boundary
535 for (which = 1;; which++) {
536 if (plist[which].sourceix)
537 return false;
538 if (phoneme_tabcxx . . $ phoneme_tab.[plist[which].phcode]->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!) {
539 plist = &plist[which];
540 break;
541 }
542 }
543 break;
544 case 8: // prevVowel in this word
545 if ((worddata == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) || (worddata->prev_vowel.ph == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!))
546 return false; // no previous vowel
547 plist = &(worddata->prev_vowel);
548 check_endtype = true;
549 break;
550 case 9: // next3PhW
551 for (int ix = 1; ix <= 3; ix++) {
552 if (plist[ix].sourceix)
553 return false;
554 }
555 plist = &plist[3];
556 break;
557 case 10: // prev2PhW
558 if ((plist[0].sourceix) || (plist[-1].sourceix))
559 return false;
560 plist -= 2;
561 check_endtype = true;
562 break;
563 }
564
565 if ((which == 0) || (which == 5)) {
566 if (plist->phcode == 1) {
567 // This is a NULL phoneme, a phoneme has been deleted so look at the previous phoneme
568 plist--;
569 }
570 }
571
572 if (control & 0x100) {
573 // "change phonemes" pass
574 plist->ph = phoneme_tabcxx . . $ phoneme_tab.[plist->phcode];
575 }
576 PHONEME_TAB *ph;
577 ph = plist->ph;
578
579 if (instn2 < 7) {
580 // 'data' is a phoneme number
581 if ((phoneme_tabcxx . . $ phoneme_tab.[data]->mnemonic == ph->mnemonic) == true)
582 return true;
583
584 // not an exact match, check for a vowel type (eg. #i )
585 if ((check_endtype) && (ph->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!))
586 return data == ph->end_type; // prevPh() match on end_type
587 return data == ph->start_type; // thisPh() or nextPh(), match on start_type
588 }
589
590 data = instn & 0x1f;
591
592 switch (instn & 0xe0)
593 {
594 case CONDITION_IS_PHONEME_TYPEcxx . . $ `external/espeak/synthesize.h:303:9`!:
595 return ph->type == data;
596 case CONDITION_IS_PLACE_OF_ARTICULATIONcxx . . $ `external/espeak/synthesize.h:304:9`!:
597 return ((ph->phflags >> 16) & 0xf) == data;
598 case CONDITION_IS_PHFLAG_SETcxx . . $ `external/espeak/synthesize.h:305:9`!:
599 return (ph->phflags & (1 << data)) != 0;
600 case CONDITION_IS_OTHERcxx . . $ `external/espeak/synthesize.h:306:9`!:
601 switch (data)
602 {
603 case STRESS_IS_DIMINISHEDcxx . . $ `external/espeak/synthesize.h:309:9`!:
604 case STRESS_IS_UNSTRESSEDcxx . . $ `external/espeak/synthesize.h:310:9`!:
605 case STRESS_IS_NOT_STRESSEDcxx . . $ `external/espeak/synthesize.h:311:9`!:
606 case STRESS_IS_SECONDARYcxx . . $ `external/espeak/synthesize.h:312:9`!:
607 case STRESS_IS_PRIMARYcxx . . $ `external/espeak/synthesize.h:313:9`!:
608 return StressConditioncxx . . $ StressCondition(c57810b7ba89883c).(tr, plist, data, 0);
609 case isBreakcxx . . $ `external/espeak/synthesize.h:324:9`!:
610 return (ph->type == phPAUSEcxx . . $ `external/espeak/phoneme.h:132:9`!) || (plist_this->synthflags & SFLAG_NEXT_PAUSEcxx . . $ `external/espeak/synthesize.h:60:9`!);
611 case isWordStartcxx . . $ `external/espeak/synthesize.h:325:9`!:
612 return plist->sourceix != 0;
613 case isWordEndcxx . . $ `external/espeak/synthesize.h:326:9`!:
614 return plist[1].sourceix || (plist[1].ph->type == phPAUSEcxx . . $ `external/espeak/phoneme.h:132:9`!);
615 case isAfterStresscxx . . $ `external/espeak/synthesize.h:317:9`!:
616 if (plist->sourceix != 0)
617 return false;
618 do {
619 plist--;
620 if ((plist->stresslevel & 0xf) >= 4)
621 return true;
622
623 } while (plist->sourceix == 0);
624 break;
625 case isNotVowelcxx . . $ `external/espeak/synthesize.h:318:9`!:
626 return ph->type != phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!;
627 case isFinalVowelcxx . . $ `external/espeak/synthesize.h:319:9`!:
628 for (;;) {
629 plist++;
630 if (plist->sourceix != 0)
631 return true; // start of next word, without finding another vowel
632 if (plist->ph->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!)
633 return false;
634 }
635 case isVoicedcxx . . $ `external/espeak/synthesize.h:320:9`!:
636 return (ph->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!) || (ph->type == phLIQUIDcxx . . $ `external/espeak/phoneme.h:135:9`!) || (ph->phflags & phVOICEDcxx . . $ `external/espeak/phoneme.h:182:9`!);
637 case isFirstVowelcxx . . $ `external/espeak/synthesize.h:321:9`!:
638 return CountVowelPositioncxx . . $ CountVowelPosition(2bd07e5cc7c389a8).(plist) == 1;
639 case isSecondVowelcxx . . $ `external/espeak/synthesize.h:322:9`!:
640 return CountVowelPositioncxx . . $ CountVowelPosition(2bd07e5cc7c389a8).(plist) == 2;
641 case isTranslationGivencxx . . $ `external/espeak/synthesize.h:323:9`!:
642 return (plist->synthflags & SFLAG_DICTIONARYcxx . . $ `external/espeak/synthesize.h:56:9`!) != 0;
643 }
644 break;
645
646 }
647 return false;
648 } else if (instn2 == 0xf) {
649 // Other conditions
650 switch (data)
651 {
652 case 1: // PreVoicing
653 return control & 1;
654 #if USE_KLATTcxx . . $ `external/espeak/espeak__config.h:17:9`!
655 case 2: // KlattSynth
656 return voice->klattv[0] != 0;
657 #endif
658 #if USE_MBROLAcxx . . $ `external/espeak/espeak__config.h:18:9`!
659 case 3: // MbrolaSynth
660 return mbrola_name[0] != 0;
661 #endif
662 }
663 }
664 return false;
665 }
666
667 static void SwitchOnVowelTypecxx . . $ SwitchOnVowelType(7eb43a1cebd5f13b).(PHONEME_LIST *plist, PHONEME_DATA *phdata, unsigned short **p_prog, int instn_type)
668 {
669 int voweltype;
670
671
672 if (instn_type == 2) {
673 phdata->pd_control |= pd_FORNEXTPHcxx . . $ `external/espeak/synthesize.h:224:9`!;
674 voweltype = plist[1].ph->start_type; // SwitchNextVowelType
675 } else
676 voweltype = plist[-1].ph->end_type; // SwitchPrevVowelType
677
678 voweltype -= phonVOWELTYPEScxx . . $ `external/espeak/phoneme.h:225:9`!;
679 if ((voweltype >= 0) && (voweltype < 6)) {
680 unsigned short *prog;
681 signed char x;
682
683 prog = *p_prog + voweltype*2;
684 phdata->sound_addr[instn_type] = (((prog[1] & 0xf) << 16) + prog[2]) * 4;
685 x = (prog[1] >> 4) & 0xff;
686 phdata->sound_param[instn_type] = x; // sign extend
687 }
688
689 *p_prog += 12;
690 }
691
692 static int NumInstnWordscxx . . $ NumInstnWords(910e03eb156beb90).(unsigned short *prog)
693 {
694 int instn;
695 int instn2;
696 int instn_type;
697 int n;
698 int type2;
699 static const char n_words[16] = { 0, 1, 0, 0, 1, 1, 0, 1, 1, 2, 4, 0, 0, 0, 0, 0 };
700
701 instn = *prog;
702 instn_type = instn >> 12;
703 if ((n = n_words[instn_type]) > 0)
704 return n;
705
706 switch (instn_type)
707 {
708 case 0:
709 if (((instn & 0xf00) >> 8) == i_IPA_NAMEcxx . . $ `external/espeak/synthesize.h:275:9`!) {
710 n = ((instn & 0xff) + 1) / 2;
711 return n+1;
712 }
713 return 1;
714 case 6:
715 type2 = (instn & 0xf00) >> 9;
716 if ((type2 == 5) || (type2 == 6))
717 return 12; // switch on vowel type
718 return 1;
719 case 2:
720 case 3:
721 // a condition, check for a 2-word instruction
722 if (((n = instn & 0x0f00) == 0x600) || (n == 0x0d00))
723 return 2;
724 return 1;
725 default:
726 // instn_type 11 to 15, 2 words
727 instn2 = prog[2];
728 if ((instn2 >> 12) == 0xf) {
729 // This instruction is followed by addWav(), 2 more words
730 return 4;
731 }
732 if (instn2 == INSTN_CONTINUEcxx . . $ `external/espeak/synthesize.h:260:9`!)
733 return 3;
734 return 2;
735 }
736 }
737
738 void InterpretPhonemecxx . . $ InterpretPhoneme(d799dfc391a6b9a1).(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata, WORD_PH_DATA *worddata)
739 {
740 // control:
741 // bit 0: PreVoicing
742 // bit 8: change phonemes
743
744 PHONEME_TAB *ph;
745 unsigned short *prog;
746 int or_flag;
747 bool truth;
748 bool truth2;
749 int data;
750 int end_flag;
751 int ix;
752 signed char param_sc;
753
754 #define N_RETURNcxx . . $ `external/espeak/synthdata.cpp:754:10`! 10
755 int n_return = 0;
756 unsigned short *return_addr[N_RETURNcxx . . $ `external/espeak/synthdata.cpp:754:10`!]; // return address stack
757
758 ph = plist->ph;
759
760 if ((worddata != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) && (plist->sourceix)) {
761 // start of a word, reset word data
762 worddata->prev_vowel.ph = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
763 }
764
765 memset(phdata, 0, sizeof(PHONEME_DATA));
766 phdata->pd_param[i_SET_LENGTHcxx . . $ `external/espeak/synthesize.h:272:9`!] = ph->std_length;
767 phdata->pd_param[i_LENGTH_MODcxx . . $ `external/espeak/synthesize.h:271:9`!] = ph->length_mod;
768
769 if (ph->program == 0)
770 return;
771
772 end_flag = 0;
773
774 for (prog = &phoneme_indexcxx . . $ phoneme_index.[ph->program]; end_flag != 1; prog++) {
775 unsigned short instn;
776 int instn2;
777
778 instn = *prog;
779 instn2 = (instn >> 8) & 0xf;
780
781 switch (instn >> 12)
782 {
783 case 0: // 0xxx
784 data = instn & 0xff;
785
786 if (instn2 == 0) {
787 // instructions with no operand
788 switch (data)
789 {
790 case INSTN_RETURNcxx . . $ `external/espeak/synthesize.h:259:9`!:
791 end_flag = 1;
792 break;
793 case INSTN_CONTINUEcxx . . $ `external/espeak/synthesize.h:260:9`!:
794 break;
795 default:
796 InvalidInstncxx . . $ InvalidInstn(2cd598dcb76e4a7e).(ph, instn);
797 break;
798 }
799 } else if (instn2 == i_APPEND_IFNEXTVOWELcxx . . $ `external/espeak/synthesize.h:267:9`!) {
800 if (phoneme_tabcxx . . $ phoneme_tab.[plist[1].phcode]->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!)
801 phdata->pd_param[i_APPEND_PHONEMEcxx . . $ `external/espeak/synthesize.h:266:9`!] = data;
802 } else if (instn2 == i_ADD_LENGTHcxx . . $ `external/espeak/synthesize.h:274:9`!) {
803 if (data & 0x80) {
804 // a negative value, do sign extension
805 data = -(0x100 - data);
806 }
807 phdata->pd_param[i_SET_LENGTHcxx . . $ `external/espeak/synthesize.h:272:9`!] += data;
808 } else if (instn2 == i_IPA_NAMEcxx . . $ `external/espeak/synthesize.h:275:9`!) {
809 // followed by utf-8 characters, 2 per instn word
810 for (ix = 0; (ix < data) && (ix < 16); ix += 2) {
811 prog++;
812 phdata->ipa_string[ix] = prog[0] >> 8;
813 phdata->ipa_string[ix+1] = prog[0] & 0xff;
814 }
815 phdata->ipa_string[ix] = 0;
816 } else if (instn2 < N_PHONEME_DATA_PARAMcxx . . $ `external/espeak/synthesize.h:217:9`!) {
817 phdata->pd_param[instn2] = data;
818 if ((instn2 == i_CHANGE_PHONEMEcxx . . $ `external/espeak/synthesize.h:263:9`!) && (control & 0x100)) {
819 // found ChangePhoneme() in PhonemeList mode, exit
820 end_flag = 1;
821 }
822 } else
823 InvalidInstncxx . . $ InvalidInstn(2cd598dcb76e4a7e).(ph, instn);
824 break;
825 case 1:
826 if (tr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
827 break; // ignore if in synthesis stage
828
829 if (instn2 < 8) {
830 // ChangeIf
831 if (StressConditioncxx . . $ StressCondition(c57810b7ba89883c).(tr, plist, instn2 & 7, 1) == true) {
832 phdata->pd_param[i_CHANGE_PHONEMEcxx . . $ `external/espeak/synthesize.h:263:9`!] = instn & 0xff;
833 end_flag = 1; // change phoneme, exit
834 }
835 }
836 break;
837 case 2:
838 case 3:
839 // conditions
840 or_flag = 0;
841 truth = true;
842 while ((instn & 0xe000) == 0x2000) {
843 // process a sequence of conditions, using boolean accumulator
844 truth2 = InterpretConditioncxx . . $ InterpretCondition(7e6a5d1ae5d78926).(tr, control, plist, prog, worddata);
845 prog += NumInstnWordscxx . . $ NumInstnWords(910e03eb156beb90).(prog);
846 if (*prog == i_NOTcxx . . $ `external/espeak/synthesize.h:282:9`!) {
847 truth2 = truth2 ^ 1;
848 prog++;
849 }
850
851 if (or_flag)
852 truth = truth || truth2;
853 else
854 truth = truth && truth2;
855 or_flag = instn & 0x1000;
856 instn = *prog;
857 }
858
859 if (truth == false) {
860 if ((instn & 0xf800) == i_JUMP_FALSEcxx . . $ `external/espeak/synthesize.h:285:9`!)
861 prog += instn & 0xff;
862 else {
863 // instruction after a condition is not JUMP_FALSE, so skip the instruction.
864 prog += NumInstnWordscxx . . $ NumInstnWords(910e03eb156beb90).(prog);
865 if ((prog[0] & 0xfe00) == 0x6000)
866 prog++; // and skip ELSE jump
867 }
868 }
869 prog--;
870 break;
871 case 6:
872 // JUMP
873 switch (instn2 >> 1)
874 {
875 case 0:
876 prog += (instn & 0xff) - 1;
877 break;
878 case 4:
879 // conditional jumps should have been processed in the Condition section
880 break;
881 case 5: // NexttVowelStarts
882 SwitchOnVowelTypecxx . . $ SwitchOnVowelType(7eb43a1cebd5f13b).(plist, phdata, &prog, 2);
883 break;
884 case 6: // PrevVowelTypeEndings
885 SwitchOnVowelTypecxx . . $ SwitchOnVowelType(7eb43a1cebd5f13b).(plist, phdata, &prog, 3);
886 break;
887 }
888 break;
889 case 9:
890 data = ((instn & 0xf) << 16) + prog[1];
891 prog++;
892 switch (instn2)
893 {
894 case 1:
895 // call a procedure or another phoneme
896 if (n_return < N_RETURNcxx . . $ `external/espeak/synthdata.cpp:754:10`!) {
897 return_addr[n_return++] = prog;
898 prog = &phoneme_indexcxx . . $ phoneme_index.[data] - 1;
899 }
900 break;
901 case 2:
902 // pitch envelope
903 phdata->pitch_env = data;
904 break;
905 case 3:
906 // amplitude envelope
907 phdata->amp_env = data;
908 break;
909 }
910 break;
911 case 10: // Vowelin, Vowelout
912 if (instn2 == 1)
913 ix = 0;
914 else
915 ix = 2;
916
917 phdata->vowel_transition[ix] = ((prog[0] & 0xff) << 16) + prog[1];
918 phdata->vowel_transition[ix+1] = (prog[2] << 16) + prog[3];
919 prog += 3;
920 break;
921 case 11: // FMT
922 case 12: // WAV
923 case 13: // VowelStart
924 case 14: // VowelEnd
925 case 15: // addWav
926 instn2 = (instn >> 12) - 11;
927 phdata->sound_addr[instn2] = ((instn & 0xf) << 18) + (prog[1] << 2);
928 param_sc = phdata->sound_param[instn2] = (instn >> 4) & 0xff;
929 prog++;
930
931 if (prog[1] != INSTN_CONTINUEcxx . . $ `external/espeak/synthesize.h:260:9`!) {
932 if (instn2 < 2) {
933 // FMT() and WAV() imply Return
934 end_flag = 1;
935 if ((prog[1] >> 12) == 0xf) {
936 // Return after the following addWav()
937 end_flag = 2;
938 }
939 } else if (instn2 == pd_ADDWAVcxx . . $ `external/espeak/synthesize.h:215:9`!) {
940 // addWav(), return if previous instruction was FMT() or WAV()
941 end_flag--;
942 }
943
944 if ((instn2 == pd_VWLSTARTcxx . . $ `external/espeak/synthesize.h:213:9`!) || (instn2 == pd_VWLENDcxx . . $ `external/espeak/synthesize.h:214:9`!)) {
945 // VowelStart or VowelEnding.
946 phdata->sound_param[instn2] = param_sc; // sign extend
947 }
948 }
949 break;
950 default:
951 InvalidInstncxx . . $ InvalidInstn(2cd598dcb76e4a7e).(ph, instn);
952 break;
953 }
954
955 if ((end_flag == 1) && (n_return > 0)) {
956 // return from called procedure or phoneme
957 end_flag = 0;
958 prog = return_addr[--n_return];
959 }
960 }
961
962 if ((worddata != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) && (plist->type == phVOWELcxx . . $ `external/espeak/phoneme.h:134:9`!))
963 memcpy(&worddata->prev_vowel, &plist[0], sizeof(PHONEME_LIST));
964
965 plist->std_length = phdata->pd_param[i_SET_LENGTHcxx . . $ `external/espeak/synthesize.h:272:9`!];
966 if (phdata->sound_addr[0] != 0) {
967 plist->phontab_addr = phdata->sound_addr[0]; // FMT address
968 plist->sound_param = phdata->sound_param[0];
969 } else {
970 plist->phontab_addr = phdata->sound_addr[1]; // WAV address
971 plist->sound_param = phdata->sound_param[1];
972 }
973 }
974
975 void InterpretPhoneme2cxx . . $ InterpretPhoneme2(2186cafe7f7186b0).(int phcode, PHONEME_DATA *phdata)
976 {
977 // Examine the program of a single isolated phoneme
978 int ix;
979 PHONEME_LIST plist[4];
980 memset(plist, 0, sizeof(plist));
981
982 for (ix = 0; ix < 4; ix++) {
983 plist[ix].phcode = phonPAUSEcxx . . $ `external/espeak/phoneme.h:207:9`!;
984 plist[ix].ph = phoneme_tabcxx . . $ phoneme_tab.[phonPAUSEcxx . . $ `external/espeak/phoneme.h:207:9`!];
985 }
986
987 plist[1].phcode = phcode;
988 plist[1].ph = phoneme_tabcxx . . $ phoneme_tab.[phcode];
989 plist[2].sourceix = 1;
990
991 InterpretPhonemecxx . . $ InterpretPhoneme(d799dfc391a6b9a1).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0, &plist[1], phdata, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
992 }