Thread: [Soaplab-users] ACD outfile problem: how do you return a file? (soaplab2)
Brought to you by:
marsenger
From: Tom C. <tc...@cs...> - 2008-07-09 10:21:55
|
Hi, I'm trying to expose a Java program as a web service using soaplab2 (2.1.1), but I am unable to return the wav audio output file that it generates. It uses a -dumpAudio flag to output to a file, otherwise the audio is played on the server (sent to the audio stream - not ideal for a web service). This is how I have encoded the dumpAudio parameter in the ACD file: # -dumpAudio <file> flag string: dump_audio [ qualifier: dumpAudio standard: "Y" default: "output.wav" information: "dump audio to this file (default: output.wav)" comment: defaults comment: "display false" ] it's hidden from the user so will always output to a file. My outfile definition is: outfile: output [ comment: "mimetype audio/x-wav" comment: bindata comment: "make_url yes" ] but when I run the process, it succeeds but I am unable to access output.wav: -------------------------------------- Summary: Completed: Successfully Termination status: 0 Started: 2008-Jul-09 11:08:18 (BST) Ended: 2008-Jul-09 11:08:21 (BST) Duration: 0:00:03.210 Report: Name: text_to_speech.freetts Job ID: [text_to_speech.freetts]_4ca7ea84.11b07436c4e._7ffe Program and parameters: java -jar /opt/freetts-1.2.1/lib/freetts.jar -dumpAudio output.wav -text Hello World! -output /home/tc/apache-tomcat-6.0.16/temp/_R_/SANDBOX/[text_to_speech.freetts]_4ca7ea84.11b07436c4e._7ffe/o_output --- end of parameters Exit: 0 Standard output stream: Wrote synthesized speech to output.wav -------------------------------------- no URL or output is generated, only the "report" and "detailed_status". When I looking in the location above on the server there is the output file, but why is no URL generated? Am I doing something incorrect with the outfile definition? Is it possible to return the file via Spinet? Thanks for your help, Tom -- Tom Crick Mathematical Foundations Group Department of Computer Science University of Bath tc...@cs... http://www.cs.bath.ac.uk/tom/ |
From: Mahmut U. <ul...@eb...> - 2008-07-09 10:33:49
|
Hi Tom, > I'm trying to expose a Java program as a web service using soaplab2 > (2.1.1), but I am unable to return the wav audio output file that it > generates. It uses a -dumpAudio flag to output to a file, otherwise the > audio is played on the server (sent to the audio stream - not ideal for > a web service). This is how I have encoded the dumpAudio parameter in > the ACD file: > > # -dumpAudio <file> flag > string: dump_audio [ > qualifier: dumpAudio > standard: "Y" > default: "output.wav" > information: "dump audio to this file (default: output.wav)" > comment: defaults > comment: "display false" > ] > > it's hidden from the user so will always output to a file. My outfile > definition is: > > outfile: output [ > comment: "mimetype audio/x-wav" > comment: bindata > comment: "make_url yes" > ] It looks like you should combine above two options into one. your Java programs output seems not connected to the Soaplab service output. You should have something similar to the following option. # -dumpAudio <file> flag outfile: dump_audio [ qualifier: dumpAudio standard: "Y" default: "output.wav" information: "dump audio to this file (default: output.wav)" comment: defaults # comment: "display false" comment: "mimetype audio/x-wav" comment: bindata comment: "make_url yes" ] Regards, Mahmut > but when I run the process, it succeeds but I am unable to access > output.wav: > > -------------------------------------- > Summary: > Completed: Successfully > Termination status: 0 > Started: 2008-Jul-09 11:08:18 (BST) > Ended: 2008-Jul-09 11:08:21 (BST) > Duration: 0:00:03.210 > Report: > Name: text_to_speech.freetts > Job ID: [text_to_speech.freetts]_4ca7ea84.11b07436c4e._7ffe > Program and parameters: > java > -jar > /opt/freetts-1.2.1/lib/freetts.jar > -dumpAudio > output.wav > -text > Hello World! > -output > /home/tc/apache-tomcat-6.0.16/temp/_R_/SANDBOX/[text_to_speech.freetts]_4ca7ea84.11b07436c4e._7ffe/o_output > --- end of parameters > Exit: 0 > > Standard output stream: > Wrote synthesized speech to output.wav > -------------------------------------- > > no URL or output is generated, only the "report" and "detailed_status". > When I looking in the location above on the server there is the output > file, but why is no URL generated? Am I doing something incorrect with > the outfile definition? Is it possible to return the file via Spinet? |
From: Tom C. <tc...@cs...> - 2008-07-10 13:43:33
|
Mahmut Uludag wrote: >> I'm trying to expose a Java program as a web service using soaplab2 >> (2.1.1), but I am unable to return the wav audio output file that it >> generates. It uses a -dumpAudio flag to output to a file, otherwise the >> audio is played on the server (sent to the audio stream - not ideal for >> a web service). This is how I have encoded the dumpAudio parameter in >> the ACD file: >> >> # -dumpAudio <file> flag >> string: dump_audio [ >> qualifier: dumpAudio >> standard: "Y" >> default: "output.wav" >> information: "dump audio to this file (default: output.wav)" >> comment: defaults >> comment: "display false" >> ] >> >> it's hidden from the user so will always output to a file. My outfile >> definition is: >> >> outfile: output [ >> comment: "mimetype audio/x-wav" >> comment: bindata >> comment: "make_url yes" >> ] > > It looks like you should combine above two options into one. your Java > programs output seems not connected to the Soaplab service output. You > should have something similar to the following option. > > # -dumpAudio <file> flag > outfile: dump_audio [ > qualifier: dumpAudio > standard: "Y" > default: "output.wav" > information: "dump audio to this file (default: output.wav)" > comment: defaults > # comment: "display false" > comment: "mimetype audio/x-wav" > comment: bindata > comment: "make_url yes" > ] That works great Mahmut, thanks. The soaplab2 docs are slightly confusing with regards to how outfiles work, but this definitely makes sense now! Martin Senger also replied to an email I sent to the soaplab2-dev list, which reiterated how one should think about parameters, inputs and outputs of soaplab2 services. Regards, Tom |