Making A Covox Speech Thing Work On A Modern PC

Long ago, when mainframes ruled the earth, computers were mute. In this era before MP3s and MMUs, most home computers could only manage a simple beep or two. Unless you had an add-on device like the Covox Speech Thing, that is. This 1986 device plugged into your parallel port and allowed you to play sound. Glorious 8-bit, mono sound. [Yeo Kheng Meng] had heard of this device, and wondered what it would take to get it running again on a modern Linux computer. So he found out in the best possible way: by doing it.

The Covox Speech Thing is a very simple device, a discrete component digital-to-analog converter (DAC) that uses computer parallel port. This offers 8 data pins, and the Covox couples each of these to a resistor of different value. Tie the output of these resistors together, then raise the voltage on different pins and you create an analog voltage level from digital data. Do this repeatedly, and you get an audio waveform. It’s a simple device that can create the waveform with a sampling frequency as fast as the parallel port can send data. It isn’t as Hi-Fi as modern sound cards, but it was a lot better than a bleep.  If you don’t have one lying around, we’ve covered how to build your own.

The main problem that [Yeo Keng Meng] found with writing a program to drive this device is the sophistication of modern computers. Most of the time, devices like parallel ports are hidden behind drivers and buffers that control the flow of data. That makes things simple for the programmer: they can let the driver take care of the tedious details. This device requires a more direct approach: the data has to be written out to the parallel port at the right frequency to create the waveform. If there is any buffering or other fiddling about, this timing is off and it doesn’t work. [Yeo’s] code gets around this by writing the data (created from an MP3 file) directly to the parallel port address in memory. That only really works in Linux, though: it is much harder to do in OSes like Windows that do their best to keep you away from the hardware. It’s arguable if that is a good or a bad thing, but [Yeo] has done a nice job of writing up his work in a way that might intrigue a modern hacker trying to understand how things in the past were both simpler and more complicated at the same time.

