mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
[1.39.28]
Added experimental Klatt synthesizer. Klatt phonemes use a new format of phoneme data. espeakedit, new dialog fields and layout for Klatt phonemes. Added Klatt versions of English phonemes. Fixed some compilation warnings on Windows. Fixed bug in Lettergroups > L10 Increased amplitude of harmonics below F1 peak, to increase bass. Allow 5 (up from 4) pairs of values in "tone" command in voice files. Default to slightly wider pk_shape1. If words are separated by hyphens, don't add word-gap, and don't pass new-word flag onto phoneme processing. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@203 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+69
-25
@@ -244,10 +244,19 @@ void SpectDisplay::ReadDialogValues()
|
||||
void SpectDisplay::RefreshDialogValues(int type)
|
||||
//{=============================================
|
||||
{
|
||||
int ix;
|
||||
SpectFrame *sf;
|
||||
|
||||
sf = spectseq->frames[sframe];
|
||||
|
||||
spectseq->amplitude = formantdlg->t_amplitude->GetValue();
|
||||
spectseq->frames[sframe]->amp_adjust = formantdlg->t_ampframe->GetValue();
|
||||
spectseq->frames[sframe]->length_adjust =
|
||||
formantdlg->t_timeframe->GetValue() - spectseq->GetFrameLength(sframe,0,NULL);
|
||||
sf->amp_adjust = formantdlg->t_ampframe->GetValue();
|
||||
sf->length_adjust = formantdlg->t_timeframe->GetValue() - spectseq->GetFrameLength(sframe,0,NULL);
|
||||
|
||||
for(ix=0; ix<9; ix++)
|
||||
{
|
||||
sf->klatt_param[ix] = formantdlg->s_klatt[ix]->GetValue();
|
||||
}
|
||||
|
||||
if(type==0)
|
||||
{
|
||||
@@ -472,7 +481,7 @@ void SpectDisplay::OnMenu(wxCommandEvent& event)
|
||||
int code;
|
||||
wxKeyEvent keyevent;
|
||||
SpectFrame *sf;
|
||||
static int key[] = {0x1044,0x3044,0x104e,0x1047,0x105a,0x1051,0x3051,WXK_F1,WXK_F2,0x1049,WXK_F10};
|
||||
static int key[] = {0x1044,0x3044,0x104e,0x1047,0x105a,0x1051,0x3051,WXK_F1,WXK_F2,0x1049,WXK_F10,0x104b};
|
||||
|
||||
id = event.GetId();
|
||||
|
||||
@@ -624,13 +633,19 @@ void SpectDisplay::OnKey(wxKeyEvent& event)
|
||||
if(event.ControlDown())
|
||||
{
|
||||
// CTRL, rotate, make right slope steeper
|
||||
pk->pkright-= 5;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright-= 5;
|
||||
pk->pkwidth += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
pk->pkright -= 10;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright -= 10;
|
||||
pk->pkwidth -= 10;
|
||||
if(pk->pkright < 0)
|
||||
pk->pkright = 0;
|
||||
if(pk->pkwidth < 0)
|
||||
pk->pkwidth = 0;
|
||||
}
|
||||
field = 4;
|
||||
display = 1;
|
||||
@@ -640,12 +655,14 @@ void SpectDisplay::OnKey(wxKeyEvent& event)
|
||||
if(event.ControlDown())
|
||||
{
|
||||
// CTRL: rotate, make left slope steeper
|
||||
pk->pkright += 5;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright += 5;
|
||||
pk->pkwidth -= 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
pk->pkright += 10;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright += 10;
|
||||
pk->pkwidth += 10;
|
||||
}
|
||||
field = 4;
|
||||
@@ -653,19 +670,37 @@ void SpectDisplay::OnKey(wxKeyEvent& event)
|
||||
break;
|
||||
|
||||
case '<': // width--
|
||||
pk->pkright -= 2;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright -= 2;
|
||||
pk->pkwidth -= 2;
|
||||
if(pk->pkwidth < 0)
|
||||
pk->pkwidth = 0;
|
||||
display = 1;
|
||||
field = 4;
|
||||
break;
|
||||
|
||||
case '>': // width++
|
||||
pk->pkright += 2;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
pk->pkright += 2;
|
||||
pk->pkwidth += 2;
|
||||
display = 1;
|
||||
field = 4;
|
||||
break;
|
||||
|
||||
case '[': // width--
|
||||
pk->pkright -= 1;
|
||||
if(pk->pkright < 0)
|
||||
pk->pkright = 0;
|
||||
display = 1;
|
||||
field = 4;
|
||||
break;
|
||||
|
||||
case ']': // width++
|
||||
pk->pkright += 1;
|
||||
display = 1;
|
||||
field = 4;
|
||||
break;
|
||||
|
||||
case '/': // make left=right
|
||||
i = pk->pkwidth + pk->pkright;
|
||||
pk->pkwidth = pk->pkright = i/2;
|
||||
@@ -708,6 +743,11 @@ void SpectDisplay::OnKey(wxKeyEvent& event)
|
||||
display = 2;
|
||||
break;
|
||||
|
||||
case 0x104b: // CTRL-K
|
||||
spectseq->SetKlattDefaults();
|
||||
display = 3;
|
||||
break;
|
||||
|
||||
case 0x104d: // CTRL-M
|
||||
sf->ToggleMarker(1);
|
||||
display = 2;
|
||||
@@ -825,25 +865,28 @@ void SpectDisplay::OnKey(wxKeyEvent& event)
|
||||
sf = spectseq->frames[sframe];
|
||||
pk = &sf->peaks[pk_num];
|
||||
|
||||
if(pk->pkwidth < 50) pk->pkwidth = 50; // min. width
|
||||
if(pk->pkright < 50) pk->pkright = 50;
|
||||
if(spectseq->synthesizer_type==0)
|
||||
{
|
||||
if(pk->pkwidth < 50) pk->pkwidth = 50; // min. width
|
||||
if(pk->pkright < 50) pk->pkright = 50;
|
||||
|
||||
// ensure minimum separation between peaks & prevent crossover
|
||||
if(direction > 0)
|
||||
{
|
||||
for(i=pk_num+1; i<N_PEAKS; i++)
|
||||
// ensure minimum separation between peaks & prevent crossover
|
||||
if(direction > 0)
|
||||
{
|
||||
if(sf->peaks[i].pkfreq < sf->peaks[i-1].pkfreq + 100)
|
||||
sf->peaks[i].pkfreq = sf->peaks[i-1].pkfreq + 100;
|
||||
for(i=pk_num+1; i<N_PEAKS; i++)
|
||||
{
|
||||
if(sf->peaks[i].pkfreq < sf->peaks[i-1].pkfreq + 100)
|
||||
sf->peaks[i].pkfreq = sf->peaks[i-1].pkfreq + 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if(direction < 0)
|
||||
{
|
||||
for(i=pk_num-1; i>=0; i--)
|
||||
else
|
||||
if(direction < 0)
|
||||
{
|
||||
if(sf->peaks[i].pkfreq > sf->peaks[i+1].pkfreq - 100)
|
||||
sf->peaks[i].pkfreq = sf->peaks[i+1].pkfreq - 100;
|
||||
for(i=pk_num-1; i>=0; i--)
|
||||
{
|
||||
if(sf->peaks[i].pkfreq > sf->peaks[i+1].pkfreq - 100)
|
||||
sf->peaks[i].pkfreq = sf->peaks[i+1].pkfreq - 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1008,6 +1051,7 @@ void InitSpectrumDisplay()
|
||||
menu_spectdisplay->Append(202,_T("Copy Peaks Up SHIFT+CTRL+D"));
|
||||
menu_spectdisplay->Append(204,_T("Grid (toggle) CTRL+G"));
|
||||
menu_spectdisplay->Append(210,_T("Interpolate (percentage) CTRL+I"));
|
||||
menu_spectdisplay->Append(212,_T("Convert sequence to Klatt format CTRL+K"));
|
||||
menu_spectdisplay->Append(203,_T("Marker (toggle) CTRL+N"));
|
||||
menu_spectdisplay->Append(206,_T("Show Interpolation CTRL+Q"));
|
||||
menu_spectdisplay->Append(207,_T("Hide Interpolation CTRL+SHIFT+Q"));
|
||||
|
||||
Reference in New Issue
Block a user