diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes
index 400816fa..bd8afb53 100644
--- a/dictsource/dict_phonemes
+++ b/dictsource/dict_phonemes
@@ -130,7 +130,7 @@ Dictionary hi_dict
@ @- @2 @3 a a: aI aU
e E e: E: E~ i I i:
l- o O o: O: o~ O~ r-
-U u: V
+U u: u~ V
- : b c ch d d. f
g h H j J k kh l
diff --git a/dictsource/en_list b/dictsource/en_list
index cf983894..ca0520ff 100644
--- a/dictsource/en_list
+++ b/dictsource/en_list
@@ -588,7 +588,7 @@ codify koUdIfaI
cognac k0njak
coincide koUIns'aId
college k0lIdZ
-colon koUl0n
+colon koUl@n
color kVl3
colored kVl3d
colonel k3:n@L
diff --git a/dictsource/fr_list b/dictsource/fr_list
index bc8d0b4e..0392ca41 100755
--- a/dictsource/fr_list
+++ b/dictsource/fr_list
@@ -388,30 +388,31 @@ montréal mO~Real
(cent une) s'A~||yn
(cent onzième) s'A~||O~zj'Em
(cent onze) s'A~||O~z
-(en haillon) A~||naj'O~
(on habille) O~||nab'ij
-(un haillon) W~||naj'O~
-(mon haillon) m'O~||najO~
-(son haillon) s'O~||najO~
-(ton haillon) tO~||na=jO~
-bus bys
-echo Eko
-fils fis
-mars maRs
-juin ZwE~
+absent absA~
+accident aksidA~
adéquat adekuat2
adéquate adekuat
adéquats adekuaz2
adéquates adekuatz2
-pays pEi
-absent absA~
ardent aRdA~
-prudent pRydA~
-imprudent E~pRydA~
+boeufs bY
+bus bys
+choeur kWr
discident disidA~
-accident aksidA~
+echo Eko
+fils fis
+haillon _|ajO~
+haricot _|aRiko
+haricots _|aRikoz2
+imprudent E~pRydA~
+juin ZwE~
+mars maRs
occident OksidA~
+oeufs Y
orient ORjA~
+pays pEi
+prudent pRydA~
secret sYkRE
secrets sYkREz2
@@ -423,11 +424,9 @@ qu'y ki
s'y si
m'y mi
t'y ti
-l'y li
(sud est) sydEst
(nord est) nOREst
écho Eko
-l'écho leko
cci $abbrev
espeak ispik
nvda $abbrev
@@ -611,3 +610,4 @@ votions vOtjO~z2 $u
pourcent puRsA~
vincent vE~sA~
+
diff --git a/dictsource/hi_list b/dictsource/hi_list
index ab3e5b47..fd0a8723 100755
--- a/dictsource/hi_list
+++ b/dictsource/hi_list
@@ -139,7 +139,7 @@ _dpt _d@s@ml'o:_ // ?? what is Hi for "." ?
ठ t.h@
ड d.@
ढ d.h@
-ण n@ // should be n.@
+ण n.@ // should be n.@
त t@
थ th@
द d@
diff --git a/dictsource/hi_rules b/dictsource/hi_rules
index dfc0cd97..604ca753 100755
--- a/dictsource/hi_rules
+++ b/dictsource/hi_rules
@@ -32,6 +32,8 @@
.group ऊ
ऊ u:
+ ऊं u~ // + anusvara
+ ऊँ u~ // + candrabinbu
.group ऋ
ऋ rI
@@ -50,6 +52,8 @@
.group ऐ
ऐ E: // ?? [aI] [E:] [&:]
+ ऐं E~
+ ऐँ E~
?2 ऐ aI // ?? [aI] [E:] [&:]
@@ -89,6 +93,8 @@
.group ू
ू u:
+ ूं u~
+ ूँ u~
.group ृ
ृ rI
@@ -107,6 +113,8 @@
.group ै
ै E: // ?? [aI] [E:] [&:]
+ ैं E~
+ ैँ E~
?2 ै aI // ?? [aI] [E:] [&:]
.group ॉ
diff --git a/dictsource/hu_list b/dictsource/hu_list
index 62e2cdd9..32a10cd1 100644
--- a/dictsource/hu_list
+++ b/dictsource/hu_list
@@ -7,48 +7,48 @@
// Numbers
-_0 nullA
-_1 EJ
-_2 kEttY:
-_3 ha:R2om
-_4 ne:J
-_5 Yt
-_6 hAt
-_7 he:t
-_8 n^olts
-_9 kilEnts
-_10 ti:z
-_1X tizEn
-_20 hu:s
-_2X huson
-_3X hAR2mints
-_4X nEJvEn
-_5X YtvEn
-_6X hAtvAn
-_7X hEtvEn
-_8X n^oltsvAn
-_9X kilEntsvEn
-_0C sa:z
-_1C sa:z
+_0 nullA
+_1 EJ
+_2 kEttY:
+_3 ha:R2om
+_4 ne:J
+_5 Yt
+_6 hAt
+_7 he:t
+_8 n^olts
+_9 kilEnts
+_10 ti:z
+_1X tizEn
+_20 hu:s
+_2X huson
+_3X hAR2mints
+_4X nEJvEn
+_5X YtvEn
+_6X hAtvAn
+_7X hEtvEn
+_8X n^oltsvAn
+_9X kilEntsvEn
+_0C sa:z
+_1C sa:z
-_0M1 EzER2
-_1M1 EzER2
-_2M1 ke:tEzER2
-_0M2 millio:
-_1M2 millio:
-_2M2 ke:tmillio:
-_0M3 millia:R2d
-_1M3 millia:R2d
-_1M3 ke:tmillia:R2d
-_0M4 billio:
-_1M4 billio:
-_2M4 ke:tbillio:
-_dpt ||_vEss2Y:_
+_0M1 EzER2
+_1M1 EzER2
+_2M1 ke:tEzER2
+_0M2 millio:
+_1M2 millio:
+_2M2 ke:tmillio:
+_0M3 millia:R2d
+_1M3 millia:R2d
+_2M3 ke:tmillia:R2d
+_0M4 billio:
+_1M4 billio:
+_2M4 ke:tbillio:
+_dpt ||_vEss2Y:_
// Abbreviations
km kilo:me:tER2
-mm milime:tER2
+mm milime:tER2
a.m An^n^i||m'int $dot
dr doktoR2 $dot
@@ -98,7 +98,7 @@ bár $pause // although
habár $pause // although
ha $u $pause // if
-noha $u $pause // even thought
+noha $u $pause // even thought
// Prepositions etc.
@@ -108,9 +108,6 @@ noha $u $pause // even thought
nem $alt2 $strend
ne $u+
-e $u // "-e" question
-e $atend // stressed at end of sentence
-
// Unstressed adverbs prepositions etc.
néhány $u+
is $u // also
@@ -145,30 +142,52 @@ közül $u
közé $u
között $u
-ba $u // into
-be $u
-ra $u // onto
-re $u
-ik $u // -th
+an $u // so many persons
as $u
-es $u
-os $u
-ós $u
-ös $u
+ba $u // into
+ban $u // in
+be $u
+ben $u
ból $u // from inside
ből $u
-ról $u // from top of, about
-ről $u
-án $u
-én $u
-on $u // on
+e $u // in query, his/her
+ei $u // his her multiole
en $u
-ön $u
-an $u // so many persons
-ón $u
-szor $u // times
+es $u
+hez $u
+hoz $u // to
+höz $u
+ig $u // up to
+ik $u // -th
+nak $u // of, him/her
+nek $u
+nál $u // by
+nél $u
+on $u // on
+en $u // on
+os $u
+ra $u // onto
+re $u
+ról $u // from top of, about
+röl $u
+ről $u
szer $u
+szor $u // times
+szór $u
ször $u
+tól $u // from
+töl $u
+től $u
+val $u // with
+vel $u
+án $u // on that day
+é $u // his, her
+éi $u // his, her multiple
+én $u
+ón $u
+ós $u
+ön $u
+ös $u
ellen $u // against
elé $u // before
@@ -180,16 +199,6 @@ se $u $pause // neither
sem $u $pause // nor
miatt $u $pause // because
-ban $u // in
-ben $u
-hoz $u // to
-hez $u
-höz $u
-ig $u // up to
-nál $u // by
-nél $u
-tól $u // from
-től $u
be $u //into
ki $u // out of
@@ -277,6 +286,8 @@ a A: $atend // letter "a"
b be:
c tse:
d de:
+_e E
+e $atend // stressed at end of sentence
f Eff
g ge:
h ha:
@@ -297,6 +308,9 @@ x iks
y ipsilon
z ze:
+_é e:
+é $atend
+
cs tSe:
dz dze:
dzs dZe:
diff --git a/dictsource/hu_rules b/dictsource/hu_rules
index e0c55ffc..eb703e6c 100644
--- a/dictsource/hu_rules
+++ b/dictsource/hu_rules
@@ -281,7 +281,7 @@ vörösmar) ty ti
zs Z
zzs Z:
- gá) z (sz z // don't devoice [z] to [s]
+ gá) z (sz z
gé) z (sz z
há) z (so z
há) z (sz z
@@ -302,7 +302,7 @@ vörösmar) ty ti
_vá) zs (or zS
_szára) zs (ág zS
_kö) zs (ég zS
-
+ _nehé) zs (ely zS
.group
$ dolla:R2
diff --git a/phsource/compile_report b/phsource/compile_report
index b0ce44cb..0bc80ae4 100644
--- a/phsource/compile_report
+++ b/phsource/compile_report
@@ -15,7 +15,7 @@
fi 40 127
fr 35 118
fr_ca 11 118
- hi 49 131
+ hi 50 132
hu 22 112
nl 26 117
pl 15 107
@@ -145,8 +145,8 @@
1 n^/n^_ base
1 n^/n^@ base
1 n^/n^#_ is
- 6 n/_n base ro
- 3 n/n_ base ro
+ 4 n/_n base ro
+ 2 n/n_ base ro
1 n/n@ base
1 n/n#_ is
1 n^/n^a base
@@ -169,6 +169,8 @@
1 nn/nnu base
1 n^/n^o base
1 n/no base
+ 2 n/_nr base
+ 1 n/nr_ base
1 n^/n^u base
1 n/nu base
1 r2/_r2 base
@@ -381,7 +383,7 @@
1 vnasal/o_n3 fr
1 vnasal/oo_n en
2 vnasal/oo_n2 hi pl
- 1 vnasal/u_n pt
+ 2 vnasal/u_n hi pt
3 vnasal/W_n en fr
1 voc/bh base
2 voc/dh base es
diff --git a/phsource/ph_hindi b/phsource/ph_hindi
index 37453cd7..bc796e11 100644
--- a/phsource/ph_hindi
+++ b/phsource/ph_hindi
@@ -170,6 +170,12 @@ phoneme u:
endphoneme
+phoneme u~
+ vowel long starttype (u) endtype (u)
+ length 230
+ formants vnasal/u_n
+endphoneme
+
phoneme r-
vowel starttype (@) endtype (@)
diff --git a/phsource/phonemes b/phsource/phonemes
index ef35aa64..b935f4e9 100644
--- a/phsource/phonemes
+++ b/phsource/phonemes
@@ -539,13 +539,14 @@ endphoneme
phoneme n.
vcd rfx nasal
starttype n endtype n
- vowelout f1=2 f2=1700 -300 250 f3=-400 80 rms=20 brk colr=2
+ vowelin f1=2 f2=1200 -300 250 f3=-500 80 rms=20 colr=2
+ vowelout f1=2 f2=1200 -300 250 f3=-500 80 rms=20 brk colr=2
length 100
lengthmod 4
formants NULL
- after _ n/_n
- after n n/_n // lengthen [nn]
- before _ n/n_
+ after _ n/_nr
+ after n n/_nr // lengthen [nn]
+ before _ n/nr_
before (r) n/nj
endphoneme
diff --git a/phsource/vowel/i b/phsource/vowel/i
index be118198..05bcfd6d 100644
Binary files a/phsource/vowel/i and b/phsource/vowel/i differ
diff --git a/src/extras.cpp b/src/extras.cpp
index db8c8cc9..4448a339 100644
--- a/src/extras.cpp
+++ b/src/extras.cpp
@@ -1164,6 +1164,50 @@ int x;
}
#endif
+#define OUTPUT_MODE AUDIO_OUTPUT_PLAYBACK
+#define TEXT "Hello world."
+#define TEXT_SSML ("" TEXT "")
+static void
+speak(char *text)
+{
+ int result;
+ result = espeak_Synth(text, strlen(text) + 1, 0, POS_CHARACTER, 0, espeakSSML, NULL, NULL);
+ assert(result == EE_OK);
+}
+
+
+int test4() {
+ espeak_ERROR result;
+ int sample_rate;
+ sample_rate = espeak_Initialize(OUTPUT_MODE, 2000, NULL, 0);
+ assert(sample_rate != EE_INTERNAL_ERROR);
+ espeak_SetSynthCallback(synth_callback);
+
+ espeak_VOICE voice;
+ memset(&voice, 0, sizeof(espeak_VOICE));
+ voice.languages = "en";
+ //voice.gender = 2;
+ voice.age = 4;
+
+ result = espeak_SetVoiceByProperties(&voice);
+ assert(result == EE_OK);
+ speak(TEXT_SSML);
+ speak(TEXT_SSML);
+ espeak_Synchronize();
+
+#ifdef deleted
+ /* Now the same ting without ssml tags. */
+result = espeak_SetVoiceByProperties(&voice);
+ assert(result == EE_OK);
+ speak(TEXT);
+ speak(TEXT);
+ espeak_Synchronize();
+#endif
+ result = espeak_Terminate();
+ assert(result == EE_OK);
+
+ return 0;
+}
char* text1 = "Hello World2. This is the second sentence";
@@ -1181,6 +1225,7 @@ void TestTest(int control)
//CharsetToUnicode("ISO-8859-4");
//CharsetToUnicode("ISCII");
+test4();
return;
if(control==2)
diff --git a/src/readclause.cpp b/src/readclause.cpp
index f76b1111..79314b12 100644
--- a/src/readclause.cpp
+++ b/src/readclause.cpp
@@ -921,6 +921,26 @@ int AddNameData(const char *name, int wide)
} // end of AddNameData
+void SetVoiceStack(espeak_VOICE *v)
+{//================================
+ SSML_STACK *sp;
+ sp = &ssml_stack[0];
+
+ if(v == NULL)
+ {
+ memset(sp,0,sizeof(ssml_stack[0]));
+ return;
+ }
+ if(v->languages != NULL)
+ strcpy(sp->language,v->languages);
+ if(v->name != NULL)
+ strcpy(sp->voice_name,v->name);
+ sp->voice_variant = v->variant;
+ sp->voice_age = v->age;
+ sp->voice_gender = v->gender;
+}
+
+
static int GetVoiceAttributes(wchar_t *pw, int tag_type)
{//=====================================================
// Determines whether voice attribute are specified in this tag, and if so, whether this means
@@ -1367,7 +1387,7 @@ static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outb
return(CLAUSE_VOICE);
case SSML_SPEAK + SSML_CLOSE:
- terminator = CLAUSE_PARAGRAPH;
+ terminator = CLAUSE_PERIOD;
case SSML_VOICE + SSML_CLOSE:
// unwind stack until the previous or tag
while((n_ssml_stack > 1) && (ssml_stack[n_ssml_stack-1].tag_type != (tag_type - SSML_CLOSE)))
@@ -1853,6 +1873,7 @@ void InitText2(void)
option_punctuation = speech_parameters[espeakPUNCTUATION];
option_capitals = speech_parameters[espeakCAPITALS];
+//#ifdef deleted
pvoice = espeak_GetCurrentVoice();
ssml_sp = &ssml_stack[0];
@@ -1865,6 +1886,7 @@ void InitText2(void)
strncpy0(ssml_sp->voice_name,pvoice->name,sizeof(ssml_sp->voice_name));
strncpy0(ssml_sp->language,&pvoice->languages[1],sizeof(ssml_sp->language));
}
+//#endif
current_voice_id[0] = 0;
n_param_stack = 1;
diff --git a/src/speak.cpp b/src/speak.cpp
index 94a1266e..96387acb 100755
--- a/src/speak.cpp
+++ b/src/speak.cpp
@@ -288,6 +288,7 @@ static int initialise(void)
#ifndef PLATFORM_WINDOWS
LoadConfig(); // causes problem on Windows, don't know why
#endif
+ SetVoiceStack(NULL);
SynthesizeInit();
for(param=0; paramLoad(stream);
spectseq->name = leaf;
spectseq->MakePitchenv(spectseq->pitchenv);
diff --git a/src/synthdata.cpp b/src/synthdata.cpp
index 91568033..e4a61eeb 100755
--- a/src/synthdata.cpp
+++ b/src/synthdata.cpp
@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"
-const char *version_string = "1.27.06 07.Jul.07";
+const char *version_string = "1.27.07 09.Jul.07";
const int version_phdata = 0x012701;
int option_device_number = -1;
@@ -160,6 +160,9 @@ void FreePhData(void)
Free(phoneme_tab_data);
Free(phoneme_index);
Free(spects_data);
+ phoneme_tab_data=NULL;
+ phoneme_index=NULL;
+ spects_data=NULL;
}
diff --git a/src/translate.h b/src/translate.h
index ef2451b1..2de4e68a 100755
--- a/src/translate.h
+++ b/src/translate.h
@@ -526,5 +526,6 @@ void InitText2(void);
int IsDigit(unsigned int c);
int IsAlpha(unsigned int c);
int isspace2(unsigned int c);
+void SetVoiceStack(espeak_VOICE *v);
extern FILE *f_trans; // for logging
diff --git a/src/voices.cpp b/src/voices.cpp
index 36dd09ac..52fa61f1 100755
--- a/src/voices.cpp
+++ b/src/voices.cpp
@@ -1189,6 +1189,7 @@ static espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
espeak_VOICE *SelectVoice(espeak_VOICE *voice_select, int *variant)
{//================================================================
// Returns a path within espeak-voices, with a possible +variant suffix
+// variant is an output-only parameter
int nv; // number of candidates
int ix, ix2;
int j;
@@ -1382,6 +1383,7 @@ void GetVoices(const char *path)
espeak_ERROR SetVoiceByName(const char *name)
{//=========================================
espeak_VOICE *v;
+ espeak_VOICE voice_selector;
int variant=0;
char *p;
char variant_name[20];
@@ -1395,7 +1397,13 @@ espeak_ERROR SetVoiceByName(const char *name)
variant = atoi(p+1);
}
+ memset(&voice_selector,0,sizeof(voice_selector));
+ voice_selector.variant = variant;
+ voice_selector.name = (char *)name;
+
// first check for a voice with this filename
+ // This may avoid the need to call espeak_ListVoices().
+
if((first_voice == NULL) && (LoadVoice(buf,1) != NULL))
{
voice_selected = first_voice;
@@ -1408,6 +1416,7 @@ espeak_ERROR SetVoiceByName(const char *name)
}
WavegenSetVoice(voice);
+ SetVoiceStack(&voice_selector);
return(EE_OK);
}
@@ -1420,11 +1429,12 @@ espeak_ERROR SetVoiceByName(const char *name)
{
voice_selected = v;
WavegenSetVoice(voice);
+ SetVoiceStack(&voice_selector);
return(EE_OK);
}
}
return(EE_INTERNAL_ERROR); // voice name not found
-} // end of espeak_SetVoiceByName
+} // end of SetVoiceByName
@@ -1436,8 +1446,10 @@ espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector)
LoadVoiceVariant(voice_selected->identifier,variant);
WavegenSetVoice(voice);
+ SetVoiceStack(voice_selector);
+
return(EE_OK);
-} // end of espeak_SetVoiceByProperties
+} // end of SetVoiceByProperties