                           CHAPTER 7.
             DEVELOPING AN ADVANCED SPEECH APPLICATION.
                                
                                
Application Control of DECtalk.
       The development process described in this manual assumes
that your  application has full control over the text being
spoken. If you  are developing an application that must read
arbitrary text (such  as electronic mail messages), your task is
more difficult because almost anything can appear in the text.

DECtalk  is  controlled  by  your PC and  even   the  smallest
personal computer has enough power to pre-process  (filter) text
to handle application-unique cases. So, you can put  application-
specific text filters in the controlling computer,  rather  than
add  many additional special cases (and switches to  enable  and
disable them) to DECtalk.

Electronic Mail Example.
For  an  electronic mail system, you can program  an  electronic
mail   pre-processor  to  make  the following  text  conversions
before sending  the text to DECtalk.

PARSE BOILERPLATE.
1.       Parse  the  header  boilerplate  to  remove  extraneous
information.

ADDING NATURAL PAUSES.
2.      If  DECtalk is speaking paragraphs of text, add the  [+]
symbol to a blank       line separating each paragraph.

PROCESS PUNCTUATION.
3.      If  words are separated by / or other special characters
or  punctuation, and if DECtalk pronounces them when you do  not
want  them  pronounced,  check to see if punctuation  is  turned
off.  If  it is not, turn punctuation off with the [:punc  none]
command.  You  may also replace such characters  or  punctuation
with   a  space.  For  example,  "Raleigh/Durham"  could  become
"Raleigh Durham" and  DECtalk will say it  without spelling  out
the entire string).

APPLICATION SPECIFIC DICTIONARY.
4.      Create  your  own  application-specific  dictionary  for
words  that  DECtalk  mispronounces such  as  proper  names.  If
DECtalk  is  connected to a database containing names,  consider
adding  a  pronunciation  field to the  name  record,   entering
phonemic text when appropriate.

PROPER NAME PROCESSING.
Note:  DECtalk  is  now  able to handle many  proper  names  and
addresses quite well using the [:pronounce name] or [:mode name]
commands.

NUMBER PROCESSING.
5.      Scan  the  text  for  strings of  numbers  in  a  format
understandable  to  your application but not  to  DECtalk.   For
example,  if you can extract the time format from an  electronic
mail message, you can add code to your application to expand  it
to its "o'clock" form.

6.      In  many applications, the listener will want  to  write
down  numberstrings (such as prices or telephone  numbers). Your
application can scan the text for strings  of numbers and,  when
found,  send them to DECtalk in a way  that includes  pauses  at
critical locations. For example:
        The number is, 1 (800) 5 5 5, 1 2 3 4.

        [:ra  120]  That is, [_<300>] 1 (800), [_<500>] 5  5  5,
[_<900>] 1 2 3 4.      [:ra 180].

The spaces between the numbers ensure that "five five  five"  is
spoken rather than "five hundred and fifty  five." (You may also
use  the  [:mode  spell on] command. In the second  string,  the
slower  speaking  rate  and the silence  phonemes  of  specified
durations permit  enough time for the listener to write down the
entire    number.   Silence   phonemes   positioned   after   an
orthographic comma maintain appropriate intonation.

         As  another  example, if your application speaks  money
(such as bank balances or item costs), it might say
                Your balance is $244.05
                 That  is,  2 4 4, [_<400>] point 0 5,  [_<400>]
dollars.

CASE OF LETTERS.
7.      When spelling an item out, your application may have  to
distinguish  the  case  of  letters.  Consider  using  different
voices  to distinguish between uppercase and lowercase   letters
(for  example,  Harry  and  Paul). Some screen-reading  software
provides this functionality.

OPTIMIZING THE QUALITY OF SPOKEN TEXT.
In  some applications, it is important to get a few sentences to
sound  very  good because they are used often.  Usually  DECtalk
does  an  excellent  job, but the phrasing can  occasionally  be
improved.  To  improve the quality of a particular sentence, the
following steps  are suggested.

NOTE: The phonemic mode is turned OFF by default. Please refer 
to Chapter 3 for information on the commands to turn phonemic 
mode on and off.

1.    Send  the  sentence  to  DECtalk  and  listen  repeatedly,
focusing on each word in turn to detect any  mispronunciations.

2.   For  each  word  that is mispronounced, there  are  several
alternatives to get the corect pronunciation.

For  words that have two alternate pronunciations, (see Appendix
C for a complete list),  DECtalk typically picks the more common
of  the two. If the other pronunciation is desired, simply enter
it  in  phonemic  text. For example, if you type  the  following
sentences:

       He produced a lot of refuse.
       He refused the produce.
       He inserts 5 inserts per minute.
       He  deliberated  deliberately for a long time.

You can hear that some of these alternately pronounced words are
incorrect.   However,  when DECtalk is able to do most of  these
these  automatically, no procedure is infallible, and there  are
times when you may need to correct the pronunciation.

You can correct such mistakes in two ways:
        a.   Replace  the correct spelling of the  word  with  a
clever misspelling:

                I red yesterday that.

       b.  Phonemicize the text.

               I [r'ehd] yesterday that. 

       c.  Use the slash notation:

               I  /read yesterday that.

3.  If the word is a compound, use a hyphenated spelling to help
DECtalk see the two parts of the compound.

                The slide-show host.

4.  Replace  the  text  version by a phonemic  string.  Use  the
commands and phonemic symbols described above. Be sure to  place
the lexical  stress  pattern correctly.

5.  Sometimes a word does not sound quite right, even  when  the
best  alternate  phonemic representation is selected.   Usually,
such subtle pronunciation defects are not  correctable.

6.  Now that each word has been pronounced in the best  possible
way, listen to the total sentence rhythm and  accent pattern. If
it is not right, try each of the  following steps.

7.  If  it  sounds  like there should be  a  short  pause  in  a
particular  sentence location, but DECtalk  says  the   sentence
without  a pause, try inserting  a comma between  the  words  in
question.

8. If the wrong word is emphasized in the sentence, try to point
out  the  word that should receive most emphasis by   placing  a
phonemic emphasis symbol before it.
         The  ["]younger man is the trouble-maker, not the older
one.

9.  Use  the  pitch control symbols [/], [\], and [/\]  to  make
final adjustments.

10.  If  none of these steps gives you a satisfactory  sentence,
you  can  still  specify  durations  and  fundamental  frequency
contours for all phonemes with the commands described above.  To
avoid too much trial-and-error effort,  you shouldhave access to
a  speech analysis facility to  analyze a recording of  the  way
the sentence should sound.

COMMON ERRORS
When  using DECtalk, try to avoid making these two common, major
errors.

1. Forgetting to change back to default voice
If you forget to return DECtalk to the standard Paul voice after
using  one  of  the other voices, all future text will  use  the
voice  currently  selected. It is a good  programming  habit  to
return to  Paul's voice (or the default voice) after every  text
message.

2. Accidental entry into phonemic mode
If [:phoneme arpabet speak] is on, permitting phonemic input, it
is   possible to get into phonemic mode unintentionally. If  the
text  contains an unexpected [, or if you forget to type ] after
a   phonemic entry, DECtalk is left in a state where it tries to
interpret  text  phonemically. This error makes  DECtalk  garble
speech.  In  fact, DECtalk is simply doing the best  it  can  to
interpret  text  phonemically, discarding  phonemically  illegal
letters.  This  problem  can be avoided by  placing  one  closed
square  (phonemic) brackets at the beginning of your text  along
with your speaking rate and voice commands, e.g.,

       ]   [:ra 220] [:nh]
       [+] Ladies and Gentlemen .
                              

End of Chapter 7.

         
