@@ -33,6 +33,7 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "readclause.h" | |||
#include "error.h" |
@@ -31,9 +31,10 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "numbers.h" | |||
#include "readclause.h" | |||
#include "synthdata.h" | |||
#include "numbers.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
@@ -98,7 +99,7 @@ void strncpy0(char *to, const char *from, int size) | |||
} | |||
#pragma GCC visibility pop | |||
int Reverse4Bytes(int word) | |||
static int Reverse4Bytes(int word) | |||
{ | |||
// reverse the order of bytes from little-endian to big-endian | |||
#ifdef ARCH_BIG |
@@ -0,0 +1,56 @@ | |||
/* | |||
* 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_DICTIONARY_H | |||
#define ESPEAK_NG_DICTIONARY_H | |||
#include "synthesize.h" | |||
#include "translate.h" | |||
#ifdef __cplusplus | |||
extern "C" | |||
{ | |||
#endif | |||
void strncpy0(char *to, const char *from, int size); | |||
int LoadDictionary(Translator *tr, const char *name, int no_error); | |||
int HashDictionary(const char *string); | |||
const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme); | |||
void DecodePhonemes(const char *inptr, char *outptr); | |||
char *WritePhMnemonic(char *phon_out, PHONEME_TAB *ph, PHONEME_LIST *plist, int use_ipa, int *flags); | |||
const char *GetTranslatedPhonemeString(int phoneme_mode); | |||
int IsVowel(Translator *tr, int letter); | |||
int Unpronouncable(Translator *tr, char *word, int posn); | |||
void ChangeWordStress(Translator *tr, char *word, int new_stress); | |||
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int control); | |||
void AppendPhonemes(Translator *tr, char *string, int size, const char *ph); | |||
int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, char *end_phonemes, int word_flags, unsigned int *dict_flags); | |||
int TransposeAlphabet(Translator *tr, char *text); | |||
int Lookup(Translator *tr, const char *word, char *ph_out); | |||
int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *flags, int end_flags, WORD_TAB *wtab); | |||
int LookupFlags(Translator *tr, const char *word, unsigned int **flags_out); | |||
int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy); | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#endif | |||
@@ -31,8 +31,9 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "readclause.h" | |||
#include "dictionary.h" | |||
#include "numbers.h" | |||
#include "readclause.h" | |||
#include "phoneme.h" | |||
#include "voice.h" |
@@ -285,9 +285,6 @@ typedef struct { | |||
int LookupPhonemeString(const char *string); | |||
int PhonemeCode(unsigned int mnem); | |||
const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme); | |||
void DecodePhonemes(const char *inptr, char *outptr); | |||
extern const char *WordToString(unsigned int word); | |||
extern PHONEME_TAB_LIST phoneme_tab_list[N_PHONEME_TABS]; |
@@ -36,6 +36,7 @@ | |||
#include <espeak-ng/encoding.h> | |||
#include <ucd/ucd.h> | |||
#include "dictionary.h" | |||
#include "readclause.h" | |||
#include "error.h" |
@@ -48,6 +48,7 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "readclause.h" | |||
#include "speech.h" |
@@ -32,6 +32,7 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "readclause.h" | |||
#include "synthdata.h" | |||
@@ -32,6 +32,7 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "intonation.h" | |||
#include "setlengths.h" | |||
#include "synthdata.h" |
@@ -513,7 +513,6 @@ int SelectPhonemeTableName(const char *name); | |||
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); | |||
int Reverse4Bytes(int word); | |||
#if HAVE_SONIC_H | |||
void DoSonicSpeed(int value); |
@@ -32,9 +32,10 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "readclause.h" | |||
#include "phonemelist.h" | |||
#include "dictionary.h" | |||
#include "numbers.h" | |||
#include "phonemelist.h" | |||
#include "readclause.h" | |||
#include "speech.h" | |||
#include "phoneme.h" |
@@ -689,7 +689,6 @@ extern int (*phoneme_callback)(const char *); | |||
extern void SetLengthMods(Translator *tr, int value); | |||
void LoadConfig(void); | |||
int TransposeAlphabet(Translator *tr, char *text); | |||
#define LEADING_2_BITS 0xC0 // 0b11000000 | |||
#define UTF8_TAIL_BITS 0x80 // 0b10000000 | |||
@@ -709,39 +708,23 @@ void InitText2(void); | |||
int IsDigit(unsigned int c); | |||
int IsDigit09(unsigned int c); | |||
int IsAlpha(unsigned int c); | |||
int IsVowel(Translator *tr, int c); | |||
int isspace2(unsigned int c); | |||
const char *GetTranslatedPhonemeString(int phoneme_mode); | |||
ALPHABET *AlphabetFromChar(int c); | |||
Translator *SelectTranslator(const char *name); | |||
int SetTranslator2(const char *name); | |||
void DeleteTranslator(Translator *tr); | |||
void ProcessLanguageOptions(LANGUAGE_OPTIONS *langopts); | |||
int Lookup(Translator *tr, const char *word, char *ph_out); | |||
int LookupFlags(Translator *tr, const char *word, unsigned int **flags_out); | |||
void ChangeWordStress(Translator *tr, char *word, int new_stress); | |||
int LoadDictionary(Translator *tr, const char *name, int no_error); | |||
int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *flags, int end_flags, WORD_TAB *wtab); | |||
int HashDictionary(const char *string); | |||
void print_dictionary_flags(unsigned int *flags, char *buf, int buf_len); | |||
char *DecodeRule(const char *group_chars, int group_length, char *rule, int control); | |||
void ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags); | |||
void AppendPhonemes(Translator *tr, char *string, int size, const char *ph); | |||
int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy); | |||
int Unpronouncable(Translator *tr, char *word, int posn); | |||
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int prev_stress); | |||
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); | |||
void TranslateClause(Translator *tr, int *tone, char **voice_change); | |||
void SetVoiceStack(espeak_VOICE *v, const char *variant_name); | |||
char *WritePhMnemonic(char *phon_out, PHONEME_TAB *ph, PHONEME_LIST *plist, int use_ipa, int *flags); | |||
extern FILE *f_trans; // for logging | |||
@@ -38,6 +38,7 @@ | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "readclause.h" | |||
#include "speech.h" |