(Page 3 of 3 in this chapter)


5.2 Demonstration Programs

The following demonstration programs are provided with NaturalText:

Program

Description

ttstest

NaturalText interactive function demonstration.

intts

Inbound call demonstration.

5.2.1 Interactive Test Program: ttstest

Name

ttstest [options]

Purpose

Tests all NaturalText functions. ttstest is used to:

Usage

ttstest [options]

where the options are:
Option

Description

-?

Help

-b n

AG board number <n>. Default=0.

-s n:m

Specifies the MVIP stream and timeslot for the first channel. Default = 0:0

-p protocol

Specifies the protocol to run. Default = nocc.

-f filename

Name of file to speak. Program loops to speak specified file continuously until stopped by the user.

-m method

E-mail preprocessor method
0 = keep header
1 = strip header
2 = none (default)

-v v

Speaking voice. Default = 1.
1 = English male
2 = Spanish male

Featured Functions

All NaturalText functions are featured.

Description

ttstest is a menu-driven interactive program. Enter one- and two-lettered mnemonics to execute NaturalText commands. Some commands prompt for additional information, such as file names or text strings.

You can enter commands while speech is in progress. For example, while NaturalText is speaking, you can run speech control functions such as modify speed (MS).

To initiate multiple instances of ttstest simultaneously, assign each instance a different stream and timeslot number by using the command line option `-s'.

Procedure

To run ttstest, follow the steps listed below:

1. From the command line prompt, run ttstest (with or without options):

ttstest [-b n -s n:m -p protocol -f filename]


If you run ttstest with the -f option, it continuously speaks the text in the specified file until you interrupt it by entering either the SS or Q command.


2.	 If you run ttstest without the -f options, the program provides a list of all ttstest commands (see Notes). You cab run a typical test with the following commands :

  • OP open context. Opens a context on the board, stream, and slot (defaults are 0,0, and 0).

    
    
  • SP start protocol. The default protocol is nocc (no call control protocol).

    
    
  • OT open NaturalText text-to-speech conversion service (TTS).

    
    
  • IF preprocess text in specified file

    
    
  • SF run text-to-speech conversion of specified file

    
    
  • S? display process status of TTS

    
    
  • CT close TTS service

    
    
  • CP close context on which TTS is running

    
    
  • Q end ttstest

  • Notes

    When you run ttstest, the program displays the following list of commands:
    H help

    Q quit

    ! repeat command

    OP open port

    CP close port

    X show port state

    SP start protocol

    UP stop protocol

    AC answer call

    RC release call

    C? call status

    IF file preproc.

    IC cont preproc.

    OT open TTS

    CT close TTS

    SF speak file

    SI speak user input

    S? speak status

    SS speak stop

    P speak pause

    SR speak resume

    SJ speak jump

    MG modify gain

    MP modify pitch

    MS modify speed

    DL link a UED

    DU unlink a UED

    5.2.2 Inbound Call Control and NaturalText: intts

    Name

    intts [options]

    Purpose

    Demonstrates:

    Usage

    intts [options]

    where the options are:
    Option

    Description

    -?

    Help

    -b n

    Specifies the AG board number <n>. Default = 0.

    -s n:m

    Specifies the MVIP stream and timeslot for the first channel. Default = 0:0

    -p protocol

    Specifies the protocol to run. Default = did0.

    -l

    Shows low-level events.

    -v voice

    Speaking voice. Default = 1.
    1 = English male
    2 = Spanish male

    Featured Functions

    ttsGetStatus, ttsJump, ttsPause, ttsResume, ttsSetGain, ttsSetPitch, ttsSetSpeed, ttsSpeak, ttsStop

    Description

    This description applies to the wink-start protocol did0.

    When you take the handset off-hook, the TCP acknowledges the line seizure by generating a wink. After the wink, enter three DTMF digits as the address. Depending upon the first digit entered, you should hear a reorder tone, busy tone or ringing. If the call is connected, the demonstration proceeds into the conversation state.

    Once in the conversation state, you are prompted for one of the following options:

    Procedure

    The following procedure assumes that you are testing on an AG-8 with a loop-start hybrid on line 0.

    To run intts:

    1. Start intts by entering the following at the prompt:

    intts -b n -s n:m -p lps0-v v

    
    
    Specify the AG board and MVIP stream for the handset you are using.

    
    2.	 Put the telephone off-hook. You should hear a relay click. Dial a three digit telephone number. The program plays a prompt that explains the option of listening to e-mail or hanging up.

    3. Select the "listen to e-mail" option.

    You will hear a sample e-mail spoken by NaturalText. The e-mail includes instructions for using a touch-tone phone to control the speech. Here is a list of the controls available:

    
    
    DTMF Digit

    Control

    3

    jump forward

    6

    jump back

    1

    speak louder

    2

    speak softer

    4

    speak faster

    5

    speak slower

    7

    increase pitch

    8

    decrease pitch

    *

    pause

    #

    resume

    0

    stop

    
    4.	 When speaking is finished, you are returned to the prompt to listen or hang up.

    5. Select the hang-up option. The line hangs up and the demo waits for a new inbound call.

    Notes

    intts demonstrates synchronous programming on a single port. Many of the demonstration subroutines are coded this way, such that a "start" command is initiated and the demonstration continuously retrieves events from the AG board until the expected event returns. This simplifies the overall program flow.

    This demonstration can be used with various protocols or configurations. If no call control is used (protocol = nocc), the demonstration code does not wait for a call. Instead, it begins playing the prompt.



    (Page 3 of 3 in this chapter)


    tech_support@nmss.com
    Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.