home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Archived / Internet / Demos / Pluto / demo2 / Docs_SWIs < prev    next >
Encoding:
Text File  |  1997-04-18  |  5.0 KB  |  135 lines

  1.  
  2. SWI Interfaces to the Speak Module.
  3.  
  4. The officially allocated SWI block number is  &4ad80.
  5.  
  6.  
  7.  
  8. SWI &4ad80    Speak_Ready
  9.      Entry:   none
  10.      
  11.      Exit:    R0   0 if still speaking,  -1 if not speaking.
  12.      
  13.               R1   Index into the character string of the ‘Say’
  14.                    call which is currently speaking.  The
  15.                    index points to the start of the word which
  16.                    is currently being spoken.
  17.                    
  18.      Can be used to wait until the speak module has finished
  19.      speaking, and to identify which word is currently being spoken.
  20.  
  21.     
  22.      
  23.      
  24. SWI &4ad82    Speak_Misc     (Miscellaneous Functions)
  25.      Entry:   R0   function
  26.      
  27.      
  28.      R0=1  Register user.  Must be used when the user application
  29.         starts.  The speak module increments a count of the number of
  30.         users of the speak module.  The updated count is returned in
  31.         R0.
  32.         
  33.      R0=2  Deregister user.  Must be used when the application
  34.         process terminates.  Decrements a count of the number of
  35.         users.  If this decrements to zero, the module terminates
  36.         itself.
  37.         The updated count is returned in R0.
  38.         
  39.      R0=3  Translate to phoneme string.
  40.         R1 String of a single English word.  This is translated into
  41.            an ascii character string of the phonemes, which is
  42.            returned, pointed to by R0 and terminated by a zero byte.
  43.  
  44.      R0=5  Read voice names.
  45.         On return, R0 points to an array of pointers to zero
  46.         terminated text strings.  The array is terminated by a NULL
  47.         (zero) pointer value.  The array is indexed by voice
  48.         number to find the name of that voice.  This can be used by
  49.         an application to construct a menu of voice names.
  50.      
  51.  
  52.  
  53.  
  54. SWI &4ad83    Speak_Say
  55.      Entry:   R0   Pointer to English text string to be spoken.
  56.                    The String must be terminated by 0 byte or CR
  57.                    (&D byte), unless the length is indicated by a
  58.                    non-zero value in R1.
  59.                    
  60.                    The string can contain phoneme codes enclosed with
  61.                    double braces, {{ }}
  62.                                      
  63.                    When speaking passages of text, this SWI should
  64.                    not be called for each individual word, but rather
  65.                    for sentences or clauses (i.e. text up to, and
  66.                    including a comma, full-stop, colon, semi-colon,
  67.                    question-mark, exclamation mark, or paragraph).
  68.  
  69.                    Punctuation which is not followed by a blank
  70.                    charcater should not be treated as end-of-clause
  71.                    (eg. !Application, :path,12.3 ).
  72.                    This allows the Speak module to apply an
  73.                    intonation pattern to the whole clause.
  74.                    
  75.                    The Speak module has to copy the text into an
  76.                    internal buffer before speaking it.  This limits
  77.                    thelength the text string to 1000 characters.
  78.                    
  79.                    This SWI will return immediately, before the text
  80.                    has been spoken.  Use SWI &4ad80 in a pooling loop
  81.                    todetermine when the speaking has finished.
  82.                                       
  83.               R1   If = 0, the end of the text string is indicated by
  84.                    a terminator, as described for R0 above.
  85.                    
  86.                    If > 0, R1 specifies the length of the text
  87.                    string, in which case it does not need a
  88.                    terminator.  A zero byte within the string will
  89.                    still act as a terminator,  CR will not.
  90.  
  91.               R2   Bits 0 to 7 specify the voice number to be used
  92.                    to speak the text.  0 indicates the default voice.
  93.                    Bits 8 to 31 must be zero (reserved for future
  94.                    use).
  95.  
  96.               R3   Must be zero (may be used in future versions)
  97.                   
  98.      Exit:    none
  99.      
  100.      
  101. SWI &4ad84    Speak_SayW
  102.      As SWI 3 (Say), but it does not return until the module has
  103.      finished speaking the string.
  104.  
  105.  
  106. SWI &4ad85    Speak_Stop
  107.      Stops speaking any “Say” calls which have been sent to the
  108.      Speak module.
  109.      
  110.  
  111. (SWI numbers 7 to 10 can be used to set new values of the
  112.  parameters which control the sound of the speech.)
  113.  
  114. SWI &4ad87    Speak_Pitch
  115.      R0   Gives the new value of the ‘pitch’ parameter.
  116.           Default value is 128.
  117.      
  118. SWI &4ad88    Speak_Speed
  119.      R0   Gives the new value of the ‘speed’ parameter.
  120.           Default value is 128.
  121.     
  122. SWI &4ad89    Speak_WordGap
  123.      R0   Gives the new value of the ‘word gap’ parameter.
  124.           0 = no extra gap between words.
  125.           1 = ensure a short gap between each spoken word.
  126.           2 or greater,  larger gap between words in multiples
  127.               of approx 50mS.
  128.           
  129.           128 is treated the same as value 0.
  130.           
  131. SWI &4ad8a   Speak_PitchRange
  132.      R0   Gives the new value of the ‘pitch range’ parameter.
  133.           Default value is 128.
  134.  
  135.