Browse Source

[1.46.53]

espeakedit, show path to phsource when compiling.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@319 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 12 years ago
parent
commit
42028ac8ce
7 changed files with 32 additions and 15 deletions
  1. 3
    1
      dictsource/pt_list
  2. 7
    2
      dictsource/pt_rules
  3. 9
    4
      src/compiledata.cpp
  4. 2
    2
      src/menus.cpp
  5. 1
    1
      src/synthdata.cpp
  6. 6
    3
      src/tr_languages.cpp
  7. 4
    2
      src/translate.cpp

+ 3
- 1
dictsource/pt_list View File

concerto $alt2 $noun concerto $alt2 $noun
concordo $alt concordo $alt
conforto $alt $verb conforto $alt $verb
congelo $alt
consolo $alt2 $noun consolo $alt2 $noun
controle $alt2 $noun controle $alt2 $noun
controlo $alt2 $noun controlo $alt2 $noun
hoje $alt2 hoje $alt2
horrores $alt2 horrores $alt2
ideia $alt ideia $alt
insonoro $alt
interesse $alt2 $noun interesse $alt2 $noun
jogo $alt2 $noun jogo $alt2 $noun
joguete $alt2 joguete $alt2
sexteto $alt2 sexteto $alt2
?1 senhora $alt2 ?1 senhora $alt2
senhores $alt2 senhores $alt2
singelo $alt
sinopse $alt sinopse $alt
soco $alt2 soco $alt2
soco $alt $verb soco $alt $verb
tumores $alt2 tumores $alt2
valeta $alt2 valeta $alt2
vanessa $alt2 vanessa $alt2
velo $alt
velozes $alt velozes $alt
verme $alt verme $alt
violeta $alt2 violeta $alt2

+ 7
- 2
dictsource/pt_rules View File

_perd) e (L05_ e _perd) e (L05_ e
_quis) e (L05_ E _quis) e (L05_ E
_soub) e (L05_ E _soub) e (L05_ E
diss) e (L06_ E / contra-
diss) e (L06_ E // contra-
tend) e (L06_ e // a- con- en- es- tend) e (L06_ e // a- con- en- es-
vend) e (L06_ e // re- vend) e (L06_ e // re-
_mord) e (L06_ e _mord) e (L06_ e
_rejuvenec) e (L07_ e _rejuvenec) e (L07_ e
_resolv) e (L07_ e _resolv) e (L07_ e
_suspend) e (L07_ e _suspend) e (L07_ e
abastec) e (L07_ e / re-
abastec) e (L07_ e // re-
conhec) e (L07_ e // & re- des- conhec) e (L07_ e // & re- des-
estabelec) e (L07_ e // re- estabelec) e (L07_ e // re-
favorec) e (L07_ e // des- favorec) e (L07_ e // des-
_g) e (rL04_ E _g) e (rL04_ E
qu) e (rL04_ E // re- qu) e (rL04_ E // re-
_op) e (rL04_ E _op) e (rL04_ E
gen) e (rL04_ E // de- re-
_alt) e (rL04_ E _alt) e (rL04_ E
_sug) e (rL04_ E _sug) e (rL04_ E
_sup) e (rL04_ E _sup) e (rL04_ E
_ens) o (pL04_ O _ens) o (pL04_ O
_s) o (prL04_ O _s) o (prL04_ O
_) o (ptL04_ O _) o (ptL04_ O
_inod) o (rL03_ O
_inson) o (rL03_ O
_comem) o (rL04 O
_remem) o (rL04_ O
_enf) o (rquL02_ O _enf) o (rquL02_ O
c) o (rrL01_ o // escorra, incorra, corra, recorra c) o (rrL01_ o // escorra, incorra, corra, recorra
_m) o (rrL01_ o _m) o (rrL01_ o

+ 9
- 4
src/compiledata.cpp View File

} }


sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp); sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
if(system(command) < 0)
if(system(command) != 0)
{ {
failed = 1; failed = 1;
} }
make_envs(); make_envs();
#endif #endif


wxLogStatus(_T("Compiling phoneme data: ")+wxString(path_source,wxConvLocal));
n_envelopes = 0; n_envelopes = 0;
error_count = 0; error_count = 0;
resample_count = 0; resample_count = 0;
memset(markers_used,0,sizeof(markers_used));
memset(markers_used,0,sizeof(markers_used));


f_errors = stderr; f_errors = stderr;




