Velocity powered by Wavelink

This page refers to an older version of the product.
View the current version of the User Guide.

Adding Grammar Terms

A grammar file determines the words and phrases that the Speakeasy engine listens for with speech-to-text responses. To add words or phrases to a grammar file, follow the existing structure of a grammar file. To begin, add it to an existing rule (such as <Speech>) and separate it from the other terms with a | symbol (also known as an OR symbol or a pipe).

Speakeasy for Velocity does not currently come with any default grammar files. You must create your own based on the commands, phrases, and responses you expect users to make when navigating a session.

The following example is a basic grammar file:

#BNF+EM V1.1;

// Accepts and returns a "yes" or "no" value.

!grammar yes_no;

!start <Speech>;

<Speech>: yes please | no ;

In this example, the words and phrases listed between <Speech>: and the last ; are the terms Speakeasy will recognize using this grammar file. Each word or phrase must be separated by a | symbol. Terms may be listed all on the same line or aligned vertically for easier editing.

Each grammar file is fully editable, and you can even create your own. You must follow the defined structure of a grammar file, but the terms you add can be unique.

#BNF+EM V1.1;

// Recognizes employee names

!grammar names;

!start <Speech>;

<Speech>:

John

| Angelica

| Dwayne

| Adriana;

To edit a grammar file that you've created, simply open it in a word processing tool, such as Notepad. Create additional groups or a simple list of words or phrases.

#BNF+EM V1.1;

// Recognizes employee names

!grammar names;

!start <Speech>;

<Speech>: <Women> | <Men>;

<Women>:

  Adriana

| Andrea;

<Men>:

  John

| Dwayne;

 

To improve recognition, use longer and more distinct phrases. For example, rather than use similar terms like “faster” and “fastest,” replace them with phrases like “go faster” and “warp speed”.

<Women>:

  "Adriana Tulley"

| "Andrea Garcia";

You can also set up grammar files to recognize specific spoken phrases, but return alternate text results.

Once you define the words in a grammar file add it as a resource to the project.


This page refers to an older version of the product.
View the current version of the User Guide.

The topic was:

Inaccurate

Incomplete

Not what I expected

Other