Browse Source

Link speak-ng to the static library build of libespeak-ng.

master
Reece H. Dunn 9 years ago
parent
commit
d9771ada20
2 changed files with 4 additions and 50 deletions
  1. 4
    3
      Makefile.am
  2. 0
    47
      src/speak-ng.c

+ 4
- 3
Makefile.am View File



bin_PROGRAMS += src/speak-ng bin_PROGRAMS += src/speak-ng


src_speak_ng_LDFLAGS = $(wave_LIBS) -lpthread -lm src_speak_ng_LDADD = src/libespeak-ng.la
src_speak_ng_CFLAGS = $(common_FLAGS) $(wave_FLAGS) -I src/libespeak-ng src_speak_ng_LDFLAGS = -static
src_speak_ng_SOURCES = src/speak-ng.c $(common_SOURCE) $(wave_SOURCE) src_speak_ng_CFLAGS = $(common_FLAGS) $(wave_FLAGS) -I src/libespeak-ng
src_speak_ng_SOURCES = src/speak-ng.c


bin_PROGRAMS += src/espeak-ng bin_PROGRAMS += src/espeak-ng



+ 0
- 47
src/speak-ng.c View File

#include "voice.h" #include "voice.h"
#include "translate.h" #include "translate.h"


#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif





extern void Write4Bytes(FILE *f, int value); extern void Write4Bytes(FILE *f, int value);


char filetype[5]; char filetype[5];
char wavefile[200]; char wavefile[200];
int (* uri_callback)(int, const char *, const char *) = NULL;
int (* phoneme_callback)(const char *) = NULL;


FILE *f_wave = NULL; FILE *f_wave = NULL;
int quiet = 0; int quiet = 0;






int GetFileLength(const char *filename)
{//====================================
struct stat statbuf;

if(stat(filename,&statbuf) != 0)
return(0);

if(S_ISDIR(statbuf.st_mode))
return(-2); // a directory

return(statbuf.st_size);
} // end of GetFileLength


char *Alloc(int size)
{//==================
char *p;
if((p = (char *)malloc(size)) == NULL)
fprintf(stderr,"Can't allocate memory\n");
return(p);
}

void Free(void *ptr)
{//=================
if(ptr != NULL)
free(ptr);
}


void DisplayVoices(FILE *f_out, char *language) void DisplayVoices(FILE *f_out, char *language)
{//============================================ {//============================================
int ix; int ix;
} // end of DisplayVoices } // end of DisplayVoices




void WVoiceChanged(voice_t *wvoice)
{
}

static int OpenWaveFile(const char *path, int rate) static int OpenWaveFile(const char *path, int rate)
//================================================= //=================================================
{ {






void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr)
{//======================================================================================
// Do nothing in the command-line version.
if(type == 2)
end_of_sentence = 1;
} // end of MarkerEvent


static int WavegenFile(void) static int WavegenFile(void)
{//========================= {//=========================
int finished; int finished;

Loading…
Cancel
Save