OPEN "COM1:4800,N,8,1,CD0,CS0,DS0,OP0,RS,TB2048,RB2048" FOR RANDOM AS #1
WHILE INKEY$ = ""
	'GOTO sfth
	GOTO allwords
	'GOTO allphonemes

	GOSUB talkword3
	GOSUB talkphonemePA5
	GOSUB talkword7
	GOSUB talkphonemePA5
	GOTO endwhile

sfth:
	GOSUB talkphonemeSS
	GOSUB talkphonemePA5
	GOSUB talkphonemeFF
	GOSUB talkphonemePA5
	GOSUB talkphonemeTH
	GOSUB talkphonemePA5
	GOTO endwhile
allwords:
       ' GOSUB talkword3
	'GOSUB talkphonemePA5
	GOSUB talkword0
	GOSUB talkphonemePA5
	GOSUB talkword1
	GOSUB talkphonemePA5
	GOSUB talkword2
	GOSUB talkphonemePA5
	GOSUB talkword3
	GOSUB talkphonemePA5
	GOSUB talkword4
	GOSUB talkphonemePA5
	GOSUB talkword5
	GOSUB talkphonemePA5
	GOSUB talkword6
	GOSUB talkphonemePA5
	GOSUB talkword7
	GOSUB talkphonemePA5
	GOSUB talkword8
	GOSUB talkphonemePA5
	GOSUB talkword9
	GOSUB talkphonemePA5
	GOSUB talkword10
	GOSUB talkphonemePA5
	GOSUB talkword11
	GOSUB talkphonemePA5
	GOSUB talkword12
	GOSUB talkphonemePA5
	GOSUB talkword13
	GOSUB talkphonemePA5
	GOSUB talkword14
	GOSUB talkphonemePA5
	GOSUB talkword15
	GOSUB talkphonemePA5
	GOSUB talkword16
	GOSUB talkphonemePA5
	GOSUB talkword17
	GOSUB talkphonemePA5
	GOSUB talkword18
	GOSUB talkphonemePA5
	GOSUB talkword19
	GOSUB talkphonemePA5
	GOSUB talkword20
	GOSUB talkphonemePA5
	GOSUB talkword30
	GOSUB talkphonemePA5
	GOSUB talkword40
	GOSUB talkphonemePA5
	GOSUB talkword50
	GOSUB talkphonemePA5
	GOSUB talkword60
	GOSUB talkphonemePA5
	GOSUB talkword70
	GOSUB talkphonemePA5
	GOSUB talkword80
	GOSUB talkphonemePA5
	GOSUB talkword90
	GOSUB talkphonemePA5
	GOSUB talkwordhundred
	GOSUB talkphonemePA5
	GOSUB talkworddepth
	GOSUB talkphonemePA5
	GOSUB talkwordpoint
	GOSUB talkphonemePA5
	GOSUB talkwordanchor
	GOSUB talkphonemePA5
	GOSUB talkwordalarm
	GOSUB talkphonemePA5
	GOSUB talkwordon
	GOSUB talkphonemePA5
	GOSUB talkwordoff
	GOSUB talkphonemePA5
	GOSUB talkwordshallow
	GOSUB talkphonemePA5
	GOSUB talkwordand
	GOSUB talkphonemePA5
	GOSUB talkwordwatch
	GOSUB talkphonemePA5
	GOSUB talkwordgps
	GOSUB talkphonemePA5
	GOSUB talkwordlimit
	GOSUB talkphonemePA5
	GOSUB talkwordset
	GOSUB talkphonemePA5
	GOSUB talkwordheading
	GOSUB talkphonemePA5
	GOSUB talkwordno
	GOSUB talkphonemePA5
	GOSUB talkwordnorth
	GOSUB talkphonemePA5
	GOSUB talkwordsouth
	GOSUB talkphonemePA5
	GOSUB talkwordeast
	GOSUB talkphonemePA5
	GOSUB talkwordwest
	GOSUB talkphonemePA5
	GOSUB talkwordposition
	GOSUB talkphonemePA5
	GOTO endwhile
