www.pudn.com > TAPIOfControl.rar > AdSapiGr.pas


(***** BEGIN LICENSE BLOCK ***** 
 * Version: MPL 1.1 
 * 
 * The contents of this file are subject to the Mozilla Public License Version 
 * 1.1 (the "License"); you may not use this file except in compliance with 
 * the License. You may obtain a copy of the License at 
 * http://www.mozilla.org/MPL/ 
 * 
 * Software distributed under the License is distributed on an "AS IS" basis, 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
 * for the specific language governing rights and limitations under the 
 * License. 
 * 
 * The Original Code is TurboPower Async Professional 
 * 
 * The Initial Developer of the Original Code is 
 * TurboPower Software 
 * 
 * Portions created by the Initial Developer are Copyright (C) 1991-2002 
 * the Initial Developer. All Rights Reserved. 
 * 
 * Contributor(s): 
 * 
 * ***** END LICENSE BLOCK ***** *) 
 
{*********************************************************} 
{*                   ADSAPIGR.PAS 4.06                   *} 
{*********************************************************} 
{* SAPI grammar definitions                              *} 
{*********************************************************} 
 
{Global defines potentially affecting this unit} 
{$I AWDEFINE.INC} 
 
unit AdSapiGr; 
 
interface 
 
resourcestring 
  { AskFor xxx Prompts } 
  ApdAskAreaCode = 'What is the area code?'; 
  ApdAskLastFour = 'What are the last four digits of the phone number?'; 
  ApdAskNextThree = 'What are the next three digits of the phone number?'; 
  ApdCannotGoBack = 'Cannot go back.'; 
  ApdCannotHangUp = 'Cannot hang up now.'; 
  ApdHangingUp = 'Goodbye.'; 
  ApdHelp = 'This is help.'; 
  ApdHelp2 = 'This is additional help.'; 
  ApdHelpVerify = 'You can speak yes or no, or press 1 for yes, or 2 for no.'; 
  ApdGoingBack = 'Going back.'; 
  ApdMain = 'Please say something.'; 
  ApdMain2 = 'Please say the something. - Shorter prompt'; 
  ApdMaxSpeed = 'I am speaking as fast as I can.'; 
  ApdMinSpeed = 'I am speaking as slowly as I can.'; 
  ApdOperator = 'Connecting to an operator.'; 
  ApdNoOperator = 'An operator is not available.'; 
  ApdNoSpeedChange = 'Cannot change speed.'; 
  ApdSpeakingFaster = 'Speaking faster.'; 
  ApdSpeakingSlower = 'Speaking slower.'; 
  ApdTooFewDigits = 'Not enough digits for the extension.'; 
  ApdTooManyDigits = 'Too many digits for the extension.'; 
  ApdUnrecognized = 'Sorry, I didn''t understand.'; 
  ApdVerifyPost = 'Is this correct?'; 
  ApdVerifyPre = 'I heard:'; 
  ApdWhere = 'You are somewhere.'; 
  ApdWhere2 = 'You are somewhere - Shorter prompt.'; 
  ApdYouHaveSpelled = 'You have spelled: '; 
 
  { Error Codes } 
  { SAPI Engine } 
  ecApdNoSS     = 'Speech synthesis engine is not assigned'; 
  ecApdNoSR     = 'Speech recognition engine is not assigned'; 
  ecApdBadIndex = 'Invalid speech engine'; 
  ecNoSREngines = 'No speech recognition engines are installed'; 
  ecNoSSEngines = 'No speech synthesis engines are installed'; 
  { SAPI Phone } 
  ecApdNoSapiEngine = 'No SAPI engine'; 
  ecApdNoPrompts = 'No prompts'; 
  ecApdBadDeviceNum = 'Unable to set device number: '; 
  ecApdCannotCreateCOM = 'Cannot create COM Object'; 
  ecApdNotPhone = 'SAPI Engine is not phone optimized'; 
 
  { More error strings } 
  {SS} 
  ApdStrTTSERR_INVALIDINTERFACE          = 'Invalid interface'; 
  ApdStrTTSERR_OUTOFDISK                 = 'Out of disk space'; 
  ApdStrTTSERR_NOTSUPPORTED              = 'Not supported'; 
  ApdStrTTSERR_VALUEOUTOFRANGE           = 'Value out of range'; 
  ApdStrTTSERR_INVALIDWINDOW             = 'Invalid window'; 
  ApdStrTTSERR_INVALIDPARAM              = 'Invalid parameter'; 
  ApdStrTTSERR_INVALIDMODE               = 'Invalid mode'; 
  ApdStrTTSERR_INVALIDKEY                = 'Invalid key'; 
  ApdStrTTSERR_WAVEFORMATNOTSUPPORTED    = 'Wave format not supported'; 
  ApdStrTTSERR_INVALIDCHAR               = 'Invalid character'; 
  ApdStrTTSERR_QUEUEFULL                 = 'Queue full'; 
  ApdStrTTSERR_WAVEDEVICEBUSY            = 'Wave device busy'; 
  ApdStrTTSERR_NOTPAUSED                 = 'Not paused'; 
  ApdStrTTSERR_ALREADYPAUSED             = 'Already paused'; 
  {SR} 
  ApdStrSRERR_OUTOFDISK                  = 'Out of disk space'; 
  ApdStrSRERR_NOTSUPPORTED               = 'Not supported'; 
  ApdStrSRERR_NOTENOUGHDATA              = 'Not enough data'; 
  ApdStrSRERR_VALUEOUTOFRANGE            = 'Value out of range'; 
  ApdStrSRERR_GRAMMARTOOCOMPLEX          = 'Grammar too complex'; 
  ApdStrSRERR_GRAMMARWRONGTYPE           = 'Grammar is of the wrong type'; 
  ApdStrSRERR_INVALIDWINDOW              = 'Invalid window'; 
  ApdStrSRERR_INVALIDPARAM               = 'Invalid parameter'; 
  ApdStrSRERR_INVALIDMODE                = 'Invalid mode'; 
  ApdStrSRERR_TOOMANYGRAMMARS            = 'Too many grammars'; 
  ApdStrSRERR_INVALIDLIST                = 'Invalid list'; 
  ApdStrSRERR_WAVEDEVICEBUSY             = 'Wave device busy'; 
  ApdStrSRERR_WAVEFORMATNOTSUPPORTED     = 'Wave format not supported'; 
  ApdStrSRERR_INVALIDCHAR                = 'Invalid character'; 
  ApdStrSRERR_GRAMTOOCOMPLEX             = 'Grammar too complex'; 
  ApdStrSRERR_GRAMTOOLARGE               = 'Grammar too large'; 
  ApdStrSRERR_INVALIDINTERFACE           = 'Invalid interface'; 
  ApdStrSRERR_INVALIDKEY                 = 'Invalid key'; 
  ApdStrSRERR_INVALIDFLAG                = 'Invalid flag'; 
  ApdStrSRERR_GRAMMARERROR               = 'Grammar error'; 
  ApdStrSRERR_INVALIDRULE                = 'Invalid rule'; 
  ApdStrSRERR_RULEALREADYACTIVE          = 'Rule already active'; 
  ApdStrSRERR_RULENOTACTIVE              = 'Rule not active'; 
  ApdStrSRERR_NOUSERSELECTED             = 'No users selected'; 
  ApdStrSRERR_BAD_PRONUNCIATION          = 'Bad pronunciation'; 
  ApdStrSRERR_DATAFILEERROR              = 'Data file error'; 
  ApdStrSRERR_GRAMMARALREADYACTIVE       = 'Grammar already active'; 
  ApdStrSRERR_GRAMMARNOTACTIVE           = 'Grammar not active'; 
  ApdStrSRERR_GLOBALGRAMMARALREADYACTIVE = 'Global grammar already active'; 
  ApdStrSRERR_LANGUAGEMISMATCH           = 'Language mismatch'; 
  ApdStrSRERR_MULTIPLELANG               = 'Multiple languages'; 
  ApdStrSRERR_LDGRAMMARNOWORDS           = 'No words in grammar'; 
  ApdStrSRERR_NOLEXICON                  = 'No lexicon'; 
  ApdStrSRERR_SPEAKEREXISTS              = 'Speaker exists'; 
  ApdStrSRERR_GRAMMARENGINEMISMATCH      = 'Grammar engine mismatch'; 
  ApdStrSRERR_BOOKMARKEXISTS             = 'Bookmark exists'; 
  ApdStrSRERR_BOOKMARKDOESNOTEXIST       = 'Bookmark does not exist'; 
  ApdStrSRERR_MICWIZARDCANCELED          = 'Microphone wizard cancelled'; 
  ApdStrSRERR_WORDTOOLONG                = 'Word too long'; 
  ApdStrSRERR_BAD_WORD                   = 'Bad word'; 
  ApdStrE_WRONGTYPE                      = 'Wrong type'; 
  ApdStrE_BUFFERTOOSMALL                 = 'Bufer too small'; 
  ApdStrE_UNKNOWN                        = 'Unknown error'; 
 
  { APRO SAPI Errors } 
  ApdStrE_CANNOTCREATESS                 = 'Unable to create speech ' + 
                                           'synthesis interface'; 
  ApdStrE_CANNOTCREATESR                 = 'Unable to create speech ' + 
                                           'recognition interface'; 
  ApdStrE_CANNOTSETSPEAKER               = 'Cannot set speech recognition ' + 
                                           'speaker'; 
  ApdStrE_CANNOTSETMIC                   = 'Cannot set microphone'; 
  ApdStrE_NOSAPI4                        = 'SAPI 4 Engine was not found'; 
   
  { Other things } 
  scApdTrainGeneral = 'General Training'; 
  scApdTrainMic     = 'Microphone Training'; 
  scApdTrainGrammar = 'Phrase Training'; 
 
