From b1a45dcdf57793ff6c6af13f3da6ba4008f1bd66 Mon Sep 17 00:00:00 2001 From: jonsd Date: Mon, 26 Nov 2007 09:55:02 +0000 Subject: [PATCH] [1.29.22] Remember voice variant over tags. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@108 d46cf337-b52f-0410-862d-fd96e6ae7743 --- dictsource/en_list | 4 +++- dictsource/en_rules | 2 +- dictsource/no_list | 2 +- src/readclause.cpp | 16 ++++++++++++---- src/synthdata.cpp | 2 +- src/voices.cpp | 3 ++- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/dictsource/en_list b/dictsource/en_list index 11cc444c..bf20ce2f 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -188,6 +188,7 @@ usa $abbrev utc $abbrev u.s ju:'Es wwii dVb@Lju:dVb@Lju:t'u: +xxx $abbrev // not roman 30 xy $abbrev @@ -1426,7 +1427,8 @@ project $verb promenade pr0m@n'A:d pronoun proUnaUn propaganda pr0p@g'and@ -protegee pr0t@dZeI +protege pr0t@ZeI +protegee pr0t@ZeI protest proUtEst $onlys protest $verb protocol proUt@k0l diff --git a/dictsource/en_rules b/dictsource/en_rules index d224391a..ac7d8df7 100644 --- a/dictsource/en_rules +++ b/dictsource/en_rules @@ -1533,7 +1533,7 @@ deter dI2t3: deter (i dI2ti@ detest dI2tEst - de (th d%i: + _) de (th d%i: de (ton dE de (tou di: de (tox d%i: diff --git a/dictsource/no_list b/dictsource/no_list index 4ee94e0f..1c542e5f 100755 --- a/dictsource/no_list +++ b/dictsource/no_list @@ -39,7 +39,7 @@ _1 'e:n _2 t'u: _3 t@-*'e: _4 f'i:*E -_5 f'e:m +_5 f'Em _6 s'Eks _7 S'u-: _8 'Ot:@2 diff --git a/src/readclause.cpp b/src/readclause.cpp index 58507cd6..6d742d6a 100644 --- a/src/readclause.cpp +++ b/src/readclause.cpp @@ -1529,7 +1529,7 @@ static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outb return(CLAUSE_COLON); case SSML_SENTENCE: - if(ssml_sp->tag_type == SSML_SENTENCE) + if((ssml_sp != NULL) && (ssml_sp->tag_type == SSML_SENTENCE)) { // new sentence implies end-of-sentence voice_change_flag = GetVoiceAttributes(px, SSML_SENTENCE+SSML_CLOSE); @@ -1539,10 +1539,18 @@ static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outb case SSML_PARAGRAPH: - if((ssml_sp->tag_type == SSML_SENTENCE) || (ssml_sp->tag_type == SSML_PARAGRAPH)) + if(ssml_sp != NULL) { - // new paragraph implies end-of-sentence or end-of-paragraph - voice_change_flag = GetVoiceAttributes(px, SSML_SENTENCE+SSML_CLOSE); + if(ssml_sp->tag_type == SSML_SENTENCE) + { + // new paragraph implies end-of-sentence or end-of-paragraph + voice_change_flag = GetVoiceAttributes(px, SSML_SENTENCE+SSML_CLOSE); + } + if(ssml_sp->tag_type == SSML_PARAGRAPH) + { + // new paragraph implies end-of-sentence or end-of-paragraph + voice_change_flag |= GetVoiceAttributes(px, SSML_PARAGRAPH+SSML_CLOSE); + } } voice_change_flag |= GetVoiceAttributes(px, tag_type); return(CLAUSE_PARAGRAPH + voice_change_flag); diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 5ca71c3d..b22feec5 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.29.21 21.Nov.07"; +const char *version_string = "1.29.22 26.Nov.07"; const int version_phdata = 0x012901; int option_device_number = -1; diff --git a/src/voices.cpp b/src/voices.cpp index 85294afc..d9b09c79 100755 --- a/src/voices.cpp +++ b/src/voices.cpp @@ -1485,7 +1485,8 @@ espeak_ERROR SetVoiceByName(const char *name) variant_name = ExtractVoiceVariantName(buf,0); memset(&voice_selector,0,sizeof(voice_selector)); - voice_selector.name = buf; +// voice_selector.name = buf; + voice_selector.name = name; // include variant name in voice stack ?? // first check for a voice with this filename // This may avoid the need to call espeak_ListVoices().