allphonemes:
	FOR j = 5 TO 63
	p$ = CHR$(j)
	PRINT j
	GOSUB talkphoneme
	GOSUB talkphonemePA5
	GOSUB talkphonemePA5
	GOSUB talkphonemePA5
	NEXT

endwhile:
WEND

END
'--------------------------------------------------------------------------

talkword0:
       GOSUB talkphonemeZZ
       GOSUB talkphonemeEH
       GOSUB talkphonemeRR2
       GOSUB talkphonemeOW
	RETURN

talkword1:
       GOSUB talkphonemeWW
       GOSUB talkphonemeAO
       GOSUB talkphonemeNN1
	RETURN

talkword2:
       GOSUB talkphonemeTT2
       GOSUB talkphonemeUW2
	RETURN

talkword3:
       GOSUB talkphonemeTH
       GOSUB talkphonemeRR2
       GOSUB talkphonemeIY
	RETURN

talkword4:
       GOSUB talkphonemeFF
       GOSUB talkphonemeOR
	RETURN

talkword5:
       GOSUB talkphonemeFF
       GOSUB talkphonemeAY
       GOSUB talkphonemeVV
       RETURN

talkword6:
       GOSUB talkphonemeSS
       GOSUB talkphonemeIH
       GOSUB talkphonemeKK2
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
	RETURN

talkword7:
       GOSUB talkphonemeSS
       GOSUB talkphonemeEH
       GOSUB talkphonemeVV
       GOSUB talkphonemeAX
       GOSUB talkphonemeNN1
	RETURN

talkword8:
       GOSUB talkphonemeEY
       GOSUB talkphonemeTT1
	RETURN

talkword9:
       GOSUB talkphonemeNN2
       GOSUB talkphonemeAY
       GOSUB talkphonemeNN1
	RETURN

talkword10:
       GOSUB talkphonemeTT2
       GOSUB talkphonemeEH
       GOSUB talkphonemeNN1
	RETURN

talkword11:
       GOSUB talkphonemeIH
       GOSUB talkphonemeLL
       GOSUB talkphonemeEH
       GOSUB talkphonemeVV
       GOSUB talkphonemeEH
       GOSUB talkphonemeNN1
	RETURN

talkword12:
       GOSUB talkphonemeTT2
       GOSUB talkphonemeWW
       GOSUB talkphonemeEH
       GOSUB talkphonemeEL
       GOSUB talkphonemeVV
	RETURN

talkword13:
       GOSUB talkphonemeTH
       GOSUB talkphonemeER2
      
talkwordteen:    
       GOSUB talkphonemeTT2
       GOSUB talkphonemeIY
       GOSUB talkphonemeNN1
	RETURN

talkword14:
       GOSUB talkword4
       GOTO talkwordteen

talkword15:
       GOSUB talkphonemeFF
       GOSUB talkphonemeIH
       GOSUB talkphonemeFF
       GOTO talkwordteen

talkword16:
       GOSUB talkword6
       GOTO talkwordteen

talkword17:
       GOSUB talkword7
       GOTO talkwordteen

talkword18:
       GOSUB talkword8
       GOTO talkwordteen
      
talkword19:
       GOSUB talkword9
       GOTO talkwordteen

talkword20:
       GOSUB talkphonemeTT2
       GOSUB talkphonemeWW
       GOSUB talkphonemeEH
       GOSUB talkphonemeNN1

talkwordty:
       GOSUB talkphonemeTT2
       GOSUB talkphonemeIY
	RETURN

talkword30:
       GOSUB talkphonemeTH
       GOSUB talkphonemeER1
       GOTO talkwordty

talkword40:
       GOSUB talkword4
       GOTO talkwordty

