| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <strings.h> | #include <strings.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <time.h> | #include <time.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "espeak_ng.h" | #include "espeak_ng.h" |
| * <http://www.gnu.org/licenses/>. | * <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "espeak_ng.h" | #include "espeak_ng.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include "speech.h" | #include "speech.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <wchar.h> | #include <wchar.h> | ||||
| if(p[0] == RULE_REPLACEMENTS) | if(p[0] == RULE_REPLACEMENTS) | ||||
| { | { | ||||
| pw = (unsigned int *)(((long64)p+4) & ~3); // advance to next word boundary | |||||
| pw = (unsigned int *)(((intptr_t)p+4) & ~3); // advance to next word boundary | |||||
| tr->langopts.replace_chars = pw; | tr->langopts.replace_chars = pw; | ||||
| while(pw[0] != 0) | while(pw[0] != 0) | ||||
| { | { |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "espeak_command.h" | #include "espeak_command.h" | ||||
| #include <stdlib.h> | #include <stdlib.h> |
| // This source file is only used for asynchronious modes | // This source file is only used for asynchronious modes | ||||
| #include "config.h" | |||||
| #ifndef PLATFORM_WINDOWS | #ifndef PLATFORM_WINDOWS | ||||
| #include <unistd.h> | #include <unistd.h> | ||||
| #endif | #endif |
| // This source file is only used for asynchronious modes | // This source file is only used for asynchronious modes | ||||
| #include "config.h" | |||||
| #ifndef PLATFORM_WINDOWS | #ifndef PLATFORM_WINDOWS | ||||
| #include <unistd.h> | #include <unistd.h> | ||||
| #endif | #endif |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| // See URL: ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/synthesis/klatt.3.04.tar.gz | // See URL: ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/synthesis/klatt.3.04.tar.gz | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| * GNU General Public License for more details. | * GNU General Public License for more details. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include <stdarg.h> | #include <stdarg.h> |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdbool.h> | #include <stdbool.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <wchar.h> | #include <wchar.h> |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <wchar.h> | #include <wchar.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| #include <string.h> | #include <string.h> | ||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include "speech.h" | |||||
| #include "sonic.h" | #include "sonic.h" | ||||
| struct sonicStreamStruct { | struct sonicStreamStruct { |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "stdio.h" | #include "stdio.h" | ||||
| #include "ctype.h" | #include "ctype.h" | ||||
| #include "string.h" | #include "string.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "spect.h" | #include "spect.h" | ||||
| #include <math.h> | #include <math.h> | ||||
| #include <stdint.h> | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| typedef unsigned short USHORT; | typedef unsigned short USHORT; | ||||
| typedef unsigned char UCHAR; | typedef unsigned char UCHAR; | ||||
| typedef double DOUBLEX; | typedef double DOUBLEX; | ||||
| #if !HAVE_STDINT_H | |||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||
| typedef uint64_t long64; // use this for conversion between pointers and integers | |||||
| typedef signed __int64 intptr_t; | |||||
| #else | #else | ||||
| typedef unsigned long long64; // use this for conversion between pointers and integers | |||||
| typedef signed __int32 intptr_t; | |||||
| #endif | |||||
| #endif | #endif | ||||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdbool.h> | #include <stdbool.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| static void DoAmplitude(int amp, unsigned char *amp_env) | static void DoAmplitude(int amp, unsigned char *amp_env) | ||||
| { | { | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| last_amp_cmd = wcmdq_tail; | last_amp_cmd = wcmdq_tail; | ||||
| amp_length = 0; // total length of vowel with this amplitude envelope | amp_length = 0; // total length of vowel with this amplitude envelope | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_AMPLITUDE; | q[0] = WCMD_AMPLITUDE; | ||||
| q[1] = 0; // fill in later from amp_length | q[1] = 0; // fill in later from amp_length | ||||
| q[2] = (long64)amp_env; | |||||
| q[2] = (intptr_t)amp_env; | |||||
| q[3] = amp; | q[3] = amp; | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } | ||||
| static void DoPitch(unsigned char *env, int pitch1, int pitch2) | static void DoPitch(unsigned char *env, int pitch1, int pitch2) | ||||
| { | { | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| EndPitch(0); | EndPitch(0); | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_PITCH; | q[0] = WCMD_PITCH; | ||||
| q[1] = 0; // length, fill in later from pitch_length | q[1] = 0; // length, fill in later from pitch_length | ||||
| q[2] = (long64)env; | |||||
| q[2] = (intptr_t)env; | |||||
| q[3] = (pitch1 << 16) + pitch2; | q[3] = (pitch1 << 16) + pitch2; | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } | ||||
| int min_length; | int min_length; | ||||
| int x; | int x; | ||||
| int len4; | int len4; | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| unsigned char *p; | unsigned char *p; | ||||
| index = index & 0x7fffff; | index = index & 0x7fffff; | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_WAVE2; | q[0] = WCMD_WAVE2; | ||||
| q[1] = length | (wav_length << 16); // length in samples | q[1] = length | (wav_length << 16); // length in samples | ||||
| q[2] = (long64)(&wavefile_data[index]); | |||||
| q[2] = (intptr_t)(&wavefile_data[index]); | |||||
| q[3] = wav_scale + (amp << 8); | q[3] = wav_scale + (amp << 8); | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| return(length); | return(length); | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_WAVE; | q[0] = WCMD_WAVE; | ||||
| q[1] = x; // length in samples | q[1] = x; // length in samples | ||||
| q[2] = (long64)(&wavefile_data[index]); | |||||
| q[2] = (intptr_t)(&wavefile_data[index]); | |||||
| q[3] = wav_scale + (amp << 8); | q[3] = wav_scale + (amp << 8); | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_WAVE; | q[0] = WCMD_WAVE; | ||||
| q[1] = len4*2; // length in samples | q[1] = len4*2; // length in samples | ||||
| q[2] = (long64)(&wavefile_data[index+x]); | |||||
| q[2] = (intptr_t)(&wavefile_data[index+x]); | |||||
| q[3] = wav_scale + (amp << 8); | q[3] = wav_scale + (amp << 8); | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = WCMD_WAVE; | q[0] = WCMD_WAVE; | ||||
| q[1] = length; // length in samples | q[1] = length; // length in samples | ||||
| q[2] = (long64)(&wavefile_data[index+x]); | |||||
| q[2] = (intptr_t)(&wavefile_data[index+x]); | |||||
| q[3] = wav_scale + (amp << 8); | q[3] = wav_scale + (amp << 8); | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } | ||||
| { | { | ||||
| // Limit the rate of frequence change of formants, to reduce chirping | // Limit the rate of frequence change of formants, to reduce chirping | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| frame_t *frame; | frame_t *frame; | ||||
| frame_t *frame2; | frame_t *frame2; | ||||
| frame_t *frame1; | frame_t *frame1; | ||||
| frame1 = (frame_t *)q[3]; | frame1 = (frame_t *)q[3]; | ||||
| if(frame1 == frame) | if(frame1 == frame) | ||||
| { | { | ||||
| q[3] = (long64)frame2; | |||||
| q[3] = (intptr_t)frame2; | |||||
| frame1 = frame2; | frame1 = frame2; | ||||
| } | } | ||||
| else | else | ||||
| modified = 1; | modified = 1; | ||||
| } | } | ||||
| frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | ||||
| q[2] = (long64)frame2; | |||||
| q[2] = (intptr_t)frame2; | |||||
| } | } | ||||
| else | else | ||||
| if(diff < -allowed) | if(diff < -allowed) | ||||
| modified = 1; | modified = 1; | ||||
| } | } | ||||
| frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | ||||
| q[2] = (long64)frame2; | |||||
| q[2] = (intptr_t)frame2; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| { | { | ||||
| if(frame1 == frame) | if(frame1 == frame) | ||||
| { | { | ||||
| q[2] = (long64)frame2; | |||||
| q[2] = (intptr_t)frame2; | |||||
| frame1 = frame2; | frame1 = frame2; | ||||
| } | } | ||||
| else | else | ||||
| modified = 1; | modified = 1; | ||||
| } | } | ||||
| frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | ||||
| q[3] = (long64)frame2; | |||||
| q[3] = (intptr_t)frame2; | |||||
| } | } | ||||
| else | else | ||||
| if(diff < -allowed) | if(diff < -allowed) | ||||
| modified = 1; | modified = 1; | ||||
| } | } | ||||
| frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | ||||
| q[3] = (long64)frame2; | |||||
| q[3] = (intptr_t)frame2; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| frame_t *frame2; | frame_t *frame2; | ||||
| frame_t *fr; | frame_t *fr; | ||||
| int ix; | int ix; | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| int len; | int len; | ||||
| int frame_length; | int frame_length; | ||||
| int length_factor; | int length_factor; | ||||
| && !(last_frame->frflags & FRFLAG_BREAK)) | && !(last_frame->frflags & FRFLAG_BREAK)) | ||||
| { | { | ||||
| // last frame of previous sequence was zero-length, replace with first of this sequence | // last frame of previous sequence was zero-length, replace with first of this sequence | ||||
| wcmdq[last_wcmdq][3] = (long64)frame1; | |||||
| wcmdq[last_wcmdq][3] = (intptr_t)frame1; | |||||
| if(last_frame->frflags & FRFLAG_BREAK_LF) | if(last_frame->frflags & FRFLAG_BREAK_LF) | ||||
| { | { | ||||
| fr->ffreq[ix] = last_frame->ffreq[ix]; | fr->ffreq[ix] = last_frame->ffreq[ix]; | ||||
| fr->fheight[ix] = last_frame->fheight[ix]; | fr->fheight[ix] = last_frame->fheight[ix]; | ||||
| } | } | ||||
| wcmdq[last_wcmdq][3] = (long64)fr; | |||||
| wcmdq[last_wcmdq][3] = (intptr_t)fr; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| q = wcmdq[wcmdq_tail]; | q = wcmdq[wcmdq_tail]; | ||||
| q[0] = wcmd_spect; | q[0] = wcmd_spect; | ||||
| q[1] = len + (modulation << 16); | q[1] = len + (modulation << 16); | ||||
| q[2] = (long64)frame1; | |||||
| q[3] = (long64)frame2; | |||||
| q[2] = (intptr_t)frame1; | |||||
| q[3] = (intptr_t)frame2; | |||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } | ||||
| v2 = (voice_t *)malloc(sizeof(voice_t)); | v2 = (voice_t *)malloc(sizeof(voice_t)); | ||||
| memcpy(v2,v,sizeof(voice_t)); | memcpy(v2,v,sizeof(voice_t)); | ||||
| wcmdq[wcmdq_tail][0] = WCMD_VOICE; | wcmdq[wcmdq_tail][0] = WCMD_VOICE; | ||||
| wcmdq[wcmdq_tail][2] = (long64)v2; | |||||
| wcmdq[wcmdq_tail][2] = (intptr_t)v2; | |||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } | ||||
| DoPause(10,0); // ensure a break in the speech | DoPause(10,0); // ensure a break in the speech | ||||
| wcmdq[wcmdq_tail][0] = WCMD_WAVE; | wcmdq[wcmdq_tail][0] = WCMD_WAVE; | ||||
| wcmdq[wcmdq_tail][1] = soundicon_tab[value].length; | wcmdq[wcmdq_tail][1] = soundicon_tab[value].length; | ||||
| wcmdq[wcmdq_tail][2] = (long64)soundicon_tab[value].data + 44; // skip WAV header | |||||
| wcmdq[wcmdq_tail][2] = (intptr_t)soundicon_tab[value].data + 44; // skip WAV header | |||||
| wcmdq[wcmdq_tail][3] = 0x1500; // 16 bit data, amp=21 | wcmdq[wcmdq_tail][3] = 0x1500; // 16 bit data, amp=21 | ||||
| WcmdqInc(); | WcmdqInc(); | ||||
| } | } |
| #define N_WCMDQ 170 | #define N_WCMDQ 170 | ||||
| #define MIN_WCMDQ 25 // need this many free entries before adding new phoneme | #define MIN_WCMDQ 25 // need this many free entries before adding new phoneme | ||||
| extern long64 wcmdq[N_WCMDQ][4]; | |||||
| extern intptr_t wcmdq[N_WCMDQ][4]; | |||||
| extern int wcmdq_head; | extern int wcmdq_head; | ||||
| extern int wcmdq_tail; | extern int wcmdq_tail; | ||||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <locale.h> | #include <locale.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include <wctype.h> | #include <wctype.h> | ||||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include <wctype.h> | #include <wctype.h> | ||||
| #include <wchar.h> | #include <wchar.h> |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "stdio.h" | #include "stdio.h" | ||||
| #include "ctype.h" | #include "ctype.h" | ||||
| #include "wctype.h" | #include "wctype.h" | ||||
| #include "string.h" | #include "string.h" | ||||
| #include "stdlib.h" | #include "stdlib.h" | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #ifdef PLATFORM_WINDOWS | #ifdef PLATFORM_WINDOWS |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #ifdef USE_ASYNC | #ifdef USE_ASYNC |
| // * prebuf,... size? | // * prebuf,... size? | ||||
| // * 0.9.6: pb pulse_free using tlength=8820 (max size never returned -> tlength=10000 ok, but higher drain). | // * 0.9.6: pb pulse_free using tlength=8820 (max size never returned -> tlength=10000 ok, but higher drain). | ||||
| // | // | ||||
| #include "config.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #ifdef USE_ASYNC | #ifdef USE_ASYNC |
| // this version keeps wavemult window as a constant fraction | // this version keeps wavemult window as a constant fraction | ||||
| // of the cycle length - but that spreads out the HF peaks too much | // of the cycle length - but that spreads out the HF peaks too much | ||||
| #include "config.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #if HAVE_STDINT_H | |||||
| #include <stdint.h> | |||||
| #endif | |||||
| int outbuf_size = 0; | int outbuf_size = 0; | ||||
| // the queue of operations passed to wavegen from sythesize | // the queue of operations passed to wavegen from sythesize | ||||
| long64 wcmdq[N_WCMDQ][4]; | |||||
| intptr_t wcmdq[N_WCMDQ][4]; | |||||
| int wcmdq_head=0; | int wcmdq_head=0; | ||||
| int wcmdq_tail=0; | int wcmdq_tail=0; | ||||
| // return: 0 output buffer has been filled | // return: 0 output buffer has been filled | ||||
| // return: 1 input command queue is now empty | // return: 1 input command queue is now empty | ||||
| long64 *q; | |||||
| intptr_t *q; | |||||
| int length; | int length; | ||||
| int result; | int result; | ||||
| int marker_type; | int marker_type; |
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | * along with this program; if not, see: <http://www.gnu.org/licenses/>. | ||||
| */ | */ | ||||
| #include "config.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include <stdbool.h> | #include <stdbool.h> |