05-01-2013 12:33 PM - edited 03-14-2019 11:39 AM
Hello all,
New to scripting. Trying to write/modify some sample scripts. I had a question about the play prompt step.
Sometimes the value of a prompt variable is something like SP[gen\hour.wav] while other times it might be promptDir + "hour.wav"
What's the difference of the SP format vs the secondary format?
I tried to read the scripting guides, but couldn't find that info.
Thanks
Bill
Solved! Go to Solution.
05-01-2013 12:43 PM
Bill,
SP[prompt_file_name] is essentially a shortcut that says "go to the default system prompt folder and use this file". If you see a format like gen\hour.wav then you are pointing to a subdirectory in the system prompt folder and grabbing the file hour.wav.
If you see something like promptDir + "hour.wav" then promptDir is a variable that the interpreter will use to determine the location of the prompt file. Given the syntax provided, promptDir is likely a string variable. You could also have prompt variables, which will typically take the form of SP[prompt_file_name] or P[prompt_file_name].
I guess I should explain the P[prompt_file_name]. This is similar to SP[] but it is referencing the user prompt directory. Which is the directory you would store .wav files in when you upload custom prompts. So, think of SP[] as your "canned" or included prompt folder and P[] as your user prompt folder. You can use variables to dereference prompt locations as well.
HTH
-Bill (@ucguerrilla)
Please remember to rate helpful responses and identify
05-01-2013 12:43 PM
Bill,
SP[prompt_file_name] is essentially a shortcut that says "go to the default system prompt folder and use this file". If you see a format like gen\hour.wav then you are pointing to a subdirectory in the system prompt folder and grabbing the file hour.wav.
If you see something like promptDir + "hour.wav" then promptDir is a variable that the interpreter will use to determine the location of the prompt file. Given the syntax provided, promptDir is likely a string variable. You could also have prompt variables, which will typically take the form of SP[prompt_file_name] or P[prompt_file_name].
I guess I should explain the P[prompt_file_name]. This is similar to SP[] but it is referencing the user prompt directory. Which is the directory you would store .wav files in when you upload custom prompts. So, think of SP[] as your "canned" or included prompt folder and P[] as your user prompt folder. You can use variables to dereference prompt locations as well.
HTH
-Bill (@ucguerrilla)
Please remember to rate helpful responses and identify
05-01-2013 12:50 PM
Thanks Bill, big help!
05-02-2013 05:18 AM
One follow up question...
Just to confirm, when referencing promptDir + "hour.wav" that would be a String variable? So the Play Prompt step could use a String or Prompt variable?
05-02-2013 08:28 AM
billmatthews wrote:
Just to confirm, when referencing promptDir + "hour.wav" that would be a String variable?
Yes, a String variable.
billmatthews wrote:
So the Play Prompt step could use a String or Prompt variable?
Correct, either one is accepted, and also Documents work to.
If you hover your mouse over the input field, the tool tip tells you what it's expecting.
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
05-02-2013 08:51 AM
Thank you. The tool tip tip is especially helpful, I never noticed that.+5
05-02-2013 12:58 PM
Good stuff Mr. Holloway! (+5 from the peanut gallery)
-Bill (@ucguerrilla)
Please remember to rate helpful responses and identify
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide