[1.39.07]

Fix  SSML <prosody rate> to allow the maximum rate of 390 wpm.
Fixes to the generation of the dict_phonemes report.
Lang=en-n adjust vowel sounds.
Compile phonemes: automatically assume vowel-break marker in second keyframe of a vowel file if none is set.
Set letter group 'A' to "vowel letters only" for Indic alphabets.



git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@195 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-09-27 18:14:15 +00:00
parent 359b2327a9
commit 5ef05700e1
37 changed files with 456 additions and 297 deletions
+15 -2
View File
@@ -601,6 +601,8 @@ int Compile::LoadSpect(const char *path, int control)
int rms;
float total;
float pkheight;
int marker1_set=0;
int frame_vowelbreak;
SpectFrame *fr;
wxString path_sep = _T("/");
@@ -651,6 +653,16 @@ for(ix=0; ix<8; ix++)
if(spectseq->frames[frame]->keyframe)
{
if(seq_out.n_frames == 1)
{
frame_vowelbreak = frame;
}
if(spectseq->frames[frame]->markers & 0x2)
{
// marker 1 is set
marker1_set = 1;
}
seq_out.n_frames++;
if(frame > 0)
total += spectseq->frames[frame-1]->length;
@@ -658,10 +670,11 @@ for(ix=0; ix<8; ix++)
}
seq_out.length = int(total);
if((control & 1) && (spectseq->numframes > 2))
if((control & 1) && (marker1_set == 0))
{
// This is a vowel, but no Vowel Break marker is set
// set a marker flag for the second frame of a vowel
spectseq->frames[1]->markers |= FRFLAG_VOWEL_CENTRE;
spectseq->frames[frame_vowelbreak]->markers |= FRFLAG_VOWEL_CENTRE;
}
ix = 0;
+1 -1
View File
@@ -47,7 +47,7 @@ static const char *help_text =
"-p <integer>\n"
"\t Pitch adjustment, 0 to 99, default is 50\n"
"-s <integer>\n"
"\t Speed in words per minute, 80 to 370, default is 170\n"
"\t Speed in words per minute, 80 to 390, default is 170\n"
"-v <voice name>\n"
"\t Use voice file of this name from espeak-data/voices\n"
"-w <wave file name>\n"
+1 -1
View File
@@ -81,7 +81,7 @@ static const char *help_text =
"-p <integer>\n"
"\t Pitch adjustment, 0 to 99, default is 50\n"
"-s <integer>\n"
"\t Speed in words per minute 80 to 370, default is 170\n"
"\t Speed in words per minute 80 to 390, default is 170\n"
"-v <voice name>\n"
"\t Use voice file of this name from espeak-data/voices\n"
"-w <wave file name>\n"
+1 -1
View File
@@ -113,7 +113,7 @@ static const char *help_text =
"-p <integer>\n"
"\t Pitch adjustment, 0 to 99, default is 50\n"
"-s <integer>\n"
"\t Speed in words per minute 80 to 370, default is 170\n"
"\t Speed in words per minute 80 to 390, default is 170\n"
"-v <voice name>\n"
"\t Use voice file of this name from espeak-data/voices\n"
"-w <wave file name>\n"
+1 -1
View File
@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"
const char *version_string = "1.39.05 22.Sep.08";
const char *version_string = "1.39.07 27.Sep.08";
const int version_phdata = 0x013900;
int option_device_number = -1;
+1 -2
View File
@@ -95,8 +95,7 @@ void SetIndicLetters(Translator *tr)
static const char dev_consonants2[] = {0x02,0x03,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f};
memset(tr->letter_bits,0,sizeof(tr->letter_bits));
SetLetterBitsRange(tr,LETTERGP_A,0x04,0x14); // vowel letters
SetLetterBitsRange(tr,LETTERGP_A,0x3e,0x4c); // vowel signs
SetLetterBitsRange(tr,LETTERGP_A,0x04,0x14); // vowel letters only
SetLetterBitsRange(tr,LETTERGP_B,0x3e,0x4d); // vowel signs, and virama
SetLetterBitsRange(tr,LETTERGP_C,0x15,0x39); // the main consonant range
SetLetterBits(tr,LETTERGP_C,dev_consonants2); // additional consonants
+45 -5
View File
@@ -381,6 +381,8 @@ void FindPhonemesUsed(void)
char *next;
unsigned char c;
int count = 0;
int ignore;
char phonetic[N_WORD_PHONEMES];
// look through all the phoneme strings in the **_rules data
// and mark these phoneme codes as used.
@@ -419,21 +421,37 @@ void FindPhonemesUsed(void)
p += (strlen(p)+1);
}
while((((c = *p) != RULE_PHONEMES)) && (c != 0)) p++;
while((c = *p) != 0)
{
if(c == RULE_CONDITION)
p++; // next byte is the condition number, which may be 3 (= RULE_PHONEMES)
if(c == RULE_PHONEMES)
break;
p++;
}
count++;
if(c == RULE_PHONEMES)
{
ignore = 0;
start = p;
p++;
while(*p != 0)
while((c = *p) != 0)
{
phoneme_tab_flags[*p & 0xff] |= 2;
if(c == phonSWITCH)
ignore = 1;
if(ignore == 0)
phoneme_tab_flags[c] |= 2;
p++;
}
}
p++;
}
// NOTE, we should recognise langopts.textmode and ignore the *_list file (lang=zh)
for(hash=0; hash<N_HASH_DICT; hash++)
{
p = translator->dict_hashtab[hash];
@@ -446,11 +464,33 @@ void FindPhonemesUsed(void)
if((p[1] & 0x80) == 0)
{
p += ((p[1] & 0x3f) + 2);
while(*p != 0)
strcpy(phonetic,p);
p += strlen(phonetic) +1;
// examine flags
ignore = 0;
while(p < next)
{
phoneme_tab_flags[*p & 0xff] |= 2;
if(*p == BITNUM_FLAG_TEXTMODE)
{
ignore = 1;
break;
}
p++;
}
if(ignore == 0)
{
p = phonetic;
while((c = *p) != 0)
{
if(c == phonSWITCH)
break;
phoneme_tab_flags[c] |= 2;
p++;
}
}
}
p = next;
}
+1 -1
View File
@@ -145,7 +145,7 @@ int wcmdq_tail=0;
// pitch,speed,
int embedded_default[N_EMBEDDED_VALUES] = {0,50,170,100,50, 0,0, 0,170,0,0,0,0,0};
static int embedded_max[N_EMBEDDED_VALUES] = {0,0x7fff,400,300,99,99,99, 0,360,0,0,0,0,4};
static int embedded_max[N_EMBEDDED_VALUES] = {0,0x7fff,600,300,99,99,99, 0,600,0,0,0,0,4};
#define N_CALLBACK_IX N_WAV_BUF-2 // adjust this delay to match display with the currently spoken word
int current_source_index=0;