talkword50:
       GOSUB talkphonemeFF
       GOSUB talkphonemeIH
       GOSUB talkphonemeFF
       GOTO talkwordty

talkword60:
       GOSUB talkword6
       GOTO talkwordty
	RETURN

talkword70:
       GOSUB talkword7
       GOTO talkwordty

talkword80:
       GOSUB talkword8
	GOTO talkwordty

talkword90:
       GOSUB talkword9
       GOTO talkwordty

talkwordhundred:
       GOSUB talkphonemeHH2
       GOSUB talkphonemeAX
       GOSUB talkphonemeNN1
       GOSUB talkphonemeDD2
       GOSUB talkphonemeRR2
       GOSUB talkphonemeDD1
	RETURN

talkworddepth:
       GOSUB talkphonemeDD2
       GOSUB talkphonemeEH
       GOSUB talkphonemeEH
       GOSUB talkphonemePP
       GOSUB talkphonemeTH
	GOTO endword

talkwordpoint:
       GOSUB talkphonemePP
       GOSUB talkphonemeOY
       GOSUB talkphonemeTT1
	GOTO endword

talkwordanchor:
       GOSUB talkphonemeEY
       GOSUB talkphonemeKK3
       GOSUB talkphonemeAE
	GOTO endword

talkwordalarm:
       GOSUB talkphonemeAE
       GOSUB talkphonemeLL
       GOSUB talkphonemeAR
       GOSUB talkphonemeMM
	GOTO endword

talkwordon:
       GOSUB talkphonemeAO
       GOSUB talkphonemeNG
	GOTO endword

talkwordoff:
       GOSUB talkphonemeAO
       GOSUB talkphonemeFF
       GOSUB talkphonemeFF
	GOTO endword

talkwordshallow:
       GOSUB talkphonemeSH
       GOSUB talkphonemeAE
       GOSUB talkphonemeLL
       GOSUB talkphonemeOW
	GOTO endword

talkwordand:
       GOSUB talkphonemeIH
       GOSUB talkphonemeIH
       GOSUB talkphonemeNN1
       GOSUB talkphonemeDD2
	GOTO endword

talkwordwatch:
       GOSUB talkphonemeWW
       GOSUB talkphonemeAO
       GOSUB talkphonemeTT1
       GOSUB talkphonemeCH
	GOTO endword

talkwordlimit:
       GOSUB talkphonemeLL
       GOSUB talkphonemeIH
       GOSUB talkphonemeMM
       GOSUB talkphonemeIH
       GOSUB talkphonemeTT1
	GOTO endword

talkwordset:
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
       GOSUB talkphonemeEH
       GOSUB talkphonemeTT2
	GOTO endword

talkwordheading:
       GOSUB talkphonemeHH1
       GOSUB talkphonemeEH
       GOSUB talkphonemeDD2
       GOSUB talkphonemeIH
       GOSUB talkphonemeNG
	GOTO endword

talkwordgps:
       GOSUB talkphonemeJH
       GOSUB talkphonemeIY
       GOSUB talkphonemePP
       GOSUB talkphonemeIY
       GOSUB talkphonemeEH
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
	GOTO endword

talkwordno:
       GOSUB talkphonemeNN2
       GOSUB talkphonemeOW
	GOTO endword

talkworddata:
       GOSUB talkphonemeDD2
       GOSUB talkphonemeEY
       GOSUB talkphonemeTT2
       GOSUB talkphonemeAX
	GOTO endword

talkwordnorth:
       GOSUB talkphonemeNN2
       GOSUB talkphonemeOR
       GOSUB talkphonemeHH1
	GOTO endword

talkwordsouth:
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
       GOSUB talkphonemeAW
       GOSUB talkphonemeTH
       GOSUB talkphonemeTH
	GOTO endword

talkwordeast:
       GOSUB talkphonemeIY
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
       GOSUB talkphonemeTT2     ' was TT1
	GOTO endword

