[Mono-dev] Festival TTS Wrapper
Robert Jordan
robertj at gmx.net
Mon Oct 29 20:18:50 EDT 2007
buhochileno at gmail.com wrote:
> Hi R. Tyler:
>
> I subscribe other mail account to the mono-devel list becouse something
> was wronge with my previous account.
>
> Sorry to disapoint you, but my wrapper is not even a "server" call to
> the festival TTS, is more cheating :-), is only a wrapper for a C shared
> library that send the correct "echo $MESSAGE | festival --tts" :-) , I
> also see the posibility to try a more sofisticate wrapper, but as you
> say is to much complicate, so this is a working approach :-)
Your p/invoke function is potentially overflowing the stack.
It it also passing unparsed strings to the system() call:
int Speech(char* frase)
{
char command_final[50];
strcat(command_final, "echo ");
strcat(command_final, frase);
strcat(command_final, " | festival --tts");
system(command_final);
}
So why are you not coding this in C#? (see System.Diagnostics.Process
and System.Diagnostics.ProcessStartInfo.RedirectStandardInput).
Robert
More information about the Mono-devel-list
mailing list