Added language da (Danish)
Fixed to wave_sada.cpp


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@222 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2009-09-06 10:07:34 +00:00
parent d39f19570b
commit b1bea7ab61
27 changed files with 1323 additions and 450 deletions
+4
View File
@@ -13,6 +13,10 @@ big-endian form if necessary.
The 'phondata-manifest' file is produced by espeakedit when it compiles
the phoneme data. If it is not present here, find it in the espeak-data directory.
NOTE:
The format of espeak-data/phondata changed in eSpeak version 1.41. The utility
has been modified for this. [jonsd]
---
To contact the author of these utilities, please send an e-mail to
<leonardop@gentoo.org>
+21 -1
View File
@@ -53,7 +53,25 @@ typedef struct {
unsigned char link_out;
} PHONEME_TAB;
// This is a new format for eSpeak 1.41
typedef struct { // 44 bytes
short frflags;
short ffreq[7];
unsigned char length;
unsigned char rms;
unsigned char fheight[8];
unsigned char fwidth[6]; // width/4 f0-5
unsigned char fright[3]; // width/4 f0-2
unsigned char bw[4]; // Klatt bandwidth BNZ /2, f1,f2,f3
unsigned char klattp[5]; // AV, FNZ, Tilt, Aspr, Skew
unsigned char klattp2[5]; // continuation of klattp[], Avp, Fric, FricBP, Turb
unsigned char klatt_ap[7]; // Klatt parallel amplitude
unsigned char klatt_bp[7]; // Klatt parallel bandwidth /2
} frame_t; // with extra Klatt parameters for parallel resonators
#ifdef deleted
// This is the previous format for versions before 1.41
typedef struct {
short frflags;
unsigned char length;
@@ -63,6 +81,7 @@ typedef struct {
unsigned char fwidth[6];
unsigned char fright[6];
} frame_t;
#endif
#define N_SEQ_FRAMES 25
@@ -210,7 +229,8 @@ swap_phondata (const char *infile, const char *outfile,
buf_spect.frame[n].frflags = (short)
SWAP_USHORT (buf_spect.frame[n].frflags);
for (k = 0; k < 9; k++) {
// Changed for eSpeak 1.41
for (k = 0; k < 7; k++) {
buf_spect.frame[n].ffreq[k] = (short)
SWAP_USHORT (buf_spect.frame[n].ffreq[k]);
}
+5 -2
View File
@@ -1,6 +1,9 @@
Compiling the espeakedit program.
Copy the source files into directory "src", but not overwrite files:
You need the "espeakedit" download,
Copy the source files from the "espeakedit" download into directory "src",
but do not overwrite files:
speech.h
StdAfx.h
@@ -8,4 +11,4 @@ There are copies of these in directory "src_copy".
Use the "Unicode Release" build configuration.
This linkls with the "Unicode Release" version of the wxWidgets libraries.
This links with the "Unicode Release" version of the wxWidgets libraries.
+11 -6
View File
@@ -28,7 +28,7 @@
#include <stdio.h>
#define ESPEAK_API_REVISION 3
#define ESPEAK_API_REVISION 5
/*
Revision 2
Added parameter "options" to eSpeakInitialize()
@@ -39,6 +39,8 @@ Revision 3
Revision 4
Added flags parameter to espeak_CompileDictionary()
Revision 5
Added espeakCHARS_16BIT
*/
/********************/
/* Initialization */
@@ -228,6 +230,7 @@ int UriCallback(int type, const char *uri, const char *base);
#define espeakCHARS_UTF8 1
#define espeakCHARS_8BIT 2
#define espeakCHARS_WCHAR 3
#define espeakCHARS_16BIT 4
#define espeakSSML 0x10
#define espeakPHONEMES 0x100
@@ -319,7 +322,8 @@ extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
/* Speak the name of a keyboard key.
Currently this just speaks the "key_name" as given
If key_name is a single character, it speaks the name of the character.
Otherwise, it speaks key_name as a text string.
Return: EE_OK: operation achieved
EE_BUFFER_FULL: the command can not be buffered;
@@ -341,6 +345,7 @@ ESPEAK_API espeak_ERROR espeak_Char(wchar_t character);
/***********************/
/* Speech Parameters */
/***********************/
@@ -390,7 +395,7 @@ ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int valu
espeakPUNCTUATION: which punctuation characters to announce:
value in espeak_PUNCT_TYPE (none, all, some),
see espeak_GetParameter() to specify which characters are announced.
see espeak_GetParameter() to specify which characters are announced.
espeakCAPITALS: announce capital letters by:
0=none,
@@ -463,9 +468,9 @@ ESPEAK_API void espeak_CompileDictionary(const char *path, FILE *log, int flags)
// voice table
typedef struct {
char *name; // a given name for this voice. UTF8 string.
char *languages; // list of pairs of (byte) priority + (string) language (and dialect qualifier)
char *identifier; // the filename for this voice within espeak-data/voices
const char *name; // a given name for this voice. UTF8 string.
const char *languages; // list of pairs of (byte) priority + (string) language (and dialect qualifier)
const char *identifier; // the filename for this voice within espeak-data/voices
unsigned char gender; // 0=none 1=male, 2=female,
unsigned char age; // 0=not specified, or age in years
unsigned char variant; // only used when passed as a parameter to espeak_SetVoiceByProperties
+19 -6
View File
@@ -36,12 +36,14 @@ extern void InitNamedata(void);
int master_volume = 100;
int master_rate = 0;
int initialised = 0;
int gVolume = 100;
int gSpeed = -1;
int gPitch = -1;
int gRange = -1;
int gEmphasis = 0;
int gSayas = 0;
char g_voice_name[80];
char *path_install = NULL;
@@ -359,8 +361,7 @@ void WcharToChar(char *out, const wchar_t *in, int len)
*****************************************************************************/
STDMETHODIMP CTTSEngObj::SetObjectToken(ISpObjectToken * pToken)
{
char voice[80];
strcpy(voice,"default");
strcpy(voice_name,"default");
SPDBG_FUNC( "CTTSEngObj::SetObjectToken" );
@@ -376,7 +377,7 @@ STDMETHODIMP CTTSEngObj::SetObjectToken(ISpObjectToken * pToken)
hr2 = m_cpToken->GetStringValue( L"VoiceName", &voicename);
if( SUCCEEDED(hr2) )
{
WcharToChar(voice,voicename,sizeof(voice));
WcharToChar(voice_name,voicename,sizeof(voice_name));
}
@@ -396,9 +397,14 @@ STDMETHODIMP CTTSEngObj::SetObjectToken(ISpObjectToken * pToken)
gEmphasis = 0;
gSayas = 0;
espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,100,path_install,1);
espeak_SetVoiceByName(voice);
espeak_SetSynthCallback(SynthCallback);
if(initialised==0)
{
espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,100,path_install,1);
espeak_SetSynthCallback(SynthCallback);
initialised = 1;
g_voice_name[0] = 0;
}
return hr;
} /* CTTSEngObj::SetObjectToken */
@@ -525,6 +531,13 @@ int CTTSEngObj::ProcessFragList(const SPVTEXTFRAG* pTextFragList, wchar_t *pW_st
frag_ix = 0;
pW = pW_start;
// check that the current voice is correct for this request
if(strcmp(voice_name, g_voice_name) != 0)
{
strcpy(g_voice_name, voice_name);
espeak_SetVoiceByName(g_voice_name);
}
while(pTextFragList != NULL)
{
action = pTextFragList->State.eAction;
@@ -117,6 +117,8 @@ class ATL_NO_VTABLE CTTSEngObj :
const WCHAR* m_pNextChar;
const WCHAR* m_pEndChar;
ULONGLONG m_ullAudioOff;
char voice_name[80];
};
#endif //--- This must be the last line in the file