(FILECREATED " 5-Jun-84 00:31:54" {PHYLUM}<SPEECH>TRANSCRIPTPVECTORS.;2 9875   

      changes to:  (FNS SPEAK FIND.PHONEMES FIND.V.FEATURES FIND.PHONEMES2 FIND.PHONEMES1 
			MAKE.PHONEME FIX.PHONEME FIND.ALLOPHONES FINDCODA FINDVOWEL FINDNUCLEUS 
			OFFGLIDE)
		   (VARS TRANSCRIPTPVECTORSCOMS PHONSYMPHONEMEALIST SOUNDS NSOUNDS PV.CONSONANTS 
			 PHONETICSYMBOLS OFFGLIDES PSVOWELS)

      previous date: " 4-Jun-84 16:02:09" {DSK}<SPEECH>TRANSCRIPTPVECTORS.;1)


(PRETTYCOMPRINT TRANSCRIPTPVECTORSCOMS)

(RPAQQ TRANSCRIPTPVECTORSCOMS ((FNS MAKE.PHONEME SPEAK FIND.ALLOPHONES FIND.PHONEMES FIND.PHONEMES1 
				    FIND.PHONEMES2 FIND.V.FEATURES FINDCODA FINDNUCLEUS FIX.PHONEME 
				    OFFGLIDE FINDVOWEL)
			       (VARS OFFGLIDES PHONETICSYMBOLS PHONSYMPHONEMEALIST PSVOWELS 
				     PV.CONSONANTS SOUNDS NSOUNDS VCOMMENTS)))
