mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-12 08:50:01 +00:00
Merge branch 'upstream' into development
Conflicts: dictsource/dict_phonemes phsource/compile_report
This commit is contained in:
+2
-2
@@ -3178,7 +3178,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
continue;
|
||||
}
|
||||
|
||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < tr->clause_end))
|
||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < translator->clause_end))
|
||||
{
|
||||
// only use this pronunciation if it's the last word of the clause
|
||||
continue;
|
||||
@@ -3190,7 +3190,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
continue;
|
||||
}
|
||||
|
||||
if((dictionary_flags2 & FLAG_SENTENCE) && !(tr->clause_terminator & CLAUSE_BIT_SENTENCE))
|
||||
if((dictionary_flags2 & FLAG_SENTENCE) && !(translator->clause_terminator & CLAUSE_BIT_SENTENCE))
|
||||
{
|
||||
// only uis this clause is a sentence , i.e. terminator is {. ? !} not {, : :}
|
||||
continue;
|
||||
|
||||
+27
-10
@@ -122,6 +122,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
int regression;
|
||||
int end_sourceix;
|
||||
int alternative;
|
||||
int delete_count;
|
||||
PHONEME_DATA phdata;
|
||||
|
||||
int n_ph_list3;
|
||||
@@ -166,18 +167,40 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
}
|
||||
|
||||
// look for switch of phoneme tables
|
||||
delete_count = 0;
|
||||
current_phoneme_tab = tr->phoneme_tab_ix;
|
||||
for(j = 0; j < n_ph_list2; j++)
|
||||
{
|
||||
if(plist2[j].phcode == phonSWITCH)
|
||||
{
|
||||
current_phoneme_tab = plist2[j].tone_ph;
|
||||
}
|
||||
if(current_phoneme_tab != tr->phoneme_tab_ix)
|
||||
{
|
||||
plist2[j].synthflags |= SFLAG_SWITCHED_LANG;
|
||||
}
|
||||
|
||||
if(delete_count > 0)
|
||||
{
|
||||
memcpy(&plist2[j-delete_count], &plist2[j], sizeof(plist2[0]));
|
||||
}
|
||||
|
||||
if(plist2[j].phcode == phonSWITCH)
|
||||
{
|
||||
if((!(plist2[j].synthflags & SFLAG_EMBEDDED)) && (
|
||||
(plist2[j].tone_ph == current_phoneme_tab) ||
|
||||
(plist2[j+1].phcode == phonSWITCH) ||
|
||||
((plist2[j+1].phcode == phonPAUSE) && (plist2[j+2].phcode == phonSWITCH))
|
||||
))
|
||||
{
|
||||
// delete this phonSWITCH if it's switching to the current phoneme table, or
|
||||
// delete this phonSWITCH if its followed by another phonSWITCH
|
||||
delete_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
current_phoneme_tab = plist2[j].tone_ph;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
n_ph_list2 -= delete_count;
|
||||
|
||||
if((regression = tr->langopts.param[LOPT_REGRESSIVE_VOICING]) != 0)
|
||||
{
|
||||
@@ -343,12 +366,6 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
|
||||
if(plist3->phcode == phonSWITCH)
|
||||
{
|
||||
if(!(plist3->synthflags & SFLAG_EMBEDDED)) // ?? phonSWITCH can't have SFLAG_EMBEDDED ??
|
||||
{
|
||||
if((plist3[1].phcode == phonSWITCH) || ((plist3[1].type == phPAUSE) && (plist3[2].phcode == phonSWITCH)))
|
||||
continue; // next phoneme is also a phonSWITCH, so ignore
|
||||
}
|
||||
|
||||
// change phoneme table
|
||||
SelectPhonemeTable(plist3->tone_ph);
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.46.48 13.Mar.13";
|
||||
const char *version_string = "1.46.50 15.Mar.13";
|
||||
const int version_phdata = 0x014640;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
+7
-1
@@ -1073,10 +1073,16 @@ int TranslateWord(Translator *tr, char *word_start, int next_pause, WORD_TAB *wt
|
||||
{
|
||||
if(word_length > 1)
|
||||
return(FLAG_SPELLWORD); // a mixture of languages, retranslate as individual letters, separated by spaces
|
||||
if(phonemes[0] == phonSWITCH)
|
||||
{
|
||||
// problem with espeak -vbg "b.c.d.e.f"
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
strcpy(word_phonemes, phonemes);
|
||||
return(dictionary_flags[0] & FLAG_SKIPWORDS); // ??
|
||||
if(wflags & FLAG_TRANSLATOR2)
|
||||
return(0);
|
||||
return(dictionary_flags[0] & FLAG_SKIPWORDS); // for "b.c.d"
|
||||
}
|
||||
else if(found == 0)
|
||||
{
|
||||
|
||||
+1
-1
@@ -586,7 +586,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
static const char *voices_asia =
|
||||
"fa fa-pin hi hy hy-west id ka kn ku ml ne pa ta tr vi vi-hue zh zh-yue ";
|
||||
static const char *voices_europe =
|
||||
"bg bs ca cs cy da el es et fi fr-be hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv ";
|
||||
"an bg bs ca cs cy da el es et fi fr-be hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv ";
|
||||
|
||||
|
||||
strncpy0(voicename, vname, sizeof(voicename));
|
||||
|
||||
Reference in New Issue
Block a user