Greeting Objects

Greeting Properties

Name

Phrase

 

Fileformat

TermOnDTMF

 

 

 

Greeting Methods

Copy

InsertNamedPhrase

 

Count

InsertSysPhrase

 

InsertFile

RemoveAt

 

InsertIndexPhrase

RemoveAll

Overview

Greeting objects are collections of Phrase objects. The For.... Each statement can be used to iterate through all the phrases in a greeting.

EXAMPLE

Dim phr as Phrase

For Each phr in greet

Debug.Print phr.filename

Next

For more examples, see the description of the example CustPhrs.

Greeting Properties

Name

The name of this greeting

Fileformat

The play format of this greeting - one of the vbvFileFormatConstants:

Not all formats are supported by all voice cards. All cards support vbvULAW_8K or vbvALAW_8K.

Phrase

(Index as Integer)

Each phrase object in a greeting can be accessed through this property. The phrase objects can then be manipulated using the Phrase methods and properties below.

TermOnDTMF

(Boolean)

Signifies whether playing the greeting terminates when a DTMF digit is detected.

Greeting Methods

Copy

Copy(Greeting as Object)

This method makes a copy of the greeting object provided by copying all phrases in it.

Count

Count() As Integer

Returns the number of phrases in this greeting.

Note: The Insert methods all create a new, empty Phrase object, and then use one of the Phrase Create methods to create a valid phrase. See Phrase Methods for more details on phrase creation.

InsertFile

InsertFile(Position as Integer, Filename as String)

Inserts a VOX or WAV file into the greeting by creating a new phrase, executing the CreateWavePhrase method on it, and inserting it into the greeting at the specified position. Other phrases are moved down in the list to make room for the new phrase.

InsertIndexPhrase

InsertIndexPhrase(Position as Integer, FileName as String, Index as String)

Creates a new phrase object, executes the CreateIndexPhrase method on it, and inserts it into the greeting at the specified position. Other phrases are moved down in the list to make room for the new phrase.

InsertNamedPhrase

InsertNamedPhrase(Position as Integer, FileName as String, PhraseName as String)

Creates a new phrase object, executes the CreateNamedPhrase method on it, and inserts it into the greeting at the specified position. Other phrases are moved down in the list to make room for the new phrase.

InsertSysPhrase

InsertSysPhrase (Index as Integer, Type as Integer, Data1 as String, Data2 as String)

Creates a new phrase, executes the CreateSysPhrase method on it, and inserts it into the greeting at the specified position. Other phrases are moved down in the list to make room for the new phrase.

RemoveAt

RemoveAt(Index as Integer)

Removes the phrase at the given position and deletes the object.

RemoveAll

RemoveAll()

Removes all the phrases from the greeting and deletes them.

Phrase Objects

Phrase Properties

Filename

PhrsType

 

Format

SysPhrsType

 

PhraseData, PhraseData1, PhraseData2

Type

 

 

 

Phrase Methods

Copy

CreateSysPhrase

 

CreateIndexPhrase

CreateWavePhrase

 

CreateNamedPhrase

 

Phrase Properties

These properties can be used to query the contents of a phrase or to modify the phrase. You should create new phrases using the methods described below.

Filename

(String)

The filename of the WAV or VAP file for a VAP phrase. For system phrases, this property contains the PhraseData1 field.

Format

(vbvFileFormatConstants)

The play format (reserved for future use).

PhraseData, PhraseData1, PhraseData2

(String)

Phrase data, having different meanings depending on the phrase type.

PhrsType

(vbvSysPhraseConstants)

The type of system phrase. See vbvSysPhraseConstants.

SysPhrsType

(vbvSysPhraseConstants)

The type of system phrase. See vbvSysPhraseConstants.

Type

(vbvPhraseTypeConstants)

The type of phrase - wavefile, system phrase, or VAP file.

Phrase Methods

Copy

Copy(Phrase as Object)

This method creates a phrase that is a copy of an existing phrase.

CreateIndexPhrase

CreateIndexPhrase(Filename as String, Index as Integer)

This method creates a phrase object that refers to a phrase in a VAP file. The phrase is referenced by position. Index 0 is the first phrase.

CreateNamedPhrase

CreateNamedPhrase(Filename as String, PhraseName as String)

This method creates a phrase that refers to a phrase in a VAP file. The phrase is referenced by the name of the script. The phrase name is case-sensitive.

CreateSysPhrase

CreateSysPhrase(PhraseType as Integer, Data1 as String, Data2 as String)

This method creates a system phrase. PhraseType is one of the vbvSysPhraseConstants. The Data1 and Data2 parameters are dependent on the phrase type. See System Phrase Types for types of system phrase and required data for each type.

CreateWavePhrase

CreateWavePhrase(Filename as String)

Creates a phrase that refers to a WAV file. The file is played in its entirety.