mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-15 01:54:46 +00:00
[1.43.46]
Fix: Speak punctuation option also caused text after [[ to be spoken as phoneme codes even if espeakPHONEMES flag is not set. Speak sequences of letters and dots as individual letters, and don't speak 'dot', eg. "u.s.a." Don't announce punctuation in the alternative text inside <audio ... </audio> Vowelcharts, show the positions of multiple FMT() in vowel phonemes definitions. Phoneme definitions: New attributes: flag1, flag2, flag3 New attribute: nopause. Prevents the insertion of a short pause when this phoneme starts a word which follows a vowel. New conditions: isFlag1, isFlag2, isFlag3, isSibilant. New statement: InsertPhoneme() Phonemes: improve syllablic [m-] [n-] [N-] *_rules: add attributes $p_alt .. $p_alt3, $w_alt .. $w_alt3 *_list: add attributes: $sentence, $atstart klatt synthesizer: implement echo. espeakedit, Prosody display: Indicate stressed and secondary-stress syllables. espeakedit: remember window size and position. Intonation: New file, 'phsource/intonation' to define 'tunes' which can be used from voice files. espeakedit: add Compile -> Intonationm data Speed: Increase range to 80 to 450, with default=175. Improve speaking at high speeds. lang=en: Reduce consecutive unstressed syllables to 'diminished' stress, only in unstressed words. lang=de: Change 'r' phoneme. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@244 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+48
-18
@@ -48,6 +48,8 @@ END_EVENT_TABLE()
|
||||
static wxPen PEN_PITCHENV(wxColour(0,0,255),1,wxSOLID);
|
||||
static wxPen PEN_SAMPLED(wxColour(0,200,200),2,wxSOLID);
|
||||
static wxPen PEN_PHSELECTED(wxColour(255,0,0),2,wxSOLID);
|
||||
static wxPen PEN_PHSTRESSED(wxColour(80,80,196),3,wxSOLID);
|
||||
static wxPen PEN_PHSTRESSED2(wxColour(160,160,255),2,wxSOLID);
|
||||
|
||||
ProsodyDisplay::ProsodyDisplay(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
||||
: wxScrolledWindow(parent, -1, pos, size,
|
||||
@@ -56,11 +58,8 @@ ProsodyDisplay::ProsodyDisplay(wxWindow *parent, const wxPoint& pos, const wxSiz
|
||||
|
||||
linewidth = size.GetWidth();
|
||||
scalex = 0.5;
|
||||
scaley = double(LINESEP*6)/160.0;
|
||||
scaley = double(LINESEP*6)/150.0;
|
||||
selected_ph = -1;
|
||||
// SetBackgroundColour(* wxWHITE);
|
||||
|
||||
LayoutData(phoneme_list,n_phoneme_list);
|
||||
} // end of ProsodyDisplay::ProsodyDisplay
|
||||
|
||||
|
||||
@@ -69,27 +68,37 @@ ProsodyDisplay::~ProsodyDisplay()
|
||||
prosodycanvas = NULL;
|
||||
}
|
||||
|
||||
extern MNEM_TAB envelope_names[];
|
||||
|
||||
void InitProsodyDisplay()
|
||||
{//======================
|
||||
wxMenu *menu_envelopes;
|
||||
int ix;
|
||||
wxString string;
|
||||
|
||||
menu_envelopes = new wxMenu;
|
||||
// entries match those in envelope_data[] in intonation.cpp
|
||||
menu_envelopes->Append(0x100,_T("Fall"));
|
||||
menu_envelopes->Append(0x102,_T("Rise"));
|
||||
menu_envelopes->Append(0x104,_T("Fall-rise"));
|
||||
menu_envelopes->Append(0x105,_T("Fall-rise (R)"));
|
||||
menu_envelopes->Append(0x106,_T("Fall-rise 2"));
|
||||
menu_envelopes->Append(0x107,_T("Fall-rise 2(R)"));
|
||||
menu_envelopes->Append(0x108,_T("Rise-fall"));
|
||||
|
||||
menu_envelopes->Append(0x10a,_T("Fall-rise 3"));
|
||||
menu_envelopes->Append(0x10c,_T("Fall-rise 4"));
|
||||
menu_envelopes->Append(0x10e,_T("Fall 2"));
|
||||
menu_envelopes->Append(0x110,_T("Rise 2"));
|
||||
menu_envelopes->Append(0x112,_T("Rise-fall-rise"));
|
||||
for(ix=0; envelope_names[ix].mnem != NULL; ix++)
|
||||
{
|
||||
string = wxString(envelope_names[ix].mnem, wxConvLocal);
|
||||
menu_envelopes->Append(0x100+envelope_names[ix].value, string);
|
||||
}
|
||||
#ifdef deleted
|
||||
menu_envelopes->Append(0x100,_T("fall"));
|
||||
menu_envelopes->Append(0x102,_T("rise"));
|
||||
menu_envelopes->Append(0x104,_T("fall-rise"));
|
||||
// menu_envelopes->Append(0x105,_T("fall-rise (R)"));
|
||||
menu_envelopes->Append(0x106,_T("fall-rise 2"));
|
||||
// menu_envelopes->Append(0x107,_T("fall-rise 2(R)"));
|
||||
menu_envelopes->Append(0x108,_T("rise-fall"));
|
||||
|
||||
menu_envelopes->Append(0x10a,_T("fall-rise 3"));
|
||||
menu_envelopes->Append(0x10c,_T("fall-rise 4"));
|
||||
menu_envelopes->Append(0x10e,_T("fall 2"));
|
||||
menu_envelopes->Append(0x110,_T("rise 2"));
|
||||
menu_envelopes->Append(0x112,_T("rise-fall-rise"));
|
||||
#endif
|
||||
menu_prosody = new wxMenu;
|
||||
menu_prosody->Append(1,_T("Pitch envelope"),menu_envelopes);
|
||||
menu_prosody->Append(2,_T("Amplitude"));
|
||||
@@ -130,6 +139,8 @@ void ProsodyDisplay::SelectPh(int index)
|
||||
PHONEME_LIST *p;
|
||||
const char *emphasized;
|
||||
int y1, y2;
|
||||
int ix;
|
||||
const char *name = "?";
|
||||
char buf[120];
|
||||
|
||||
if(index < 0) return;
|
||||
@@ -141,10 +152,18 @@ void ProsodyDisplay::SelectPh(int index)
|
||||
if(p->stresslevel & 8)
|
||||
emphasized = "*";
|
||||
|
||||
for(ix=0; envelope_names[ix].mnem != NULL; ix++)
|
||||
{
|
||||
if(envelope_names[ix].value == (p->env & 0xfe))
|
||||
{
|
||||
name = envelope_names[ix].mnem;
|
||||
break;
|
||||
}
|
||||
}
|
||||
y1 = p->pitch1;
|
||||
y2 = p->pitch2;
|
||||
sprintf(buf,"Stress %s%d Amp %2d LenMod %2d Pitch %3d %3d [env=%d] Flags %.2x ",
|
||||
emphasized,p->stresslevel&0x7,p->amp,p->length,y1,y2,p->env,p->ph->phflags);
|
||||
sprintf(buf,"Stress %s%d Amp %2d LenMod %2d Pitch %3d %3d %s PhFlags %.2x ",
|
||||
emphasized,p->stresslevel&0x7,p->amp,p->length,y1,y2,name,p->ph->phflags);
|
||||
wxLogStatus(wxString(buf,wxConvLocal));
|
||||
}
|
||||
|
||||
@@ -352,6 +371,7 @@ void ProsodyDisplay::DrawEnv(wxDC& dc, int x1, int y1, int width, PHONEME_LIST *
|
||||
p1 = ph->pitch1;
|
||||
}
|
||||
|
||||
if(p1 == 255) return;
|
||||
|
||||
dc.SetPen(PEN_PITCHENV);
|
||||
|
||||
@@ -427,6 +447,16 @@ void ProsodyDisplay::DrawPitchline(wxDC& dc, int line, int x1, int x2)
|
||||
continue; // before the redraw region
|
||||
}
|
||||
|
||||
// is this a stressed vowel ?
|
||||
if((p->type == phVOWEL) && (p->stresslevel >= 2))
|
||||
{
|
||||
if(p->stresslevel >= 4)
|
||||
dc.SetPen(PEN_PHSTRESSED);
|
||||
else
|
||||
dc.SetPen(PEN_PHSTRESSED2);
|
||||
dc.DrawLine(xpos,offy-LINEBASE-1,xpos+width,offy-LINEBASE-1);
|
||||
}
|
||||
|
||||
// is this phoneme selected ?
|
||||
if(ix == selected_ph)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user