const 
  scApdDefaultUser : string = 'APRO User'; 
  scApdDefaultMic  : string = 'Default Microphone'; 
  scApdTelMic      : string = 'Telephone'; 
   
  { Default grammars used by the TApdSapiPhone component - 
    These are declared as constants.  It appears that if resource strings 
    are used, the grammars wind up truncated. } 
 
  { DefaultPhoneGrammar - This grammar is used as a skeleton by all the 
    AskFor methods in the TApdSapiPhone component.  It provides a basic 
    driver for the "ask the user for something" loop.  It provides a link to 
     which is used to provide specific information needed for the 
    data being asked. } 
     
  ApdDefaultPhoneGrammar : string = 
    '[Grammar]' + ^M^J + 
    'LangId=1033' + ^M^J + 
    'Type=CFG' + ^M^J + 
    '' + ^M^J + 
    '[Prompts]' + ^M^J + 
    '; you need to modify the next few prompts' + ^M^J + 
    'Main=Please say something.' + ^M^J + 
    ';Main.2=Please say the something. - Shorter prompt' + ^M^J + 
    'Where=You are somewhere.' + ^M^J + 
    'Help=This is help.' + ^M^J + 
    '' + ^M^J + 
    'VerifyPre=I heard:' + ^M^J + 
    'VerifyPost=Is this correct?' + ^M^J + 
    'Unrecognized=Sorry, I didn''t understand.' + ^M^J + 
    'SpeakingFaster=Speaking faster.' + ^M^J + 
    'SpeakingSlower=Speaking slower.' + ^M^J + 
    'HelpVerify=You can speak yes or no, or press 1 for yes, or 2 for no.' + 
        ^M^J + 
    '' + ^M^J + 
    '[Settings]' + ^M^J + 
    'Verify=0' + ^M^J + 
    '; verification on grammars just respeaks the recognize string' + ^M^J + 
    '' + ^M^J + 
    '; you usually wont need to change wha''t below here' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=(DefaultResponses)' + ^M^J + 
    '' + ^M^J + 
    '; **********************************************************************' + 
        ^M^J + 
    '; all controls should have these default responses' + ^M^J + 
    '[(DefaultResponses)]' + ^M^J + 
    '=[opt] (DefaultJunkBegin) (ValidDefault) [opt] (DefaultJunkEnd)' + ^M^J + 
    '' + ^M^J + 
    '[(ValidDefault)]' + ^M^J + 
    '-3=(AskOperator)' + ^M^J + 
    '-4=(AskHangUp)' + ^M^J + 
    '-5=(AskBack)' + ^M^J + 
    '-10=(AskWhere)' + ^M^J + 
    '-11=(AskHelp)' + ^M^J + 
    '-12=(AskRepeat)' + ^M^J + 
    '-13=(AskSpeakFaster)' + ^M^J + 
    '-14=(AskSpeakSlower)' + ^M^J + 
    '' + ^M^J + 
    '[(DefaultJunkBegin)]' + ^M^J + 
    '=could you' + ^M^J + 
    '=I want [opt] to' + ^M^J + 
    '=please' + ^M^J + 
    '' + ^M^J + 
    '[(DefaultJunkEnd)]' + ^M^J + 
    '=please' + ^M^J + 
    '=now [opt] please' + ^M^J + 
    '' + ^M^J + 
    '[(AskOperator)]' + ^M^J + 
    '=[opt] (TalkToOperator) (OperatorName)' + ^M^J + 
    '' + ^M^J + 
    '[(TalkToOperator)]' + ^M^J + 
    '=talk to' + ^M^J + 
    '=speak with' + ^M^J + 
    '=connect me to' + ^M^J + 
    '=give me' + ^M^J + 
    '' + ^M^J + 
    '[(OperatorName)]' + ^M^J + 
    '=[opt] an operator' + ^M^J + 
    '=someone real' + ^M^J + 
    '=real person' + ^M^J + 
    '=living person' + ^M^J + 
    '=warm body' + ^M^J + 
    '' + ^M^J + 
    '[(AskHangUp)]' + ^M^J + 
    '=hang up' + ^M^J + 
    '=goodbye' + ^M^J + 
    '' + ^M^J + 
    '[(AskBack)]' + ^M^J + 
    '=scratch that' + ^M^J + 
    '=go back' + ^M^J + 
    '=undo that' + ^M^J + 
    '=I made a mistake' + ^M^J + 
    '=never mind' + ^M^J + 
    '' + ^M^J + 
    '[(AskWhere)]' + ^M^J + 
    '=where am I' + ^M^J + 
    '=where were we' + ^M^J + 
    '=what am I doing' + ^M^J + 
    '=what''s going on' + ^M^J + 
    '' + ^M^J + 
    '[(AskHelp)]' + ^M^J + 
    '=[opt] some help [opt] me' + ^M^J + 
    '=give me help' + ^M^J + 
    '=what can I say' + ^M^J + 
    '=list [opt] voice commands' + ^M^J + 
    '=what are my options' + ^M^J + 
    '=tell me what I can say' + ^M^J + 
    '' + ^M^J + 
    '[(AskRepeat)]' + ^M^J + 
    '=what' + ^M^J + 
    '=what did you say' + ^M^J + 
    '=repeat [opt] that' + ^M^J + 
    '=huh' + ^M^J + 
    '' + ^M^J + 
    '[(AskSpeakFaster)]' + ^M^J + 
    '=speak faster' + ^M^J + 
    '=talk faster' + ^M^J + 
    '=speak more quickly' + ^M^J + 
    '=talk more quickly' + ^M^J + 
    '' + ^M^J + 
    '[(AskSpeakSlower)]' + ^M^J + 
    '=speak slower' + ^M^J + 
    '=talk slower' + ^M^J + 
    '=speak more slowly' + ^M^J + 
    '=talk more slowly' + ^M^J + 
    '' + ^M^J + 
    '; entries necessary for verification to work' + ^M^J + 
    '[]' + ^M^J + 
    '=(YesNo)' + ^M^J + 
    '=(DefaultResponses)' + ^M^J; 
 
  { AskForDateGrammar - This grammar provides everything needed for asking 
    the user for a date. } 
 
  ApdAskForDateGrammar : string = 
    '[]' + ^M^J + 
    '=(TheDate)' + ^M^J + 
    '' + ^M^J + 
    '[(TheDate)]' + ^M^J + 
    '-500=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '// Double-number cominations, like "ninteen sixty"' + ^M^J + 
    '= ' + ^M^J + 
    '= oh "0" <1_9>' + ^M^J + 
    '= hundred "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=january' + ^M^J + 
    '=february' + ^M^J + 
    '=march' + ^M^J + 
    '=april' + ^M^J + 
    '=may' + ^M^J + 
    '=june' + ^M^J + 
    '=july' + ^M^J + 
    '=august' + ^M^J + 
    '=september' + ^M^J + 
    '=october' + ^M^J + 
    '=november' + ^M^J + 
    '=december' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=1' + ^M^J + 
    '=2' + ^M^J + 
    '=3' + ^M^J + 
    '=4' + ^M^J + 
    '=5' + ^M^J + 
    '=6' + ^M^J + 
    '=7' + ^M^J + 
    '=8' + ^M^J + 
    '=9' + ^M^J + 
    '=10' + ^M^J + 
    '=11' + ^M^J + 
    '=12' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '= " " ' + ^M^J + 
    '= " " ' + ^M^J + 
    '=[opt]  ' + ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=' + ^M^J + 
    '= [opt] ' + ^M^J + 
    '=<1_31>' + ^M^J + 
    '=' + ^M^J + 
    '=", " ' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=<32_99>' + ^M^J + 
    '<1_31>=<1_9>' + ^M^J + 
    '<1_31>=<10_19>' + ^M^J + 
    '<1_31>=<20_31>' + ^M^J + 
    '// Double-number cominations, like "ninteen sixty"' + ^M^J + 
    '= ' + ^M^J + 
    '= oh "0" <1_9>' + ^M^J + 
    '= hundred "00"' + ^M^J + 
    '=next' + ^M^J + 
    '=last' + ^M^J + 
    '=monday' + ^M^J + 
    '=tuesday' + ^M^J + 
    '=wednesday' + ^M^J + 
    '=thursday' + ^M^J + 
    '=friday' + ^M^J + 
    '=saturday' + ^M^J + 
    '=sunday' + ^M^J + 
    '=today' + ^M^J + 
    '=yesterday' + ^M^J + 
    '=tomorrow' + ^M^J + 
    '=week' + ^M^J + 
    '=month' + ^M^J + 
    '' + ^M^J + 
    '// Less than 1,000,000,000,000,000, not padded with zeros' + ^M^J + 
    '= ' + 
        ^M^J + 
    '= ' + 
        ^M^J + 
    '=trillion "000000000000"' + ^M^J + 
    '=trillion [opt] and ' + 
        ^M^J + 
    '// Less than 1,000,000,000,000, padded with zeros' + ^M^J + 
    '="000" ' + ^M^J + 
    '=billion [opt] and "001" ' + 
        ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=billion "000000000"' + ^M^J + 
    '=billion [opt] and ' + ^M^J + 
    '// Less than 1,000,000,000,000, not padded with zeros' + ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=billion "000000000"' + ^M^J + 
    '=billion [opt] and ' + ^M^J + 
    '// Less than 1,000,000,000, padded with zeros' + ^M^J + 
    '="000" ' + ^M^J + 
    '=million [opt] and "001" ' + ^M^J + 
    '= ' + ^M^J + 
    '=million "000000"' + ^M^J + 
    '=million [opt] and ' + ^M^J + 
    '// Less than 1,000,000,000, not padded with zeros' + ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=million "000000"' + ^M^J + 
    '=million [opt] and ' + ^M^J + 
    '// Less than 1,000,000, padded with zeros' + ^M^J + 
    '="000" ' + ^M^J + 
    '=thousand [opt] and "001" ' + ^M^J + 
    '= ' + ^M^J + 
    '=thousand "000"' + ^M^J + 
    '=thousand [opt] and ' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '= hundredth "00"' + ^M^J + 
    '= trillionth "000000000000"' + ^M^J + 
    '= trillion [opt] and ' + 
        '' + ^M^J + 
    '= trillionth "000000000000"' + ^M^J + 
    '= trillion [opt] and ' + 
      '' + ^M^J + 
    '="000" ' + ^M^J + 
    '=billion [opt] and "001" ' + 
        '' + ^M^J + 
    '= ' + 
        '' + ^M^J + 
    '= ' + 
        '' + ^M^J + 
    '=billionth "000000000"' + ^M^J + 
    '=billion [opt] and ' + 
        '' + ^M^J + 
    '= ' + 
        '' + ^M^J + 
    '= ' + 
        '' + ^M^J + 
    '=billionth "000000000"' + ^M^J + 
    '=billion [opt] and ' + 
        '' + ^M^J + 
    '="000" ' + ^M^J + 
    '=million [opt] and "001" ' + 
        '' + ^M^J + 
    '= ' + 
        ^M^J + 
    '=millionth "000000"' + ^M^J + 
    '=million [opt] and ' + 
         ^M^J + 
    '= ' + 
        ^M^J + 
    '= ' + 
        ^M^J + 
    '=millionth "000000"' + ^M^J + 
    '=million [opt] and ' + 
        ^M^J + 
    '// Ordinal Less than 1,000,000, padded with zeros, without ending' + ^M^J + 
    '="000" ' + ^M^J + 
    '=thousand [opt] and "001" ' + 
        ^M^J + 
    '= ' + ^M^J + 
    '=thousandth "000"' + ^M^J + 
    '=thousandth [opt] and ' + 
        ^M^J + 
    '// Ordinal Less than 1,000,000, not padded with zeros, without ending' + 
        ^M^J + 
    '=<1_9> thousandth "000"' + ^M^J + 
    '=<1_9> thousand [opt] and ' + 
        ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=thousandth "000"' + ^M^J + 
    '=thousand [opt] and ' + ^M^J + 
    '// Ordinal Less than 1000, padded with zeros, without ending' + ^M^J + 
    '="0" ' + ^M^J + 
    '=' + ^M^J + 
    '// Ordinal Less than 1000, not padded with zeros, without ending' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[<1_9>]' + ^M^J + 
    '<1_9>=1' + ^M^J + 
    '<1_9>=2' + ^M^J + 
    '<1_9>=3' + ^M^J + 
    '<1_9>=4' + ^M^J + 
    '<1_9>=5' + ^M^J + 
    '<1_9>=6' + ^M^J + 
    '<1_9>=7' + ^M^J + 
    '<1_9>=8' + ^M^J + 
    '<1_9>=9' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=first "1"' + ^M^J + 
    '=second "2"' + ^M^J + 
    '=third "3"' + ^M^J + 
    '=fourth "4"' + ^M^J + 
    '=fifth "5"' + ^M^J + 
    '=sixth "6"' + ^M^J + 
    '=seventh "7"' + ^M^J + 
    '=eighth "8"' + ^M^J + 
    '=ninth "9"' + ^M^J + 
    '' + ^M^J + 
    '[<0_9>]' + ^M^J + 
    '<0_9>=zero "0"' + ^M^J + 
    '<0_9>=oh "0"' + ^M^J + 
    '<0_9>=<1_9>' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Ordinal Zero through nine, without ending' + ^M^J + 
    '=zeroth "0"' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[<10_19>]' + ^M^J + 
    '<10_19>=10' + ^M^J + 
    '<10_19>=11' + ^M^J + 
    '<10_19>=12' + ^M^J + 
    '<10_19>=13' + ^M^J + 
    '<10_19>=14' + ^M^J + 
    '<10_19>=15' + ^M^J + 
    '<10_19>=16' + ^M^J + 
    '<10_19>=17' + ^M^J + 
    '<10_19>=18' + ^M^J + 
    '<10_19>=19' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=tenth "10"' + ^M^J + 
    '=eleventh "11"' + ^M^J + 
    '=twelfth "12"' + ^M^J + 
    '=thirteenth "13"' + ^M^J + 
    '=fourteenth "14"' + ^M^J + 
    '=fifteenth "15"' + ^M^J + 
    '=sixteenth "16"' + ^M^J + 
    '=seventeenth "17"' + ^M^J + 
    '=eighteenth "18"' + ^M^J + 
    '=nineteenth "19"' + ^M^J + 
    '' + ^M^J + 
    '[<20_99>]' + ^M^J + 
    '<20_99>=<20_31>' + ^M^J + 
    '<20_99>=<32_99>' + ^M^J + 
    '' + ^M^J + 
    '[<20_31>]' + ^M^J + 
    '<20_31>=20' + ^M^J + 
    '<20_31>=twenty "2" <1_9>' + ^M^J + 
    '<20_31>=30' + ^M^J + 
    '' + ^M^J + 
    '[<32_99>]' + ^M^J + 
    '<32_99>=thirty "3" <1_9>' + ^M^J + 
    '<32_99>=forty "40"' + ^M^J + 
    '<32_99>=forty "4" <1_9>' + ^M^J + 
    '<32_99>=fifty "50"' + ^M^J + 
    '<32_99>=fifty "5" <1_9>' + ^M^J + 
    '<32_99>=sixty "60"' + ^M^J + 
    '<32_99>=sixty "6" <1_9>' + ^M^J + 
    '<32_99>=seventy "70"' + ^M^J + 
    '<32_99>=seventy "7" <1_9>' + ^M^J + 
    '<32_99>=eighty "80"' + ^M^J + 
    '<32_99>=eighty "8" <1_9>' + ^M^J + 
    '<32_99>=ninety "90"' + ^M^J + 
    '<32_99>=ninety "9" <1_9>' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=twentieth "20"' + ^M^J + 
    '=twenty "2" ' + ^M^J + 
    '=thirtieth "30"' + ^M^J + 
    '=thirty "3" ' + ^M^J + 
    '=fortieth "40"' + ^M^J + 
    '=forty "4" ' + ^M^J + 
    '=fiftieth "50"' + ^M^J + 
    '=fifty "5" ' + ^M^J + 
    '=sixtieth "60"' + ^M^J + 
    '=sixty "6" ' + ^M^J + 
    '=seventieth "70"' + ^M^J + 
    '=seventy "7" ' + ^M^J + 
    '=eightieth "80"' + ^M^J + 
    '=eighty "8" ' + ^M^J + 
    '=ninetieth "90"' + ^M^J + 
    '=ninety "9" ' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=<20_99>' + ^M^J + 
    '=<10_19>' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=hundred "1" ' + ^M^J + 
    '=<1_9> ' + ^M^J + 
    '=hundred [opt] and ' + ^M^J + 
    '=hundred "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=hundred "1" ' + ^M^J + 
    '=<1_9> hundred [opt] and ' + ^M^J + 
    '=<1_9> hundredth "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less that 100, not padded with zeros' + ^M^J + 
    '=<1_9>' + ^M^J + 
    '=' + ^M^J + 
    '=zero "0"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Ordinal, Less that 100, not padded with zeros, without ending' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '=zeroeth "0"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less that 100, padded with zeros' + ^M^J + 
    '="0" <1_9>' + ^M^J + 
    '=' + ^M^J + 
    '=zero "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Ordinal Less that 100, padded with zeros, without ending' + ^M^J + 
    '="0" ' + ^M^J + 
    '=' + ^M^J + 
    '=zeroeth "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less than 1000, not padded with zeros' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less than 1000, padded with zeros' + ^M^J + 
    '="0" ' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less than 1,000,000, not padded with zeros' + ^M^J + 
    '=<1_9> thousand "000"' + ^M^J + 
    '=<1_9> thousand [opt] and ' + ^M^J + 
    '= ' + ^M^J + 
    '= ' + ^M^J + 
    '=thousand "000"' + ^M^J + 
    '=thousand [opt] and ' + ^M^J; 
 
  ApdAskForExtensionGrammar : string = 
    '[]' + ^M^J + 
    '=(Extension)' + ^M^J + 
    '' + ^M^J + 
    '[(Extension)]' + ^M^J + 
    '-400=(ExtensionDigits)' + ^M^J + 
    '' + ^M^J + 
    '[(ExtensionDigits)]' + ^M^J + 
    '=0' + ^M^J + 
    '=1' + ^M^J + 
    '=2' + ^M^J + 
    '=3' + ^M^J + 
    '=4' + ^M^J + 
    '=5' + ^M^J + 
    '=6' + ^M^J + 
    '=7' + ^M^J + 
    '=8' + ^M^J + 
    '=9' + ^M^J; 
 
  ApdAskForPhoneNumberGrammar : string = 
    '[]' + ^M^J + 
    '=(GetPhoneNumber)' + ^M^J + 
    '' + ^M^J + 
    '[(GetPhoneNumber)]' + ^M^J + 
    '-600=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=area code  [opt]  "-" ' + 
        ' [opt]  "-" ' + ^M^J + 
    '= [opt]  "-" ' + ^M^J + 
    '= [opt]  "-"  [opt] ' + 
        ' "-" ' + ^M^J + 
    '=1  [opt]  "-"  ' + 
        '[opt]  "-" ' + ^M^J + 
    '=1 8 hundred "00-"  [opt]  "-" ' + 
        '' + ^M^J + 
    '=1 9 hundred "00-"  [opt]  "-" ' + 
        '' + ^M^J + 
{   '= one one [opt]  "011-"  ' + 
        '[opt]  "-" ' + ^M^J + 
    '=X. "x" [1+] <0_9>' + ^M^J + 
    '=extension "x" [1+] <0_9>' + ^M^J + } 
    '=<0_9> <0_9> <0_9>' + ^M^J + 
    '=<0_9> ' + ^M^J + 
    '=' + ^M^J + 
    '=<0_9> ' + ^M^J + 
    '= ' + ^M^J + 
    '=' + ^M^J + 
    '=<0_9> <0_9>' + ^M^J + 
    '=hundred "00"' + ^M^J + 
    '=-\dash' + ^M^J + 
    '=dash' + ^M^J + 
    '=/\slash' + ^M^J + 
    '=slash' + ^M^J + 
    '=zero' + ^M^J + 
    '=oh' + ^M^J + 
    '' + ^M^J + 
    '[<1_9>]' + ^M^J + 
    '<1_9>=1' + ^M^J + 
    '<1_9>=2' + ^M^J + 
    '<1_9>=3' + ^M^J + 
    '<1_9>=4' + ^M^J + 
    '<1_9>=5' + ^M^J + 
    '<1_9>=6' + ^M^J + 
    '<1_9>=7' + ^M^J + 
    '<1_9>=8' + ^M^J + 
    '<1_9>=9' + ^M^J + 
    '' + ^M^J + 
    '[<0_9>]' + ^M^J + 
    '<0_9>=zero "0"' + ^M^J + 
    '<0_9>=oh "0"' + ^M^J + 
    '<0_9>=<1_9>' + ^M^J + 
    '' + ^M^J + 
    '[<10_19>]' + ^M^J + 
    '<10_19>=10' + ^M^J + 
    '<10_19>=11' + ^M^J + 
    '<10_19>=12' + ^M^J + 
    '<10_19>=13' + ^M^J + 
    '<10_19>=14' + ^M^J + 
    '<10_19>=15' + ^M^J + 
    '<10_19>=16' + ^M^J + 
    '<10_19>=17' + ^M^J + 
    '<10_19>=18' + ^M^J + 
    '<10_19>=19' + ^M^J + 
    '' + ^M^J + 
    '[<20_99>]' + ^M^J + 
    '<20_99>=<20_31>' + ^M^J + 
    '<20_99>=<32_99>' + ^M^J + 
    '' + ^M^J + 
    '[<20_31>]' + ^M^J + 
    '<20_31>=20' + ^M^J + 
    '<20_31>=twenty "2" <1_9>' + ^M^J + 
    '<20_31>=30' + ^M^J + 
    '' + ^M^J + 
    '[<32_99>]' + ^M^J + 
    '<32_99>=thirty "3" <1_9>' + ^M^J + 
    '<32_99>=40' + ^M^J + 
    '<32_99>=forty "4" <1_9>' + ^M^J + 
    '<32_99>=50' + ^M^J + 
    '<32_99>=fifty "5" <1_9>' + ^M^J + 
    '<32_99>=60' + ^M^J + 
    '<32_99>=sixty "6" <1_9>' + ^M^J + 
    '<32_99>=70' + ^M^J + 
    '<32_99>=seventy "7" <1_9>' + ^M^J + 
    '<32_99>=80' + ^M^J + 
    '<32_99>=eighty "8" <1_9>' + ^M^J + 
    '<32_99>=90' + ^M^J + 
    '<32_99>=ninety "9" <1_9>' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=<20_99>' + ^M^J + 
    '=<10_19>' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=' + ^M^J + 
    '=' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '=hundred "1" ' + ^M^J + 
    '=<1_9> ' + ^M^J + 
    '=hundred [opt] and ' + ^M^J + 
    '=hundred "00"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less that 100, not padded with zeros' + ^M^J + 
    '=<1_9>' + ^M^J + 
    '=' + ^M^J + 
    '=zero "0"' + ^M^J + 
    '' + ^M^J + 
    '[]' + ^M^J + 
    '// Less that 100, padded with zeros' + ^M^J + 
    '="0" <1_9>' + ^M^J + 
    '=' + ^M^J + 
    '=zero "00"' + ^M^J; 
 
  ApdAskForSpellingGrammar : string = 
    '[]' + ^M^J + 
    '=(Spelling)' + ^M^J + 
    '' + ^M^J + 
    '[(Spelling)]' + ^M^J + 
    '-200=(Letter)' + ^M^J + 
    '-201=(DoneSpelling)' + ^M^J + 
    '-202=(EraseSpelling)' + ^M^J + 
    '-203=(SpellingCorrection)' + ^M^J + 
    '-204=(WhatHaveISpelled)' + ^M^J + 
    '' + ^M^J + 
    '[(Letter)]' + ^M^J + 
    '=A' + ^M^J + 
    '=B' + ^M^J + 
    '=C' + ^M^J + 
    '=D' + ^M^J + 
    '=E' + ^M^J + 
    '=F' + ^M^J + 
    '=G' + ^M^J + 
    '=H' + ^M^J + 
    '=I' + ^M^J + 
    '=J' + ^M^J + 
    '=K' + ^M^J + 
    '=L' + ^M^J + 
    '=M' + ^M^J + 
    '=N' + ^M^J + 
    '=O' + ^M^J + 
    '=P' + ^M^J + 
    '=Q' + ^M^J + 
    '=R' + ^M^J + 
    '=S' + ^M^J + 
    '=T' + ^M^J + 
    '=U' + ^M^J + 
    '=V' + ^M^J + 
    '=W' + ^M^J + 
    '=X' + ^M^J + 
    '=Y' + ^M^J + 
    '=Z' + ^M^J + 
    '' + ^M^J + 
    '[(DoneSpelling)]' + ^M^J + 
    '=thats it' + ^M^J + 
    '=opt ime done' + ^M^J + 
    '=thats all' + ^M^J + 
    '=finished' + ^M^J + 
    '=done' + ^M^J + 
    '' + ^M^J + 
    '[(EraseSpelling)]' + ^M^J + 
    '=clear [opt] that' + ^M^J + 
    '=start over' + ^M^J + 
    '' + ^M^J + 
    '[(SpellingCorrection)]' + ^M^J + 
    '=delete' + ^M^J + 
    '=oops' + ^M^J + 
    '' + ^M^J + 
    '[(WhatHaveISpelled)]' + ^M^J + 
    '=what did I spell' + ^M^J + 
    '=repeat it back to me' + ^M^J + 
    '=what have I spelled' + ^M^J + 
    '=what have I said' + ^M^J; 
 
  ApdAskForTimeGrammar : string = 
    '[]' + ^M^J + 
    '=(GetTime)' + ^M^J + 
    '' + ^M^J + 
    '[(GetTime)]' + ^M^J + 
    '-700=