Commit 63c1c019 authored by jonsd's avatar jonsd Committed by Reece H. Dunn

[1.24.02]

parent 443424cb
......@@ -6,24 +6,30 @@
// * Numbers, a few abbreviations and exceptions.
//
// Letters
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.
_ç sesedij
_ë @:trema
_é @:aksA~Egy
_è @:aksA~grav
_ê @:aksA~sirkO~flEks
_ï i:trema
_ë @:trema
_ñ Entilde
_ô o:aksA~sirkO~flEks
_û u:aksA~sirkO~flEks
_ü u:trema
_à a:aksA~grav
â a:aksA~sirkO~flEks
ä a:trema
ç sesedij
ë @:trema
é @:aksA~Egy
è @:aksA~grav
ê @:aksA~sirkO~flEks
ï i:trema
ë @:trema
ñ Entilde
ô o:aksA~sirkO~flEks
ö o:trema
ù u:aksA~grav
û u:aksA~sirkO~flEks
ü u:trema
_y i:gr'Ek
_t te
// character names
......@@ -32,7 +38,7 @@ _t te
_?A lEt@
_?? sE~b'OL
_! Eksklamassj'O~
! Eksklamassj'O~
_" gijm'E
_# dj'Ez
_$ dOl'ar
......@@ -339,6 +345,14 @@ eut yt2 $u+
quelque $u
tout $u
// Letters which can be words
//===========================
à a:aksA~grav $atend
y i:gr'Ek $atend
// pronunciation exceptions
scient si
......@@ -368,12 +382,15 @@ montréal mO~real // Montréal
(mon haillon) m'O~||najO~
(son haillon) s'O~||najO~
(ton haillon) tO~||na=jO~
fils fis
bus bys
echo Eko
fils fis
mars mars
sens sA~s
pays pEi
sens sA~s
c'est sEt2 $u
qu'à ka
qu'y ki
(sud est) sydEst
(nord est) nOREst
......
......@@ -757,12 +757,10 @@
â a:
ñ n^
// _) ç (_ sesedij // ç
ç s // rançon
é e // été
è E // règle
ê E // fête
// _) ñ (_ Entilde
ñ Ni // niño
ö O // angström
œ W
......

