Re: Speakable Item and SpeechRecognitionServer
Re: Speakable Item and SpeechRecognitionServer
- Subject: Re: Speakable Item and SpeechRecognitionServer
- From: Bruce Robertson <email@hidden>
- Date: Fri, 11 Dec 2009 12:26:25 -0800
On Dec 11, 2009, at 12:00 PM, Christopher Nebel wrote:
> On Dec 8, 2009, at 6:47 PM, Bruce Robertson wrote:
>
>> The problem statement is to read an arbitrary string of numbers and have them be recognized.
>>
>> The string might be preceded by a known string ("Find phone" ) but the solution must be able to recognize any following string of four numbers.
>>
>> There is no "set J"; it isn't known ahead of time.
>
> The functionality that "listen for" exposes is pretty dead-simple -- it is, as you've observed, a list of fixed phrases. (For a sufficiently small set of numbers, you could generate all the combinations, but that's hardly practical in this case.) The underlying C API *can* do something like you're describing: it lets you create a "language model", which is roughly equivalent in expressive power to a basic regular expression, so you could set up a model which is one of the words "one" through "nine", repeated any number of times. However, that's only available to C clients, and there are no plans to expose it in the scripting interface.
>
> The best you can do is to effectively do the model logic yourself -- in your case, sit in a loop recognizing single digits until you decide you're done. However, I expect you'd have to speak very slowly, since each digit is being recognized separately. (And I, too, ran into trouble trying to call "listen for" twice.)
>
>
> --Chris Nebel
> AppleScript Engineering
Thanks. Your suggestion seems a little conflicting though. Any ideas then about how to do the loop? _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden