Tidy up phsource.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@213 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-12-22 19:19:34 +00:00
parent eabd70afbf
commit 3d02bd19d4
103 changed files with 3058 additions and 733 deletions
+9 -1
View File
@@ -2541,7 +2541,15 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
return(0);
}
}
#ifdef deleted
// can't switch to a tone language, because the tone-phoneme numbers are not valid for the original language
if((letter >= 0x4e00) && (letter < 0xa000) && (tr->langopts.ideographs != 1))
{
// Chinese ideogram
sprintf(phonemes,"%czh",phonSWITCH);
return(0);
}
#endif
// no match, try removing the accent and re-translating the word
if((letter >= 0xc0) && (letter <= 0x241) && ((ix = remove_accent[letter-0xc0]) != 0))
{
+3
View File
@@ -517,6 +517,9 @@ void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_b
return; // the character is specified as _* so ignore it when speaking normal text
// check whether this character is specified for English
if(tr->translator_name == L('e','n'))
return; // we are already using English
SetTranslator2("en");
if(Lookup(translator2, &single_letter[2], ph_buf3) != 0)
{
+3
View File
@@ -607,6 +607,9 @@ if(p->type != phVOWEL)
if(pre_sonorant || pre_voiced)
{
// set pitch for pre-vocalic part
if(pitch_start == 1024)
last_pitch = pitch_start; // pitch is not set
if(pitch_start - last_pitch > 8) // was 9
last_pitch = pitch_start - 8;
+2 -2
View File
@@ -35,8 +35,8 @@
#include "translate.h"
#include "wave.h"
const char *version_string = "1.39.48 19.Dec.08";
const int version_phdata = 0x013900;
const char *version_string = "1.39.49 21.Dec.08";
const int version_phdata = 0x014000;
int option_device_number = -1;
+1
View File
@@ -876,6 +876,7 @@ SetLengthMods(tr,3); // all equal
tr->langopts.stress_flags = 0x16 + 0x100;
SetLetterVowel(tr,'y');
tr->langopts.numbers = 0x69 + 0x8000;
tr->langopts.accents = 2; // "capital" after letter name
}
break;
+8 -5
View File
@@ -890,12 +890,15 @@ int h2;
// increase bass
y = peaks[1].height * 10; // addition as a multiple of 1/256s
h2 = (1000<<16)/pitch; // decrease until 1000Hz
x = y/h2;
h = 1;
while(y > 0)
if(h2 > 0)
{
htab[h++] += y;
y -= x;
x = y/h2;
h = 1;
while(y > 0)
{
htab[h++] += y;
y -= x;
}
}
}