if(error_count > 0) if(error_count > 0)
{ {
report += _T(" See file: 'phsource/error_log'.");
report += _T(" See file: '")+wxString(path_source,wxConvLocal)+_T("phsource/error_log'.");
wxLogError(report); wxLogError(report);
} }
wxLogStatus(report + report_dict); wxLogStatus(report + report_dict);
void CompileSampleRate() void CompileSampleRate()
{ {
long value; long value;
value = wxGetNumberFromUser(_T("Compile phoneme data with a specified sample rate"), _T("Sample rate"), _T("Resample (needs sox)"), 22050, 5000, 48000);
#ifndef PLATFORM_POSIX
wxLogError(_T("Change Sample Rate needs the 'sox' program. It probably doesn't work on Windows"));
#endif

value = wxGetNumberFromUser(_T("Compile phoneme data with a specified sample rate"), _T("Sample rate"), _T("Resample (needs 'sox' program)"), 22050, 5000, 48000);


if(value > 1000) if(value > 1000)
{ {

+ 2
- 2
src/menus.cpp View File

data_menu = new wxMenu; data_menu = new wxMenu;
data_menu->Append(MENU_COMPILE_DICT, _("Compile &dictionary")); data_menu->Append(MENU_COMPILE_DICT, _("Compile &dictionary"));
data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (debu&g)")); data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (debu&g)"));
data_menu->Append(MENU_COMPILE_PH, _("Compile &phoneme data"));
data_menu->Append(MENU_COMPILE_PH2, _("Change sample &rate"));
data_menu->Append(MENU_COMPILE_PH, _("Compile &phoneme data 22050Hz"));
data_menu->Append(MENU_COMPILE_PH2, _("Compile at sample &rate"));
data_menu->AppendSeparator(); data_menu->AppendSeparator();
data_menu->Append(MENU_COMPILE_MBROLA, _("Compile &mbrola phonemes list...")); data_menu->Append(MENU_COMPILE_MBROLA, _("Compile &mbrola phonemes list..."));
data_menu->Append(MENU_COMPILE_INTONATION, _("Compile &intonation data")); data_menu->Append(MENU_COMPILE_INTONATION, _("Compile &intonation data"));

+ 1
- 1
src/synthdata.cpp View File

#include "translate.h" #include "translate.h"
#include "wave.h" #include "wave.h"


const char *version_string = "1.46.52 16.Mar.13";
const char *version_string = "1.46.53 16.Mar.13";
const int version_phdata = 0x014640; const int version_phdata = 0x014640;


int option_device_number = -1; int option_device_number = -1;

+ 6
- 3
src/tr_languages.cpp View File

static const short stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210}; static const short stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210};


static const short stress_lengths_ta[8] = {200, 200, 210, 210, 0, 0, 230, 230}; static const short stress_lengths_ta[8] = {200, 200, 210, 210, 0, 0, 230, 230};
static const short stress_lengths_ta2[8] = {230, 230, 240, 240, 0, 0, 260, 260};
static const unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 }; static const unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 };


// convert name string into a word of up to 4 characters, for the switch() // convert name string into a word of up to 4 characters, for the switch()
case L('m','r'): // Marathi case L('m','r'): // Marathi
case L('t','e'): // Telugu case L('t','e'): // Telugu
{ {
SetupTranslator(tr,stress_lengths_ta,stress_amps_ta);
SetupTranslator(tr,stress_lengths_ta2, stress_amps_ta);
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable


tr->langopts.stress_rule = STRESSPOSN_1L; tr->langopts.stress_rule = STRESSPOSN_1L;


if(name2 == L('t','a')) if(name2 == L('t','a'))
{ {
SetupTranslator(tr,stress_lengths_ta, NULL);
tr->letter_bits_offset = OFFSET_TAMIL; tr->letter_bits_offset = OFFSET_TAMIL;
tr->langopts.numbers = NUM_OMIT_1_THOUSAND ; tr->langopts.numbers = NUM_OMIT_1_THOUSAND ;
tr->langopts.param[LOPT_WORD_MERGE] = 1; // don't break vowels betwen words
} }
else
if(name2 == L('m','r')) if(name2 == L('m','r'))
{ {
tr->letter_bits_offset = OFFSET_DEVANAGARI; tr->letter_bits_offset = OFFSET_DEVANAGARI;
tr->letter_bits_offset = OFFSET_TELUGU; tr->letter_bits_offset = OFFSET_TELUGU;
tr->langopts.numbers = 0x1; tr->langopts.numbers = 0x1;
} }
tr->langopts.param[LOPT_WORD_MERGE] = 1; // don't break vowels betwen words
SetIndicLetters(tr); // call this after setting OFFSET_ SetIndicLetters(tr); // call this after setting OFFSET_
SetLetterBitsRange(tr,LETTERGP_B,0x4e,0x4e); // chillu-virama (unofficial)
SetLetterBitsRange(tr,LETTERGP_B,0x4e,0x4e); // chillu-virama (unofficial)
} }
break; break;



+ 4
- 2
src/translate.cpp View File

char prefix_chars[0x3f + 2]; char prefix_chars[0x3f + 2];
int found=0; int found=0;
int end_flags; int end_flags;
char c_temp; // save a character byte while we temporarily replace it with space
int c_temp; // save a character byte while we temporarily replace it with space
int first_char; int first_char;
int last_char = 0; int last_char = 0;
int add_plural_suffix = 0; int add_plural_suffix = 0;
if((word_length == 1) && (wflags & FLAG_TRANSLATOR2)) if((word_length == 1) && (wflags & FLAG_TRANSLATOR2))
{ {
// retranslating a 1-character word using a different language, say its name // retranslating a 1-character word using a different language, say its name
spell_word = 1;
utf8_in(&c_temp, wordx+1); // the next character
if(!IsAlpha(c_temp) || (AlphabetFromChar(last_char) != AlphabetFromChar(c_temp)))
spell_word = 1;
} }


if(option_sayas == SAYAS_KEY) if(option_sayas == SAYAS_KEY)

Loading…
Cancel
Save