Merge branch 'upstream' into development

Conflicts:
	dictsource/dict_phonemes
	phsource/compile_report
This commit is contained in:
Reece H. Dunn
2013-04-05 12:55:09 +01:00
19 changed files with 248 additions and 114 deletions
+17
View File
@@ -645,6 +645,7 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa)
char *buf;
int count;
int flags;
int separate_phonemes = 0;
char phon_buf[30];
char phon_buf2[30];
PHONEME_LIST *plist;
@@ -652,6 +653,13 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa)
static const char *stress_chars = "==,,''";
static const int char_tie[] = {0x0361, 0x200d}; // combining-double-inverted-breve, zero-width-joiner
if(use_ipa == 4)
{
// separate individual phonemes with underscores
use_ipa = 1;
separate_phonemes = '_';
}
if(phon_out != NULL)
{
for(ix=1; ix<(n_phoneme_list-2); ix++)
@@ -661,6 +669,13 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa)
plist = &phoneme_list[ix];
if(plist->newword)
*buf++ = ' ';
else
{
if((separate_phonemes != 0) && (ix > 1))
{
*buf++ = separate_phonemes;
}
}
if(plist->synthflags & SFLAG_SYLLABLE)
{
@@ -683,6 +698,8 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa)
if(c != 0)
{
buf += utf8_out(c, buf);
if(separate_phonemes)
*buf++ = separate_phonemes;
}
}
}
+2 -2
View File
@@ -67,7 +67,7 @@ static const char *help_text =
"\t Compile pronunciation rules and dictionary from the current\n"
"\t directory. <voice name> specifies the language\n"
"--ipa Write phonemes to stdout using International Phonetic Alphabet\n"
"\t --ipa=1 Use ties, --ipa=2 Use ZWJ\n"
"\t --ipa=1 Use ties, --ipa=2 Use ZWJ, --ipa=3 Separate with _\n"
"--path=\"<path>\"\n"
"\t Specifies the directory containing the espeak-data directory\n"
"--pho Write mbrola phoneme data (.pho) to stdout or to the file in --phonout\n"
@@ -620,7 +620,7 @@ int main (int argc, char **argv)
{
value = -1;
sscanf(optarg2,"%d",&value);
if((value<0) || (value>2))
if((value<0) || (value>3))
{
fprintf(stderr,"Bad value for -ipa=\n");
value = 0;
+2 -2
View File
@@ -101,7 +101,7 @@ static const char *help_text =
"\t Compile pronunciation rules and dictionary from the current\n"
"\t directory. <voice name> specifies the language\n"
"--ipa Write phonemes to stdout using International Phonetic Alphabet\n"
"\t --ipa=1 Use ties, --ipa=2 Use ZWJ\n"
"\t --ipa=1 Use ties, --ipa=2 Use ZWJ, --ipa=3 Separate with _\n"
"--path=\"<path>\"\n"
"\t Specifies the directory containing the espeak-data directory\n"
"--pho Write mbrola phoneme data (.pho) to stdout or to the file in --phonout\n"
@@ -739,7 +739,7 @@ int main (int argc, char **argv)
{
value = -1;
sscanf(optarg2,"%d",&value);
if((value<0) || (value>2))
if((value<0) || (value>3))
{
fprintf(stderr,"Bad value for -ipa=\n");
value = 0;
+1 -1
View File
@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"
const char *version_string = "1.47.04 02.Apr.13";
const char *version_string = "1.47.04a 05.Apr.13";
const int version_phdata = 0x014701;
int option_device_number = -1;
+1 -1
View File
@@ -1955,7 +1955,7 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
{
int use_ipa = 0;
if(option_phonemes >= 3)
use_ipa = option_phonemes-2; // 1=ipa, 2=ipa with tie, 3=ipa with ZWJ
use_ipa = option_phonemes-2; // 1=ipa, 2=ipa with tie, 3=ipa with ZWJ, 4=ipa with separators
GetTranslatedPhonemeString(translator->phon_out, sizeof(translator->phon_out), use_ipa);
if(option_phonemes > 0)
+1
View File
@@ -21,6 +21,7 @@
typedef struct {
char v_name[40];
char language_name[20];
int phoneme_tab_ix; // phoneme table number
int pitch_base; // Hz<<12
+6 -3
View File
@@ -421,7 +421,7 @@ void VoiceReset(int tone_only)
voice->n_harmonic_peaks = 5;
voice->peak_shape = 0;
voice->voicing = 64;
voice->consonant_amp = 90; // change to 85 for v.1.47 was 100
voice->consonant_amp = 90; // change from 100 to 90 for v.1.47
voice->consonant_ampv = 100;
voice->samplerate = samplerate_native;
memset(voice->klattv,0,sizeof(voice->klattv));
@@ -750,6 +750,7 @@ voice_t *LoadVoice(const char *vname, int control)
new_translator = SelectTranslator(translator_name);
langopts = &new_translator->langopts;
strncpy0(voice->language_name, language_name, sizeof(voice->language_name));
}
}
break;
@@ -1818,6 +1819,7 @@ espeak_ERROR SetVoiceByName(const char *name)
}
DoVoiceChange(voice);
voice_selector.languages = voice->language_name;
SetVoiceStack(&voice_selector, variant_name);
return(EE_OK);
}
@@ -1834,6 +1836,7 @@ espeak_ERROR SetVoiceByName(const char *name)
LoadVoice(variant_name,2);
}
DoVoiceChange(voice);
voice_selector.languages = voice->language_name;
SetVoiceStack(&voice_selector, variant_name);
return(EE_OK);
}
@@ -1884,8 +1887,8 @@ void FreeVoiceList()
ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec)
{//========================================================================
char path_voices[sizeof(path_home)+12];
#ifdef PLATFORM_RISCOS
if(n_voices_list == 0)
{