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



flutter(frame); /* add f0 flutter */ 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: */ /* MAIN LOOP, for each output sample of current frame: */


for (kt_globals.ns=0; kt_globals.ns<kt_globals.nspfr; kt_globals.ns++) for (kt_globals.ns=0; kt_globals.ns<kt_globals.nspfr; kt_globals.ns++)
} }
} }


#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) if(control & 1)
{ {
for(ix=1; ix<6; ix++) for(ix=1; ix<6; ix++)

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



#endif #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 // will look for espeak_data directory here, and also in user's home directory
#ifndef PATH_ESPEAK_DATA #ifndef PATH_ESPEAK_DATA
#define PATH_ESPEAK_DATA "/usr/share/espeak-data" #define PATH_ESPEAK_DATA "/usr/share/espeak-data"

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

extern int event_list_ix; extern int event_list_ix;
extern espeak_EVENT *event_list; extern espeak_EVENT *event_list;
extern t_espeak_callback* synth_callback; extern t_espeak_callback* synth_callback;
extern int option_log_frames;
extern const char *version_string; extern const char *version_string;
extern const int version_phdata; extern const int version_phdata;
extern double sonicSpeed; extern double sonicSpeed;

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

FILE *f_log = NULL; FILE *f_log = NULL;
int option_waveout = 0; int option_waveout = 0;
static int option_harmonic1 = 10; // 10 static int option_harmonic1 = 10; // 10
int option_log_frames = 0;
static int flutter_amp = 64; static int flutter_amp = 64;


static int general_amplitude = 60; static int general_amplitude = 60;
}; };




#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() void WcmdqStop()
{ {
wcmdq_head = 0; wcmdq_head = 0;
#ifdef INCLUDE_KLATT #ifdef INCLUDE_KLATT
KlattInit(); KlattInit();
#endif #endif

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




{ {
// length in samples // 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) if((wdata.pitch_env = env)==NULL)
wdata.pitch_env = env_fall; // default wdata.pitch_env = env_fall; // default


static int glottal_reduce_tab1[4] = {0x30, 0x30, 0x40, 0x50}; // vowel before [?], amp * 1/256 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 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; harm_sqrt_n = 0;
end_wave = 1; end_wave = 1;


case WCMD_MARKER: case WCMD_MARKER:
marker_type = q[0] >> 8; marker_type = q[0] >> 8;
MarkerEvent(marker_type, q[1],q[2],q[3],out_ptr); 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 if(marker_type == 1) // word marker
{ {
current_source_index = q[1] & 0xffffff; current_source_index = q[1] & 0xffffff;

Loading…
Cancel
Save