J'essaie d'exécuter Festival text to speech à partir d'une application AIR 2.Suggestions pour exécuter Festival TTS à partir de l'application Flex4 Adobe AIR
Voici un exemple de code pour démarrer le bloc-notes
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="1024" height="768">
<fx:Script>
<![CDATA[
protected function button1_clickHandler(event:MouseEvent):void
{
var exe:File = new File("c:/Windows/notepad.exe");
var nativeProcess:NativeProcess = new NativeProcess();
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = exe;
var args:Vector.<String> = new Vector.<String>();
args.push("e:/temp/Hello.txt");
nativeProcessStartupInfo.arguments = args;
nativeProcess.start(nativeProcessStartupInfo);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button x="265" y="236" label="Hello Button" width="465" height="131" fontSize="30" click="button1_clickHandler(event)"/>
</s:WindowedApplication>
La commande que je veux courir sur le bouton, cliquez ici:
c:\FestivalTTS>echo "Hello world" | festival --tts
ou commencer festival comme celui-ci:
c:\FestivalTTS>festival.exe --pipe
, puis tapez ce qui suit dans l'invite de commande Festival
(SayText "Hello world.")
comment est-ce que je peux diriger des commandes dans le NativeProcessStartupInfo comme c: \ FestivalTTS> echo "Hello world" | festival --tts – iceman