home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D3.DMS / in.adf / Interfaces / Narrator.mod < prev    next >
Encoding:
Text File  |  1992-12-17  |  6.8 KB  |  131 lines

  1. (*-------------------------------------------------------------------------*)
  2. (*                                                                         *)
  3. (*  Amiga Oberon Interface Module:                    Date: 02-Nov-92      *)
  4. (*                                                                         *)
  5. (*   © 1992 by Fridtjof Siebert                                            *)
  6. (*                                                                         *)
  7. (*-------------------------------------------------------------------------*)
  8.  
  9. MODULE Narrator;   (* $Implementation- *)
  10.  
  11. IMPORT e * := Exec;
  12.  
  13. CONST
  14.  
  15.                 (*          Device Options      *)
  16.  
  17.   newIORB     * = 0;       (* Use new extended IORB                *)
  18.   wordSync    * = 1;       (* Generate word sync messages          *)
  19.   sylSync     * = 2;       (* Generate syllable sync messages      *)
  20.  
  21.  
  22.  
  23.                 (*          Error Codes         *)
  24.  
  25.   noMem       * =  -2;      (* Can't allocate memory                *)
  26.   noAudLib    * =  -3;      (* Can't open audio device              *)
  27.   makeBad     * =  -4;      (* Error in MakeLibrary call            *)
  28.   unitErr     * =  -5;      (* Unit other than 0                    *)
  29.   cantAlloc   * =  -6;      (* Can't allocate audio channel(s)      *)
  30.   unimpl      * =  -7;      (* Unimplemented command                *)
  31.   noWrite     * =  -8;      (* Read for mouth without write first   *)
  32.   expunged    * =  -9;      (* Can't open, deferred expunge bit set *)
  33.   phonErr     * = -20;      (* Phoneme code spelling error                  *)
  34.   rateErr     * = -21;      (* Rate out of bounds                   *)
  35.   pitchErr    * = -22;      (* Pitch out of bounds                          *)
  36.   sexErr      * = -23;      (* Sex not valid                        *)
  37.   modeErr     * = -24;      (* Mode not valid                       *)
  38.   freqErr     * = -25;      (* Sampling frequency out of bounds     *)
  39.   volErr      * = -26;      (* Volume out of bounds         *)
  40.   dCentErr    * = -27;      (* Degree of centralization out of bounds *)
  41.   centPhonErr * = -28;      (* Invalid central phon                 *)
  42.  
  43.  
  44.  
  45.                 (* Input parameters and defaults *)
  46.  
  47.   defPitch    * = 110;         (* Default pitch                        *)
  48.   defRate     * = 150;         (* Default speaking rate (wpm)                  *)
  49.   defVol      * = 64;          (* Default volume (full)                *)
  50.   defFreq     * = 22200;       (* Default sampling frequency (Hz)      *)
  51.   male        * = 0;           (* Male vocal tract                     *)
  52.   female      * = 1;           (* Female vocal tract                   *)
  53.   naturalF0   * = 0;           (* Natural pitch contours               *)
  54.   roboticF0   * = 1;           (* Monotone pitch                       *)
  55.   manualF0    * = 2;           (* Manual setting of pitch contours     *)
  56.   defSex      * = male;        (* Default sex                                  *)
  57.   defMode     * = naturalF0;   (* Default mode                 *)
  58.   defArtic    * = 100;         (* 100% articulation (normal)           *)
  59.   defCentral  * = 0;           (* No centralization                    *)
  60.   defF0Pert   * = 0;           (* No F0 Perturbation                   *)
  61.   defF0Enthus * = 32;          (* Default F0 enthusiasm (in 32nds)     *)
  62.   defPriority * = 100;         (* Default speaking priority            *)
  63.  
  64.  
  65.                         (*      Parameter bounds        *)
  66.  
  67.   minRate     * = 40;          (* Minimum speaking rate                *)
  68.   maxRate     * = 400;         (* Maximum speaking rate                *)
  69.   minPitch    * = 65;          (* Minimum pitch                        *)
  70.   maxPitch    * = 320;         (* Maximum pitch                        *)
  71.   minFreq     * = 5000;        (* Minimum sampling frequency           *)
  72.   maxFreq     * = 28000;       (* Maximum sampling frequency           *)
  73.   minVol      * = 0;           (* Minimum volume                       *)
  74.   maxVol      * = 64;          (* Maximum volume                       *)
  75.   minCent     * = 0;           (* Minimum degree of centralization     *)
  76.   maxCent     * = 100;         (* Maximum degree of centralization     *)
  77.  
  78.  
  79. TYPE
  80.  
  81.                 (*    Standard Write request    *)
  82.  
  83.   NarratorPtr * = UNTRACED POINTER TO Narrator;
  84.   Narrator * = STRUCT (message * : e.IOStdReq)
  85.             (* Standard IORB                *)
  86.     rate * : INTEGER;                   (* Speaking rate (words/minute) *)
  87.     pitch * : INTEGER;                  (* Baseline pitch in Hertz              *)
  88.     mode * : INTEGER;                   (* Pitch mode                   *)
  89.     sex * : INTEGER;                    (* Sex of voice                 *)
  90.     chMasks * : e.APTR;                 (* Pointer to audio alloc maps  *)
  91.     nmMasks * : INTEGER;                (* Number of audio alloc maps   *)
  92.     volume * : INTEGER;                 (* Volume. 0 (off) thru 64      *)
  93.     sampfreq * : INTEGER;               (* Audio sampling freq                  *)
  94.     mouths * : BOOLEAN;                 (* If non-zero, generate mouths *)
  95.     chanmask * : e.BYTE;                (* Which ch mask used (internal)*)
  96.     numchan * : e.BYTE;                 (* Num ch masks used (internal) *)
  97.     flags * : SHORTSET;                 (* New feature flags            *)
  98.     f0enthusiasm * : SHORTINT;          (* F0 excursion factor          *)
  99.     f0perturb * : SHORTINT;             (* Amount of F0 perturbation    *)
  100.     f1adj * : SHORTINT;                 (* F1 adjustment in ±5% steps   *)
  101.     f2adj * : SHORTINT;                 (* F2 adjustment in ±5% steps   *)
  102.     f3adj * : SHORTINT;                 (* F3 adjustment in ±5% steps   *)
  103.     a1adj * : SHORTINT;                 (* A1 adjustment in decibels    *)
  104.     a2adj * : SHORTINT;                 (* A2 adjustment in decibels    *)
  105.     a3adj * : SHORTINT;                 (* A3 adjustment in decibels    *)
  106.     articulate * : SHORTINT;            (* Transition time multiplier   *)
  107.     centralize * : SHORTINT;            (* Degree of vowel centralization *)
  108.     centphon * : e.APTR;                (* Pointer to central ASCII phon  *)
  109.     avBias * : SHORTINT;                (* AV bias                      *)
  110.     afBias * : SHORTINT;                (* AF bias                      *)
  111.     priority * : SHORTINT;              (* Priority while speaking      *)
  112.     pad1 * : SHORTINT;                  (* For alignment                *)
  113.   END;
  114.  
  115.  
  116.                 (*    Standard Read request     *)
  117.  
  118.   MouthPtr * = UNTRACED POINTER TO Mouth;
  119.   Mouth * = STRUCT (voice * : Narrator) (* Speech IORB                  *)
  120.     width * : e.BYTE;                (* Width (returned value)       *)
  121.     height * : e.BYTE;               (* Height (returned value)      *)
  122.     shape * : e.BYTE;                (* Internal use, do not modify  *)
  123.     sync * : e.BYTE;                 (* Returned sync events         *)
  124.   END;
  125.  
  126. END Narrator.
  127.  
  128.  
  129.  
  130.  
  131.