talkwordwest:
       GOSUB talkphonemeWW
       GOSUB talkphonemeEH
       GOSUB talkphonemeSS
       GOSUB talkphonemeSS
       GOSUB talkphonemeTT2     ' was TT1
	GOTO endword

talkwordposition:
       GOSUB talkphonemePP
       GOSUB talkphonemeIH
       GOSUB talkphonemeZZ
       GOSUB talkphonemeIH
       GOSUB talkphonemeSH
       GOSUB talkphonemeNN1
	GOTO endword

endword:
       GOSUB talkphonemePA2
	RETURN
'----------------------------------------------------------------------------
' talkphonemex set, where x is the phoneme
'                               Example and comments

talkphonemeAA:                   ' hOt
	p$ = CHR$(24)         ' can be doubled
	GOTO talkphoneme
talkphonemeAE:                   ' hAt
	p$ = CHR$(26)         ' can be doubled
	GOTO talkphoneme
talkphonemeAO:                   ' AUght
	p$ = CHR$(23)         ' can be doubled
	GOTO talkphoneme
talkphonemeAR:                   ' alARm
	p$ = CHR$(59)
	GOTO talkphoneme
talkphonemeAW:                   ' dOWn
	p$ = CHR$(32)
	GOTO talkphoneme
talkphonemeAX:                   ' sUceed
	p$ = CHR$(15)         ' can be doubled
	GOTO talkphoneme
talkphonemeAY:                   ' kIte
	p$ = CHR$(6)
	GOTO talkphoneme
talkphonemeBB1:                  ' riB
	p$ = CHR$(28)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeBB2:                  ' Beast
	p$ = CHR$(63)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeCH:                   ' CHurCH
	p$ = CHR$(50)
	GOTO talkphoneme
talkphonemeDD1:                  ' enD
	p$ = CHR$(21)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeDD2:                  ' Down
	p$ = CHR$(33)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeDH1:                  ' THis
	p$ = CHR$(18)
	GOTO talkphoneme
talkphonemeDH2:                  ' baTHe
	p$ = CHR$(54)
	GOTO talkphoneme
talkphonemeEH:                   ' End
	p$ = CHR$(7)          ' can be doubled
	GOTO talkphoneme
talkphonemeEL:                   ' angLE
	p$ = CHR$(62)
	GOTO talkphoneme
talkphonemeER1:                  ' lettER
	p$ = CHR$(51)
	GOTO talkphoneme
talkphonemeER2:                  ' fERn
	p$ = CHR$(52)
	GOTO talkphoneme
talkphonemeEY:                   ' trAY
	p$ = CHR$(20)
	GOTO talkphoneme
talkphonemeFF:                   ' Food
	p$ = CHR$(40)         ' usually double for initial
	GOTO talkphoneme
talkphonemeGG1:                  ' Guest
	p$ = CHR$(36)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeGG2:                  ' Got
	p$ = CHR$(61)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeGG3:                  ' peG
	p$ = CHR$(34)         ' usually preceed with 10-30 mS silence
	GOTO talkphoneme
talkphonemeHH1:                  ' He
	p$ = CHR$(27)         ' usually double for initial
	GOTO talkphoneme
talkphonemeHH2:                  ' Hoe
	p$ = CHR$(57)         ' usually double for initial
	GOTO talkphoneme
talkphonemeIH:                   ' sIt
	p$ = CHR$(12)         ' can be doubled
	GOTO talkphoneme
talkphonemeIY:                   ' sEE
	p$ = CHR$(19)
	GOTO talkphoneme
talkphonemeJH:                   ' JudGe
	p$ = CHR$(10)
	GOTO talkphoneme
talkphonemeKK1:                  ' Can't
	p$ = CHR$(42)         ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeKK2:                  ' speaK
	p$ = CHR$(41)         ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeKK3:                  ' Crane
	p$ = CHR$(8)          ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeLL:                   ' Like
	p$ = CHR$(45)
	GOTO talkphoneme
