mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 05:46:19 +00:00
[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:
+4
-4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user