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

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