Page 3 of 3
Re: Speech Adapter info thread
Posted: Sun Apr 29, 2018 10:51 am
by Brutman
You've piqued my curiosity (again) on the speech adapter. What is the SPC format? Does that allow you to substitute different phonemes than what the standard BIOS routines provide?
Have you been collecting any docs on what the CVSD/LPC data looks like? I'd like to write my own code to manipulate it one day, but in C ...
I have a very poor copy of the technical reference here from Trixter; it had the BIOS listing but not much else, and the BIOS listing didn't have any secrets. But it will have the hardware registers that it is manipulating. Combine that with the data sheet on the chip and you should be able to do what you want with it.
Mike
Re: Speech Adapter info thread
Posted: Sun Apr 29, 2018 11:17 am
by redmagehat
Whoops, my bad, by "SPC" I really mean "LPC". (Typed up my last post in too much of a hurry.)
BlueWizard saves out LPC-format .BIN or text-based byte stream files.
I don't have any more information on what the actual data looks like, but generally what I think it's doing is parsing through the source audio file, and deriving what the equivalent LPC synthesis values would be based on how the TMS5220 chip would decode it. I'm sure that the standard BIOS vocabulary built into the PCjr Speech Adapter ROM was originally recorded by a voice actor in audio format, then converted to an LPC format, then stored in the ROM chips.
So really the only thing missing is how to take these LPC files that BlueWizard saves out, and get them to load/playback using the same decoding method that the internal BIOS vocabulary uses. Loading CVSD data into memory and playing it back is supported pretty well in BASIC and MakeTalk, so I'm guessing that loading LPC data would be exactly the same, it's just the decode process that we're missing.
Here's the original thread I found on BlueWizard:
http://atariage.com/forums/topic/260857 ... 5220-tool/
Unfortunately when it comes to programming, I'm lucky if I can even throw a text adventure together with some PLAY music statements and screen colors. So I won't be much help on that front. If you're curious to see the text-based LPC output of BlueWizard, I can save a file out in that format.
Re: Speech Adapter info thread
Posted: Sun Apr 29, 2018 12:14 pm
by Trixter
Is BASIC a requirement for your project?
Re: Speech Adapter info thread
Posted: Sun Apr 29, 2018 12:30 pm
by redmagehat
Yeah it is (unfortunate as that may be). It's easier for me to understand ... I'm a super-beginner at actual coding.

Re: Speech Adapter info thread
Posted: Thu May 03, 2018 9:02 am
by Trixter
The tech ref states that the speech adapter provides BIOS support in the form of interrupt 0x4d. Looking at page 20, we can see that AH=2 is LPC (Background), and AL=2 will speak the LPC data pointed to by DS:SI with length in CX not to exceed 4095 bytes. (Because longform playback beyond 4095 bytes isn't possible, probably due to chip limitations, a long file would likely need to be played back with AH-3 which is polled LPC (foreground), and playback would have to be restarted immediately with the next 4k chunk after that function returns.)
So yes, this should totally be possible. If I weren't over-extended, I'd write a small .COM program to test this theory.
Mike, you may have missed that I finally sourced a decent copy of the tech ref where everything is readable:
ftp://ftp.oldskool.org/pub/drivers/IBM/ ... uncut).pdf
I'll chop it up into pages at some point, but all the info is there and can be reproduced perfectly if you print it out double-sided.
Re: Speech Adapter info thread
Posted: Thu May 03, 2018 9:25 am
by redmagehat
I wonder if that AH parameter is being utilized by the P1 BASIC parameter (P1 sets the mode to record/playback, vocab foreground or vocab background). Then the P2 BASIC parameter that tells it to "play back from vocabulary BIOS" assuming you are in one of the vocab modes, and then P3 sets the particular word you want.
When I was messing around I set P2 to a value of 2 just to see what would happen (in vocabulary mode) and it started playing back a whole bunch of really weird squawks and squeaks for 20 seconds or so, then gave control back to BASIC. P2=3 does nothing. P2=2 in vocabulary mode is undocumented but maybe it's attempting to read some segment in memory and trying to "decode" it?
Maybe I'm secretly hoping that undocumented support is already present in BASIC?
