home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 35.dms / 35.adf / ezspeak.bas < prev    next >
BASIC Source File  |  1988-05-22  |  8KB  |  289 lines

  1. 10    scnclr
  2. 20    rem SpeechCraft V.1.0, by Kelly Kauffman, 3170 Sprout Way, Sparks, NV  89431
  3. 30    rem CIS [70206,640]
  4. 40    restore 100
  5. 50    for i=0 to 8:read config%(i):next i
  6. 60    read x$
  7. 70    speek$=translate$(x$)
  8. 80    x%=narrate (speek$,config%())
  9. 90    print    "            Version 1.0"
  10. 100   data 110,0,150,0,22000,64,10,0,0
  11. 110   data speech-eazy.
  12. 120   goto 1770:rem menu
  13. 130   speek$=translate$(x$)
  14. 140   x%=narrate(speek$,config%())
  15. 150   return
  16. 160   x$="Change Pitch.":gosub 130
  17. 170   scnclr
  18. 180   print "Please enter a number between 65 and"
  19. 190   print 
  20. 200   print "320.  It is currently set to ";config%(0);"."
  21. 210   print
  22. 220   print
  23. 230   print "What do you want it to be now ";:input change
  24. 240   config%(0)=change
  25. 250   print
  26. 260   x$=phrase$
  27. 270   gosub 130
  28. 280   goto 1770
  29. 290   rem end of changing pitch
  30. 300   x$="Change Inflection.":gosub 130
  31. 310   scnclr
  32. 320   print "          Change Inflection"
  33. 330   print
  34. 340   print "It is currently set to:";config%(1);"."
  35. 350   if config%(1)=0 then print "Inflection Enabled." Else print "Monotone.  No Inflection."
  36. 360   print
  37. 370   print "0 = Inflection Enabled":print :print "1 = Inflection Disabled"
  38. 380   print
  39. 390   print "Enter Choice ";:input change
  40. 400   if change>1 or change<0 then 300 else config%(1)=change
  41. 410   goto 1770
  42. 420   rem end of inflection
  43. 430   x$="Speeking Rate.":gosub 130
  44. 440   scnclr
  45. 450   print
  46. 460   print "            Change Rate"
  47. 470   print
  48. 480   print
  49. 490   print"Speeking Rate is currently set to:"
  50. 500   print config%(2);"."
  51. 510   print
  52. 520   print
  53. 530   print "You can enter a number between 40 &"
  54. 540   print "400, the default is 150."
  55. 550   print
  56. 560   print "Enter Speech Rate ";:input change
  57. 570   if change >400 or change<40 then 440
  58. 580   config%(2)=change
  59. 590   x$=phrase$:gosub 130
  60. 600   goto 1770
  61. 610   x$="Change Voice.":gosub 130
  62. 620   scnclr
  63. 630   print
  64. 640   print "         Change Speaking Voice"
  65. 650   print
  66. 660   print "Currently set to ";
  67. 670   if config%(3)=0 then print "Male Voice." else print "Female Voice."
  68. 680   print
  69. 690   print "0=Male"
  70. 700   print "1=Female"
  71. 710   print
  72. 720   print "Enter Choice";
  73. 730   input choice
  74. 740   if choice>1 or choice <0 then 620
  75. 750   config%(3)=choice
  76. 760   goto 1770
  77. 770   x$="Change Freequency.":gosub 130
  78. 780   scnclr
  79. 790   print
  80. 800   print"           Change Frequency"
  81. 810   print
  82. 820   print
  83. 830   print "This paramater controls the changes"
  84. 840   print "in vocal quality. Specify a value"
  85. 850   print "in the range of 5,000 (low and"
  86. 860   print "rumbly), to 28000 (high and squeaky."
  87. 870   print "The default value is 22200."
  88. 880   print
  89. 890   print "It is currently set to ";config%(4)
  90. 900   print
  91. 910   print "Please enter Frequency now";
  92. 920   input choice
  93. 930   if choice >28000 or choice <5000 then 780
  94. 940   config%(4)=choice
  95. 950   goto 1770
  96. 960   x$="Volume.":gosub 130
  97. 970   scnclr
  98. 980   print"              Volume."
  99. 990   print
  100. 1000  print "Specify a value between 0 (no sound)"
  101. 1010  print "and 64 (loudest).  It is currently "
  102. 1020  print "set at ";config%(5);"."
  103. 1030  print
  104. 1040  print "Enter Volume ";
  105. 1050  input vol
  106. 1060  if vol>64 or vol<0 then 970
  107. 1070  print
  108. 1080  config%(5)=vol
  109. 1090  goto 1770
  110. 1100  x$="Chanel Selection.":gosub 130
  111. 1110  scnclr
  112. 1120  print"      Channel Selection"
  113. 1130  print "Channels 0 and 3 go to the left audio"
  114. 1140  print "output, and channels 1 and 2 go to "
  115. 1150  print "the right audio output.  Specify a "
  116. 1160  print "number from the following chart:"
  117. 1170  print
  118. 1180  print "Value     Channel"
  119. 1190  print "0         0"
  120. 1200  print "1         1"
  121. 1210  print "2         2"
  122. 1220  print "3         3"
  123. 1230  print "4         0 and 1"
  124. 1240  print "5         0 and 2"
  125. 1250  print "6         3 and 1"
  126. 1260  print "7         3 and 2"
  127. 1270  print "8         either avail. left channel."
  128. 1280  print "9         either aval. right channel."
  129. 1290  print "10        either avail. right/left"
  130. 1300  print "          pair of channels (default)"
  131. 1310  print "11        any avail. single channel."
  132. 1320  print
  133. 1330  print "Enter Choice";
  134. 1340  input choice
  135. 1350  if choice>11 or choice<0 then 1110
  136. 1360  config%(6)=choice
  137. 1370  goto 1770
  138. 1380  end
  139. 1390  x$="sinkronihzation mode.":gosub 130
  140. 1400  scnclr
  141. 1410  print "     Synchronization Mode."
  142. 1420  print
  143. 1430  print "0 (default) means the Amiga waits"
  144. 1440  print "  to finish what it is saying, before"
  145. 1450  print "  it goes on in the program."
  146. 1460  print
  147. 1470  print "1 means the Amiga doesn't wait to"
  148. 1480  print "  finish what it's saying, instead"
  149. 1490  print "  it speaks and continues with the"
  150. 1500  print "  program."
  151. 1510  print
  152. 1520  print "It is currently set to ";config%(7)
  153. 1530  print
  154. 1540  print "Enter new Value ";
  155. 1550  input choice
  156. 1560  if choice>1 or choice<0 then 1400
  157. 1570  config%(7)=choice
  158. 1580  goto 1770
  159. 1590  x$="Narator device control.":gosub 130
  160. 1600  scnclr
  161. 1610  print "0=Wait to finish first statement,then"
  162. 1620  print "speak the next one."
  163. 1630  print 
  164. 1640  print "1=If another speech command is found"
  165. 1650  print "encountered, stop speaking the"
  166. 1660  print "one and say neither."
  167. 1670  print
  168. 1680  print "2=Identical to 1 except it speaks"
  169. 1690  print "the second command."
  170. 1700  print
  171. 1710  print "Currently set to ";config%(8)
  172. 1720  print
  173. 1730  print "Change to ";:input choice
  174. 1740  if choice>2 or choice<0 then 1600
  175. 1750  config%(8)=choice
  176. 1760  goto 1770
  177. 1770  rem menu
  178. 1780  scnclr
  179. 1790  print "      SpeechEazy! Version 1.0"
  180. 1800  print 
  181. 1810  print "            Main Menu"
  182. 1820  print
  183. 1830  print "1) Change Pitch "
  184. 1840  print "2) Change Inflection"
  185. 1850  print "3) Change Rate"
  186. 1860  print "4) Change Speaking Voice"
  187. 1870  print "5) Change Frequency in hertz"
  188. 1880  print "6) Change Volume"
  189. 1890  print "7) Change Channel Selection"
  190. 1900  print "8) Change Synchronization mode."
  191. 1910  print "9) Change Narrator device control"
  192. 1920  print "0) Change Phrase"
  193. 1930  print "S) Save current phrase w/paramaters."
  194. 1940  print "L) Load phrase w/parameters."
  195. 1950  ?
  196. 1960  x$="choose.":gosub 130
  197. 1970  print "Please enter Choice ";
  198. 1980  getkey a$
  199. 1990  print a$
  200. 2000  if asc(a$)=13 then 1770
  201. 2010  if a$<>"L" or a$<>"l" or a$<>"S" or a$<>"s" then choice=val(a$)
  202. 2020  if a$="L" or a$="l" then 2300
  203. 2030  if a$="S" or a$="s" then 2530
  204. 2040  if choice=0 then 2070
  205. 2050  on choice goto 160,300,430,610,770,960,1100,1390,1590,2070
  206. 2060  goto 1770
  207. 2070  scnclr
  208. 2080  x$="Change Frase.":gosub 130
  209. 2090  print "          Change Phrase"
  210. 2100  print
  211. 2110  print "1) Listen to Current Phrase"
  212. 2120  print 
  213. 2130  print "2) Make a new phrase"
  214. 2140  print
  215. 2150  print "Enter Choice.";
  216. 2160  input choice
  217. 2170  if choice>2 or choice<1 then 2070
  218. 2180  if choice=1 then x$=phrase$:gosub 130
  219. 2190  if choice=1 then 1770
  220. 2200  scnclr
  221. 2210  print "          Enter New Phrase"
  222. 2220  print 
  223. 2230  print "Then follow it by a [RETURN]"
  224. 2240  print
  225. 2250  line input phrase$
  226. 2260  print
  227. 2270  print "Do you want to hear it now? (y/n)";:input yn$
  228. 2280  if yn$="Y" or yn$="y" then x$=phrase$:gosub 130
  229. 2290  goto 1770
  230. 2300  x$="Load.":gosub 130
  231. 2310  scnclr
  232. 2320  print
  233. 2330  print "            Load Phrase"
  234. 2340  print
  235. 2350  print "This will load in a previously "
  236. 2360  print
  237. 2370  print "      ";
  238. 2380  print inverse(1);"S";inverse(0);"aved phrase."
  239. 2390  print
  240. 2400  print"Enter filename for phrase:"
  241. 2410  print
  242. 2420  print "FORMAT:  Volume name:subdir./file"
  243. 2430  print
  244. 2440  on error gosub 2780
  245. 2450  line input file$
  246. 2460  open "i",#1,file$
  247. 2470  for i=0 to 8
  248. 2480  input #1,config%(i)
  249. 2490  next i
  250. 2500  line input #1,phrase$
  251. 2510  close #1
  252. 2520  goto 1770
  253. 2530  x$="Save.":gosub 130
  254. 2540  scnclr
  255. 2550  print
  256. 2560  print"              Save"
  257. 2570  print 
  258. 2580  print"This command will save your current"
  259. 2590  print 
  260. 2600  print "phrase to disk to a file you specify"
  261. 2610  print
  262. 2620  print "along with all of your parameters."
  263. 2630  print
  264. 2640  print "Press RETURN to exit.":?
  265. 2650  print "Filename:";
  266. 2660  line input file$
  267. 2670  if file$="" then 1770
  268. 2680  open "o",#1,file$
  269. 2690  for i=0 to 8
  270. 2700  print #1,config%(i)
  271. 2710  next i
  272. 2720  print #1,phrase$
  273. 2730  close #1
  274. 2740  print
  275. 2750  print "Save is complete."
  276. 2760  for i=1 to 2000:next i
  277. 2770  goto 1770
  278. 2780  scnclr 
  279. 2790  x$="you messed up."
  280. 2800  gosub 130
  281. 2810  ?:?:?
  282. 2820  ?"I encountered an error ";err;"."
  283. 2830  print
  284. 2840  print
  285. 2850  print"Press RETURN to continue."
  286. 2860  input a$
  287. 2870  on error gosub 2780
  288. 2880  resume 1770
  289.