[1.43.48]

Add mbrowrap.cpp to emulate the mbrola library which is available in Windows, but not on Linux.  mbrola voices in command-line espeak and libespeak now call mbrola directly rather than generating phoneme information as text.  Mbrola phonemes as text is still available with the new --pho command-line option.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@248 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2010-06-28 15:50:12 +00:00
parent fb9338ad14
commit a9fedd94db
33 changed files with 1693 additions and 714 deletions
+4 -4
View File
@@ -1744,12 +1744,12 @@ static int LoadWavefile(FILE *f, const char *fname)
sr2 = Read4Bytes(f);
fseek(f,40,SEEK_SET);
if((sr1 != samplerate) || (sr2 != sr1*2))
if((sr1 != samplerate_native) || (sr2 != sr1*2))
{
#ifdef PLATFORM_WINDOWS
if(sr1 != samplerate)
if(sr1 != samplerate_native)
{
fprintf(f_errors,"Wrong samplerate %d, wants %d\n",sr1,samplerate);
fprintf(f_errors,"Wrong samplerate %d, wants %d\n",sr1,samplerate_native);
error("Wrong samplerate: %s",fname);
}
if(sr2 != sr1*2)
@@ -1764,7 +1764,7 @@ static int LoadWavefile(FILE *f, const char *fname)
if((fd_temp = mkstemp(fname_temp)) >= 0)
{
close(fd_temp);
sprintf(command,"sox \"%s%s.wav\" -r %d -c 1 -w %s polyphase\n",path_source,fname,samplerate,fname_temp);
sprintf(command,"sox \"%s%s.wav\" -r %d -c 1 -w %s polyphase\n",path_source,fname,samplerate_native,fname_temp);
if(system(command) < 0)
{
error("Failed to resample: %s",command);