Browse Source

Remove the LOG_FRAMES code which was only used in espeakedit.

master
Reece H. Dunn 9 years ago
parent
commit
85c87e83a9
4 changed files with 0 additions and 108 deletions
  1. 0
    35
      src/libespeak-ng/klatt.c
  2. 0
    4
      src/libespeak-ng/speech.h
  3. 0
    1
      src/libespeak-ng/synthesize.h
  4. 0
    68
      src/libespeak-ng/wavegen.c

+ 0
- 35
src/libespeak-ng/klatt.c View File

@@ -284,17 +284,6 @@ static int parwave(klatt_frame_ptr frame)

flutter(frame); /* add f0 flutter */

#ifdef LOG_FRAMES
if(option_log_frames)
{
FILE *f;
f=fopen("log-klatt","a");
fprintf(f,"%4dhz %2dAV %4d %3d, %4d %3d, %4d %3d, %4d %3d, %4d, %3d, FNZ=%3d TLT=%2d\n",frame->F0hz10,frame->AVdb,
frame->Fhz[1],frame->Bhz[1],frame->Fhz[2],frame->Bhz[2],frame->Fhz[3],frame->Bhz[3],frame->Fhz[4],frame->Bhz[4],frame->Fhz[5],frame->Bhz[5],frame->Fhz[0],frame->TLTdb);
fclose(f);
}
#endif

/* MAIN LOOP, for each output sample of current frame: */

for (kt_globals.ns=0; kt_globals.ns<kt_globals.nspfr; kt_globals.ns++)
@@ -1164,30 +1153,6 @@ void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v
}
}

#ifdef LOG_FRAMES
if(option_log_frames)
{
FILE *f_log;
f_log=fopen("log-espeakedit","a");
if(f_log != NULL)
{
fprintf(f_log,"K %3dmS %3d %3d %4d %4d %4d %4d (%2d) to %3d %3d %4d %4d %4d %4d (%2d)\n",length*1000/samplerate,
fr1->klattp[KLATT_FNZ]*2,fr1->ffreq[1],fr1->ffreq[2],fr1->ffreq[3],fr1->ffreq[4],fr1->ffreq[5], fr1->klattp[KLATT_AV],
fr2->klattp[KLATT_FNZ]*2,fr2->ffreq[1],fr2->ffreq[2],fr2->ffreq[3],fr1->ffreq[4],fr1->ffreq[5], fr2->klattp[KLATT_AV] );
fclose(f_log);
}
f_log=fopen("log-klatt","a");
if(f_log != NULL)
{
fprintf(f_log,"K %3dmS %3d %3d %4d %4d (%2d) to %3d %3d %4d %4d (%2d)\n",length*1000/samplerate,
fr1->klattp[KLATT_FNZ]*2,fr1->ffreq[1],fr1->ffreq[2],fr1->ffreq[3], fr1->klattp[KLATT_AV],
fr2->klattp[KLATT_FNZ]*2,fr2->ffreq[1],fr2->ffreq[2],fr2->ffreq[3], fr2->klattp[KLATT_AV] );

fclose(f_log);
}
}
#endif

if(control & 1)
{
for(ix=1; ix<6; ix++)

+ 0
- 4
src/libespeak-ng/speech.h View File

@@ -52,10 +52,6 @@ extern "C"

#endif

#ifdef _ESPEAKEDIT
#define LOG_FRAMES // write keyframe info to log-espeakedit
#endif

// will look for espeak_data directory here, and also in user's home directory
#ifndef PATH_ESPEAK_DATA
#define PATH_ESPEAK_DATA "/usr/share/espeak-data"

+ 0
- 1
src/libespeak-ng/synthesize.h View File

@@ -556,7 +556,6 @@ extern unsigned char *out_end;
extern int event_list_ix;
extern espeak_EVENT *event_list;
extern t_espeak_callback* synth_callback;
extern int option_log_frames;
extern const char *version_string;
extern const int version_phdata;
extern double sonicSpeed;

+ 0
- 68
src/libespeak-ng/wavegen.c View File

@@ -66,7 +66,6 @@ voice_t *wvoice;
FILE *f_log = NULL;
int option_waveout = 0;
static int option_harmonic1 = 10; // 10
int option_log_frames = 0;
static int flutter_amp = 64;

static int general_amplitude = 60;
@@ -268,37 +267,6 @@ unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1] = {
};


#ifdef LOG_FRAMES
static void LogMarker(int type, int value, int value2)
{
char buf[20];
int *p;

if(option_log_frames == 0)
return;

if((type == espeakEVENT_PHONEME) || (type == espeakEVENT_SENTENCE))
{
f_log=fopen("log-espeakedit","a");
if(f_log)
{
if(type == espeakEVENT_PHONEME)
{
p = (int *)buf;
p[0] = value;
p[1] = value2;
buf[8] = 0;
fprintf(f_log,"Phoneme [%s]\n", buf);
}
else
fprintf(f_log,"\n");
fclose(f_log);
f_log = NULL;
}
}
}
#endif

void WcmdqStop()
{
wcmdq_head = 0;
@@ -753,11 +721,6 @@ void WavegenInit(int rate, int wavemult_fact)
#ifdef INCLUDE_KLATT
KlattInit();
#endif

#ifdef LOG_FRAMES
remove("log-espeakedit");
remove("log-klatt");
#endif
}


@@ -1646,18 +1609,6 @@ void SetPitch(int length, unsigned char *env, int pitch1, int pitch2)
{
// length in samples

#ifdef LOG_FRAMES
if(option_log_frames)
{
f_log=fopen("log-espeakedit","a");
if(f_log != NULL)
{
fprintf(f_log," pitch %3d %3d %3dmS\n",pitch1,pitch2,(length*1000)/samplerate);
fclose(f_log);
f_log=NULL;
}
}
#endif
if((wdata.pitch_env = env)==NULL)
wdata.pitch_env = env_fall; // default

@@ -1690,22 +1641,6 @@ void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v)
static int glottal_reduce_tab1[4] = {0x30, 0x30, 0x40, 0x50}; // vowel before [?], amp * 1/256
static int glottal_reduce_tab2[4] = {0x90, 0xa0, 0xb0, 0xc0}; // vowel after [?], amp * 1/256

#ifdef LOG_FRAMES
if(option_log_frames)
{
f_log=fopen("log-espeakedit","a");
if(f_log != NULL)
{
fprintf(f_log,"%3dmS %3d %3d %4d %4d (%3d %3d %3d %3d) to %3d %3d %4d %4d (%3d %3d %3d %3d)\n",length*1000/samplerate,
fr1->ffreq[0],fr1->ffreq[1],fr1->ffreq[2],fr1->ffreq[3], fr1->fheight[0],fr1->fheight[1],fr1->fheight[2],fr1->fheight[3],
fr2->ffreq[0],fr2->ffreq[1],fr2->ffreq[2],fr2->ffreq[3], fr2->fheight[0],fr2->fheight[1],fr2->fheight[2],fr2->fheight[3] );

fclose(f_log);
f_log=NULL;
}
}
#endif

harm_sqrt_n = 0;
end_wave = 1;

@@ -1913,9 +1848,6 @@ int WavegenFill2(int fill_zeros)
case WCMD_MARKER:
marker_type = q[0] >> 8;
MarkerEvent(marker_type, q[1],q[2],q[3],out_ptr);
#ifdef LOG_FRAMES
LogMarker(marker_type, q[2], q[3]);
#endif
if(marker_type == 1) // word marker
{
current_source_index = q[1] & 0xffffff;

Loading…
Cancel
Save