talkphonemeMM:                   ' Milk
	p$ = CHR$(16)
	GOTO talkphoneme
talkphonemeNG:                   ' aNGer
	p$ = CHR$(44)
	GOTO talkphoneme
talkphonemeNN1:                  ' thiN
	p$ = CHR$(11)
	GOTO talkphoneme
talkphonemeNN2:                  ' No
	p$ = CHR$(56)
	GOTO talkphoneme
talkphonemeOR:                   ' fORtune
	p$ = CHR$(58)
	GOTO talkphoneme
talkphonemeOW:                   ' zOne
	p$ = CHR$(53)
	GOTO talkphoneme
talkphonemeOY:                   ' vOIce
	p$ = CHR$(5)
	GOTO talkphoneme
talkphonemePP:                   ' Pow
	p$ = CHR$(9)          ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeRR1:                  ' Read
	p$ = CHR$(14)
	GOTO talkphoneme
talkphonemeRR2:                  ' cRane
	p$ = CHR$(39)
	GOTO talkphoneme
talkphonemeSH:                   ' SHip
	p$ = CHR$(37)         ' usually double for initial
	GOTO talkphoneme
talkphonemeSS:                   ' veSt
	p$ = CHR$(55)         ' usually double for initial
	GOTO talkphoneme
talkphonemeTH:                   ' THin
	p$ = CHR$(29)         ' usually double for initial
	GOTO talkphoneme
talkphonemeTT1:                  ' parTs
	p$ = CHR$(17)         ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeTT2:                  ' To
	p$ = CHR$(13)         ' usually preceed with 50-80 mS silence
	GOTO talkphoneme
talkphonemeUH:                   ' bOOk
	p$ = CHR$(30)         ' may be doubled
	GOTO talkphoneme
talkphonemeUW1:                  ' tO
	p$ = CHR$(22)
	GOTO talkphoneme
talkphonemeUW2:                  ' fOOd
	p$ = CHR$(31)
	GOTO talkphoneme
talkphonemeVV:                   ' Vest
	p$ = CHR$(35)
	GOTO talkphoneme
talkphonemeWH:                   ' WHig
	p$ = CHR$(48)         ' usually double for initial
	GOTO talkphoneme
talkphonemeWW:                   ' We
	p$ = CHR$(46)
	GOTO talkphoneme
talkphonemeXR:                   ' stARs
	p$ = CHR$(47)
	GOTO talkphoneme
talkphonemeYR:                   ' hEAr
	p$ = CHR$(60)
	GOTO talkphoneme
talkphonemeYY1:                  ' cUte
	p$ = CHR$(49)
	GOTO talkphoneme
talkphonemeYY2:                  ' Yes
	p$ = CHR$(25)
	GOTO talkphoneme
talkphonemeZH:                   ' pleaSure
	p$ = CHR$(38)
	GOTO talkphoneme
talkphonemeZZ:                   ' Zoo
	p$ = CHR$(43)
	GOTO talkphoneme
talkphonemePA1:                  ' 10 mS silence
	p$ = CHR$(0)
	GOTO talkphoneme
talkphonemePA2:                  ' 30 mS silence
	p$ = CHR$(1)
	GOTO talkphoneme
talkphonemePA3:                  ' 50 mS silence
	p$ = CHR$(2)
	GOTO talkphoneme
talkphonemePA4:                  ' 100 mS silence
	p$ = CHR$(3)
	GOTO talkphoneme
talkphonemePA5:                  ' 200 mS silence
	p$ = CHR$(4)
	GOTO talkphoneme

'-----------------------------------

talkphoneme:
PRINT #1, p$;
a$ = INPUT$(1, 1)
IF INKEY$ <> "" THEN PRINT #1, CHR$(0); : END
'WHILE INKEY$ = "": WEND
RETURN

