Velocity with Speakeasy: How to add a grammar file and activate it within the project / How to add Speech to Text files

Version 6

    Environment (Prerequisites):

    • Velocity Console 1.2.104
    • Speakeasy Add On 1.2.104
    • Grammar File ( .bnf file ) [see attached]
      • To learn about building grammar files go to this article: TBD
    • Load Grammar script ( .wlxjs file ) [see attached]


    What this article covers:

    1. How to add a grammar file to your Velocity project
    2. How to use the Load Grammar script to activate the grammar file correctly within your project file


    How To Add A Grammar File To Your Velocity Project:

    The reason you need to have grammar files is to that you can have Speech To Text. Grammar files allow you configure which words or numbers are allowed in a particular field. (For example, the ability to reply and say "1 - 2 - Ready" for twelve (12) instead of having to type it manually on the device and then press enter.  To add a grammar file to your project, here are the steps:


    1. Open the Velocity Console
    2. Open a Velocity TE project
    3. Click on the Settingsvelocity_console_settings_button.jpgbutton (top right)
    4. Select Resources on the left side of the screen
    5. At the bottom of the screen, click Addvelocity_console_add_button.jpg
    6. Navigate to your Grammar File (which should be a .bnf file)
      NOTE: To learn more about *.bnf files, please go here: TBD
    7. Once you've added the .bnf file, you will see it in the list. (i.e. Below I've added Lib_3b_digits_ready.bnf)

    How To Activate A Grammar File For A Specific Screen:

    Now that you've added your grammar file, you will need to use the Load Grammar script to activate the Grammar for the specific screen or screens

    1. Click on the Scripts button scripts_.jpg
    2. At the bottom left of the screen click Importimport.jpg
    3. Import the attached Load Grammar.wlxjs file
      NOTE: You will now see Load Grammar on the screen in the scripts list
    4. Click on the Screens button
    5. Navigate to the particular screen or screens you want to connect your grammar file to
      NOTE: I suggest you copy and paste the screen names to notepad to make the following steps faster
    6. Click on the Scripts buttonscripts_.jpg
    7. Check the box next to Load Grammar (do NOT check other script boxes at this time, only Load Grammar), then click the Link link_button.jpg
      NOTE: A prompt will appear with "session" as the default value.
    8. Replace "session" with "@[NameOfYourPage]". So if your page was titled PickingMenu, then your link would look like this:
      linking script.jpg
    9. Press OK
    10. You've now got two input options (as seen in the picture below: the first for "Grammar" and the second for "Key Macro"
      For the Grammar you MUST match the name of the .bnf file ( it is case sensitive )
      For the Key Macro, you can choose to send an action following the grammar (usually ENTER).
      NOTE: For a list of Key Macros, see this page:

    11. Below is an example of when I'm linking the PickingMenu page to my Lib_3b_digits_ready.bnf file and want to send an ENTER after the action
      NOTE: You do not put the ".bnf" when typing the grammar file in the value below.
      Scope 2.jpg

    Note: Currently you can only link to specific screens and not your project as a whole