Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 116030 | Differences between
and this patch

Collapse All | Expand All

(-)festival.orig/src/arch/festival/audspio.cc (+3 lines)
Lines 43-48 Link Here
43
#include "festival.h"
43
#include "festival.h"
44
#include "festivalP.h"
44
#include "festivalP.h"
45
45
46
using std::cerr;
47
using std::endl;
48
46
#ifdef NO_SPOOLER
49
#ifdef NO_SPOOLER
47
void audsp_play_wave(EST_Wave *w) { cerr << "no spooler available\n"; }
50
void audsp_play_wave(EST_Wave *w) { cerr << "no spooler available\n"; }
48
LISP l_audio_mode(LISP mode) { return NIL; }
51
LISP l_audio_mode(LISP mode) { return NIL; }
(-)festival.orig/src/arch/festival/client.cc (+3 lines)
Lines 49-54 Link Here
49
#include "festival.h"
49
#include "festival.h"
50
#include "festivalP.h"
50
#include "festivalP.h"
51
51
52
using std::cerr;
53
using std::endl;
54
52
static EST_Regex ipnum("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
55
static EST_Regex ipnum("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
53
56
54
int festival_socket_client(const char *host,int port)
57
int festival_socket_client(const char *host,int port)
(-)festival.orig/src/arch/festival/features.cc (+3 lines)
Lines 79-84 Link Here
79
#include "festival.h"
79
#include "festival.h"
80
#include "festivalP.h"
80
#include "festivalP.h"
81
81
82
using std::cerr;
83
using std::endl;
84
82
static LISP ff_pref_assoc(const char *name, LISP alist);
85
static LISP ff_pref_assoc(const char *name, LISP alist);
83
86
84
static LISP ff_docstrings = NULL;
87
static LISP ff_docstrings = NULL;
(-)festival.orig/src/arch/festival/festival.cc (+2 lines)
Lines 46-51 Link Here
46
#include "siod.h"
46
#include "siod.h"
47
#include "ModuleDescription.h"
47
#include "ModuleDescription.h"
48
48
49
using namespace std;
50
49
static void festival_lisp_funcs(void);
51
static void festival_lisp_funcs(void);
50
static void festival_lisp_vars(void);
52
static void festival_lisp_vars(void);
51
static void festival_banner(void);
53
static void festival_banner(void);
(-)festival.orig/src/arch/festival/festivalP.h (-1 / +1 lines)
Lines 50-56 void festival_ngram_init(); Link Here
50
void festival_wfst_init();
50
void festival_wfst_init();
51
void festival_fringe_init(void);
51
void festival_fringe_init(void);
52
52
53
extern ostream *cslog; 
53
extern std::ostream *cslog; 
54
54
55
LISP l_audio_mode(LISP mode);
55
LISP l_audio_mode(LISP mode);
56
void audsp_play_wave(EST_Wave *w);
56
void audsp_play_wave(EST_Wave *w);
(-)festival.orig/src/arch/festival/ModuleDescription.cc (-1 / +2 lines)
Lines 38-46 Link Here
38
 /*                                                                       */
38
 /*                                                                       */
39
 /*************************************************************************/
39
 /*************************************************************************/
40
40
41
#include <iostream.h>
41
#include <iostream>
42
#include "siod.h"
42
#include "siod.h"
43
#include "ModuleDescription.h"
43
#include "ModuleDescription.h"
44
using std::ostream;
44
45
45
// to make life easier
46
// to make life easier
46
static inline EST_String S(const char *s) { return EST_String(s); }
47
static inline EST_String S(const char *s) { return EST_String(s); }
(-)festival.orig/src/arch/festival/ngram.cc (+3 lines)
Lines 40-45 Link Here
40
#include "festival.h"
40
#include "festival.h"
41
#include "festivalP.h"
41
#include "festivalP.h"
42
42
43
using std::cout;
44
using std::endl;
45
43
static LISP ngram_loaded_list = NIL;
46
static LISP ngram_loaded_list = NIL;
44
static EST_Ngrammar *load_ngram(const EST_String &filename);
47
static EST_Ngrammar *load_ngram(const EST_String &filename);
45
static LISP add_ngram(const EST_String &name,EST_Ngrammar *n);
48
static LISP add_ngram(const EST_String &name,EST_Ngrammar *n);
(-)festival.orig/src/arch/festival/Phone.cc (+4 lines)
Lines 43-48 Link Here
43
#include "festival.h"
43
#include "festival.h"
44
#include "festivalP.h"
44
#include "festivalP.h"
45
45
46
using std::cout;
47
using std::cerr;
48
using std::endl;
49
46
static void check_phoneset(void);
50
static void check_phoneset(void);
47
static void ps_add_def(const EST_String &name, PhoneSet *ps);
51
static void ps_add_def(const EST_String &name, PhoneSet *ps);
48
static LISP lisp_select_phoneset(LISP phoneset);
52
static LISP lisp_select_phoneset(LISP phoneset);
(-)festival.orig/src/arch/festival/server.cc (+2 lines)
Lines 54-59 Link Here
54
#include "festival.h"
54
#include "festival.h"
55
#include "festivalP.h"
55
#include "festivalP.h"
56
56
57
using namespace std;
58
57
#define DEFAULT_MAX_CLIENTS 10
59
#define DEFAULT_MAX_CLIENTS 10
58
60
59
/* The folloing gives a server that never forks */
61
/* The folloing gives a server that never forks */
(-)festival.orig/src/arch/festival/utterance.cc (+4 lines)
Lines 42-47 Link Here
42
#include "festival.h"
42
#include "festival.h"
43
#include "festivalP.h"
43
#include "festivalP.h"
44
44
45
using std::cout;
46
using std::cerr;
47
using std::endl;
48
45
static LISP item_features(LISP sitem, LISP leval = NIL);
49
static LISP item_features(LISP sitem, LISP leval = NIL);
46
static LISP item_features(EST_Item *s, bool evaluate_ff=false);
50
static LISP item_features(EST_Item *s, bool evaluate_ff=false);
47
static LISP stream_tree_to_lisp(EST_Item *s);
51
static LISP stream_tree_to_lisp(EST_Item *s);
(-)festival.orig/src/arch/festival/wagon_interp.cc (-2 / +2 lines)
Lines 155-162 static int wagon_ask(EST_Item *s, LISP q Link Here
155
	    return FALSE;
155
	    return FALSE;
156
    else 
156
    else 
157
    {
157
    {
158
	cerr << "Decision tree: unknown question operator: \"" << 
158
	std::cerr << "Decision tree: unknown question operator: \"" << 
159
	    str_oper << "\"\n";
159
	    str_oper << "\"" << std::endl;
160
	festival_error();
160
	festival_error();
161
    }
161
    }
162
    return 0;
162
    return 0;
(-)festival.orig/src/arch/festival/wave.cc (+3 lines)
Lines 47-52 Link Here
47
#include "winsock2.h"
47
#include "winsock2.h"
48
#endif
48
#endif
49
49
50
using std::cerr;
51
using std::endl;
52
50
static void utt_save_f0_from_targets(EST_Utterance *u,EST_String &filename);
53
static void utt_save_f0_from_targets(EST_Utterance *u,EST_String &filename);
51
static float f0_interpolate(EST_Item *ptval, EST_Item *tval, float time);
54
static float f0_interpolate(EST_Item *ptval, EST_Item *tval, float time);
52
55
(-)festival.orig/src/arch/festival/wfst.cc (+3 lines)
Lines 40-45 Link Here
40
#include "festival.h"
40
#include "festival.h"
41
#include "festivalP.h"
41
#include "festivalP.h"
42
42
43
using std::cout;
44
using std::endl;
45
43
static LISP wfst_loaded_list = NIL;
46
static LISP wfst_loaded_list = NIL;
44
static EST_WFST *load_wfst(const EST_String &filename);
47
static EST_WFST *load_wfst(const EST_String &filename);
45
static LISP add_wfst(const EST_String &name,EST_WFST *n);
48
static LISP add_wfst(const EST_String &name,EST_WFST *n);
(-)festival.orig/src/include/festival.h (-2 / +2 lines)
Lines 40-46 Link Here
40
#define __FESTIVAL_H__
40
#define __FESTIVAL_H__
41
41
42
#include <stdlib.h>
42
#include <stdlib.h>
43
#include <fstream.h>
43
#include <fstream>
44
#include "EST.h"
44
#include "EST.h"
45
#include "EST_cutils.h"
45
#include "EST_cutils.h"
46
#include "siod.h"
46
#include "siod.h"
Lines 55-61 struct ModuleDescription; Link Here
55
55
56
/* An iostream for outputing debug messages, switchable    */
56
/* An iostream for outputing debug messages, switchable    */
57
/* to /dev/null or cerr                                    */
57
/* to /dev/null or cerr                                    */
58
extern ostream *cdebug;
58
extern std::ostream *cdebug;
59
#define cwarn cout
59
#define cwarn cout
60
extern "C" FILE* stddebug;
60
extern "C" FILE* stddebug;
61
extern int ft_server_socket;
61
extern int ft_server_socket;
(-)festival.orig/src/include/lexicon.h (-2 / +2 lines)
Lines 99-110 public: Link Here
99
		      const EST_String &word,
99
		      const EST_String &word,
100
		      int start,int mid, int end);
100
		      int start,int mid, int end);
101
101
102
    inline friend ostream& operator<<(ostream& s, Lexicon &p);
102
    inline friend std::ostream& operator<<(std::ostream& s, Lexicon &p);
103
103
104
    Lexicon & operator =(const Lexicon &a);
104
    Lexicon & operator =(const Lexicon &a);
105
};
105
};
106
106
107
inline ostream& operator<<(ostream& s, Lexicon &p)
107
inline std::ostream& operator<<(std::ostream& s, Lexicon &p)
108
{
108
{
109
    s << "[LEXICON " << p.lex_name() << "]" ;
109
    s << "[LEXICON " << p.lex_name() << "]" ;
110
    return s;
110
    return s;
(-)festival.orig/src/include/ModuleDescription.h (-3 / +3 lines)
Lines 35-41 Link Here
35
#define __MODULEDESCRIPTION_H__
35
#define __MODULEDESCRIPTION_H__
36
36
37
#include <stdio.h>
37
#include <stdio.h>
38
#include <iostream.h>
38
#include <iostream>
39
#include "EST_String.h"
39
#include "EST_String.h"
40
40
41
/** Machine readable descriptions of modules. Useful for help messages
41
/** Machine readable descriptions of modules. Useful for help messages
Lines 130-143 struct ModuleDescription { Link Here
130
  /// Create a module description, initialising it properly.
130
  /// Create a module description, initialising it properly.
131
  static struct ModuleDescription *create();
131
  static struct ModuleDescription *create();
132
  /// Print the description to the strream.
132
  /// Print the description to the strream.
133
  static ostream &print(ostream &s, const ModuleDescription &desc);
133
  static std::ostream &print(std::ostream &s, const ModuleDescription &desc);
134
134
135
  static int print(FILE *s, const ModuleDescription &desc);
135
  static int print(FILE *s, const ModuleDescription &desc);
136
136
137
};
137
};
138
138
139
/// Output operator for descriptions.
139
/// Output operator for descriptions.
140
ostream &operator << (ostream &stream, const ModuleDescription &desc);
140
std::ostream &operator << (std::ostream &stream, const ModuleDescription &desc);
141
141
142
VAL_REGISTER_CLASS_DCLS(moddesc,ModuleDescription)
142
VAL_REGISTER_CLASS_DCLS(moddesc,ModuleDescription)
143
SIOD_REGISTER_CLASS_DCLS(moddesc,ModuleDescription)
143
SIOD_REGISTER_CLASS_DCLS(moddesc,ModuleDescription)
(-)festival.orig/src/include/Phone.h (-4 / +4 lines)
Lines 55-66 public: Link Here
55
       { return features.val_def(key,def); }
55
       { return features.val_def(key,def); }
56
    int match_features(Phone *foreign);
56
    int match_features(Phone *foreign);
57
57
58
    inline friend ostream& operator<<(ostream& s, Phone &p);
58
    inline friend std::ostream& operator<<(std::ostream& s, Phone &p);
59
59
60
    Phone & operator =(const Phone &a);
60
    Phone & operator =(const Phone &a);
61
};
61
};
62
62
63
inline ostream& operator<<(ostream& s, Phone &p)
63
inline std::ostream& operator<<(std::ostream& s, Phone &p)
64
{
64
{
65
    s << "[PHONE " << p.phone_name() << "]";
65
    s << "[PHONE " << p.phone_name() << "]";
66
//    s << p.features << endl;
66
//    s << p.features << endl;
Lines 108-120 public: Link Here
108
		           != NIL); }
108
		           != NIL); }
109
    void set_feature(const EST_String &name, LISP vals); 
109
    void set_feature(const EST_String &name, LISP vals); 
110
110
111
    inline friend ostream& operator<<(ostream& s, PhoneSet &p);
111
    inline friend std::ostream& operator<<(std::ostream& s, PhoneSet &p);
112
112
113
    Phone *find_matched_phone(Phone *phone);
113
    Phone *find_matched_phone(Phone *phone);
114
    PhoneSet & operator =(const PhoneSet &a);
114
    PhoneSet & operator =(const PhoneSet &a);
115
};
115
};
116
116
117
inline ostream& operator<<(ostream& s, PhoneSet &p)
117
inline std::ostream& operator<<(std::ostream& s, PhoneSet &p)
118
{
118
{
119
    s << p.phone_set_name(); return s;
119
    s << p.phone_set_name(); return s;
120
}
120
}
(-)festival.orig/src/main/audsp.cc (+3 lines)
Lines 48-53 Link Here
48
#include "EST.h"
48
#include "EST.h"
49
#include "EST_unix.h"
49
#include "EST_unix.h"
50
50
51
using std::cerr;
52
using std::endl;
53
51
#ifdef NO_SPOOLER
54
#ifdef NO_SPOOLER
52
55
53
int main(int argc, char **argv)
56
int main(int argc, char **argv)
(-)festival.orig/src/main/festival_client.cc (+3 lines)
Lines 48-53 typedef HANDLE SERVER_FD; Link Here
48
typedef FILE *SERVER_FD;
48
typedef FILE *SERVER_FD;
49
#endif
49
#endif
50
50
51
using std::cerr;
52
using std::endl;
53
51
static void festival_client_main(int argc, char **argv);
54
static void festival_client_main(int argc, char **argv);
52
static void copy_to_server(FILE *fdin,SERVER_FD serverfd);
55
static void copy_to_server(FILE *fdin,SERVER_FD serverfd);
53
static void ttw_file(SERVER_FD serverfd, const EST_String &file);
56
static void ttw_file(SERVER_FD serverfd, const EST_String &file);
(-)festival.orig/src/main/festival_main.cc (-1 / +1 lines)
Lines 218-224 static void festival_script_mode(int arg Link Here
218
218
219
    if (argc < 2)
219
    if (argc < 2)
220
    {   
220
    {   
221
	cerr << "festival: script_mode has no file to interpret" << endl;
221
	std::cerr << "festival: script_mode has no file to interpret" << std::endl;
222
	return;
222
	return;
223
    }
223
    }
224
224
(-)festival.orig/src/modules/base/ff.cc (+3 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "modules.h"
42
#include "modules.h"
43
43
44
using std::cerr;
45
using std::endl;
46
44
static EST_String stressname("stress");
47
static EST_String stressname("stress");
45
static EST_Val val_string0("0");
48
static EST_Val val_string0("0");
46
static EST_Val val_string1("1");
49
static EST_Val val_string1("1");
(-)festival.orig/src/modules/base/modules.cc (+3 lines)
Lines 43-48 Link Here
43
#include "modules.h"
43
#include "modules.h"
44
#include "intonation.h"
44
#include "intonation.h"
45
45
46
using std::cerr;
47
using std::endl;
48
46
static void create_words(EST_Utterance *u);
49
static void create_words(EST_Utterance *u);
47
static void create_segments(EST_Utterance *u);
50
static void create_segments(EST_Utterance *u);
48
static void create_wave(EST_Utterance *u);
51
static void create_wave(EST_Utterance *u);
(-)festival.orig/src/modules/base/parameters.cc (+2 lines)
Lines 45-50 Link Here
45
// this isn't as efficient as it might be, but we aren't going to be
45
// this isn't as efficient as it might be, but we aren't going to be
46
// doing this inside any loops
46
// doing this inside any loops
47
47
48
using std::cerr;
49
48
LISP lisp_parameter_get(const EST_String parameter_name)
50
LISP lisp_parameter_get(const EST_String parameter_name)
49
{
51
{
50
  LISP parameter_get = siod_get_lval("Parameter.get", "Parameter.get not defined");
52
  LISP parameter_get = siod_get_lval("Parameter.get", "Parameter.get not defined");
(-)festival.orig/src/modules/base/phrasify.cc (-1 / +4 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "modules.h"
42
#include "modules.h"
43
43
44
using std::cerr;
45
using std::endl;
46
44
static void phrasing_none(EST_Utterance *u);
47
static void phrasing_none(EST_Utterance *u);
45
static void phrasing_by_cart(EST_Utterance *u);
48
static void phrasing_by_cart(EST_Utterance *u);
46
static void phrasing_by_probmodels(EST_Utterance *u);
49
static void phrasing_by_probmodels(EST_Utterance *u);
Lines 218-224 static void phrasing_by_probmodels(EST_U Link Here
218
	    EST_Val npbreak = wagon_predict(w,phrase_type_tree);
221
	    EST_Val npbreak = wagon_predict(w,phrase_type_tree);
219
	    w->set("pbreak",npbreak.string());  // may reset to BB
222
	    w->set("pbreak",npbreak.string());  // may reset to BB
220
	}
223
	}
221
	pbreak = (EST_String)w->f("pbreak");
224
	pbreak = EST_String(w->f("pbreak"));
222
	if (pbreak == "B")
225
	if (pbreak == "B")
223
	    w->set("blevel",3);
226
	    w->set("blevel",3);
224
	else if (pbreak == "mB")
227
	else if (pbreak == "mB")
(-)festival.orig/src/modules/base/phrinfo.cc (+3 lines)
Lines 43-48 Link Here
43
#include "modules.h"
43
#include "modules.h"
44
#include "text.h"
44
#include "text.h"
45
45
46
using std::cerr;
47
using std::endl;
48
46
static EST_Item *make_phrase_node(EST_Utterance *u,
49
static EST_Item *make_phrase_node(EST_Utterance *u,
47
					 const EST_String &name,
50
					 const EST_String &name,
48
					 LISP feats);
51
					 LISP feats);
(-)festival.orig/src/modules/base/pos.cc (+3 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "lexicon.h"
42
#include "lexicon.h"
43
43
44
using std::cerr;
45
using std::endl;
46
44
static EST_VTCandidate *pos_candlist(EST_Item *s,EST_Features &f);
47
static EST_VTCandidate *pos_candlist(EST_Item *s,EST_Features &f);
45
static EST_VTPath *pos_npath(EST_VTPath *p,EST_VTCandidate *c,EST_Features &f);
48
static EST_VTPath *pos_npath(EST_VTPath *p,EST_VTCandidate *c,EST_Features &f);
46
static double find_np_prob(EST_VTPath *p,int n,int *state);
49
static double find_np_prob(EST_VTPath *p,int n,int *state);
(-)festival.orig/src/modules/base/word.cc (-4 / +7 lines)
Lines 42-47 Link Here
42
#include "lexicon.h"
42
#include "lexicon.h"
43
#include "modules.h"
43
#include "modules.h"
44
44
45
using std::cerr;
46
using std::endl;
47
45
static EST_Item *add_syllable(EST_Utterance *u, int stress);
48
static EST_Item *add_syllable(EST_Utterance *u, int stress);
46
static LISP specified_word_pronunciation(EST_Item *w, LISP lpos);
49
static LISP specified_word_pronunciation(EST_Item *w, LISP lpos);
47
50
Lines 64-73 LISP FT_Classic_Word_Utt(LISP utt) Link Here
64
    for (w=u->relation("Word")->first(); w != 0; w = next(w))
67
    for (w=u->relation("Word")->first(); w != 0; w = next(w))
65
    {
68
    {
66
	lpos = NIL;
69
	lpos = NIL;
67
	pos = (EST_String)ffeature(w,"hg_pos");
70
	pos = EST_String(ffeature(w,"hg_pos"));
68
                        // explicit homograph pos disambiguation
71
                        // explicit homograph pos disambiguation
69
	if (pos == "0")
72
	if (pos == "0")
70
	    pos = (EST_String)ffeature(w,"pos");
73
	    pos = EST_String(ffeature(w,"pos"));
71
	if (pos != "0")
74
	if (pos != "0")
72
	    lpos = rintern(pos);
75
	    lpos = rintern(pos);
73
76
Lines 100-107 static LISP specified_word_pronunciation Link Here
100
    //  from which a list can be read.
103
    //  from which a list can be read.
101
    EST_String p;
104
    EST_String p;
102
105
103
    if (((p = (EST_String)ffeature(w,"phonemes")) != "0") ||
106
    if (((p = EST_String(ffeature(w,"phonemes"))) != "0") ||
104
	((p = (EST_String)ffeature(w,"R:Token.parent.phonemes")) != "0"))
107
	((p = EST_String(ffeature(w,"R:Token.parent.phonemes"))) != "0"))
105
    {
108
    {
106
	LISP phones = read_from_lstring(strintern(p));
109
	LISP phones = read_from_lstring(strintern(p));
107
110
(-)festival.orig/src/modules/clunits/acost.cc (+2 lines)
Lines 49-54 Link Here
49
#include "festival.h"
49
#include "festival.h"
50
#include "clunits.h"
50
#include "clunits.h"
51
51
52
using namespace std;
53
52
static void find_unit_distances(LISP units, const EST_String &fname);
54
static void find_unit_distances(LISP units, const EST_String &fname);
53
55
54
static float duration_penalty_weight=1.0;
56
static float duration_penalty_weight=1.0;
(-)festival.orig/src/modules/clunits/cldb.cc (+2 lines)
Lines 44-49 Link Here
44
#include "EST_FileType.h"
44
#include "EST_FileType.h"
45
#include "clunits.h"
45
#include "clunits.h"
46
46
47
using namespace std;
48
47
VAL_REGISTER_CLASS(clunitsdb,CLDB)
49
VAL_REGISTER_CLASS(clunitsdb,CLDB)
48
SIOD_REGISTER_CLASS(clunitsdb,CLDB)
50
SIOD_REGISTER_CLASS(clunitsdb,CLDB)
49
static void cl_load_catalogue(CLDB *cldb,EST_String &indexfile);
51
static void cl_load_catalogue(CLDB *cldb,EST_String &indexfile);
(-)festival.orig/src/modules/clunits/clunits.cc (+3 lines)
Lines 78-83 Link Here
78
#include "festival.h"
78
#include "festival.h"
79
#include "clunits.h"
79
#include "clunits.h"
80
80
81
using std::cerr;
82
using std::endl;
83
81
static void setup_clunits_params();
84
static void setup_clunits_params();
82
static EST_VTCandidate *TS_candlist(EST_Item *s,EST_Features &f);
85
static EST_VTCandidate *TS_candlist(EST_Item *s,EST_Features &f);
83
static EST_VTPath *TS_npath(EST_VTPath *p,EST_VTCandidate *c,EST_Features &f);
86
static EST_VTPath *TS_npath(EST_VTPath *p,EST_VTCandidate *c,EST_Features &f);
(-)festival.orig/src/modules/donovan/donovan.cc (-4 / +6 lines)
Lines 44-54 Link Here
44
/* Note the FreeSpeech code is GNU Copyright not like the above          */
44
/* Note the FreeSpeech code is GNU Copyright not like the above          */
45
/*                                                                       */
45
/*                                                                       */
46
/*=======================================================================*/
46
/*=======================================================================*/
47
#include <iostream.h>
47
#include <iostream>
48
#include <fstream.h>
49
#include "festival.h"
48
#include "festival.h"
50
#include "donovan.h"
49
#include "donovan.h"
51
50
51
using std::cerr;
52
using std::endl;
53
52
static CONFIG *make_config(void);
54
static CONFIG *make_config(void);
53
static void delete_config(CONFIG *config);
55
static void delete_config(CONFIG *config);
54
static SPN *make_spn(EST_Utterance &u);
56
static SPN *make_spn(EST_Utterance &u);
Lines 111-117 LISP FT_Donovan_Synthesize_Utt(LISP utt) Link Here
111
113
112
    if (nindex == 0)
114
    if (nindex == 0)
113
    {
115
    {
114
	cerr << "Festival: no donovan diphones loaded\n";
116
	cerr << "Festival: no donovan diphones loaded" << endl;
115
	festival_error();
117
	festival_error();
116
    }
118
    }
117
119
Lines 307-313 void as_realloc(int nframes, int npp, AC Link Here
307
    (void)npp;
309
    (void)npp;
308
    (void)as;
310
    (void)as;
309
311
310
    cerr << "Donovan diphones: as_realloc called unexpectedly\n";
312
    cerr << "Donovan diphones: as_realloc called unexpectedly" << endl;
311
    festival_error();
313
    festival_error();
312
314
313
}
315
}
(-)festival.orig/src/modules/Duration/duration.cc (+2 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "durationP.h"
42
#include "durationP.h"
43
43
44
using namespace std;
45
44
LISP FT_Duration_Ave_Utt(LISP utt)
46
LISP FT_Duration_Ave_Utt(LISP utt)
45
{
47
{
46
    // Predict average duration on segments
48
    // Predict average duration on segments
(-)festival.orig/src/modules/Duration/dur_aux.cc (+2 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "durationP.h"
42
#include "durationP.h"
43
43
44
using std::cerr;
45
44
float dur_get_stretch(void)
46
float dur_get_stretch(void)
45
{
47
{
46
    LISP lstretch = ft_get_param("Duration_Stretch");
48
    LISP lstretch = ft_get_param("Duration_Stretch");
(-)festival.orig/src/modules/Duration/Klatt.cc (+4 lines)
Lines 56-61 which I think is neater. Link Here
56
#include "festival.h"
56
#include "festival.h"
57
#include "durationP.h"
57
#include "durationP.h"
58
58
59
using std::cout;
60
using std::cerr;
61
using std::endl;
62
59
static void klatt_dur_debug(EST_Item *s);
63
static void klatt_dur_debug(EST_Item *s);
60
64
61
static float rule2(EST_Item *seg);
65
static float rule2(EST_Item *seg);
(-)festival.orig/src/modules/Intonation/duffint.cc (+3 lines)
Lines 41-46 Link Here
41
#include "festival.h"
41
#include "festival.h"
42
#include "intonation.h"
42
#include "intonation.h"
43
43
44
using std::cout;
45
using std::endl;
46
44
LISP FT_Intonation_Default_Utt(LISP utt)
47
LISP FT_Intonation_Default_Utt(LISP utt)
45
{
48
{
46
    return utt;
49
    return utt;
(-)festival.orig/src/modules/Intonation/gen_int.cc (+3 lines)
Lines 49-54 Link Here
49
#include "festival.h"
49
#include "festival.h"
50
#include "intonation.h"
50
#include "intonation.h"
51
51
52
using std::cerr;
53
using std::endl;
54
52
static void check_targs(EST_Utterance *u);
55
static void check_targs(EST_Utterance *u);
53
static EST_Item *find_nearest_seg(EST_Utterance *u,float pos);
56
static EST_Item *find_nearest_seg(EST_Utterance *u,float pos);
54
57
(-)festival.orig/src/modules/Intonation/int_tree.cc (-7 / +10 lines)
Lines 47-52 Link Here
47
#include "festival.h"
47
#include "festival.h"
48
#include "intonation.h"
48
#include "intonation.h"
49
49
50
using std::cerr;
51
using std::endl;
52
50
enum lr_tpos {tp_start, tp_mid, tp_end};
53
enum lr_tpos {tp_start, tp_mid, tp_end};
51
54
52
static EST_String accent_specified(EST_Item *s);
55
static EST_String accent_specified(EST_Item *s);
Lines 87-97 LISP FT_Intonation_Tree_Utt(LISP utt) Link Here
87
    for (s=u->relation("Syllable")->first(); s != 0; s=next(s))
90
    for (s=u->relation("Syllable")->first(); s != 0; s=next(s))
88
    {
91
    {
89
	if ((paccent = accent_specified(s)) == "0") // check if pre-specified
92
	if ((paccent = accent_specified(s)) == "0") // check if pre-specified
90
	    paccent = (EST_String)wagon_predict(s,accent_tree);
93
	    paccent = EST_String(wagon_predict(s,accent_tree));
91
	if (paccent != "NONE")
94
	if (paccent != "NONE")
92
	    add_IntEvent(u,s,paccent);
95
	    add_IntEvent(u,s,paccent);
93
	if ((ptone = tone_specified(s)) == "0")
96
	if ((ptone = tone_specified(s)) == "0")
94
	    ptone = (EST_String)wagon_predict(s,endtone_tree);
97
	    ptone = EST_String(wagon_predict(s,endtone_tree));
95
	if (ptone != "NONE")
98
	if (ptone != "NONE")
96
	    add_IntEvent(u,s,ptone);
99
	    add_IntEvent(u,s,ptone);
97
    }
100
    }
Lines 107-117 static EST_String accent_specified(EST_I Link Here
107
    EST_Item *token = parent(word,"Token");
110
    EST_Item *token = parent(word,"Token");
108
    EST_String paccent("0");
111
    EST_String paccent("0");
109
    if (token)
112
    if (token)
110
	paccent = (EST_String)ffeature(token,"accent");
113
	paccent = EST_String(ffeature(token,"accent"));
111
	
114
	
112
    if (paccent == "0")
115
    if (paccent == "0")
113
    {
116
    {
114
	paccent = (EST_String)ffeature(word,"accent");
117
	paccent = EST_String(ffeature(word,"accent"));
115
	if (paccent == "0")
118
	if (paccent == "0")
116
	    return paccent;
119
	    return paccent;
117
    }
120
    }
Lines 139-149 static EST_String tone_specified(EST_Ite Link Here
139
    EST_Item *token = parent(word,"Token");
142
    EST_Item *token = parent(word,"Token");
140
    EST_String ptone("0");
143
    EST_String ptone("0");
141
    if (token)
144
    if (token)
142
	ptone = (EST_String)ffeature(token,"tone");
145
	ptone = EST_String(ffeature(token,"tone"));
143
146
144
    if (ptone == "0")
147
    if (ptone == "0")
145
    {
148
    {
146
	ptone = (EST_String)ffeature(word,"tone");
149
	ptone = EST_String(ffeature(word,"tone"));
147
	if (ptone == "0")
150
	if (ptone == "0")
148
	    return ptone;
151
	    return ptone;
149
    }
152
    }
Lines 272-278 static void add_target_at(EST_Utterance Link Here
272
	add_target(u,seg,seg->F("end"),val);
275
	add_target(u,seg,seg->F("end"),val);
273
    else
276
    else
274
    {
277
    {
275
	cerr << "add_target_at: unknown position type\n";
278
	cerr << "add_target_at: unknown position type" << endl;
276
	festival_error();
279
	festival_error();
277
    }
280
    }
278
}
281
}
(-)festival.orig/src/modules/Intonation/simple.cc (-2 / +2 lines)
Lines 52-58 LISP FT_Intonation_Simple_Utt(LISP utt) Link Here
52
    LISP accent_tree;
52
    LISP accent_tree;
53
    EST_Val paccent;
53
    EST_Val paccent;
54
54
55
    *cdebug << "Simple intonation module" << endl;
55
    *cdebug << "Simple intonation module" << std::endl;
56
56
57
    accent_tree = siod_get_lval("int_accent_cart_tree","no accent tree");
57
    accent_tree = siod_get_lval("int_accent_cart_tree","no accent tree");
58
58
Lines 80-86 LISP FT_Int_Targets_Simple_Utt(LISP utt) Link Here
80
    LISP simple_params;
80
    LISP simple_params;
81
    float f0_mean, f0_std;
81
    float f0_mean, f0_std;
82
82
83
    *cdebug << "Simple int targets module" << endl;
83
    *cdebug << "Simple int targets module" << std::endl;
84
84
85
    // Create some down step accents
85
    // Create some down step accents
86
    simple_params = siod_get_lval("int_simple_params","no simple params");
86
    simple_params = siod_get_lval("int_simple_params","no simple params");
(-)festival.orig/src/modules/Lexicon/complex.cc (+2 lines)
Lines 44-49 Link Here
44
#include "lexiconP.h"
44
#include "lexiconP.h"
45
#include "lts.h"
45
#include "lts.h"
46
46
47
using namespace std;
48
47
static LISP check_and_fix(LISP entry);
49
static LISP check_and_fix(LISP entry);
48
static void check_sylphones(const char *name,LISP syls);
50
static void check_sylphones(const char *name,LISP syls);
49
51
(-)festival.orig/src/modules/Lexicon/lexicon.cc (+4 lines)
Lines 43-48 Link Here
43
#include "lexiconP.h"
43
#include "lexiconP.h"
44
#include "lts.h"
44
#include "lts.h"
45
45
46
using std::cout;
47
using std::cerr;
48
using std::endl;
49
46
static int bl_match_entry(LISP entry,const EST_String &word);
50
static int bl_match_entry(LISP entry,const EST_String &word);
47
static int match_features(LISP req_feats, LISP act_feats);
51
static int match_features(LISP req_feats, LISP act_feats);
48
52
(-)festival.orig/src/modules/Lexicon/lts_rules.cc (+2 lines)
Lines 58-63 Link Here
58
#include "festival.h"
58
#include "festival.h"
59
#include "lts.h"
59
#include "lts.h"
60
60
61
using namespace std;
62
61
class LTS_Ruleset{
63
class LTS_Ruleset{
62
  private:
64
  private:
63
    EST_String p_name;
65
    EST_String p_name;
(-)festival.orig/src/modules/rxp/ttsxml.cc (+3 lines)
Lines 46-51 Link Here
46
#include "text.h"
46
#include "text.h"
47
#include "rxp.h"
47
#include "rxp.h"
48
48
49
using std::cerr;
50
using std::endl;
51
49
// So we can share the known_ids table.
52
// So we can share the known_ids table.
50
#include "ling_class/EST_utterance_xml.h"
53
#include "ling_class/EST_utterance_xml.h"
51
54
(-)festival.orig/src/modules/Text/text.cc (+3 lines)
Lines 49-54 Link Here
49
#include "festival.h"
49
#include "festival.h"
50
#include "text.h"
50
#include "text.h"
51
51
52
using std::cerr;
53
using std::endl;
54
52
static void tts_raw_token(EST_Item *t);
55
static void tts_raw_token(EST_Item *t);
53
static void tts_raw_utt(LISP utt);
56
static void tts_raw_utt(LISP utt);
54
57
(-)festival.orig/src/modules/Text/text_modes.cc (+3 lines)
Lines 52-57 Link Here
52
#include "text.h"
52
#include "text.h"
53
#include "lexicon.h"
53
#include "lexicon.h"
54
54
55
using std::cerr;
56
using std::endl;
57
55
static void um_apply_filter(const EST_String &filtername,
58
static void um_apply_filter(const EST_String &filtername,
56
			    const EST_String &infile,
59
			    const EST_String &infile,
57
			    const EST_String &outname);
60
			    const EST_String &outname);
(-)festival.orig/src/modules/Text/token.cc (-4 / +4 lines)
Lines 84-90 LISP FT_Welsh_Token_Utt(LISP utt) Link Here
84
LISP FT_Spanish_Token_Utt(LISP utt)
84
LISP FT_Spanish_Token_Utt(LISP utt)
85
{
85
{
86
    (void)utt;
86
    (void)utt;
87
    cerr << "TOKEN: Spanish tokenization not yet supported\n";
87
    std::cerr << "TOKEN: Spanish tokenization not yet supported" << std::endl;
88
    festival_error();
88
    festival_error();
89
89
90
    // never happens
90
    // never happens
Lines 136-142 LISP FT_English_Token_Utt(LISP utt) Link Here
136
    LISP words,w,eou_tree,l;
136
    LISP words,w,eou_tree,l;
137
    EST_Item *new_word;
137
    EST_Item *new_word;
138
138
139
    *cdebug << "Token module (English)" << endl;
139
    *cdebug << "Token module (English)" << std::endl;
140
140
141
    eou_tree = siod_get_lval("eou_tree","No end of utterance tree");
141
    eou_tree = siod_get_lval("eou_tree","No end of utterance tree");
142
    user_token_to_word_func = siod_get_lval("token_to_words",NULL);
142
    user_token_to_word_func = siod_get_lval("token_to_words",NULL);
Lines 230-236 static LISP builtin_word_it(EST_Item *to Link Here
230
	else
230
	else
231
	    return cons(strintern(tok),NIL);
231
	    return cons(strintern(tok),NIL);
232
    }
232
    }
233
    else if ((token_pos = (EST_String)ffeature(token,"token_pos")) == "ordinal")
233
    else if ((token_pos = EST_String(ffeature(token,"token_pos"))) == "ordinal")
234
	return say_num_as_ordinal(tok);
234
	return say_num_as_ordinal(tok);
235
    else if (token_pos == "year")
235
    else if (token_pos == "year")
236
	return say_num_as_year(tok);
236
	return say_num_as_year(tok);
Lines 471-477 static LISP say_num_as_ordinal(const EST Link Here
471
    {
471
    {
472
	// I don't think I've forgotten anything 
472
	// I don't think I've forgotten anything 
473
	*cdebug << "Token: can't make ordinal from \"" << lastword 
473
	*cdebug << "Token: can't make ordinal from \"" << lastword 
474
	    << "\"" << endl;
474
	    << "\"" << std::endl;
475
	CAR(last) = strintern(EST_String(lastword)+"th");
475
	CAR(last) = strintern(EST_String(lastword)+"th");
476
    }
476
    }
477
477
(-)festival.orig/src/modules/Text/tok_ext.cc (+3 lines)
Lines 48-53 Link Here
48
#include "lexicon.h"
48
#include "lexicon.h"
49
#include "text.h"
49
#include "text.h"
50
50
51
using std::cerr;
52
using std::endl;
53
51
static int rhc = 10;
54
static int rhc = 10;
52
static int lhc = 10;
55
static int lhc = 10;
53
56
(-)festival.orig/src/modules/Text/xxml.cc (-2 / +5 lines)
Lines 48-53 Link Here
48
#include "text.h"
48
#include "text.h"
49
#include "lexicon.h"
49
#include "lexicon.h"
50
50
51
using std::cerr;
52
using std::endl;
53
51
static LISP xxml_get_attribute(const EST_String &remainder);
54
static LISP xxml_get_attribute(const EST_String &remainder);
52
static char *xxml_process_line(const char *line);
55
static char *xxml_process_line(const char *line);
53
static void tts_xxml_token(EST_Item *t);
56
static void tts_xxml_token(EST_Item *t);
Lines 93-99 void tts_file_xxml(LISP filename) Link Here
93
	    cerr << "xxml parse error: unexpected end of file \n";
96
	    cerr << "xxml parse error: unexpected end of file \n";
94
	    festival_error();
97
	    festival_error();
95
	}
98
	}
96
	line = (EST_String)ts.get_upto_eoln();
99
	line = EST_String(ts.get_upto_eoln());
97
	type = line.at(0,1);
100
	type = line.at(0,1);
98
	remainder = line.after(0);
101
	remainder = line.after(0);
99
	if (type == "-")
102
	if (type == "-")
Lines 159-165 static LISP xxml_get_attribute(const EST Link Here
159
    EST_Token t;
162
    EST_Token t;
160
163
161
    ts.open_string(remainder);
164
    ts.open_string(remainder);
162
    name = (EST_String)ts.get();
165
    name = EST_String(ts.get());
163
    if ((t=ts.get()) == "IMPLIED")
166
    if ((t=ts.get()) == "IMPLIED")
164
	att = cons(rintern(name),cons(NIL,NIL));
167
	att = cons(rintern(name),cons(NIL,NIL));
165
    else if (t == "TOKEN")
168
    else if (t == "TOKEN")
(-)festival.orig/src/modules/UniSyn/us_features.cc (+3 lines)
Lines 43-48 Link Here
43
#include "EST_error.h"
43
#include "EST_error.h"
44
#include "us_features.h"
44
#include "us_features.h"
45
45
46
using std::cerr;
47
using std::endl;
48
46
void add_feature_function(EST_Relation &r, const EST_String &fname,
49
void add_feature_function(EST_Relation &r, const EST_String &fname,
47
			  const EST_String &funcname)
50
			  const EST_String &funcname)
48
{
51
{
(-)festival.orig/src/modules/UniSyn_diphone/UniSyn_diphone.cc (-5 / +7 lines)
Lines 42-47 Link Here
42
#include "us_diphone.h"
42
#include "us_diphone.h"
43
#include "festival.h"
43
#include "festival.h"
44
44
45
using std::endl;
46
45
extern USDiphIndex *diph_index;
47
extern USDiphIndex *diph_index;
46
LISP us_dbs = NIL;
48
LISP us_dbs = NIL;
47
LISP us_make_group_file(LISP lname, LISP params);
49
LISP us_make_group_file(LISP lname, LISP params);
Lines 114-120 LISP us_diphone_init(LISP args) Link Here
114
	d_index->grouped = true;
116
	d_index->grouped = true;
115
	if (d_index->ts.open(d_index->index_file) != 0)
117
	if (d_index->ts.open(d_index->index_file) != 0)
116
	{
118
	{
117
	    cerr << "US DB: can't open grouped diphone file " 
119
	    std::cerr << "US DB: can't open grouped diphone file " 
118
		<< d_index->index_file << endl;
120
		<< d_index->index_file << endl;
119
	    festival_error();
121
	    festival_error();
120
	}
122
	}
Lines 123-132 LISP us_diphone_init(LISP args) Link Here
123
    }
125
    }
124
    else
126
    else
125
    {
127
    {
126
	*cdebug << ":" << get_param_str("grouped",args,"") << ":" << endl;
128
	*cdebug << ":" << get_param_str("grouped",args,"") << ":" << endl
127
	*cdebug << "index grouped:" << d_index->grouped << endl;
129
	        << "index grouped:" << d_index->grouped << endl
128
	*cdebug << "true:" << true << endl;
130
	        << "true:" << true << endl
129
	*cdebug << "false:" << false << endl;
131
	        << "false:" << false << endl;
130
	
132
	
131
	d_index->coef_dir = get_param_str("coef_dir",args,"");
133
	d_index->coef_dir = get_param_str("coef_dir",args,"");
132
	d_index->sig_dir = get_param_str("sig_dir",args,"");
134
	d_index->sig_dir = get_param_str("sig_dir",args,"");
(-)festival.orig/src/modules/UniSyn_diphone/us_diphone_index.cc (-2 / +6 lines)
Lines 43-48 Link Here
43
#include "us_diphone.h"
43
#include "us_diphone.h"
44
#include "Phone.h"
44
#include "Phone.h"
45
45
46
using std::cout;
47
using std::cerr;
48
using std::endl;
49
46
static bool US_full_coefs = false;
50
static bool US_full_coefs = false;
47
USDiphIndex *diph_index = 0;
51
USDiphIndex *diph_index = 0;
48
extern LISP us_dbs;
52
extern LISP us_dbs;
Lines 106-114 static EST_String get_diphone_name(EST_I Link Here
106
110
107
    if (!item)
111
    if (!item)
108
	return "";
112
	return "";
109
    else if ((d1 = (EST_String)item->f(dname+"_"+dir,def)) != "0")
113
    else if ((d1 = EST_String(item->f(dname+"_"+dir,def))) != "0")
110
	return d1;
114
	return d1;
111
    else if ((d1 = (EST_String)item->f(dname,def)) != "0")
115
    else if ((d1 = EST_String(item->f(dname,def))) != "0")
112
	return d1;
116
	return d1;
113
    else
117
    else
114
	return item->f("name","0").string();
118
	return item->f("name","0").string();
(-)festival.orig/src/modules/UniSyn_diphone/us_diphone_unit.cc (+3 lines)
Lines 43-48 Link Here
43
#include "us_diphone.h"
43
#include "us_diphone.h"
44
#include "Phone.h"
44
#include "Phone.h"
45
45
46
using std::cerr;
47
using std::endl;
48
46
extern USDiphIndex *diph_index;
49
extern USDiphIndex *diph_index;
47
50
48
void dur_to_end(EST_Relation &r)
51
void dur_to_end(EST_Relation &r)

Return to bug 116030