mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 13:54:20 +00:00
Merge commit 'e4854a9cd6' into android
Conflicts: src/voices.cpp
This commit is contained in:
+1
-8
@@ -741,7 +741,6 @@ static int LoadSoundFile(const char *fname, int index)
|
||||
{
|
||||
int ix;
|
||||
int fd_temp;
|
||||
const char *resample;
|
||||
int header[3];
|
||||
char command[sizeof(fname2)+sizeof(fname2)+40];
|
||||
|
||||
@@ -755,17 +754,11 @@ static int LoadSoundFile(const char *fname, int index)
|
||||
fclose(f);
|
||||
f = NULL;
|
||||
|
||||
if(header[2] == samplerate)
|
||||
resample = "";
|
||||
else
|
||||
resample = "polyphase";
|
||||
|
||||
strcpy(fname_temp,"/tmp/espeakXXXXXX");
|
||||
if((fd_temp = mkstemp(fname_temp)) >= 0)
|
||||
{
|
||||
close(fd_temp);
|
||||
// sprintf(fname_temp,"%s.wav",tmpnam(NULL));
|
||||
sprintf(command,"sox \"%s\" -r %d -w -s -c1 %s %s\n", fname, samplerate, fname_temp, resample);
|
||||
sprintf(command,"sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
|
||||
if(system(command) == 0)
|
||||
{
|
||||
fname = fname_temp;
|
||||
|
||||
Reference in New Issue
Block a user