| @@ -82,9 +82,6 @@ libespeak_ng_SOURCE = \ | |||
| src/libespeak-ng/speak_lib.c \ | |||
| src/libespeak-ng/debug.c | |||
| espeakedit_SOURCE = \ | |||
| src/espeakedit.cpp | |||
| if OPT_KLATT | |||
| common_FLAGS += -DINCLUDE_KLATT | |||
| common_SOURCE += src/libespeak-ng/klatt.c | |||
| @@ -160,15 +157,6 @@ src_espeak_ng_LDADD = src/libespeak-ng.la | |||
| src_espeak_ng_CFLAGS = -I src/include/espeak-ng | |||
| src_espeak_ng_SOURCES = src/espeak-ng.c | |||
| bin_PROGRAMS += src/espeakedit | |||
| src_espeakedit_LDFLAGS = $(wave_LIBS) ${WX_LIBS} | |||
| src_espeakedit_CFLAGS = ${WX_CXXFLAGS} $(common_FLAGS) $(libespeak_ng_FLAGS) $(wave_FLAGS) \ | |||
| -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT | |||
| src_espeakedit_CXXFLAGS = ${WX_CXXFLAGS} $(common_FLAGS) $(libespeak_ng_FLAGS) $(wave_FLAGS) \ | |||
| -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT -I src/libespeak-ng | |||
| src_espeakedit_SOURCES = $(common_SOURCE) $(libespeak_ng_SOURCE) $(espeakedit_SOURCE) $(wave_SOURCE) | |||
| ##### phoneme data: | |||
| espeak-data/phondata: phsource/phonemes.stamp | |||
| @@ -278,7 +266,7 @@ phsource/phonemes.stamp: \ | |||
| phsource/ph_zh \ | |||
| phsource/ph_zh_yue \ | |||
| phsource/phonemes \ | |||
| src/espeakedit | |||
| src/espeak-ng | |||
| ESPEAK_DATA_PATH=$(PWD) src/espeak-ng --compile-intonations && \ | |||
| ESPEAK_DATA_PATH=$(PWD) src/espeak-ng --compile-phonemes && \ | |||
| touch $@ | |||
| @@ -897,7 +885,7 @@ espeak-data/mbrola_ph/grc-de6_phtrans: phsource/mbrola/grc-de6 src/espeak-ng | |||
| mkdir -p espeak-data/mbrola_ph | |||
| ESPEAK_DATA_PATH=$(PWD) src/espeak-ng --compile-mbrola=$< | |||
| espeak-data/mbrola_ph/hn1_phtrans: phsource/mbrola/hn1 src/espeakedit | |||
| espeak-data/mbrola_ph/hn1_phtrans: phsource/mbrola/hn1 src/espeak-ng | |||
| mkdir -p espeak-data/mbrola_ph | |||
| ESPEAK_DATA_PATH=$(PWD) src/espeak-ng --compile-mbrola=$< | |||
| @@ -30,10 +30,7 @@ In order to build eSpeak NG, you need: | |||
| 1. a functional autotools system (`make`, `autoconf`, `automake`, `libtool` | |||
| and `pkg-config`); | |||
| 2. a functional c compiler that supports C11; | |||
| 3. a functional c++ compiler; | |||
| 4. wxWidgets development libraries (needed to build and run espeakedit | |||
| to compile the phoneme data). | |||
| 2. a functional c compiler that supports C11. | |||
| Optionally, you need: | |||
| @@ -45,24 +42,19 @@ Optionally, you need: | |||
| | Dependency | Install | | |||
| |---------------|------------------------------------------------------------------| | |||
| | autotools | `sudo apt-get install make autoconf automake libtool pkg-config` | | |||
| | c++ compiler | `sudo apt-get install gcc g++` | | |||
| | wxWidgets | `sudo apt-get install libwxgtk2.8-dev` | | |||
| | c11 compiler | `sudo apt-get install gcc` | | |||
| | pulseaudio | `sudo apt-get install libpulse-dev` | | |||
| | portaudio | `sudo apt-get install libportaudio-dev` | | |||
| ## Building | |||
| The espeak-ng and espeakedit programs, along with the espeak-ng voices, can | |||
| The `espeak-ng` and `speak-ng` programs, along with the espeak-ng voices, can | |||
| be built via the standard autotools commands: | |||
| $ ./autogen.sh | |||
| $ ./configure --prefix=/usr | |||
| $ make | |||
| __NOTE:__ The configure command detects various platform differences that | |||
| the espeak-ng makefiles don't cater for (e.g. different wxWidgets version) | |||
| and detect the available audio setup to use automatically. | |||
| ### Audio Output Configuration | |||
| The following `configure` options control which audio interfaces to use: | |||
| @@ -15,7 +15,6 @@ dnl Program checks. | |||
| dnl ================================================================ | |||
| AC_PROG_CC | |||
| AC_PROG_CXX | |||
| AC_PROG_MAKE_SET | |||
| AC_PROG_LIBTOOL | |||
| @@ -294,29 +293,6 @@ AM_CONDITIONAL(HAVE_RU_EXTENDED_DICTIONARY, [test x"$have_extdict_ru" = xyes]) | |||
| AM_CONDITIONAL(HAVE_ZH_EXTENDED_DICTIONARY, [test x"$have_extdict_zh" = xyes]) | |||
| AM_CONDITIONAL(HAVE_ZHY_EXTENDED_DICTIONARY, [test x"$have_extdict_zhy" = xyes]) | |||
| dnl ================================================================ | |||
| dnl wxWidgets checks. | |||
| dnl ================================================================ | |||
| AC_ARG_WITH([wx-config], | |||
| [AS_HELP_STRING([--with-wx-config], [specify the location of wx-config @<:@default=wx-config@:>@])], | |||
| [WX_CONFIG=$with_wx_config], | |||
| [WX_CONFIG=wx-config]) | |||
| if test ! -e "${WX_CONFIG}" ; then | |||
| AC_CHECK_PROG(WXCONFIG_CHECK,${WX_CONFIG},yes) | |||
| if test x"$WXCONFIG_CHECK" != x"yes" ; then | |||
| AC_MSG_ERROR([Cannot find wxWidgets which is needed for espeakedit to build the voices.]) | |||
| fi | |||
| fi | |||
| WX_LIBS=`${WX_CONFIG} --libs` | |||
| WX_CXXFLAGS=`${WX_CONFIG} --cxxflags` | |||
| WX_VERSION=`${WX_CONFIG} --version` | |||
| AC_SUBST(WX_LIBS) | |||
| AC_SUBST(WX_CXXFLAGS) | |||
| dnl ================================================================ | |||
| dnl Generate output. | |||
| dnl ================================================================ | |||
| @@ -333,10 +309,6 @@ AC_MSG_NOTICE([ | |||
| C11 Compiler: ${CC} | |||
| C11 Compiler flags: ${CFLAGS} | |||
| C++ Compiler: ${CXX} | |||
| C++ Compiler flags: ${CXXFLAGS} | |||
| wxWidgets: ${WX_VERSION} (${WX_CONFIG}) | |||
| pulseaudio: ${have_pulseaudio} | |||
| portaudio: ${have_portaudio} | |||
| sada: ${have_sada} | |||
| @@ -1,125 +0,0 @@ | |||
| /*************************************************************************** | |||
| * Copyright (C) 2005 to 2015 by Jonathan Duddington * | |||
| * email: [email protected] * | |||
| * Copyright (C) 2013-2015 by Reece H. Dunn * | |||
| * * | |||
| * This program is free software; you can redistribute it and/or modify * | |||
| * it under the terms of the GNU General Public License as published by * | |||
| * the Free Software Foundation; either version 3 of the License, or * | |||
| * (at your option) any later version. * | |||
| * * | |||
| * This program is distributed in the hope that it will be useful, * | |||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
| * GNU General Public License for more details. * | |||
| * * | |||
| * You should have received a copy of the GNU General Public License * | |||
| * along with this program; if not, see: * | |||
| * <http://www.gnu.org/licenses/>. * | |||
| ***************************************************************************/ | |||
| #include "wx/wx.h" | |||
| #include <locale.h> | |||
| #include "speak_lib.h" | |||
| #include "espeak_ng.h" | |||
| #include "speech.h" | |||
| #include "phoneme.h" | |||
| #include "synthesize.h" | |||
| #include "voice.h" | |||
| #include "spect.h" | |||
| #include "translate.h" | |||
| static const char *about_string2 = "espeakedit: %s\nAuthor: Jonathan Duddington (c) 2009\n\n" | |||
| "Licensed under GNU General Public License version 3\n" | |||
| "http://espeak.sourceforge.net/"; | |||
| static const char *about_string = "<font size=0><b>espeakedit </b> %s<br>Author: Jonathan Duddington (c) 2009<br>" | |||
| "<a href=\"http://espeak.sourceforge.net/\">http://espeak.sourceforge.net</a><br>" | |||
| "Licensed under <a href=\"http://espeak.sourceforge.net/license.html\">GNU General Public License version 3</a></font>"; | |||
| int progress_max; | |||
| int gui_flag = 0; | |||
| char path_source[sizeof(path_home)+20]; | |||
| char voice_name2[40]; | |||
| class MyApp: public wxApp | |||
| { | |||
| public: | |||
| bool OnInit(void); | |||
| int OnExit(void); | |||
| }; | |||
| IMPLEMENT_APP(MyApp) | |||
| wxString AppName = _T("espeakedit"); | |||
| int MyApp::OnExit() | |||
| {//================ | |||
| return(0); | |||
| } | |||
| static const char *help_text = | |||
| "\n\nespeakedit\n" | |||
| "\tRun with GUI\n" | |||
| "espeakedit --compile\n" | |||
| "\tCompile phoneme data in espeak-data/phsource\n" | |||
| "\tand dictionary data in espeak-data/dictsource\n"; | |||
| // Initialise this in OnInit, not statically | |||
| bool MyApp::OnInit(void) | |||
| {//===================== | |||
| int j; | |||
| char param[120]; | |||
| if(argc > 1) | |||
| { | |||
| #if wxUSE_UNICODE == 1 | |||
| wcstombs(param, argv[1], sizeof(param)); | |||
| #else | |||
| const char *p = argv[1]; | |||
| while((param[j] = p[j]) != 0) j++; | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| param[0] = '-'; | |||
| param[1] = 'h'; | |||
| param[2] = 0; | |||
| } | |||
| if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0)) | |||
| { | |||
| printf(about_string2,espeak_Info(NULL)); | |||
| printf("%s", help_text); | |||
| exit(0); | |||
| } | |||
| char *env; | |||
| if((env = getenv("ESPEAK_DATA_PATH")) == NULL) | |||
| env = getenv("HOME"); | |||
| snprintf(path_home,sizeof(path_home),"%s/espeak-data",env); | |||
| snprintf(path_source,sizeof(path_source),"%s/../phsource/",path_home); | |||
| if(strcmp(param,"--compile")==0) | |||
| { | |||
| samplerate_native = samplerate = 22050; | |||
| LoadPhData(NULL); | |||
| if(LoadVoice("", 0) == NULL) | |||
| { | |||
| fprintf(stderr, "Failed to load default voice\n"); | |||
| exit(1); | |||
| } | |||
| espeak_ng_CompilePhonemeData(22050, stderr); | |||
| espeak_ng_CompileIntonation(stderr); | |||
| } | |||
| exit(0); | |||
| } | |||