commit
0db484d365
@ -0,0 +1 @@
|
||||
233144a772de72741ae1aa2292f672c30224afb3 SOURCES/flite-1.3-release.tar.gz
|
@ -0,0 +1 @@
|
||||
SOURCES/flite-1.3-release.tar.gz
|
@ -0,0 +1,50 @@
|
||||
From a85193f122b7ec0d377e0a39ac58c64f12c51085 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon, 6 Jan 2014 13:45:00 +0000
|
||||
Subject: [PATCH] auserver.c: Only write audio data to a file in debug builds
|
||||
|
||||
This isn't useful in regular builds and is actually a security
|
||||
concern.
|
||||
---
|
||||
src/audio/auserver.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/audio/auserver.c b/src/audio/auserver.c
|
||||
index 29716d3..3e838d0 100644
|
||||
--- a/src/audio/auserver.c
|
||||
+++ b/src/audio/auserver.c
|
||||
@@ -58,9 +58,11 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
|
||||
int q,i,n,r;
|
||||
unsigned char bytes[CST_AUDIOBUFFSIZE];
|
||||
short shorts[CST_AUDIOBUFFSIZE];
|
||||
+#ifdef DEBUG
|
||||
cst_file fff;
|
||||
|
||||
fff = cst_fopen("/tmp/awb.wav",CST_OPEN_WRITE|CST_OPEN_BINARY);
|
||||
+#endif
|
||||
|
||||
if ((audio_device = audio_open(header->sample_rate,1,
|
||||
(header->encoding == CST_SND_SHORT) ?
|
||||
@@ -107,7 +109,9 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
|
||||
for (q=r; q > 0; q-=n)
|
||||
{
|
||||
n = audio_write(audio_device,shorts,q);
|
||||
+#ifdef DEBUG
|
||||
cst_fwrite(fff,shorts,2,q);
|
||||
+#endif
|
||||
if (n <= 0)
|
||||
{
|
||||
audio_close(audio_device);
|
||||
@@ -116,7 +120,9 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
|
||||
}
|
||||
}
|
||||
audio_close(audio_device);
|
||||
+#ifdef DEBUG
|
||||
cst_fclose(fff);
|
||||
+#endif
|
||||
|
||||
return CST_OK_FORMAT;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,4 @@
|
||||
|
||||
Native ALSA support for Flite 1.3 - patch created by
|
||||
Lukas Loehrer <listaddr1@gmx.net>
|
||||
|
@ -0,0 +1,20 @@
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Fri, 8 Jan 2016 18:26:03 +0300
|
||||
Subject: [PATCH] Fixed texi2html ambiguity
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
|
||||
diff --git a/doc/Makefile b/doc/Makefile
|
||||
index 12a5720..8fb9a03 100644
|
||||
--- a/doc/Makefile
|
||||
+++ b/doc/Makefile
|
||||
@@ -50,7 +50,8 @@ doc: flite.html flite.pdf
|
||||
flite.html: flite.texi
|
||||
@ if [ ! -d html ] ; \
|
||||
then mkdir -p html ; fi
|
||||
- (cd html; texi2html -number -split_chapter ../flite.texi)
|
||||
+ (cd html; texi2html -number-sections -split_chapter ../flite.texi)
|
||||
+ @mv html/flite/*.html html/
|
||||
@ for i in html/*.html ; \
|
||||
do \
|
||||
sed 's/<BODY>/<BODY bgcolor="#ffffff">/' $$i >ttt.html; \
|
@ -0,0 +1,333 @@
|
||||
diff -uNr flite-1.3-release/configure.in flite-1.3-release-mod/configure.in
|
||||
--- flite-1.3-release/configure.in 2005-08-13 13:43:21.000000000 +0200
|
||||
+++ flite-1.3-release-mod/configure.in 2006-11-13 21:16:27.000000000 +0200
|
||||
@@ -206,10 +206,10 @@
|
||||
AC_CHECK_HEADER(sys/audioio.h,
|
||||
[AUDIODRIVER="sun"
|
||||
AUDIODEFS=-DCST_AUDIO_SUNOS])
|
||||
-dnl AC_CHECK_HEADER(sys/asoundlib.h,
|
||||
-dnl [AUDIODRIVER="alsa"
|
||||
-dnl AUDIODEFS=-DCST_AUDIO_ALSA
|
||||
-dnl AUDIOLIBS=-lasound])
|
||||
+AC_CHECK_HEADER(alsa/asoundlib.h,
|
||||
+ [AUDIODRIVER="alsa"
|
||||
+ AUDIODEFS=-DCST_AUDIO_ALSA
|
||||
+ AUDIOLIBS=-lasound])
|
||||
AC_CHECK_HEADER(mmsystem.h,
|
||||
[AUDIODRIVER="wince"
|
||||
AUDIODEFS=-DCST_AUDIO_WINCE
|
||||
diff -uNr flite-1.3-release/src/audio/au_alsa.c flite-1.3-release-mod/src/audio/au_alsa.c
|
||||
--- flite-1.3-release/src/audio/au_alsa.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ flite-1.3-release-mod/src/audio/au_alsa.c 2006-11-13 21:16:54.000000000 +0200
|
||||
@@ -0,0 +1,311 @@
|
||||
+/*************************************************************************/
|
||||
+/* */
|
||||
+/* Language Technologies Institute */
|
||||
+/* Carnegie Mellon University */
|
||||
+/* Copyright (c) 2000 */
|
||||
+/* All Rights Reserved. */
|
||||
+/* */
|
||||
+/* Permission is hereby granted, free of charge, to use and distribute */
|
||||
+/* this software and its documentation without restriction, including */
|
||||
+/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
+/* distribute, sublicense, and/or sell copies of this work, and to */
|
||||
+/* permit persons to whom this work is furnished to do so, subject to */
|
||||
+/* the following conditions: */
|
||||
+/* 1. The code must retain the above copyright notice, this list of */
|
||||
+/* conditions and the following disclaimer. */
|
||||
+/* 2. Any modifications must be clearly marked as such. */
|
||||
+/* 3. Original authors' names are not deleted. */
|
||||
+/* 4. The authors' names are not used to endorse or promote products */
|
||||
+/* derived from this software without specific prior written */
|
||||
+/* permission. */
|
||||
+/* */
|
||||
+/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
|
||||
+/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
|
||||
+/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
|
||||
+/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
|
||||
+/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
|
||||
+/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
|
||||
+/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
|
||||
+/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
|
||||
+/* THIS SOFTWARE. */
|
||||
+/* */
|
||||
+/*********************************************************************** */
|
||||
+/* Author: Lukas Loehrer ( */
|
||||
+/* Date: January 2005 */
|
||||
+/*************************************************************************/
|
||||
+/* */
|
||||
+/* Native access to alsa audio devices on Linux */
|
||||
+/* Tested with libasound version 1.0.10 */
|
||||
+/*************************************************************************/
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <assert.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+#include "cst_string.h"
|
||||
+#include "cst_wave.h"
|
||||
+#include "cst_audio.h"
|
||||
+
|
||||
+#include <alsa/asoundlib.h>
|
||||
+
|
||||
+
|
||||
+/*static char *pcm_dev_name = "hw:0,0"; */
|
||||
+static char *pcm_dev_name ="default";
|
||||
+
|
||||
+static inline void print_pcm_state(snd_pcm_t *handle, char *msg)
|
||||
+{
|
||||
+ fprintf(stderr, "PCM state at %s = %s\n", msg,
|
||||
+ snd_pcm_state_name(snd_pcm_state(handle)));
|
||||
+}
|
||||
+
|
||||
+cst_audiodev *audio_open_alsa(int sps, int channels, cst_audiofmt fmt)
|
||||
+{
|
||||
+ cst_audiodev *ad;
|
||||
+ unsigned int real_rate;
|
||||
+ int err;
|
||||
+
|
||||
+ /* alsa specific stuff */
|
||||
+ snd_pcm_t *pcm_handle;
|
||||
+ snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
|
||||
+ snd_pcm_hw_params_t *hwparams;
|
||||
+ snd_pcm_format_t format;
|
||||
+ snd_pcm_access_t access = SND_PCM_ACCESS_RW_INTERLEAVED;
|
||||
+
|
||||
+ /* Allocate the snd_pcm_hw_params_t structure on the stack. */
|
||||
+ snd_pcm_hw_params_alloca(&hwparams);
|
||||
+
|
||||
+ /* Open pcm device */
|
||||
+ err = snd_pcm_open(&pcm_handle, pcm_dev_name, stream, 0);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_open_alsa: failed to open audio device %s. %s\n",
|
||||
+ pcm_dev_name, snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Init hwparams with full configuration space */
|
||||
+ err = snd_pcm_hw_params_any(pcm_handle, hwparams);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to get hardware parameters from audio device. %s\n", snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Set access mode */
|
||||
+ err = snd_pcm_hw_params_set_access(pcm_handle, hwparams, access);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to set access mode. %s.\n", snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Determine matching alsa sample format */
|
||||
+ /* This could be implemented in a more */
|
||||
+ /* flexible way (byte order conversion). */
|
||||
+ switch (fmt)
|
||||
+ {
|
||||
+ case CST_AUDIO_LINEAR16:
|
||||
+ if (CST_LITTLE_ENDIAN)
|
||||
+ format = SND_PCM_FORMAT_S16_LE;
|
||||
+ else
|
||||
+ format = SND_PCM_FORMAT_S16_BE;
|
||||
+ break;
|
||||
+ case CST_AUDIO_LINEAR8:
|
||||
+ format = SND_PCM_FORMAT_U8;
|
||||
+ break;
|
||||
+ case CST_AUDIO_MULAW:
|
||||
+ format = SND_PCM_FORMAT_MU_LAW;
|
||||
+ break;
|
||||
+ default:
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to find suitable format.\n");
|
||||
+ return NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Set samble format */
|
||||
+ err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format);
|
||||
+ if (err <0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to set format. %s.\n", snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Set sample rate near the disired rate */
|
||||
+ real_rate = sps;
|
||||
+ err = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &real_rate, 0);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to set sample rate near %d. %s.\n", sps, snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /*FIXME: This is probably too strict */
|
||||
+ assert(sps == real_rate);
|
||||
+
|
||||
+ /* Set number of channels */
|
||||
+ assert(channels >0);
|
||||
+ err = snd_pcm_hw_params_set_channels(pcm_handle, hwparams, channels);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to set number of channels to %d. %s.\n", channels, snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Commit hardware parameters */
|
||||
+ err = snd_pcm_hw_params(pcm_handle, hwparams);
|
||||
+ if (err < 0)
|
||||
+ {
|
||||
+ snd_pcm_close(pcm_handle);
|
||||
+ cst_errmsg("audio_open_alsa: failed to set hw parameters. %s.\n", snd_strerror(err));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Make sure the device is ready to accept data */
|
||||
+ assert(snd_pcm_state(pcm_handle) == SND_PCM_STATE_PREPARED);
|
||||
+
|
||||
+ /* Write hardware parameters to flite audio device data structure */
|
||||
+ ad = cst_alloc(cst_audiodev, 1);
|
||||
+ assert(ad != NULL);
|
||||
+ ad->real_sps = ad->sps = sps;
|
||||
+ ad->real_channels = ad->channels = channels;
|
||||
+ ad->real_fmt = ad->fmt = fmt;
|
||||
+ ad->platform_data = (void *) pcm_handle;
|
||||
+
|
||||
+ return ad;
|
||||
+}
|
||||
+
|
||||
+int audio_close_alsa(cst_audiodev *ad)
|
||||
+{
|
||||
+ int result;
|
||||
+ snd_pcm_t *pcm_handle;
|
||||
+
|
||||
+ if (ad == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ pcm_handle = (snd_pcm_t *) ad->platform_data;
|
||||
+ result = snd_pcm_close(pcm_handle);
|
||||
+ if (result < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_close_alsa: Error: %s.\n", snd_strerror(result));
|
||||
+ }
|
||||
+ cst_free(ad);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+/* Returns zero if recovery was successful. */
|
||||
+static int recover_from_error(snd_pcm_t *pcm_handle, ssize_t res)
|
||||
+{
|
||||
+ if (res == -EPIPE) /* xrun */
|
||||
+ {
|
||||
+ res = snd_pcm_prepare(pcm_handle);
|
||||
+ if (res < 0)
|
||||
+ {
|
||||
+ /* Failed to recover from xrun */
|
||||
+ cst_errmsg("recover_from_write_error: failed to recover from xrun. %s\n.", snd_strerror(res));
|
||||
+ return res;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (res == -ESTRPIPE) /* Suspend */
|
||||
+ {
|
||||
+ while ((res = snd_pcm_resume(pcm_handle)) == -EAGAIN)
|
||||
+ {
|
||||
+ snd_pcm_wait(pcm_handle, 1000);
|
||||
+ }
|
||||
+ if (res < 0)
|
||||
+ {
|
||||
+ res = snd_pcm_prepare(pcm_handle);
|
||||
+ if (res <0)
|
||||
+ {
|
||||
+ /* Resume failed */
|
||||
+ cst_errmsg("audio_recover_from_write_error: failed to resume after suspend. %s\n.", snd_strerror(res));
|
||||
+ return res;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else if (res < 0)
|
||||
+ {
|
||||
+ /* Unknown failure */
|
||||
+ cst_errmsg("audio_recover_from_write_error: %s.\n", snd_strerror(res));
|
||||
+ return res;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int audio_write_alsa(cst_audiodev *ad, void *samples, int num_bytes)
|
||||
+{
|
||||
+ size_t frame_size;
|
||||
+ ssize_t num_frames, res;
|
||||
+ snd_pcm_t *pcm_handle;
|
||||
+ char *buf = (char *) samples;
|
||||
+
|
||||
+ /* Determine frame size in bytes */
|
||||
+ frame_size = audio_bps(ad->real_fmt) * ad->real_channels;
|
||||
+ /* Require that only complete frames are handed in */
|
||||
+ assert((num_bytes % frame_size) == 0);
|
||||
+ num_frames = num_bytes / frame_size;
|
||||
+ pcm_handle = (snd_pcm_t *) ad->platform_data;
|
||||
+
|
||||
+ while (num_frames > 0)
|
||||
+ {
|
||||
+ res = snd_pcm_writei(pcm_handle, buf, num_frames);
|
||||
+ if (res != num_frames)
|
||||
+ {
|
||||
+ if (res == -EAGAIN || (res > 0 && res < num_frames))
|
||||
+ {
|
||||
+ snd_pcm_wait(pcm_handle, 100);
|
||||
+ }
|
||||
+ else if (recover_from_error(pcm_handle, res) < 0)
|
||||
+ {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (res >0)
|
||||
+ {
|
||||
+ num_frames -= res;
|
||||
+ buf += res * frame_size;
|
||||
+ }
|
||||
+ }
|
||||
+ return num_bytes;
|
||||
+}
|
||||
+
|
||||
+int audio_flush_alsa(cst_audiodev *ad)
|
||||
+{
|
||||
+ int result;
|
||||
+ result = snd_pcm_drain((snd_pcm_t *) ad->platform_data);
|
||||
+ if (result < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result));
|
||||
+ }
|
||||
+ /* Prepare device for more data */
|
||||
+ result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data);
|
||||
+if (result < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result));
|
||||
+ }
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int audio_drain_alsa(cst_audiodev *ad)
|
||||
+{
|
||||
+ int result;
|
||||
+ result = snd_pcm_drop((snd_pcm_t *) ad->platform_data);
|
||||
+ if (result < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result));
|
||||
+ }
|
||||
+/* Prepare device for more data */
|
||||
+ result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data);
|
||||
+if (result < 0)
|
||||
+ {
|
||||
+ cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result));
|
||||
+ }
|
||||
+ return result;
|
||||
+}
|
@ -0,0 +1,30 @@
|
||||
diff -uNr flite-1.3-release/doc/flite.texi flite-1.3-mod/doc/flite.texi
|
||||
--- flite-1.3-release/doc/flite.texi 2005-08-14 21:50:02.000000000 +0200
|
||||
+++ flite-1.3-mod/doc/flite.texi 2006-05-08 12:39:54.000000000 +0200
|
||||
@@ -711,14 +711,14 @@
|
||||
cst_voice *register_cmu_us_kal();
|
||||
|
||||
int main(int argc, char **argv)
|
||||
-{
|
||||
+@{
|
||||
cst_voice *v;
|
||||
|
||||
if (argc != 2)
|
||||
- {
|
||||
+ @{
|
||||
fprintf(stderr,"usage: flite_test FILE\n");
|
||||
exit(-1);
|
||||
- }
|
||||
+ @}
|
||||
|
||||
flite_init();
|
||||
|
||||
@@ -726,7 +726,7 @@
|
||||
|
||||
flite_file_to_speech(argv[1],v,"play");
|
||||
|
||||
-}
|
||||
+@}
|
||||
@end example
|
||||
Assuming the shell variable FLITEDIR is set to the flite directory
|
||||
the following will compile the system (with appropriate changes for
|
@ -0,0 +1,12 @@
|
||||
diff -uNr flite-1.3-release/tools/Makefile flite-1.3-release-mod/tools/Makefile
|
||||
--- flite-1.3-release/tools/Makefile 2005-01-01 19:24:16.000000000 +0200
|
||||
+++ flite-1.3-release-mod/tools/Makefile 2011-03-13 23:53:12.365235072 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
$(BINDIR)/find_sts: find_sts_main.o $(FLITELIBS) $(flite_LIBS_deps)
|
||||
echo $(ALL)
|
||||
echo $(HOST_PLATFORM) $(TARGET_PLATFORM)
|
||||
- $(CC) $(CFLAGS) -o $@ find_sts_main.o $(flite_LIBS_flags) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) -o $@ find_sts_main.o $(flite_LIBS_flags) $(LDFLAGS) -lm
|
||||
$(BINDIR)/flite_sort: flite_sort_main.o $(FLITELIBS) $(flite_LIBS_deps)
|
||||
$(CC) $(CFLAGS) -o $@ flite_sort_main.o $(flite_LIBS_flags) $(LDFLAGS)
|
||||
$(BINDIR)/regexcomp: regexcomp_main.o $(FLITELIBS) $(flite_LIBS_deps)
|
@ -0,0 +1,170 @@
|
||||
diff -uNr flite-1.3-release/config/common_make_rules flite-1.3-release-mod/config/common_make_rules
|
||||
--- flite-1.3-release/config/common_make_rules 2004-12-20 00:20:43.000000000 +0200
|
||||
+++ flite-1.3-release-mod/config/common_make_rules 2006-11-12 12:17:25.000000000 +0200
|
||||
@@ -59,27 +59,35 @@
|
||||
endif
|
||||
OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
|
||||
BINDIR=$(BUILDDIR)/bin
|
||||
+LIBDIR=$(BUILDDIR)/lib
|
||||
ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
|
||||
BINDIR=$(TOP)/bin
|
||||
+LIBDIR=$(TOP)/lib
|
||||
endif
|
||||
|
||||
-LIBDIR=$(BUILDDIR)/lib
|
||||
BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR)
|
||||
|
||||
-FLITELIBS = $(BUILDDIR)/lib/libflite.a
|
||||
-LDFLAGS += -L$(BUILDDIR)/lib -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
|
||||
+ifdef SHFLAGS
|
||||
+FLITELIBS = $(LIBDIR)/libflite.so
|
||||
+LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS)
|
||||
+else
|
||||
+FLITELIBS = $(LIBDIR)/libflite.a
|
||||
+LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
|
||||
+endif
|
||||
|
||||
FULLOBJS = $(OBJS:%=$(OBJDIR)/%)
|
||||
ifdef SHFLAGS
|
||||
SOOBJS = $(OBJS:.o=.os)
|
||||
-FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%)
|
||||
+FULLSOOBJS = $(SOOBJS:%=$(OBJDIR)/%)
|
||||
ifdef LIBNAME
|
||||
ALL += $(OBJDIR)/.build_so
|
||||
endif
|
||||
-endif
|
||||
+else
|
||||
ifdef LIBNAME
|
||||
ALL += $(OBJDIR)/.build_lib
|
||||
endif
|
||||
+endif
|
||||
+
|
||||
# Only do some directories when you are not cross compiling
|
||||
ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
|
||||
OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS)
|
||||
@@ -117,14 +125,14 @@
|
||||
@ touch $(OBJDIR)/.build_so
|
||||
|
||||
# Used in the lib/ directory and in building new voices
|
||||
-$(OBJDIR)/%.so: %.shared.a
|
||||
+%.so: %.shared.a
|
||||
@ echo making $@
|
||||
@ rm -rf shared_os && mkdir shared_os
|
||||
- @ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
|
||||
+ @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
|
||||
@ (cd shared_os && ar x ../$<)
|
||||
- @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
|
||||
- @ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
|
||||
- @ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@
|
||||
+ @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS)))
|
||||
+ @ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
|
||||
+ @ ln -s $@.${PROJECT_SHLIB_VERSION} $@
|
||||
@ rm -rf shared_os
|
||||
|
||||
$(OBJDIR)/.make_build_dirs:
|
||||
diff -uNr flite-1.3-release/lib/Makefile flite-1.3-release-mod/lib/Makefile
|
||||
--- flite-1.3-release/lib/Makefile 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ flite-1.3-release-mod/lib/Makefile 2006-11-12 12:17:40.000000000 +0200
|
||||
@@ -0,0 +1,73 @@
|
||||
+###########################################################################
|
||||
+## ##
|
||||
+## Language Technologies Institute ##
|
||||
+## Carnegie Mellon University ##
|
||||
+## Copyright (c) 1999 ##
|
||||
+## All Rights Reserved. ##
|
||||
+## ##
|
||||
+## Permission is hereby granted, free of charge, to use and distribute ##
|
||||
+## this software and its documentation without restriction, including ##
|
||||
+## without limitation the rights to use, copy, modify, merge, publish, ##
|
||||
+## distribute, sublicense, and/or sell copies of this work, and to ##
|
||||
+## permit persons to whom this work is furnished to do so, subject to ##
|
||||
+## the following conditions: ##
|
||||
+## 1. The code must retain the above copyright notice, this list of ##
|
||||
+## conditions and the following disclaimer. ##
|
||||
+## 2. Any modifications must be clearly marked as such. ##
|
||||
+## 3. Original authors' names are not deleted. ##
|
||||
+## 4. The authors' names are not used to endorse or promote products ##
|
||||
+## derived from this software without specific prior written ##
|
||||
+## permission. ##
|
||||
+## ##
|
||||
+## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
|
||||
+## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
|
||||
+## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
|
||||
+## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
|
||||
+## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
|
||||
+## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
|
||||
+## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
|
||||
+## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
|
||||
+## THIS SOFTWARE. ##
|
||||
+## ##
|
||||
+###########################################################################
|
||||
+## ##
|
||||
+## FLITE libraries ##
|
||||
+## ##
|
||||
+###########################################################################
|
||||
+TOP=..
|
||||
+DIRNAME=lib
|
||||
+BUILD_DIRS =
|
||||
+ALL_DIRS=
|
||||
+FILES = Makefile
|
||||
+LIBNAMES = flite flite_cmulex flite_usenglish \
|
||||
+ flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb
|
||||
+
|
||||
+STATICLIBS= $(LIBNAMES:%=lib%.a)
|
||||
+SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a)
|
||||
+#SHAREDLIBS = $(LIBNAMES:%=lib%.so)
|
||||
+SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
|
||||
+VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
|
||||
+ $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
|
||||
+ALL_LIBS = $(SHAREDLIBS) $(VERSIONSHAREDLIBS)
|
||||
+
|
||||
+ALL = shared_libs
|
||||
+
|
||||
+LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION}
|
||||
+
|
||||
+include $(TOP)/config/common_make_rules
|
||||
+
|
||||
+ifdef SHFLAGS
|
||||
+shared_libs: $(SHAREDLIBS)
|
||||
+libflite_LDLIBS = -lm $(AUDIOLIBS)
|
||||
+libflite_cmulex_LDLIBS = -lflite
|
||||
+libflite_usenglish_LDLIBS = -lflite
|
||||
+libflite_cmu_us_kal_LDLIBS = -lflite_cmulex -lflite_usenglish
|
||||
+libflite_cmu_us_kal16_LDLIBS = -lflite_cmulex -lflite_usenglish
|
||||
+libflite_cmu_time_awb_LDLIBS = -lflite -lflite_cmulex -lflite_usenglish
|
||||
+else
|
||||
+shared_libs: nothing
|
||||
+endif
|
||||
+
|
||||
+install:
|
||||
+ @ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -)
|
||||
+
|
||||
diff -uNr flite-1.3-release/main/Makefile flite-1.3-release-mod/main/Makefile
|
||||
--- flite-1.3-release/main/Makefile 2005-08-08 00:38:42.000000000 +0200
|
||||
+++ flite-1.3-release-mod/main/Makefile 2006-11-12 11:44:46.000000000 +0200
|
||||
@@ -50,11 +50,11 @@
|
||||
|
||||
flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX)
|
||||
flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
|
||||
-flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
|
||||
+flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so)
|
||||
|
||||
flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX)
|
||||
flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%)
|
||||
-flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a)
|
||||
+flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so)
|
||||
|
||||
include $(TOP)/config/common_make_rules
|
||||
|
||||
diff -uNr flite-1.3-release/Makefile flite-1.3-release-mod/Makefile
|
||||
--- flite-1.3-release/Makefile 2005-11-01 15:40:45.000000000 +0200
|
||||
+++ flite-1.3-release-mod/Makefile 2006-11-12 11:44:46.000000000 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
###########################################################################
|
||||
TOP=.
|
||||
DIRNAME=
|
||||
-BUILD_DIRS = include src lang doc
|
||||
+BUILD_DIRS = include src lang lib doc
|
||||
ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm tools main
|
||||
CONFIG=configure configure.in config.sub config.guess \
|
||||
missing install-sh mkinstalldirs
|
@ -0,0 +1,221 @@
|
||||
Name: flite
|
||||
Version: 1.3
|
||||
Release: 40%{?dist}
|
||||
Summary: Small, fast speech synthesis engine (text-to-speech)
|
||||
License: MIT
|
||||
URL: http://www.speech.cs.cmu.edu/flite/
|
||||
|
||||
Source0: http://www.speech.cs.cmu.edu/flite/packed/%{name}-%{version}/%{name}-%{version}-release.tar.gz
|
||||
Source1: README-ALSA.txt
|
||||
Patch0: flite-1.3-sharedlibs.patch
|
||||
Patch1: flite-1.3-doc_texinfo.patch
|
||||
Patch2: flite-1.3-alsa_support.patch
|
||||
Patch3: flite-1.3-implicit_dso_linking.patch
|
||||
Patch4: 0001-auserver.c-Only-write-audio-data-to-a-file-in-debug-.patch
|
||||
Patch5: flite-0001-Fixed-texi2html-ambiguity.patch
|
||||
BuildRequires: texi2html
|
||||
# texi2pdf
|
||||
# WARNING see explanation about PDF doc below.
|
||||
#BuildRequires: texinfo-tex
|
||||
BuildRequires: gcc
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: ed alsa-lib-devel
|
||||
BuildRequires: make
|
||||
|
||||
|
||||
%description
|
||||
Flite (festival-lite) is a small, fast run-time speech synthesis engine
|
||||
developed at CMU and primarily designed for small embedded machines and/or
|
||||
large servers. Flite is designed as an alternative synthesis engine to
|
||||
Festival for voices built using the FestVox suite of voice building tools.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for flite
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development files for Flite, a small, fast speech synthesis engine.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}-release
|
||||
%patch0 -p1 -b .flite-1.3-sharedlibs
|
||||
%patch1 -p1 -b .flite-1.3-doc_texinfo
|
||||
%patch2 -p1 -b .flite-1.3-alsa_support
|
||||
%patch3 -p1 -b .flite-1.3-implicit_dso_linking
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
cp -p %{SOURCE1} .
|
||||
|
||||
|
||||
%build
|
||||
autoreconf -vif
|
||||
%configure --enable-shared --with-audio=alsa
|
||||
# This package fails parallel make (thus cannot be built using "_smp_flags")
|
||||
make \
|
||||
CFLAGS="$RPM_OPT_FLAGS -Wl,-z,now"
|
||||
# Build documentation
|
||||
cd doc
|
||||
# WARNING "make doc" provides a huge PDF file. It was decided not to produce/package it.
|
||||
#make doc
|
||||
make flite.html
|
||||
|
||||
|
||||
%install
|
||||
make install INSTALLBINDIR=%{buildroot}%{_bindir} INSTALLLIBDIR=%{buildroot}%{_libdir} INSTALLINCDIR=%{buildroot}%{_includedir}/flite
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc ACKNOWLEDGEMENTS README doc/html README-ALSA.txt
|
||||
%{_libdir}/*.so.*
|
||||
%{_bindir}/*
|
||||
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/flite
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 26 2022 Matthias Clasen <mclasen@redhat.com> - 1.3-40
|
||||
- Link with -Wl,-z,now. Related: rhbz#2044860
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.3-39
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.3-38
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-37
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-36
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-35
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-33
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-32
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Mar 7 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.3-31
|
||||
- Add gcc BR, minor spec cleanups
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-30
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-28
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-27
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Fri Jan 8 2016 Peter Lemenkov <lemenkov@gmail.com> - 1.3-25
|
||||
- Fixed FTBFS in Rawhide
|
||||
- Remove pre-EPEL6 support
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-24
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon Jan 6 2014 Rui Matos <rmatos@redhat.com> - 1.3-21
|
||||
- Resolves: (CVE-2014-0027) flite: insecure temporary file use
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Mon Mar 13 2011 Francois Aucamp <faucamp@fedoraproject.org> - 1.3-16
|
||||
- Added patch declaring explicit libm linking dependency (RHBZ #564899)
|
||||
- Updated source and URL tags
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Sat Mar 21 2009 Robert Scheck <robert@fedoraproject.org> - 1.3-13
|
||||
- Removed moving of non-existing documentation flite directory
|
||||
|
||||
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Oct 11 2008 Peter Lemenkov <lemenkov@gmail.com> - 1.3-11
|
||||
- Fix for RHEL 4
|
||||
|
||||
* Fri Jul 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.3-10
|
||||
- fix license tag
|
||||
|
||||
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3-9
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Tue Nov 14 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-8
|
||||
- Added comment to %%build stating why "_smp_flags" isn't used with make
|
||||
|
||||
* Mon Nov 13 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-7
|
||||
- Modified alsa support patch file to patch "configure.in" instead of "configure"
|
||||
- Added "autoconf" step to %%build
|
||||
- Added BuildRequires: autoconf
|
||||
- Fixed patch backup file suffixes
|
||||
- Renamed patch files to a more standard format
|
||||
- Moved header files from /usr/include to /usr/include/flite
|
||||
- Added -p option to all cp operations (to preserve timestamps)
|
||||
|
||||
* Sun Nov 12 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-6
|
||||
- Recreated patch to allow shared libraries to build correctly (sharedlibs.patch)
|
||||
- "flite" and "flite_time" binaries now link to flite shared libraries (sharedlibs.patch)
|
||||
- Simplified the documentation patch filename
|
||||
- Modified patch steps in %%prep to create backup files with different suffixes
|
||||
- Removed "_smp_flags" macro from %%build for all archs
|
||||
|
||||
* Fri Oct 20 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-5
|
||||
- Modified "build" so that "_smp_flags" is only used for i386 arch
|
||||
|
||||
* Mon Oct 10 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-4
|
||||
- Removed "_smp_flags" macro from "build" for x86_64 arch
|
||||
|
||||
* Tue Sep 26 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-3
|
||||
- Added README-ALSA.txt (Source1)
|
||||
- Removed subpackage: flite-devel-static
|
||||
- Modified shared libraries patch (Patch0) to prevent building static libraries
|
||||
- Renamed patch files: Patch0, Patch1
|
||||
|
||||
* Tue Sep 26 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-2
|
||||
- Added flite 1.3 ALSA patch (Patch2) by Lukas Loehrer - thanks Anthony Green for pointing it out
|
||||
- Added configure option: --with-audio=alsa
|
||||
- Added BuildRequires: alsa-lib-devel
|
||||
|
||||
* Fri Sep 22 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-1
|
||||
- Initial RPM build
|
Loading…
Reference in new issue