home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / pastalk.zip / TALK.DOC < prev    next >
Text File  |  1989-04-23  |  3KB  |  78 lines

  1. Mike,
  2.  
  3. I think we did it. The work you did debugging really helped a lot.
  4.  
  5. Here's what I learned:
  6.  
  7. The most important part of the code is what you labeled DoSpk.
  8. Essentially it takes an address where the data begins, and the
  9. address where the data ends, and one-by-one sends each bit to the
  10. speaker port, 61h. If the bit is 1, it sends 32h. If the bit is 0
  11. then it sends 30h. I traced it's progress as it spoke each
  12. phoneme to learn their addresses.
  13.  
  14. Each phoneme is exactly 023Fh bytes long, and they are arranged
  15. in sequence in the data table, in no particular order starting at
  16. offset $012C. "I" is a special case which is always translated
  17. into the pair "AH-EE". There is also a mystery "blank" phoneme.
  18.  
  19. So I wrote my own code for doing about the same thing as DoSpk.
  20. This is in Talk.ASM. It requires TASM to assemble. It is passed
  21. the address in memory where you want to start moving data to the
  22. speaker, and the number of bytes you want processed. If you say
  23. you want zero bytes, it processes 65536. It uses the value of a
  24. global variable SpeedDelay to determine how much to slow down.
  25. Altogether, it seems to be somewhat faster than the code used in
  26. the original, so perhaps even a 4.77 MHz machine could use a
  27. small delay. It is called ** FAR **.
  28.  
  29. Then I copied the data part of Speech.BIN to a file called
  30. TalkData, and converted that to an object file with BINOBJ.
  31. You'll have to run "BinObj TalkData.BIN TalkData.OBJ TalkDataLink".
  32.  
  33. I wrote routines in Pascal for parsing a string of phonemes, and
  34. determining what values Talk needs.
  35.  
  36. TalkPhoneme takes just one phoneme and looks up it's address in
  37. the table. The Turbo Pascal Seg and Ofs functions are used to
  38. find the data table, and the constant data length, $023F, is hard
  39. coded.
  40.  
  41. procedure Speech parses a string for phonemes. I've allowed any
  42. non-alphabetic character to be used as a seperator.
  43.  
  44. This is great.
  45.  
  46. Why don't you try it on your machine with different SpeedDelays
  47. and see what happens.
  48.  
  49. For fun, run Talk on any part of memory, your program, the
  50. operating system, whatever.
  51.  
  52. I don't think it can be made fast enough to run in the
  53. background, as I had hoped. It would be alright on a 386 perhaps,
  54. but not at 4.77 MHz. Hmmm ....
  55.  
  56. It may be possible to compress the data somewhat. It seems that
  57. there are often a lot of high bits in a row, followed by a lot of
  58. low bits in a row. I might examine the possibility of storing
  59. counts of high and low bits instead.
  60.  
  61. Have you noticed that NumSpeech's interpretation of "30" sounds a
  62. lot like "50"?
  63.  
  64. We could make some improvements in the sounds themselves. For
  65. example, every time there is a "D" sound, it sounds like "Da".
  66. Perhaps the Count for this phoneme could be shorter. Replacing
  67. the samples, though, would require some sampling device of which
  68. I have none.
  69.  
  70. Are we a team or what?
  71.  
  72.  
  73.  
  74. -David-
  75.  
  76.  
  77.  
  78.