(DEFINEQ

(MAKE.PHONEME
  [LAMBDA (PVECTORNAME)                                      (* pkh: " 4-Jun-84 23:01")
    (PROG [PHONEME (PHONEMENAME (PACK* (SUBSTRING PVECTORNAME 1 2)
				       '.PHONEME))
		   (FEATURES (MKATOM (SUBSTRING PVECTORNAME 3]
          [SET PHONEMENAME (COND
		 ((NEQ (EVALV PHONEMENAME)
		       'NOBIND)                              (* PHONEMENAME is a PHONEME)
		   (FIX.PHONEME (EVALV PHONEMENAME)
				FEATURES
				(EVAL PVECTORNAME)))
		 (T                                          (* PHONEMENAME is not the name of a PHONEME yet)
		    (SETQ PHONEME (create PHONEME))
		    (FIX.PHONEME PHONEME FEATURES (EVAL PVECTORNAME]
          (RETURN PHONEMENAME])

(SPEAK
  [LAMBDA (TRANSCRIPTION)                                    (* pkh: " 4-Jun-84 23:46")
                                                             (* Top level function for the synthesizer)
    (PROG ((SOUNDLIST (UNPACK TRANSCRIPTION))
	   NUCLEUS ONSET CODA FEATURES (SYLLABLE (create SYLLABLE)))
                                                             (* TBW (FOR (SYLLABIFY SOUNDLIST) SYLLABLE IN DO BODY))
          (SETQ NUCLEUS (FINDNUCLEUS SOUNDLIST))
          (SETQ ONSET (FINDONSET SOUNDLIST NUCLEUS))
          (SETQ CODA (FINDCODA SOUNDLIST NUCLEUS))
          (replace ONSET of SYLLABLE with ONSET)
          (replace NUCLEUS of SYLLABLE with NUCLEUS)
          (replace CODA of SYLLABLE with CODA)
          (FIND.PHONEMES SYLLABLE)
          (FIND.ALLOPHONES SYLLABLE)
          (SPEECH.GLUE ONSET NUCLEUS CODA])

(FIND.ALLOPHONES
  [LAMBDA (SYLLABLE)                                         (* pkh: " 4-Jun-84 23:23")
                                                             (* Goes from syllable with phonetic transcription to 
							     allophones and PVECTORS)
    (PROG (VFEATURES)
          [SETQ VFEATURES (FIND.V.FEATURES (EVAL (CAR (fetch NUCLEUS of SYLLABLE]
          (FIND.ALLOPHONES1 SYLLABLE:ONSET)
          (FIND.ALLOPHONES1 SYLLABLE:NUCLEUS)
          (FIND.ALLOPHONES1 SYLLABLE:CODA])

(FIND.PHONEMES
  [LAMBDA (SYLLABLE)                                         (* pkh: " 4-Jun-84 23:45")
    (FIND.PHONEMES1 (fetch ONSET of SYLLABLE))
    (FIND.PHONEMES1 (fetch NUCLEUS of SYLLABLE))
    (FIND.PHONEMES1 (fetch CODA of SYLLABLE])

(FIND.PHONEMES1
  [LAMBDA (PSYMBOLLST)                                       (* pkh: " 5-Jun-84 00:27")
    (for X M in old PSYMBOLLST
       collect (SETQ M (FIND.PHONEMES2 X))
	       [COND
		 (M M)
		 (T (COND
		      ((MEMB (CADR PSYMBOLLST)
			     '(w y))
			(SETQ PSYMBOLLST (CDDR PSYMBOLLST))
			(PACK* [U-CASE (MKATOM (PACK* X (CADR PSYMBOLLST]
			       '.PHONEME]
       finally (RETURN $$VAL])

(FIND.PHONEMES2
  [LAMBDA (PSYMBOL)                                          (* pkh: " 5-Jun-84 00:29")
    (PROG (M)
          (RETURN (COND
		    ((SETQ M (ASSOC PSYMBOL PHONSYMPHONEMEALIST))
		      (CADR M])

(FIND.V.FEATURES
  [LAMBDA (VPHONEME)                                         (* pkh: " 5-Jun-84 00:08")
    (PROG [(COMMENT (fetch (PVECTOR COMMENT) of (fetch INVARIANT of VPHONEME]
          (for X in COMMENT when (LISTP COMMENT) DO (RETURN X])

(FINDCODA
  [LAMBDA (SOUNDLIST VOWEL)                                  (* pkh: " 4-Jun-84 20:49")
    (NTH SOUNDLIST (ADD1 (IPLUS (LENGTH ONSET)
				(LENGTH NUCLEUS])

(FINDNUCLEUS
  [LAMBDA (TRANSCRIPTION SYLLABLE)                           (* pkh: " 4-Jun-84 17:11")

          (* Takes a transcription symbol for a vowel%, finds the PVECTOR name and the PVECTOR (i.e. 
	  (EVAL P)) corresponding to it; extracts feature information from its comment)

                                                             (* Returns the phonetic symbol of the vowel nucleus)
    (for P S V G in old TRANSCRIPTION when (MEMB P PSVOWELS)
       do (SETQ V (LIST P))
	  [COND
	    ((SETQ G (OFFGLIDE (CADR TRANSCRIPTION)))
	      (SETQ V (APPEND V (LIST G]
       finally (RETURN V])

(FIX.PHONEME
  [LAMBDA (PHONEME FEATURES PVECTOR)                         (* pkh: " 4-Jun-84 22:59")
    (SELECTQ FEATURES
	     ((b r)
	       (replace PREVBACKROUNDED of PHONEME with PVECTOR))
	     (f (replace PREVFRONT of PHONEME with PVECTOR))
	     (bu (replace PREVBACKUNROUNDED of PHONEME with PVECTOR))
	     (nw (replace POSTVNOWOFFGLIDE of PHONEME with PVECTOR))
	     (w (replace POSTVWOFFGLIDE of PHONEME with PVECTOR))
	     (NIL (replace INVARIANT of PHONEME with PVECTOR))
	     (SHOULDNT))
    PHONEME])

(OFFGLIDE
  [LAMBDA (PS)                                               (* pkh: " 4-Jun-84 16:47")
                                                             (* Checks if a PhoneticSymbol is an offglide%, returns 
							     the PS if it is else NIL)
    (COND
      ((MEMB PS OFFGLIDES)
	PS])

(FINDVOWEL
  [LAMBDA (TRANSCRIPTION SYLLABLE)                           (* pkh: " 4-Jun-84 16:43")

          (* Takes a transcription symbol for a vowel%, finds the PVECTOR name and the PVECTOR (i.e. 
	  (EVAL P)) corresponding to it; extracts feature information from its comment)

                                                             (* Returns the phonetic symbol of the vowel nucleus)
    (for P S V G in old TRANSCRIPTION when (MEMB P PSVOWELS)
       do (SETQ V P)
	  [COND
	    ((SETQ G (OFFGLIDE (CADR TRANSCRIPTION)))
	      (SETQ V (PACK* V G]
       finally (RETURN V])
)

(RPAQQ OFFGLIDES (Y W y w))

(RPAQQ PHONETICSYMBOLS (P T K p t k b d g D 0 & f v s z S Z C J W Y m n G ~ y w l r R %, : H L M ? x 
			  "l~"
			  i I U u o c a - E @ e))

(RPAQQ PHONSYMPHONEMEALIST ((s SS.PHONEME)
			    (p PP.PHONEME)
			    (t TT.PHONEME)
			    (k KK.PHONEME (b BB.PHONEME)
			       (d DD.PHONEME)
			       (g GG.PHONEME)
			       (t TT.PHONEME))))

(RPAQQ PSVOWELS (i I U u o c a - E @ e))

(RPAQQ PV.CONSONANTS (SPEECH.FFb SPEECH.VVf SPEECH.VVb SPEECH.THf SPEECH.THb SPEECH.DHf SPEECH.DHb 
				 SPEECH.SSf SPEECH.SSbu SPEECH.SSr SPEECH.ZZf SPEECH.ZZbu SPEECH.ZZb 
				 SPEECH.SHf SPEECH.SHbu SPEECH.CHbu SPEECH.SHr SPEECH.CHf SPEECH.CHr 
				 SPEECH.JHf SPEECH.JHbu SPEECH.JHr SPEECH.PPf SPEECH.PPb SPEECH.BBf 
				 SPEECH.BBb SPEECH.TTf SPEECH.TTbu SPEECH.TTr SPEECH.DDf SPEECH.DDbu 
				 SPEECH.DDr SPEECH.KKf SPEECH.KKbu SPEECH.KKr SPEECH.GGf SPEECH.GGbu 
				 SPEECH.GGr SPEECH.MMf SPEECH.MMb SPEECH.NNf SPEECH.NNbu SPEECH.NNr 
				 SPEECH.WW SPEECH.YY SPEECH.RR SPEECH.LL SPEECH.HH SPEECH.SI 
				 SPEECH.TTnw SPEECH.TTw))

(RPAQQ SOUNDS (SPEECH.IY SPEECH.IH SPEECH.EY SPEECH.EH SPEECH.AE SPEECH.AY SPEECH.AA SPEECH.AW 
			 SPEECH.AH SPEECH.AO SPEECH.OW SPEECH.OY SPEECH.UH SPEECH.UW SPEECH.ER 
			 SPEECH.YU SPEECH.FFf SPEECH.FFb SPEECH.VVf SPEECH.VVb SPEECH.THf SPEECH.THb 
			 SPEECH.DHf SPEECH.DHb SPEECH.SSf SPEECH.SSbu SPEECH.SSr SPEECH.ZZf 
			 SPEECH.ZZbu SPEECH.ZZb SPEECH.SHf SPEECH.SHbu SPEECH.CHbu SPEECH.SHr 
			 SPEECH.CHf SPEECH.CHr SPEECH.JHf SPEECH.JHbu SPEECH.JHr SPEECH.PPf 
			 SPEECH.PPb SPEECH.BBf SPEECH.BBb SPEECH.TTf SPEECH.TTbu SPEECH.TTr 
			 SPEECH.DDf SPEECH.DDbu SPEECH.DDr SPEECH.KKf SPEECH.KKbu SPEECH.KKr 
			 SPEECH.GGf SPEECH.GGbu SPEECH.GGr SPEECH.MMf SPEECH.MMb SPEECH.NNf 
			 SPEECH.NNbu SPEECH.NNr SPEECH.WW SPEECH.YY SPEECH.RR SPEECH.LL SPEECH.HH 
			 SPEECH.SI SPEECH.TTnw SPEECH.TTw))

(RPAQQ NSOUNDS (SPEECH.FFf SPEECH.FFb SPEECH.VVf SPEECH.VVb SPEECH.THf SPEECH.THb SPEECH.DHf 
			   SPEECH.DHb SPEECH.SSf SPEECH.SSbu SPEECH.SSr SPEECH.ZZf SPEECH.ZZbu 
			   SPEECH.ZZb SPEECH.SHf SPEECH.SHbu SPEECH.CHbu SPEECH.SHr SPEECH.CHf 
			   SPEECH.CHr SPEECH.JHf SPEECH.JHbu SPEECH.JHr SPEECH.PPf SPEECH.PPb 
			   SPEECH.BBf SPEECH.BBb SPEECH.TTf SPEECH.TTbu SPEECH.TTr SPEECH.DDf 
			   SPEECH.DDbu SPEECH.DDr SPEECH.KKf SPEECH.KKbu SPEECH.KKr SPEECH.GGf 
			   SPEECH.GGbu SPEECH.GGr SPEECH.MMf SPEECH.MMb SPEECH.NNf SPEECH.NNbu 
			   SPEECH.NNr SPEECH.WW SPEECH.YY SPEECH.RR SPEECH.LL SPEECH.HH SPEECH.SI 
			   SPEECH.TTnw SPEECH.TTw))

(RPAQQ VCOMMENTS ((IY (* as in "beet" (+front)
			 *))
		  (IH (* as in "bit" (+front)
			 *))
		  (EY (* as in "bait" (+front)
			 *))
		  (EH (* as in "bet" (+front)
			 *))
		  (AE (* as in "bat" (+front)
			 *))
		  (AY (* as in "bite" (+back -round)
			 *))
		  (AA (* as in "Bob" (+back -round)
			 *))
		  (AW (* as in "bout" (+back -round)
			 *))
		  (AH (* as in "but" (+front -round)
			 *))
		  (AO (* as in "bought" (+round)
			 *))
		  (OW (* as in "boat" (+round)
			 *))
		  (OY (* as in "boy" (+round)
			 *))
		  (UH (* as in "book" (+round)
			 *))
		  (UW (* as in "boot" (+round)
			 *))
		  (ER (* as in "Bert" (+round)
			 *))
		  (YU (* as in "pew" (+front)
			 *))))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (840 6617 (MAKE.PHONEME 850 . 1553) (SPEAK 1555 . 2468) (FIND.ALLOPHONES 2470 . 2992) (
FIND.PHONEMES 2994 . 3282) (FIND.PHONEMES1 3284 . 3721) (FIND.PHONEMES2 3723 . 3942) (FIND.V.FEATURES 
3944 . 4230) (FINDCODA 4232 . 4406) (FINDNUCLEUS 4408 . 5061) (FIX.PHONEME 5063 . 5663) (OFFGLIDE 5665
 . 5976) (FINDVOWEL 5978 . 6615)))))
STOP