Running praat script in asp.net web app

160 views Asked by At

I am working on a ASP.net web application and I want it to coorperate with a Praat script. For example I have 2 params in the web app (String text, String filename) and I want to give these two params to the Script and it just write the content of "text" into the file named "filename". How could I manage this?

1

There are 1 answers

0
jja On

I'm not sure if I totally understand the question, but if you are asking how to run a praat script that writes a string to a file from a command line (which I'm guessing might be enough), having a script like this

# Contents of script.praat
form Output to file...
  sentence String Your awesome string with spaces
  word Filename /path/to/file
endform

# These are the same variable names as in the form
# but with a lowercase initial
string$ > 'filename$'

should do it. You can then run this command from the command line (if you are doing it from asp.net maybe something like this?) as

praat script.praat "some other string with spaces" new_filename.txt