mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
[1.45.43]
Added runtime detection of pulseaudio, with fallback to portaudio if pulse is not running. Use build option "AUDIO=runtime" in the makefile. Phoneme programs. Added condition "isTranslationGiven" to test whether a phoneme has been specified explicitly for a word in *_list. *_rules files. Suffix rules are now considered only if there is a previous vowel in the word. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@274 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+23
-10
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.45.41 07.Sep.11";
|
||||
const char *version_string = "1.45.43 16.Sep.11";
|
||||
const int version_phdata = 0x014500;
|
||||
|
||||
int option_device_number = -1;
|
||||
@@ -172,6 +172,7 @@ void FreePhData(void)
|
||||
Free(phoneme_tab_data);
|
||||
Free(phoneme_index);
|
||||
Free(phondata_ptr);
|
||||
Free(tunes);
|
||||
phoneme_tab_data=NULL;
|
||||
phoneme_index=NULL;
|
||||
phondata_ptr=NULL;
|
||||
@@ -613,7 +614,16 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
|
||||
int count;
|
||||
PHONEME_TAB *ph;
|
||||
PHONEME_LIST *plist_this;
|
||||
static int ph_position[8] = {0, 1, 2, 3, 2, 0, 1, 3}; // prevPh, thisPh, nextPh, next2Ph, nextPhW, prevPhW, nextVowel, next2PhW
|
||||
static int ph_position[8] = {0, 1, 2, 3, 2, 0, 1, 3}; // prevPh, thisPh, nextPh, next2Ph, nextPhW, prevPhW, nextVowel, (other conditions)
|
||||
|
||||
// instruction: 2xxx, 3xxx
|
||||
|
||||
// bits 8-10 = 0 to 6, which phoneme
|
||||
// bit 11 = 0, bits 0-7 are a phoneme code
|
||||
// bit 11 = 1, bits 5-7 type of data, bits 0-4 data value
|
||||
|
||||
// bits 8-10 = 7, other conditions
|
||||
|
||||
|
||||
data = instn & 0xff;
|
||||
instn2 = instn >> 8;
|
||||
@@ -634,12 +644,12 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
|
||||
if(plist[0].sourceix)
|
||||
return(false);
|
||||
}
|
||||
if(which==7)
|
||||
{
|
||||
// nextPh2 not word boundary
|
||||
if((plist[1].sourceix) || (plist[2].sourceix))
|
||||
return(false);
|
||||
}
|
||||
// if(which==7)
|
||||
// {
|
||||
// // nextPh2 not word boundary
|
||||
// if((plist[1].sourceix) || (plist[2].sourceix))
|
||||
// return(false);
|
||||
// }
|
||||
|
||||
if(which==6)
|
||||
{
|
||||
@@ -676,7 +686,7 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
|
||||
}
|
||||
ph = plist->ph;
|
||||
|
||||
if(instn2 < 7)
|
||||
if(instn2 < 8)
|
||||
{
|
||||
// 'data' is a phoneme number
|
||||
if((phoneme_tab[data]->mnemonic == ph->mnemonic) == true)
|
||||
@@ -783,6 +793,9 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
|
||||
break;
|
||||
}
|
||||
return(count > 0);
|
||||
|
||||
case 0x10: // isTranslationGiven
|
||||
return((plist->synthflags & SFLAG_DICTIONARY) != 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -903,7 +916,7 @@ void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_
|
||||
|
||||
switch(instn >> 12)
|
||||
{
|
||||
case 0:
|
||||
case 0: // 0xxx
|
||||
data = instn & 0xff;
|
||||
|
||||
if(instn2 == 0)
|
||||
|
||||
Reference in New Issue
Block a user