mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-03 14:59:52 +00:00
code cleanup: move function declarations from speech.h to new file mnemonics.h
This adds a corresponding header file for mnemonics.c that was introduced in d5d93be.
This commit is contained in:
@@ -37,10 +37,11 @@
|
|||||||
|
|
||||||
#include "dictionary.h" // for strncpy0
|
#include "dictionary.h" // for strncpy0
|
||||||
#include "error.h" // for create_file_error_context
|
#include "error.h" // for create_file_error_context
|
||||||
|
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB
|
||||||
#include "phoneme.h" // for PHONEME_TAB, PHONEME_TAB_LIST
|
#include "phoneme.h" // for PHONEME_TAB, PHONEME_TAB_LIST
|
||||||
#include "readclause.h" // for Read4Bytes
|
#include "readclause.h" // for Read4Bytes
|
||||||
#include "spect.h" // for SpectFrame, peak_t, SpectSeq
|
#include "spect.h" // for SpectFrame, peak_t, SpectSeq
|
||||||
#include "speech.h" // for path_home, MNEM_TAB, GetFileLength
|
#include "speech.h" // for path_home, GetFileLength
|
||||||
#include "synthdata.h" // for LoadPhData
|
#include "synthdata.h" // for LoadPhData
|
||||||
#include "synthesize.h" // for TUNE, frame_t, CONDITION_IS_OTHER
|
#include "synthesize.h" // for TUNE, frame_t, CONDITION_IS_OTHER
|
||||||
#include "translate.h" // for utf8_out, utf8_in
|
#include "translate.h" // for utf8_out, utf8_in
|
||||||
|
|||||||
@@ -34,14 +34,12 @@
|
|||||||
#include <espeak-ng/encoding.h>
|
#include <espeak-ng/encoding.h>
|
||||||
|
|
||||||
#include "compiledict.h"
|
#include "compiledict.h"
|
||||||
#include "dictionary.h"
|
|
||||||
#include "readclause.h"
|
|
||||||
|
|
||||||
#include "dictionary.h" // for EncodePhonemes, strncpy0, HashDicti...
|
#include "dictionary.h" // for EncodePhonemes, strncpy0, HashDicti...
|
||||||
#include "error.h" // for create_file_error_context
|
#include "error.h" // for create_file_error_context
|
||||||
|
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB
|
||||||
#include "phoneme.h" // for PHONEME_TAB_LIST, phonSWITCH, phone...
|
#include "phoneme.h" // for PHONEME_TAB_LIST, phonSWITCH, phone...
|
||||||
#include "readclause.h" // for towlower2
|
#include "readclause.h" // for towlower2
|
||||||
#include "speech.h" // for LookupMnemName, MNEM_TAB, path_home
|
#include "speech.h" // for path_home
|
||||||
#include "synthesize.h" // for Write4Bytes
|
#include "synthesize.h" // for Write4Bytes
|
||||||
#include "translate.h" // for isspace2, IsDigit09, utf8_in, utf8_out
|
#include "translate.h" // for isspace2, IsDigit09, utf8_in, utf8_out
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <espeak-ng/encoding.h> // for espeak_ng_TEXT_DECODER, ESPEAKNG_EN...
|
#include <espeak-ng/encoding.h> // for espeak_ng_TEXT_DECODER, ESPEAKNG_EN...
|
||||||
#include "espeak-ng/speak_lib.h" // for espeakCHARS_16BIT, espeakCHARS_8BIT
|
#include "espeak-ng/speak_lib.h" // for espeakCHARS_16BIT, espeakCHARS_8BIT
|
||||||
#include "speech.h" // for LookupMnem, MNEM_TAB
|
#include "mnemonics.h" // for LookupMnem, MNEM_TAB
|
||||||
#include "translate.h" // for LEADING_2_BITS, UTF8_TAIL_BITS
|
#include "translate.h" // for LEADING_2_BITS, UTF8_TAIL_BITS
|
||||||
|
|
||||||
// http://www.iana.org/assignments/character-sets/character-sets.xhtml
|
// http://www.iana.org/assignments/character-sets/character-sets.xhtml
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <espeak-ng/espeak_ng.h>
|
#include <espeak-ng/espeak_ng.h>
|
||||||
|
|
||||||
#include "speech.h" // for MNEM_TAB, LookupMnem, LookupMnemName
|
#include "mnemonics.h" // for MNEM_TAB, LookupMnem, LookupMnemName
|
||||||
|
|
||||||
int LookupMnem(MNEM_TAB *table, const char *string)
|
int LookupMnem(MNEM_TAB *table, const char *string)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 to 2007 by Jonathan Duddington
|
||||||
|
* email: jonsd@users.sourceforge.net
|
||||||
|
* Copyright (C) 2013-2015 Reece H. Dunn
|
||||||
|
* Copyright (C) 2021 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_MNEMONICS_H
|
||||||
|
#define ESPEAK_NG_MNEMONICS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char *mnem;
|
||||||
|
int value;
|
||||||
|
} MNEM_TAB;
|
||||||
|
int LookupMnem(MNEM_TAB *table, const char *string);
|
||||||
|
const char *LookupMnemName(MNEM_TAB *table, const int value);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -59,13 +59,6 @@ extern "C"
|
|||||||
#define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data"
|
#define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
const char *mnem;
|
|
||||||
int value;
|
|
||||||
} MNEM_TAB;
|
|
||||||
int LookupMnem(MNEM_TAB *table, const char *string);
|
|
||||||
const char *LookupMnemName(MNEM_TAB *table, const int value);
|
|
||||||
|
|
||||||
void cancel_audio(void);
|
void cancel_audio(void);
|
||||||
|
|
||||||
extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
|
extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
#include "ssml.h"
|
#include "ssml.h"
|
||||||
#include "dictionary.h" // for strncpy0
|
#include "dictionary.h" // for strncpy0
|
||||||
|
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB,
|
||||||
#include "readclause.h" // for PARAM_STACK, param_stack, AddNameData
|
#include "readclause.h" // for PARAM_STACK, param_stack, AddNameData
|
||||||
#include "speech.h" // for MNEM_TAB, LookupMnem
|
|
||||||
#include "synthesize.h" // for SPEED_FACTORS, speed
|
#include "synthesize.h" // for SPEED_FACTORS, speed
|
||||||
#include "translate.h" // for CTRL_EMBEDDED, IsDigit09, utf8_out
|
#include "translate.h" // for CTRL_EMBEDDED, IsDigit09, utf8_out
|
||||||
#include "voice.h" // for SelectVoice, SelectVoiceByName
|
#include "voice.h" // for SelectVoice, SelectVoiceByName
|
||||||
|
|||||||
@@ -40,8 +40,9 @@
|
|||||||
|
|
||||||
#include "voice.h" // for voice_t, DoVoiceChange, N_PEAKS
|
#include "voice.h" // for voice_t, DoVoiceChange, N_PEAKS
|
||||||
#include "dictionary.h" // for strncpy0, LoadDictionary
|
#include "dictionary.h" // for strncpy0, LoadDictionary
|
||||||
|
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB
|
||||||
#include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho...
|
#include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho...
|
||||||
#include "speech.h" // for LookupMnem, GetFileLength, PATHSEP
|
#include "speech.h" // for GetFileLength, PATHSEP
|
||||||
#include "mbrola.h" // for LoadMbrolaTable
|
#include "mbrola.h" // for LoadMbrolaTable
|
||||||
#include "synthdata.h" // for SelectPhonemeTableName, LookupP...
|
#include "synthdata.h" // for SelectPhonemeTableName, LookupP...
|
||||||
#include "synthesize.h" // for SetSpeed, SPEED_FACTORS, speed
|
#include "synthesize.h" // for SetSpeed, SPEED_FACTORS, speed
|
||||||
|
|||||||
Reference in New Issue
Block a user