Speech Synthesis

Anything QL Software or Programming Related.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Speech Synthesis

Post by bwinkel67 »

I recently recovered software for my ZX81 that I bought in 1985. It was labeled a TS1000 Speech Synthesizer though in reality it just had 273 words digitized (over 9 libraries at about 500 bytes per word).

Today I was able to recover the BioTalk program...after years of sitting in a box, the first part of the tape seemed to degrade but I was able to go into the captured audio with audacity and just replace the 4 and 9 pulse audio blobs (representing 0 and 1) with good ones and it loaded. Then used OTLA to turn 7 minute load time into 14 seconds. Best configuration is to put a small amplifier on the Mic jack, though it can come through the TV's audio (modern TV's don't work well with that).

So my question is, can the QL somehow play digitized audio? The built-in speaker can't do that but is there any other place? How is the QL network hardware implemented? I assume it keeps things digital and doesn't somehow modulate and demodulate the signal. Just curious.

Pretty neat to see the ZX81 play audio and embedded in an application at that -- the BioTalk program asks what your birthday is, what today's date is, and then reads off how many days you've lived. All in software only.


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Speech Synthesis

Post by tofro »

bwinkel67 wrote:
So my question is, can the QL somehow play digitized audio? The built-in speaker can't do that but is there any other place? How is the QL network hardware implemented? I assume it keeps things digital and doesn't somehow modulate and demodulate the signal. Just curious.
The only port that would theoretically be able to output 1-bit audio would in fact be the network port - it can be bit-banged to produce signals up to about probably 100kHz - That's pretty close to what you can do with the ZX Spectrum's beeper. The problem is: The QL doesn't have a suitable internal timing source, so the timing would entirely be up to the CPU, relying on internal timed loops to provide the timing.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Speech Synthesis

Post by dilwyn »

One of the Ergon Spectrum emulators had a utility package which let you read Spectrum cassettes via the network ports. Never tried it. In the ZM/Accessories pack on http://www.dilwyn.me.uk/spectrum/index.html

There was also an early bit of software which let you output files in this way via the network port, effectively implementing a cassette save facility. Afraid I can't remember where I saw this, I thought it was in Quanta library but I've just done a quick search through the library guide at https://quanta.org.uk/software-library/ ... e-version/ and can't see it there. Anyone know what it might have been?


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: Speech Synthesis

Post by bwinkel67 »

Wow, that's pretty interesting that the network port could save and load ZX tapes. That would suggest you could play digitized sounds (voice and music) out of it. I know there was software on the ZX81 that turned it's mic port into a small electronic piano.

I have the Z80 machine code that outputs digitized sound on the ZX81. Is the Ergon emulator source public domain?


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: Speech Synthesis

Post by janbredenbeek »

dilwyn wrote:One of the Ergon Spectrum emulators had a utility package which let you read Spectrum cassettes via the network ports. Never tried it. In the ZM/Accessories pack on http://www.dilwyn.me.uk/spectrum/index.html

There was also an early bit of software which let you output files in this way via the network port, effectively implementing a cassette save facility. Afraid I can't remember where I saw this, I thought it was in Quanta library but I've just done a quick search through the library guide at https://quanta.org.uk/software-library/ ... e-version/ and can't see it there. Anyone know what it might have been?
Back in 1987 I developed a cassette interface using the network ports. It was originally developed for reading BASICODE programs from the radio but it includes two commands CLOAD and CSAVE which can be used to load and save programs to cassette (I've used them to make backups of microdrive files). The format isn't compatible with the Spectrum though as it uses the Kansas City modulation scheme (0-bit is one period of 1200 Hz, 1-bit is two periods of 2400 Hz) and records a QL-type header before the data block. Also, because of the strict timing requirements it can only be run from EPROM or zero-waitstate RAM (even a Trump card won't probably do).

The complete source and circuit diagram are here on GitHub: https://github.com/janbredenbeek/QL-Basicode


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Speech Synthesis

Post by dilwyn »

Ah, thanks Jan, that may have been what I was thinking of.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: Speech Synthesis

Post by bwinkel67 »

Thank you Jan, this is amazing. I will take a look at it and see if I can figure out how the digitizer on the ZX81 worked. Maybe we can get some audio out of the network ports as a sort of pseudo sound card.

I've read up on the Kansas City standard (4 pulses for zero and 8 pulses for one) is pretty close to the ZX81 format (4 pulses for zero and 9 pulses for one) though that over simplifies things since I haven't looked close enough at the former to see if the lengths of the pulses and pauses is similar. Found info on both here:

https://www.myprius.co.za/tape_storage.htm

Should your software be put on Dilwyn's page so it's more visible to us ordinary folks? :D


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: Speech Synthesis

Post by janbredenbeek »

bwinkel67 wrote:Thank you Jan, this is amazing. I will take a look at it and see if I can figure out how the digitizer on the ZX81 worked. Maybe we can get some audio out of the network ports as a sort of pseudo sound card.

I've read up on the Kansas City standard (4 pulses for zero and 8 pulses for one) is pretty close to the ZX81 format (4 pulses for zero and 9 pulses for one) though that over simplifies things since I haven't looked close enough at the former to see if the lengths of the pulses and pauses is similar. Found info on both here:

https://www.myprius.co.za/tape_storage.htm
Actually, my implementation uses the faster version of the Kansas City standard, which is 1200 baud rather than 300. It can be decoded from .WAV files by the minimodem program on Linux.
Should your software be put on Dilwyn's page so it's more visible to us ordinary folks? :D
That's up to Dilwyn, but If he does I would appreciate a link to my GitHub page too since that contains the source files and documentation.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Speech Synthesis

Post by dilwyn »

janbredenbeek wrote:
bwinkel67 wrote: Should your software be put on Dilwyn's page so it's more visible to us ordinary folks? :D
That's up to Dilwyn, but If he does I would appreciate a link to my GitHub page too since that contains the source files and documentation.
Thank you Jan. I've put it on the Misc Software page on my site, under 'Basicode'

As I don't know what I'm talking about with this, I'd be grateful if you'd take a quick look to see that my description and links are as you would want them.

http://www.dilwyn.me.uk/misc/index.html


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: Speech Synthesis

Post by bwinkel67 »

Thank you Dilwyn!

Btw, here is what digitized speech sounds like on a ZX81...maybe someday we can have that on the QL too...

https://youtu.be/UnfJG_H_Dsc


Post Reply