Text To Speech

User avatar
Pacman
Posts: 148
Joined: Mon Feb 05, 2018 2:59 pm

Re: Text To Speech

Post by Pacman »

The chip used looks like an SPO256 in shape and connection.
I have an old program to use it under MZ-700 but not with the same interface I believe.
I'll try to find him.
User avatar
Pacman
Posts: 148
Joined: Mon Feb 05, 2018 2:59 pm

Re: Text To Speech

Post by Pacman »

The BASIC program confirms that it is indeed an SPO256: The words of the examples practically take up the codes of the doc ...
SPO256.zip
(154.23 KiB) Downloaded 12 times
psmart
Posts: 130
Joined: Thu Nov 21, 2019 10:12 am
Location: Leeds
Contact:

Re: Text To Speech

Post by psmart »

This thread reminded me of a project during the uni years where I computerised my car with interconnected microcontrollers at each control cluster (ie. rear light cluster, front cluster etc). One of the boards was for speech and indeed used the GI SP0256 device, pictured below. It was tricky putting phonemes together to create words but at the time it was the rage, computers speaking, magic!

It would be difficult to create speech on the MZ series computers without additional hardware (probably MZ-2500 would be the exception albeit it had a dedicated speech board too). The MZ-80B range creates sound via an 8255 port C bit so with some creativity it may be possible and easier than the 8253 timer output on the 80K series, but I havent seen anything on these lines.
SK - 1.png
Sharp MZ/X Series Projects and FPGA Emulator
engineers@work : https://eaw.app/sharpmz-series/
hlide
Posts: 578
Joined: Thu Jan 25, 2018 9:31 pm

Re: Text To Speech

Post by hlide »

it's pretty easy to make PWM with 8253, using mode 0 without programming its counter to output 1 permanently and mode 4 to output 0 permanently. You can even put a variable voltage like 5V/n where n is the counter of mode 2 (instead of mode 3) to attenuate volume programmatically.
psmart
Posts: 130
Joined: Thu Nov 21, 2019 10:12 am
Location: Leeds
Contact:

Re: Text To Speech

Post by psmart »

Examples? Most things are possible if you dedicate enough time but I havent seen it on a Sharp MZ, not to say there isnt some game which like Robotron makes a hoarse speech like sound but havent seen anything like the OP put up which is pure software.
Sharp MZ/X Series Projects and FPGA Emulator
engineers@work : https://eaw.app/sharpmz-series/
hlide
Posts: 578
Joined: Thu Jan 25, 2018 9:31 pm

Re: Text To Speech

Post by hlide »

I'm experimenting those in-game with my current Space Rally game. But yeah, I'm NOT making any text speech as you need a better resolution than the ones I used.
hlide
Posts: 578
Joined: Thu Jan 25, 2018 9:31 pm

Re: Text To Speech

Post by hlide »

Anyway, I already indicated it cannot really be done. Moreover, there is a thing we call "priming" in psychology: when you type your sentence and let it speak, you believe hearing it. Just make a program which just speaks without displaying the sentence, you won't be able to understand. Audio illusion. Brain can be easily fooled.
hlide
Posts: 578
Joined: Thu Jan 25, 2018 9:31 pm

Re: Text To Speech

Post by hlide »

Mode 2 (one cycle pulse every N cycles):
- CNT0 = 1 -> 1.1MHz/1 -> 1.1MHz -> avg(V) = 5V on sound pin.
- CNT0 = 2 -> 1.1MHz/2 -> 554KHz -> avg(V) = 2.5V on sound pin.
- CNT0 = 3 -> 1.1MHz/3 -> 369KHz -> avg(V) = 1,75V on sound pin.
- CNT0 = 4 -> 1.1MHz/4 -> 277KHz -> avg(V) = 1,25V on sound pin.
...

EDIT: I have contrary information about the real frequency input to CLK0.
hlide
Posts: 578
Joined: Thu Jan 25, 2018 9:31 pm

Re: Text To Speech

Post by hlide »

To output full 'positive' energy: LD A,$10: LD ($E007),A
To output full 'negative' energy: LD A,$18: LD ($E007),A
Note that positive/negative energies are interchangeable as long as they are opposite.
So you can use intersective PWM with them to recreate a pretty good average energy.

We can also do intersective PWM with variable duty cycle upon 32KHz (by polling D0 at $E008) using only mode 0 and its counter: LD A,$10: LD ($E007),A: LD A,n: LD ($E004),A.

A lot of possibilities but a lot of memories to "sample".

EDIT: My bad! it's 32Hz, not 32kHz so it is not useable but you could poll D7 (15KHz).
Post Reply