mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-02 22:52:29 +00:00
[1.45.47]
Fixed crash on re-initializing libespeak. lang=hu, experimental, if the last two words of a clause (before punctuation) both have capital letters, then make the last word unstressed. This is useful for people names, but may be wrong for other cases. lang=en-us, distinguish phonemes [aI@] and [aI3] (compare "diet", "tired"). lang=de, fix automatic devoicing of word-final 'b', 'd', 'g'. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@276 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+2
-2
@@ -1432,8 +1432,8 @@ void SetVoiceStack(espeak_VOICE *v, const char *variant_name)
|
||||
sp->voice_age = v->age;
|
||||
sp->voice_gender = v->gender;
|
||||
|
||||
if(memcmp(variant_name, "!v/", 3) == 0)
|
||||
variant_name += 3;// strip variant directory name
|
||||
if(memcmp(variant_name, "!v", 2) == 0)
|
||||
variant_name += 3;// strip variant directory name, !v plus PATHSEP
|
||||
strncpy0(base_voice_variant_name, variant_name, sizeof(base_voice_variant_name));
|
||||
memcpy(&base_voice, ¤t_voice_selected, sizeof(base_voice));
|
||||
}
|
||||
|
||||
+2
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.45.45 07.Oct.11";
|
||||
const char *version_string = "1.45.47 24.Oct.11";
|
||||
const int version_phdata = 0x014500;
|
||||
|
||||
int option_device_number = -1;
|
||||
@@ -176,6 +176,7 @@ void FreePhData(void)
|
||||
phoneme_tab_data=NULL;
|
||||
phoneme_index=NULL;
|
||||
phondata_ptr=NULL;
|
||||
tunes=NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1436,6 +1436,18 @@ if(dictionary_flags2[0] & FLAG_ABBREV)
|
||||
dictionary_flags[0] &= ~FLAG_PAUSE1;
|
||||
}
|
||||
|
||||
if(tr->translator_name == L('h','u'))
|
||||
{
|
||||
// lang=Hungarian, If the last two words of a clause have capital letters (eg. a person name), unstress the last word.
|
||||
if((wflags & (FLAG_LAST_WORD | FLAG_FIRST_UPPER | FLAG_ALL_UPPER | FLAG_FIRST_WORD)) == (FLAG_LAST_WORD | FLAG_FIRST_UPPER))
|
||||
{
|
||||
if(((wtab[-1].flags & (FLAG_FIRST_UPPER | FLAG_ALL_UPPER)) == FLAG_FIRST_UPPER) && ((tr->clause_terminator != 0x90028) || (wflags & FLAG_HAS_DOT)))
|
||||
{
|
||||
ChangeWordStress(tr,word_phonemes,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if((wflags & FLAG_HYPHEN) && (tr->langopts.stress_flags & S_HYPEN_UNSTRESS))
|
||||
{
|
||||
ChangeWordStress(tr,word_phonemes,3);
|
||||
@@ -1461,6 +1473,7 @@ if(dictionary_flags2[0] & FLAG_ABBREV)
|
||||
ChangeWordStress(tr,word_phonemes,3);
|
||||
}
|
||||
|
||||
|
||||
// dictionary flags for this word give a clue about which alternative pronunciations of
|
||||
// following words to use.
|
||||
if(end_type & SUFX_F)
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
|
||||
// Punctuation types returned by ReadClause()
|
||||
// bits 0-7 pause x 10mS, bits 12-14 intonation type,
|
||||
// bits12-14 intonation type
|
||||
// bit 15- don't need space after the punctuation
|
||||
// bit 19=sentence, bit 18=clause, bits 17=voice change
|
||||
// bit 16 used to distinguish otherwise identical types
|
||||
|
||||
Reference in New Issue
Block a user