Page 2 of 3

Re: Text To Speech

Posted: Fri Jul 30, 2021 12:44 pm
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.

Re: Text To Speech

Posted: Sun Aug 01, 2021 7:36 pm
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 287 times

Re: Text To Speech

Posted: Tue Aug 17, 2021 10:00 am
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

Re: Text To Speech

Posted: Tue Aug 17, 2021 10:18 am
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.

Re: Text To Speech

Posted: Tue Aug 17, 2021 11:04 am
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.

Re: Text To Speech

Posted: Tue Aug 17, 2021 11:43 am
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.

Re: Text To Speech

Posted: Tue Aug 17, 2021 11:51 am
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.

Re: Text To Speech

Posted: Tue Aug 17, 2021 12:03 pm
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.

Re: Text To Speech

Posted: Tue Aug 17, 2021 1:34 pm
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).

Re: Text To Speech

Posted: Thu Oct 28, 2021 11:39 am
by mz-80a