// This file in UTF8 encoded
// Options
......@@ -466,13 +466,12 @@ há $u+
// Letter names
_a a
_e E
_o O
_s 'Ese
a a $atend
e E $atend // assume letter-e at end of sentence
o O $atend
s 'Ese $atend
// some common adjectives and adverbs
......
// translation rules Brazilian
// translation rules Brazilian
// This file is UTF-8 encoded
// Options
......@@ -25,6 +25,7 @@
a (C_ &
a (r_ 'a
?1 p) a (d_ =E
a (CC_ &
?1 al (_ 'al // eg: Portugal, capital, etc.
?2 al (K aU
......@@ -98,6 +99,7 @@
c (c //drop “c” in European Portuguese (eg: seleccionar)
?1 A) ct t //drop “c” in European Portuguese (eg: exacto)
?1 A) cç s //drop “c” in European Portuguese (eg: selecção)
?1 conta) ct ct
.group d
......@@ -131,6 +133,7 @@
?2 el (K EU
?2 elh elj
?1 e (rtA_ 'E // Eg: Alberto, aberta, etc...
em (C eIm
en (K eIN
enh en^
......@@ -154,6 +157,19 @@
?1 C) e (cC 'E // eg: seleccionar, efectuar, selecção, etc...
?1 C) e (ã i // leão, panteão, etc.
?1 C) e (a i // oceano, etc.
?1 _C) e (CACA =y //definições.
?1 _C) e (CCACAr =y // desligar.
?1 _C) e (CKAr =y // fechar
?1 _C) e (CCACAr =y // terminar.
?1 _C) e (CACC =y // recicla, reciclagem, etc...
?1 _f) e (rrament =y // ferramenta, ferramentas.
?1 hip) e (r ,E // eg: hiper
?1 sup) e (r ,E // super
?1 int) e (rC 'E // Interno
?1 int) e (rr E // Interno
?1 n) e (t ,E // eg: net
?1 e (l_ ,E
.group é
......@@ -181,21 +197,22 @@
.group f
?1 _) f (_ Ef
?2 _) f (_ 'Efe
?1 _) f (_ Ef; // individual letter
?1 _) f (__ Ef // individual letter at end-of-word
_) f (_ 'Efe
f f
f (f
.group g
?1 _) g (_ ge
?2 _) g (_ Ze
?1 _) g (_ ge
_) g (_ Ze
g g
g (g
g (Y Z // ge gi
gu (Y g
?1 guen (C gw'eIN // aguenta, etc.
?1 n) gu (A gw // eg: língua, etc.
?1 guen (C gw'eIN // aguenta, etc.
?1 n) gu (A gw // eg: língua, etc.
.group h
......@@ -271,8 +288,9 @@
.group l
?1 _) l (_ El
?2 _) l (_ 'Ele
?1 _) l (_ El; // individual letter
?1 _) l (__ El // individual letter at end-of-word
_) l (_ 'Ele
l l
l (l
lh l^
......@@ -281,15 +299,17 @@
.group m
?1 _) m (_ Em
?2 _) m (_ 'eme
?1 _) m (_ Em;
?1 _) m (__ Em
_) m (_ 'eme
m m
m (m
.group n
?1 _) n (_ En
?2 _) n (_ 'ene
?1 _) n (_ En;
?1 _) n (__ En
_) n (_ 'ene
n n
n (n
nh n^
......@@ -320,9 +340,11 @@
?2 ol (K Ow
?2 olh olj
om (_ oN
?1 om (_ 'om
?2 om (_ oN
o (ma_ o
om (C om
?1 om (C 'om
?2 om (C om
on (K oN
o (na_ o
onh on^
......@@ -334,6 +356,9 @@
o (zes_ O
o (ra_ O
o (ras_ O
?1 _C) o (CACACC =u // Documento, documentação, etc.
?1 _C) o (CCAC =u // formatar, formato.
.group ô
ô ''o
......@@ -352,6 +377,7 @@
óu ''Ow
óy ''OI
.group õ
õ o~
õe o~j
......@@ -362,7 +388,7 @@
p p
p (p
?1 ph f //Didn’t use in European Portuguese (eg: English)
?1 ple (_ _^_EN
?1 ple (_ _^_EN
.group q
......@@ -389,8 +415,9 @@
.group r
?1 _) r (_ 'Err
?2 _) r (_ 'Exe
?1 _) r (_ 'Err; // individual letter
?1 _) r (__ 'Err // individual letter at end-of-word
_) r (_ 'Exe
_) r (_\$ xe'aU // currency
r r
?1 A) r (A :r
......@@ -404,12 +431,13 @@
l) r x
n) r x
s) r x
?1 A) r (_ =@- //now, tis sound isn’t perfect but is is acceptable.
?1 A) r (_ =@- //now, tis sound isn’t perfect but is is acceptable.
.group s
?1 _) s (_ 'Ess
?2 _) s (_ 'Ese
?1 _) s (_ 'Ess|; [s]+[;] not [s;] phoneme
?1 _) s (__ 'Ess
_) s (_ 'Ese
s s
ss s
sc (Y s
......@@ -430,6 +458,7 @@
?1 A) s (_KS1 S
?1 A) s (_G+S1 Z
.group t
_) t (_ te
t t
......@@ -570,3 +599,4 @@
......@@ -5,14 +5,14 @@
phoneme : // Lengthen previous vowel by "length"
virtual
length 140
length 150
endphoneme
phoneme i
vowel starttype (i) endtype (i)
length 150
length 140
formants vowel/i_4
linkout ;
reduceto I 1
......@@ -20,7 +20,7 @@ endphoneme
phoneme I
vowel starttype (i) endtype (i)
length 150
length 140
formants vowel/ii_3
linkout ;
endphoneme
......@@ -29,60 +29,60 @@ endphoneme
phoneme e
vowel starttype (e) endtype (e)
length 160
length 150
formants vowel/e_mid2
endphoneme
phoneme &
vowel starttype (a) endtype (a)
length 160
length 150
formants vowel/&
endphoneme
phoneme a
vowel starttype (a) endtype (a)
length 180
length 170
formants vowel/aa
reduceto a2 1
endphoneme
phoneme a2
vowel starttype (a) endtype (a)
length 180
length 170
formants vowel/aa#
endphoneme
phoneme o
vowel starttype (o) endtype (o)
length 165
length 155
formants vowel/oo_1
endphoneme
phoneme Y
vowel starttype (@) endtype (@)
length 165
length 155
formants vowel/y#
endphoneme
phoneme u
vowel starttype (u) endtype (u)
length 150
length 140
formants vowel/u_bck
endphoneme
phoneme u1 // TEST
vowel starttype (u) endtype (u)
length 150
length 140
formants vowel/u_2
endphoneme
phoneme U // TEST
vowel starttype (u) endtype (u)
length 150
length 140
formants vowel/uu_4
endphoneme
......@@ -90,7 +90,7 @@ endphoneme
phoneme y
vowel starttype (u) endtype (u)
length 165
length 155
formants vowel/y
endphoneme
......
......@@ -189,7 +189,7 @@ phoneme R
lengthmod 7
beforenotvowel r/
trill
formants vwl_fr/@R+r3/rx%120
formants vwl_fr/@R+r3/rx%80
endphoneme
......
//====================================================
// Testing Tone levels for a tone language
//====================================================
phoneme 1 // tone: high level
stress
tone 50 45 envelope/p_level NULL
endphoneme
phoneme 2 // tone: rise
stress
tone 30 50 envelope/p_rise NULL
endphoneme
phoneme 3 // tone: fall-rise
stress
tone 10 40 envelope/p_214 NULL
endphoneme
phoneme 4 // tone fall
stress
tone 50 5 envelope/p_fall NULL
endphoneme
phoneme 6 // tone fall-level (tone 3 when followed by 1,2 or 4)
stress
tone 20 5 envelope/p_211 NULL
endphoneme
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -18,12 +18,12 @@ MKDIR = mkdir -p
speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
synthdata.cpp synthesize.cpp translate.cpp tr_english.cpp \
tr_languages.cpp voices.cpp wavegen.cpp
tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp
libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp \
readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
synthdata.cpp synthesize.cpp translate.cpp tr_english.cpp \
tr_languages.cpp voices.cpp wavegen.cpp \
tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp \
espeak_command.cpp event.cpp fifo.cpp wave.cpp debug.cpp
......
......@@ -66,14 +66,10 @@ static const char *help_text =
"\t =<characters> is omitted, all punctuation is spoken.\n"
"--voices=<langauge>\n"
"\t List the available voices for the specified language.\n"
"\t If <language> is omitted, then list all voices.\n";
#ifdef deleted
"\t If <language> is omitted, then list all voices.\n"
"-k <integer>\n"
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
"\t higher values = a pitch increase (try -k20).\n";
#endif
......@@ -451,13 +447,13 @@ int main (int argc, char **argv)
}
if(voicename[0] != 0)
if(voicename[0] == 0)
strcpy(voicename,"default");
if(espeak_SetVoiceByName(voicename) != EE_OK)
{
if(espeak_SetVoiceByName(voicename) != EE_OK)
{
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
exit(2);
}
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
exit(2);
}
if(flag_compile)
......
......@@ -268,7 +268,8 @@ wxSashLayoutWindow *win;
option_ssml = 1;
if(LoadVoice(voice_name,0) == NULL)
// if(LoadVoice(voice_name,0) == NULL)
if(SetVoiceByName(voice_name) != EE_OK)
{
if(error_flag==0)
wxLogError(_T("Failed to load voice data"));
......
......@@ -125,6 +125,7 @@ if(f_wavtest == NULL) return(0);
if(wav == NULL)
{
fprintf(f_events,"Finished\n");
CloseWaveFile3(samplerate);
fclose(f_events);
return(0);
......@@ -844,6 +845,7 @@ void TestTest(int control)
//FindPhonemesUsed();
//return;
return;
if(control==2)
......@@ -869,8 +871,8 @@ if(control==2)
OpenWaveFile3("/home/jsd1/speechdata/text/test.wav",samplerate);
f_events = fopen("/home/jsd1/speechdata/text/events","w");
espeak_Initialize(AUDIO_OUTPUT_PLAYBACK,100,NULL);
// espeak_SetSynthCallback(TestSynthCallback);
espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,100,NULL);
espeak_SetSynthCallback(TestSynthCallback);
// espeak_SetUriCallback(TestUriCallback);
voice.languages = "fr";
......@@ -879,7 +881,7 @@ if(control==2)
voice.variant = 0;
espeak_SetVoiceByName("en");
// espeak_SetVoiceByProperties(&voice);
espeak_SetParameter(espeakLINELENGTH,11,0);
espeak_SetParameter(espeakRANGE,0,0);
espeak_Synth(textbuf,ix+1,0,POS_CHARACTER,0,espeakCHARS_8BIT+espeakSSML,NULL,NULL);
// for(voice.variant = 1; voice.variant < 9; voice.variant++)
......
......@@ -69,6 +69,7 @@ int Translator::TranslateLetter(char *word, char *phonemes, int control)
len = utf8_out(letter,&single_letter[2]);
single_letter[2+len] = ' ';
memcpy(&single_letter[3+len],&word[n_bytes],3); // include the next letter, after a space, in case it affects the translation rules
single_letter[1] = '_';
if(Lookup(&single_letter[1],ph_buf) == 0)
......
This diff is collapsed.
......@@ -119,7 +119,7 @@ typedef struct {
int voice_gender;
int voice_age;
char voice_name[40];
char language[40];
char language[20];
} SSML_STACK;
#define N_SSML_STACK 20
......@@ -933,14 +933,16 @@ static int GetVoiceAttributes(wchar_t *pw, int tag_type)
{
// delete a stack frame
if(n_ssml_stack > 1)
{
n_ssml_stack--;
}
ssml_sp = &ssml_stack[n_ssml_stack];
}
else
{
// add a stack frame if any voice details are specified
lang = GetSsmlAttribute(pw,"xml:lang");
if(tag_type != SSML_VOICE)
{
// only expect an xml:lang attribute
......@@ -1354,7 +1356,9 @@ static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outb
case SSML_VOICE + SSML_CLOSE:
// unwind stack until the previous <voice> or <speak> tag
while((n_ssml_stack > 1) && (ssml_stack[n_ssml_stack-1].tag_type != (tag_type - SSML_CLOSE)))
{
n_ssml_stack--;
}
return(terminator + GetVoiceAttributes(px, tag_type));
......@@ -1819,6 +1823,7 @@ void InitNamedata(void)
void InitText2(void)
{//=================
int param;
espeak_VOICE *pvoice;
n_ssml_stack =1;
n_param_stack = 1;
......@@ -1829,13 +1834,15 @@ void InitText2(void)
option_punctuation = speech_parameters[espeakPUNCTUATION];
option_capitals = speech_parameters[espeakCAPITALS];
pvoice = espeak_GetCurrentVoice();
ssml_sp = &ssml_stack[0];
ssml_sp->tag_type = 0;
ssml_sp->voice_variant = 0;
ssml_sp->voice_gender = 0;
ssml_sp->voice_age = 0;
ssml_sp->voice_name[0] = 0;
strcpy(ssml_sp->language,"en");
strncpy0(ssml_sp->voice_name,pvoice->name,sizeof(ssml_sp->voice_name));
strncpy0(ssml_sp->language,&pvoice->languages[1],sizeof(ssml_sp->language));
current_voice_id[0] = 0;
n_param_stack = 1;
......
......@@ -229,7 +229,7 @@ static void init_path(void)
unsigned long size;
unsigned long var_type;
unsigned char buf[100];
buf[0] = 0;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Speech\\Voices\\Tokens\\eSpeak", 0, KEY_READ, &RegKey);
size = sizeof(buf);
......@@ -525,29 +525,16 @@ int main (int argc, char **argv)
initialise();
if(flag_compile == 0)
{
ix = 1;
if((voicename[0] != 0) && (strchr(voicename,'+')==NULL))
{
if((ix = SetVoiceByName(voicename)) != 0)
{
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
}
}
if(ix != 0)
{
if(LoadVoiceVariant(voicename,0) == NULL)
{
exit(2);
}
}
}
else
if(voicename[0] == 0)
strcpy(voicename,"default");
if(SetVoiceByName(voicename) != EE_OK)
{
LoadVoice(voicename,4);
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
exit(2);
}
if(flag_compile)
{
#ifdef PLATFORM_WINDOWS
......
......@@ -366,7 +366,7 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text,
if(translator == NULL)
{
LoadVoice("default",0);
SetVoiceByName("default");
}
SpeakNextClause(NULL,text,0);
......@@ -654,7 +654,7 @@ ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output_type, int buf_length
option_phonemes = 0;
LoadVoice("default",0);
SetVoiceByName("default");
for(param=0; param<N_SPEECH_PARAM; param++)
param_stack[0].parameter[param] = param_defaults[param];
......@@ -1048,8 +1048,8 @@ ESPEAK_API espeak_ERROR espeak_Terminate(void)
wave_terminate();
}
Free(event_list);
#endif
Free(event_list);
Free(outbuf);
FreePhData();
......
......@@ -363,9 +363,9 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela
espeakVOLUME: volume in range 0-100 0=silence
espeakPITCH: base pitch in Hz
espeakPITCH: base pitch, range 0-100. 50=normal
espeakRANGE: pitch range in Hz
espeakRANGE: pitch range, range 0-100. 0-monotone, 50=normal
espeakPUNCTUATION: which punctuation characters to announce:
value in espeak_PUNCT_TYPE (none, all, some),
......
......@@ -38,6 +38,10 @@
//#define USE_MBROLA_LIB
#endif
#ifdef _ESPEAKEDIT
#define USE_ASYNC
#define LOG_FRAMES // write keyframe info to log-espeakedit
#endif
// will look for espeak_data directory here, and also in user's home directory
#ifndef PATH_ESPEAK_DATA
......@@ -51,7 +55,7 @@ typedef double DOUBLEX;
#define N_PEAKS 9
#define N_MARKERS 7
#define N_MARKERS 8
typedef struct {
......
File mode changed from 100644 to 100755
......@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"
const char *version_string = "1.24 03.May.07";
const char *version_string = "1.24.02 04.May.07";
const int version_phdata = 0x012201;
int option_device_number = -1;
......
......@@ -202,8 +202,8 @@ Translator *SelectTranslator(const char *name)
case L('f','i'): // Finnish
{
static int stress_amps_fi[8] = {16,16, 22,22, 20,24, 24,22 };
static int stress_lengths_fi[8] = {150,180, 210,220, 0,0, 240,280};
static int stress_amps_fi[8] = {18,16, 22,22, 20,22, 22,22 };
static int stress_lengths_fi[8] = {150,170, 200,200, 0,0, 210,250};
tr = new Translator();
SetupTranslator(tr,stress_lengths_fi,stress_amps_fi);
......@@ -218,6 +218,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.max_initial_consonants = 2;
tr->langopts.spelling_stress = 1;
tr->punct_to_tone[0][1] = 0; // don't raise pitch for comma
// tr->punct_to_tone[0][2] = 0; // don't raise pitch for question
}
break;
......
This diff is collapsed.
......@@ -363,7 +363,7 @@ private:
void SetSpellingStress(char *phonemes, int control);
void GetTranslatedPhonemeString(char *phon_out, int n_phon_out);
void WriteMnemonic(int *ix, int mnem);
void MakePhonemeList(int post_pause, int embedded, int new_sentence);
void MakePhonemeList(int post_pause, int new_sentence);
int SubstitutePhonemes(PHONEME_LIST2 *plist_out);