Do variable vs field as AppleScript

David V Glasgow dvglasgow at gmail.com
Thu Jul 4 08:12:21 EDT 2019


Thanks, Bob, that’s what I suspected.

From the UI point of view, its just feels a bit clunky - combined with being uncertain about whether the speechrecognitionserver is still working or whether recognition has failed, and whether the human  needs to repeat the phrase or not.

Maybe I am conflating two issues, but I wondered whether I could get it all to be a bit more brisk.

Cheers,

David G

> On 3 Jul 2019, at 3:55 pm, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Relative to the speech recognition, and there only being several hundred iterations, I would say hardly. if it added 20 milliseconds to a process that takes many tens of minutes (I suspect the speech has to be uttered in real time) I hardly call that a delay. 
> 
> Bob S
> 
> 
>> On Jul 3, 2019, at 03:28 , David V Glasgow via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> I have a script which in the fullness of time will repeatedly (several hundred times) run a list of commands as an Applescript.  It will take a fair bit of time to loop through because each iteration involves speech recognition.
>> 
>> My question is, will there be any meaningful speed advantage to storing the AppleScript in a variable rather than field?  This doesn’t mean finishing all 340 iterations faster, because the slowdown is the human thinking about the question and giving a response.  I’m thinking about a bit more responsivity from 
>> 
>> tell application "SpeechRecognitionServer"
>> 	local tresult, choicesLanguageModel, titem
>> 	set choicesLanguageModel to {"false", "slightly true", "mainly true", "very true"}
>> set tPrompt to "item 6"
>> 	set tresult to listen for choicesLanguageModel with prompt tPrompt giving up after 30
>> 	say tresult
>> 	return tresult
>> end tell
>> 
>> (I should say that the line "set tPrompt to "item 6”” looks a bit weird because it is incremented under script control, and when that happens the indent is lost.)
>> 
>> I know I could test, but if someone just knows….
>> 
>> Cheers
>> 
>> David Glasgow
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list