-
Notifications
You must be signed in to change notification settings - Fork 155
Description
My end-goal is to incorporate the TTS libraries into my own application to help me practice my Spanish listening skills. I would like this application to work on both Linux and Windows.
I have downloaded and compiled the source code for Mimic Classic on my Linux box (Linux Mint 18). The standalone version (version mimic-1.3.0.2) runs fine from a console window. I have also “cross-compiled” the source for Windows and “distributed” it per the instructions. The standalone version also runs fine on my Windows laptop (Windows 7) from a command prompt.
Now my next step is to link the libraries into my own source code and use the API to generate TTS from within my own application. I am using code::blocks IDE and MinGW G++ compiler (version 6.3.0-1) on both Linux and Windows. Everything seems to compile except when it comes to registering a voice. I’m trying to use register_cmu_us_slt(), but I get an undefined reference. I am linking in the libttsmimic_lang_cmu_us_slt.a library, which I’m sure contains this routine, but it’s not resolving it. It does the same thing on both Linux and Windows. I must be doing something stupid, but I can’t identify the problem. So any help would be greatly appreciated! Here’s my code (same on both Linux and Windows):
#include
#include “mimic.h”
using namespace std;
extern cst_voice *register_cmu_us_slt(const char *voxdir);
int main()
{
cst_voice *v = NULL;
float durs = 0.0;
int err;
if ((err = mimic_init()))
cout << "error initializing mimic (" << err << ")\n";
v = register_cmu_us_slt(NULL);
if ((err = mimic_text_to_speech("hello world", v, "play", &durs))) {
if (err == -EINVAL)
cout << "mimic_text_to_speech invalid parameter (-EINVAL)\n";
else if (err == -EINTR)
cout << "mimic_text_to_speech error processing output (-EINTR)\n";
}
cout << "Hello world!" << endl;
if ((err = mimic_exit()))
cout << "error exiting mimic (" << err << ")\n";
return 0;
}
Or should I be using “mimic_voice_select()” instead of “register_cmu_us_slt()”? I’ve tried using “mimic_voice_select(“slt”)”, but it still returns an invalid pointer to an object of type “cst_voice”. I've also tried using mimic_voice_load() with a *.flitevox file and get the message that the file is not supported or has the wrong header?
I’m just lost. Not sure what to try next. Any help would be greatly appreciated. Then, of course, once I get this working I will need to switch to using Spanish language instead of English.
I’ve searched for some sample code to use as a starting point, but I’m just not finding anything.