Using peml:rule

Unlike some other posts, this one applies to the current version of Speech Server and the Beta.  One of the more obscure features of MSS is peml:rule, which is only briefly covered in the docs and only a handful of people know about.  In fact, not many people know about PEML in general - for more info look a ways back in my post where I discuss it in more depth.

peml:rule allows you to call a JScript function that replaces a given string with another string.  Have you ever noticed that Prompt projects can accept JScript and VBScript files?  This is the reason.  So, the string that is contained within the peml:rule element is passed to a function with the specified name in your JScript file.

The format of peml:rule is <peml:rule name="functionName">string to translate</peml:rule>.  The function you need to create must have the name you specified and takes a single variable.  You then return the translated string.

One possible use of this is to read phone numbers in a better way - for instance, saying "five five five five thousand" instead of "five five five five zero zero zero".

With the increased flexibility in managed speech applications, I don't see this feature as being very useful.  It still is obviously useful for SALT and VXML applications though.