52 thoughts on “Making A Covox Speech Thing Work On A Modern PC

  1. I remember this thing. AKA Disney Sound Source (same principle, but different hardware).
    Back then, games used FM synthesis for music, and a DAC (usually 8 bit) for noises. So the sound cards had hardware for both. There were sound cards that could only do FM (like the AdLib, that I owned), ones that only had a DAC (like the Covox) and ones that had both, like the Soundblaster.

    Most games had independent settings for music and sound, so you could use different devices for that.
    Like, using an AdLib for music, and a (DIY-) Covox for sound. Which is what I did.
    The cool kids had a soundblaster, that could do both, and it had a buffer, so it relieved the PC from having to send single sound bytes to the DAC at exactly the right time.

    I spent weeks getting this thing running in various programs. There even was a driver for Windows, so I could watch videos with sound for the first time, but my computer was so slow, that the sound stuttered horribly.
    Those were the beginnings of multimedia.

    Grandpa tells us war storys :-)

    1. Having a SoundBlaster on old Sierra games was amazing. It was a different world when every game had to have its own settings and drivers. I remember repeatedly scrolling through the list on One Must Fall 2097’s settings page to find the SoundBlaster IRQ and so on. The first time I heard actual voice playback on Star Trek Judgement Rites was mind blowing.

      Before that, I was very fond of a kid’s game which featured a coloring and drawing program and it spoke with that ubiquitous robot voice from the early nineties.

      Anyone else remember the SoundBlaster parrot or the psychiatrist chat bot?

      1. Yep. “Dr. Dr. Sbaitso, by Creative Labs.” I remember playing a .MOD on the PC for the first time, complete with oscilloscope view of each sample channel and the mix. That fully Blew. My. Mind.

    2. The only game I encountered that supported both Soundblaster and AdLib simultaneously was Duken Nukem II. It did music and effects with Soundblaster but if you selected only AdLib there was no music, just effects. Select both and it’d mix effects from both for a “fatter and fuller” sound.

  2. I can add here one thing about parallel ports. I am not sure about very very very latest chipsets, but, so far for myself (because I am electronic hobbyist) I have got mainboards that still have parallel (and serial) ports. Right now I have Gigabyte Intel Z170 (i5/i7, DDR4), and it has both. Sure, they are not directly on the back of the boards, but there are pins where to put raisers with connectors. Thing is, LPT/COM still exists in I/O system, it is just a question, does mainboard manufacturer trace that to connectors or not. So far, when choosing new PC platform for myself, I have always checked, does board have those LPT and COM pins connectors.
    Here, picture of board that I have right now on main system:
    http://images.hardwarecanucks.com/image/mac/reviews/gigabyte/Z170HD3DDR3/Z170_HD3_DDR3-13.jpg

    1. And: You can still run FreeDOS on actual boards, and all of the old DOS software, like games that support Covox, trackers, composers, software for old LPT EEPROM programmers, etc.

    2. Yes, this! Just about every motherboard I have ever seen still contains a parallel port even if it is only pins for plugging in a riser. Most even come with the riser!

      I don’t get why people make the claim that parallel and/or serial ports aren’t available anymore. Unless all they ever look at are laptops…

  3. Something fun to try would be to connect one of those to a microcontroller or FPGA and do all sorts of tricks to try to get the best audio quality. Stuff like oversampling, nonlinearity compensation, maybe even demux the output to get multiple channels. Getting full HD quality would be a bit of a stretch but getting it to the point where the output is hard to tell from good MP3 would be quite an achievement.

  4. growing up a friend had a apricot qi-300, with the IBM MCA instead of ISA, when Creative Labs eventually did release a Sound Blaster for it they also supplied a driver disk which did setup at boot and that was it, no jumpers to switch unlike the soundblasters where you had to set port and irq. I did my final exam with code sampling a sound blaster and displaying it using mode 13h vga as a oscilloscope, they were very hardy DAC’s and could sample voltages way higher than 12V, some were even opto -isolated to improve sound quality. programming was simple too, send the raw wav data to port ($300) and trigger irq once you filled the 16-bit buffer, rinse and repeat. DMA also, send memory address to port along with config for dma then trigger IRQ, stopping it playing memory data was another story, if you mis-timed something or got the port/irq/dma wrong in some way you had some interesting sounds and volume. All this was coded in Borland Turbo Pascal 6. ahh, the days of emm386/himem.sys tweaking to have enough memory for sounds.

      1. Ah yes, that program always made me reach for my 1.44mb boot disc due to it’s loads some tools in himem and not emm or vice versa. If i recall the DRDOS 5.0/6.0 had much better handling of himem/emm memory areas and you could get almost 620K low mem , then DOS4GW came alone allowing game code in highmem , whoopee , no more issues……maybe, what was my PATH to SBLIB again… .

  5. It might work in Windows too. You can either use a wrapper function that might come with your compiler, or just try and access the raw hardware, and the OS bounces that through a dozen layers of emulation and the bits eventually end up coming out of the port. Sure it takes millions of cycles, but that’s about the difference between a modern PC and a 286 anyway.

          1. No. That is not strictly true!

            The original XP could directly access the parallel port up until one of the service packs. I forget which one. After that I think there was a dll available that could be copied back in to make it work for another service pack or two before it reached the point that nobody bothered to hack it or at least didn’t bother to share the dlls again.

          1. > InpOut32 library
            More importantly – a driver behind it. So… why to stop at this point? Go waveout driver! (there were LPTDAC drivers back in time for Windows)

    1. We hooked one of those up to our MC6802 based ham radio repeater controller. We could enter random strings into memory over a modem link and the controller would “speak” them over the air.

  6. “Long ago, when mainframes ruled the earth, computers were mute. In this era before MP3s and MMUs, most home computers could only manage a simple beep or two.”

    Taught them to make noise, and talk, and we haven’t had peace since. Yes, my door is ajar.

      1. Oh sheesh is this why you are so hostile to me for no discernable reason? HaD can confirm I am not this MR Mannering or whatever. And just wow. You have some sort of Alex Jones level of almost hilarious paranoia. The saying wasn’t about you. Hopefully, they will get rid of the other users you dislike so you can leave me the hell alone and get back to enjoying life. Believe what you want, but either way I will still be here since I am not them.

        You really shouldn’t do this white knight garbage, you just make yourself look crazy and you are like “fifth year on the internet” bad at it. smdh

        1. Someone here is or has trolled under my previous handle…
          Yeah, they will now know that other handle is the same as this handle even though the admins here won’t.

          Jhodge666@gmail.com had a social-engineering re-personification attack attempted on it by a Joshua Hodges somewhere in the east coast of the USA.

          I had to keep removing my e-mail from their account on Amazon via logging as my old email (current email at the time) and also had to remove their drop-box, and some other stuff.
          I didn’t see them attempt to attach their Facebook account to my old e-mail otherwise I’d gotten them a quick entry into Guantanamo bay.

          Long and short, I’m not bound by Amazon terms and services, I’m not in the USA and Joshua gave me permission by gesture (the attaching my e-mail to his account), I emailed him a few times as I acquired his E-mail for his live.com address at the time… So I used my permission to purchase as many dildos as I could max his account on… only after ordering books on how not to get hacked and general security. Shortly (a few days ) after he then e-mailed a load of abuse and threats, so I deleted my account just after opening an account somewhere on the vast internet for my next e-mail as well as storing my google-sites pages.

          I then moved to the Unferium handle and associated account. Yeah, I should of been more careful with my email, not saying whom I signed up for my e-mail though…
          However, the only way he found my stuff is because I directly transferred my Google-sites pages to a location called / unferium / on the google sites.
          Of course, it won’t take someone long to do a string search in google to find where someone moved their google-pages to.
          Add in the mix that I made a few hints to someone on extending battery run-time, a link back to Hackaday and the sighting of my first comment, he probably tried a few guesses at posting on one of the few sites he could think I’d be on… i.e. Hackaday.

          When I countered your argument only for you to throw it off as rubbish in a troll-ish manner, I allowed myself to get suckered in to find out where your trolling leads to.
          It then appeared like that Joshua’s typing style but lacking my writing style being simulated badly (he did have access to my google-sites pages for a while BTW). Segmentation of querying an argument before stating an insult gives him away usually.

          So if you are not him, then well at least I can list you down as someone to ignore instead of asking that you get barred… I’ll allow others to find you offensive towards them, therefore pushing them to report you.

          However it is now known to that dangerous troll Joshua Hodges that I’ve moved to:
          John M Jahmez
          VishDemAblax@gmail.com

          I was hoping to keep this handle a more civil and constructive comment outlet for good projects and for giving out ideas as a free “think-tank” for others, especially contributors.

          HACKADAY STAFF, MY CURRENT HANDLE IS NOW CONSIDERED TROLL-BAIT, PLEASE BLACKLIST IMEDIATELY! I’ll click report comment on my own comment to highlight this for you… Sorry.

        2. The thing that didn’t make it through is a very long reason about this situation…
          The TL;DR of it is:

          I my old email someone attempted to re-personify,
          I caused them damage with their attempt because: legal grey area stuff about jurisdictions.
          I moved,
          I made a stupid mistake and moved some searchable strings that gave me away…
          He tracked down my e-mail account,
          He trolled some tites under my old name (handle),
          I’ve been essentially defamed by that person!

          I still don’t know why you have to keep poking though… And I’ve now seen you’re narrow minded.

          For one the fragmented comment is clearly fragmented for some obscure reason… therefore anyone with a wider mind-set would see the comment to be a correction of something awaiting approval.

          Then that picture you are referring to didn’t call you a slur, it actually showed an action of someone who lost an argument and pressing the “call him a slur” button.
          In other words the person pressing the button is you pressing the “I give up and instead throw abuse because he won and I lost” button.

          At least your narrow mind explains your extremist hatred in the form of femnazi grammanazi neonazi like retaliation.

        3. Oh, I pulled the whole convo along someone else as the repor t commen t link required fewer clicks than expected, thank you very much!

          P.s. I made a spelling mistake just above… have fun picking that nit! ;)

        4. It got through now,
          you can re-read the fragmented comment after the big bulky comment, then you’ll know why it looks that way.

          This proves your narrow mindedness as that fragmented comment is now below a seemingly newer bigger comment:

          Odd isn’t it?

          Anyway… as I did last time, when this conversation is finished, I’ll clean up after us.
          A moderator must have his/her pop-corn out right now. :D

    1. lol, With my first attempt at speech (1979) a flipped bit in machine code caused “My God how bored we are today” to come out as “Huberb a rebor babem bar”. There after, every time I mentioned computer speak people would respond with “Huberb a rebor baben bar” just to remind me of my failure.

  7. I’m not sure it was necessary to write any code. I think I remember seeing support for the ‘Speech Thing’ available as an option buried somewhere deep in the menus of the Linux kernel configurator. Maybe it’s been removed, I don’t know but I thought I remembered seeing it sometime in the last 7 years or so. I doubt any distro’s stock kernel will include support but if you don’t mind building your own kernel it might still be available today.

  8. Cute to be snide about 8 bit mono, but since when is any speech synthesizing stereo? And does the frequency range and quality of speech synthesis really need more than 8 bit?

    Don’t get me wrong I’m all for quality and stereo.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.