mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-10 16:21:29 +00:00
[1.33] continued
git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@159 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
#include "translate.h"
|
||||
#include "prosodydisplay.h"
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/font.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/button.h"
|
||||
@@ -372,6 +377,7 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
int clause_tone;
|
||||
int clause_count;
|
||||
FILE *f;
|
||||
int fd_temp;
|
||||
char fname_temp[100];
|
||||
static int n_ph_list;
|
||||
static PHONEME_LIST ph_list[N_PH_LIST+1];
|
||||
@@ -383,11 +389,25 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
case T_RULES:
|
||||
case MENU_SPEAK_RULES:
|
||||
option_phonemes = 2;
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
strcpy(fname_temp,"/tmp/espeakXXXXXX");
|
||||
if((fd_temp = mkstemp(fname_temp)) >= 0)
|
||||
{
|
||||
close(fd_temp);
|
||||
|
||||
if((f = fopen(fname_temp,"w+")) != NULL)
|
||||
{
|
||||
f_trans = f; // write translation rule trace to a temp file
|
||||
}
|
||||
}
|
||||
#else
|
||||
strcpy(fname_temp,tmpnam(NULL));
|
||||
if((f = fopen(fname_temp,"w+")) != NULL)
|
||||
{
|
||||
f_trans = f; // write translation rule trace to a temp file
|
||||
}
|
||||
#endif
|
||||
case T_TRANSLATE:
|
||||
case MENU_SPEAK_TRANSLATE:
|
||||
option_multibyte = espeakCHARS_AUTO;
|
||||
|
||||
Reference in New Issue
Block a user