| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "error.h" | #include "error.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | #include "synthesize.h" |
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include <ucd/ucd.h> | #include <ucd/ucd.h> | ||||
| #include "readclause.h" | |||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" |
| /* | |||||
| * Copyright (C) 2005 to 2015 by Jonathan Duddington | |||||
| * email: [email protected] | |||||
| * Copyright (C) 2015-2018 Reece H. Dunn | |||||
| * Copyright (C) 2018 Juho Hiltunen | |||||
| * | |||||
| * This program is free software; you can redistribute it and/or modify | |||||
| * it under the terms of the GNU General Public License as published by | |||||
| * the Free Software Foundation; either version 3 of the License, or | |||||
| * (at your option) any later version. | |||||
| * | |||||
| * This program is distributed in the hope that it will be useful, | |||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| * GNU General Public License for more details. | |||||
| * | |||||
| * You should have received a copy of the GNU General Public License | |||||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||||
| */ | |||||
| #ifndef ESPEAK_NG_READCLAUSE_H | |||||
| #define ESPEAK_NG_READCLAUSE_H | |||||
| #include "translate.h" | |||||
| #ifdef __cplusplus | |||||
| extern "C" | |||||
| { | |||||
| #endif | |||||
| typedef struct { | |||||
| int type; | |||||
| int parameter[N_SPEECH_PARAM]; | |||||
| } PARAM_STACK; | |||||
| extern PARAM_STACK param_stack[]; | |||||
| extern const int param_defaults[N_SPEECH_PARAM]; | |||||
| int clause_type_from_codepoint(uint32_t c); | |||||
| int towlower2(unsigned int c); // Supports Turkish I | |||||
| int Eof(void); | |||||
| const char *WordToString2(unsigned int word); | |||||
| int Read4Bytes(FILE *f); | |||||
| int LoadSoundFile2(const char *fname); | |||||
| int AddNameData(const char *name, | |||||
| int wide); | |||||
| int ReadClause(Translator *tr, | |||||
| char *buf, | |||||
| short *charix, | |||||
| int *charix_top, | |||||
| int n_buf, | |||||
| int *tone_type, | |||||
| char *voice_change); | |||||
| #ifdef __cplusplus | |||||
| } | |||||
| #endif | |||||
| #endif | |||||
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | #include "synthesize.h" |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include <ucd/ucd.h> | #include <ucd/ucd.h> | ||||
| #include "readclause.h" | |||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" |
| #define HTML_NOSPACE 16 // don't insert a space for this element, so it doesn't break a word | #define HTML_NOSPACE 16 // don't insert a space for this element, so it doesn't break a word | ||||
| #define SSML_CLOSE 0x20 // for a closing tag, OR this with the tag type | #define SSML_CLOSE 0x20 // for a closing tag, OR this with the tag type | ||||
| int LoadSoundFile2(const char *fname); | |||||
| int AddNameData(const char *name, | |||||
| int wide); | |||||
| int ProcessSsmlTag(wchar_t *xml_buf, | int ProcessSsmlTag(wchar_t *xml_buf, | ||||
| char *outbuf, | char *outbuf, | ||||
| int *outix, | int *outix, |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" |
| int FormantTransition2(frameref_t *seq, int *n_frames, unsigned int data1, unsigned int data2, PHONEME_TAB *other_ph, int which); | int FormantTransition2(frameref_t *seq, int *n_frames, unsigned int data1, unsigned int data2, PHONEME_TAB *other_ph, int which); | ||||
| void Write4Bytes(FILE *f, int value); | void Write4Bytes(FILE *f, int value); | ||||
| int Read4Bytes(FILE *f); | |||||
| int Reverse4Bytes(int word); | int Reverse4Bytes(int word); | ||||
| #if HAVE_SONIC_H | #if HAVE_SONIC_H |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |
| #define CLAUSE_COLON (30 | CLAUSE_INTONATION_FULL_STOP | CLAUSE_TYPE_CLAUSE) | #define CLAUSE_COLON (30 | CLAUSE_INTONATION_FULL_STOP | CLAUSE_TYPE_CLAUSE) | ||||
| #define CLAUSE_SEMICOLON (30 | CLAUSE_INTONATION_COMMA | CLAUSE_TYPE_CLAUSE) | #define CLAUSE_SEMICOLON (30 | CLAUSE_INTONATION_COMMA | CLAUSE_TYPE_CLAUSE) | ||||
| int clause_type_from_codepoint(uint32_t c); | |||||
| //@} | //@} | ||||
| #define SAYAS_CHARS 0x12 | #define SAYAS_CHARS 0x12 | ||||
| unsigned char length; | unsigned char length; | ||||
| } WORD_TAB; | } WORD_TAB; | ||||
| typedef struct { | |||||
| int type; | |||||
| int parameter[N_SPEECH_PARAM]; | |||||
| } PARAM_STACK; | |||||
| extern PARAM_STACK param_stack[]; | |||||
| extern const int param_defaults[N_SPEECH_PARAM]; | |||||
| typedef struct { | typedef struct { | ||||
| const char *name; | const char *name; | ||||
| int offset; | int offset; | ||||
| int lookupwchar(const unsigned short *list, int c); | int lookupwchar(const unsigned short *list, int c); | ||||
| int lookupwchar2(const unsigned short *list, int c); | int lookupwchar2(const unsigned short *list, int c); | ||||
| int Eof(void); | |||||
| char *strchr_w(const char *s, int c); | char *strchr_w(const char *s, int c); | ||||
| int IsBracket(int c); | int IsBracket(int c); | ||||
| void InitNamedata(void); | void InitNamedata(void); | ||||
| int IsVowel(Translator *tr, int c); | int IsVowel(Translator *tr, int c); | ||||
| int IsSuperscript(int letter); | int IsSuperscript(int letter); | ||||
| int isspace2(unsigned int c); | int isspace2(unsigned int c); | ||||
| int towlower2(unsigned int c); // Supports Turkish I | |||||
| const char *GetTranslatedPhonemeString(int phoneme_mode); | const char *GetTranslatedPhonemeString(int phoneme_mode); | ||||
| const char *WordToString2(unsigned int word); | |||||
| ALPHABET *AlphabetFromChar(int c); | ALPHABET *AlphabetFromChar(int c); | ||||
| Translator *SelectTranslator(const char *name); | Translator *SelectTranslator(const char *name); | ||||
| int TranslateRules(Translator *tr, char *p, char *phonemes, int size, char *end_phonemes, int end_flags, unsigned int *dict_flags); | int TranslateRules(Translator *tr, char *p, char *phonemes, int size, char *end_phonemes, int end_flags, unsigned int *dict_flags); | ||||
| int TranslateWord(Translator *tr, char *word1, WORD_TAB *wtab, char *word_out); | int TranslateWord(Translator *tr, char *word1, WORD_TAB *wtab, char *word_out); | ||||
| void TranslateClause(Translator *tr, int *tone, char **voice_change); | void TranslateClause(Translator *tr, int *tone, char **voice_change); | ||||
| int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_buf, int *tone_type, char *voice_change); | |||||
| void SetVoiceStack(espeak_VOICE *v, const char *variant_name); | void SetVoiceStack(espeak_VOICE *v, const char *variant_name); | ||||
| void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata, WORD_PH_DATA *worddata); | void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata, WORD_PH_DATA *worddata); |
| #include <espeak-ng/speak_lib.h> | #include <espeak-ng/speak_lib.h> | ||||
| #include <espeak-ng/encoding.h> | #include <espeak-ng/encoding.h> | ||||
| #include "readclause.h" | |||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | #include "voice.h" |