Complete 72 allophone binary for testing

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JetSetIlly

These new results sound less good to me. But then I don't have a real AtariVox to compare it to.

@SpiceWare: Could you make an audio recording of Man Goes Down? The initial voice on the title screen sounds very different after the updates. That would be a good test case that the changes are on the right lines.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Andrew Davie

Quote from: JetSetIlly on 27 Oct 2026, 09:06 PMThese new results sound less good to me. But then I don't have a real AtariVox to compare it to.

I have also been surprised/disappointed with the speech produced under emulation.
It will be interesting to figure out what's going on.

JetSetIlly

#32
Quote from: Andrew Davie on 27 Oct 2026, 09:19 PM
Quote from: JetSetIlly on 27 Oct 2026, 09:06 PMThese new results sound less good to me. But then I don't have a real AtariVox to compare it to.

I have also been surprised/disappointed with the speech produced under emulation.
It will be interesting to figure out what's going on.
I like the original pass of the code. But as I say, I don't have anything real to compare it to.

The problem with any recording of the hardware, is the introduction of additional noise and distortion. That might be throwing Claude off the scent.

But generally, this goes back to what I was saying in another thread - rather than go for an exact emulation, I think it's acceptable to go for something that simply interprets the Atarivox "protocol". The Speakjet package is definitely closer to the truth and more useful than Festival in that respect.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Andrew Davie

I addressed the noise issue with Claude. I thought we had handled that; apparently not.

----------
**SpeakJet emulation: checking the recordings themselves**

After my last update, someone said the new sounds "sound less good", and someone else made a fair point: every recording of the hardware adds its own noise and distortion, and that could be throwing the analysis off. So I went back and characterised the recordings themselves, rebuilt the comparison to take out what they add, and re-checked everything against recordings nothing was fitted to.

**What the recordings add**
- **Background noise.** I measured it in about 33 silent gaps per recording. It's very steady: under 1 dB variation across most of the band, 3 dB at most, no drift over a recording. So it can simply be subtracted, and every comparison now does that first. Both units' backgrounds have exactly the same shape, so it comes from my recording setup or the chips' idle output, not from either unit.
- **Clipping.** This was the big one. The unit A take I'd been using as a main reference, which I believed was clean, clips in 101 of its sounds: most vowels lightly, and a few effects (A5, A4, M1) heavily. The original AtariVox's take clips only in M1. Clipped sounds are now left out of the comparison for that unit.
- **My own processing.** The comparison was high-passing the recordings near 200 Hz but not the library's output. Both now go through the same filter.
- **Distortion.** Is the faint noise under the chip's pure tones real, or distortion in the recording path? I checked inside effects that fade out (M0 drops 25 dB). Distortion added after the chip would fall two or three times faster than the tone. On both units the noise falls no faster than the tone, so it's the chip's own.

**Held-out data.** Everything is also scored on material nothing was fitted to: the first VoxProbe recording (12 sustained sounds at pitches 88 and 60, plus AW swept from pitch 40 to 254) and the spectra of the connected groups.

**Results, with the cleaning applied**

                                  Original  Before the  After    After worst-
                                  library   rebuild     rebuild  sounds work   Now
Original AtariVox, 126 sounds     45%       73%         81%      84%           84%
  (spectrum error)                7.95 dB   3.88 dB     2.63 dB  1.97 dB       1.93 dB
VoxProbe sustained (held out)     7.0 dB    3.2 dB      1.9 dB   1.6 dB        1.4 dB
Connected groups (held out)       61%       84%         85%      86%           86%

The two real chips match each other at about 88%, so there's still room.

**What it caught.** Sound by sound, the rebuild had made some things worse, and the hold-out confirmed it:

- The per-formant start phases I measured from single pulses at pitch 40 don't all hold at speaking pitch. IY, EY, EH, AY, AX, UX, OH, AW and MM match better without them. IY was the clearest: 3.4 → 2.2 dB on the held-out recording. The other vowels keep theirs.
- OB and PO go back to their values from before the refit; PO goes from 48% to 64%.
- EB, HO, TH, CH, HE, OHIY, OHIH, OD and DO came out mixed or worse with their earlier values, so they stay.

**On "sounds less good"**

- The scoring still can't see two things: anything above about 4 kHz, and how sounds join up in phrases beyond their spectra. The real chip has some content above 4 kHz; the library renders at 8192 Hz and has none.
- For that I've made a blind listening set: the real chip first, then three library versions in a random order. Ears are the final check.

**Next**
- A loopback recording, to measure the recording path's own frequency response, which the library's output filter currently includes.
- Recording VoxProbe4 with peaks kept well below clipping.


SpiceWare

Probe 4 results from AtariVox+ Vectrex Enhanced

SpiceWare

Probe 4 results from original AtariVox

SpiceWare

Man Goes Down from AtariVox+ Vectrex Enhanced.

I hit the firebutton and let the player die so it captures
  • Man goes down
  • May the fruit be with you
  • sound effect
  • you suck

Version I have is mgd_201204.a26, file matches what Alex posted on December 20, 2004.

SpiceWare

Man Goes Down from original AtariVox

Andrew Davie

**SpeakJet emulation: the missing top end**

After the last update, I noticed something I should have caught much earlier. Every comparison I'd made stopped at 4 kHz, because that's as far as the library went: it rendered at 8192 samples a second, as the manual says. The scoring was built around what the library could do, so it could never show what the library was missing.

The real chip has plenty above 4 kHz. Vowels have energy 30–40 dB down up there, clearly above the recording's background. SE has as much at 4–5 kHz as in its main band. B7's 3.9 kHz tone has a mirror image at 4.12 kHz only 1 dB quieter. That's a big part of the chip's gritty, crisp character, and the library had none of it.

**What the chip actually does**, measured from both units' recordings:

- **It doesn't run at 8192.** Every steady tone has a mirror image at (sample rate − tone), which gives the rate directly. Across 26 tone effects that's 8040 Hz on one unit and 8015 Hz on the other: 2% below the manual, and the two units differ by the same 0.3% as their pitches.
- **It holds each sample until the next one.** The images repeat around every multiple of the rate, all the way up to 23 kHz, at exactly the levels a sample-and-hold produces.
- **An analogue low-pass after the chip shapes them.** Measured from 160 images, each against its own tone: −18 dB at 5.5 kHz, −23 at 7.5, −27 at 10.5, −33 at 15.5 and −38 at 23.5 kHz.

**What the library does now**
- It makes its samples at the chip's rate, 8028 Hz (the mean of the two units).
- It holds each one, as the chip does.
- It filters the result through that measured low-pass, fitted within 0.3 dB below 4 kHz and 1.6 dB above.
- It outputs at 48 kHz.

The old in-band filter had the hold folded into it; now each is modelled as its own physical stage. Gopher2600 picks up the new rate with no code change.

**One knock-on effect.** The noise sounds had been fitted at 8192 Hz, and the library makes noise by jittering a frequency every sample, so changing the rate changed the noise. They're refitted at the chip's rate. My first attempt let each sound's loudness float, and SE and others came out louder than the vowels around them. Played alone they scored better; in connected speech, which nothing was fitted to, they scored worse. So the refit now holds each sound's overall loudness fixed. 38 of the 55 noise sounds changed: TS from 28% to 54%, CH from 67% to 83%, TT from 29% to 45%.

**Results** against the original AtariVox (the unit that doesn't clip). The scoring now runs to 16 kHz:

                                        Before        Now
Above 4 kHz (123 sounds)                15.5 dB       2.0 dB
Below 4 kHz, all 126 sounds             83.9% 1.93    84.5% 1.80
Stops and fricatives                    70.5%         73.3%
Second take (held out)                  57.1%         59.7%
VoxProbe sustained (held out)           1.40/1.48 dB  1.45/1.46 dB
Connected groups (held out, A / B)      86.4/74.1%    86.0/73.8%

Level in each band above 4 kHz, relative to the sound's main band:

               4.5k    5.7k    7.1k    9.0k   11.3k   14.3k
Real chip     -34.2   -31.3   -37.0   -40.8   -42.2   -42.9
Before         none    none    none    none    none    none
Now           -34.3   -32.4   -37.5   -41.8   -43.3   -45.7

Everything below 4 kHz is the same or slightly better, and the held-out checks are level.

Andrew Davie

Quote from: SpiceWare on 28 Oct 2026, 12:59 AMMan Goes Down from original AtariVox

@JetSetIlly make sure you use the latest code for testing!  I've just updated.

SpiceWare

I found that Audio MIDI Setup in the Utilities folder has settings for the audio input devices.

My capture device has no options, just shows 48,000 Hz 2 channels 16 bit integer.

In contrast for my webcam I can select from 16,000 HZ, 24,000 Hz, or 32,000 Hz. All are at 2 channels 16 bit integer.

Andrew Davie

#41
Quote from: SpiceWare on 28 Oct 2026, 12:50 AMProbe 4 results from original AtariVox

Many thanks.

---

**SpeakJet emulation: VoxProbe 4 results**

Thanks to both AtariVoxes, the VoxProbe 4 recordings are in. They were made after all the fitting so far, so they're a clean test: none of the library's values were tuned to them.

**How it was checked.** I worked out where each item starts from the library playing the same bytes, anchored at each section's DTMF marker, then matched every item to the recording. Items that clipped were left out, as were items too quiet to measure reliably (less than 20 dB above the background). That leaves about 145 items per unit. Unfortunately it also drops all 48 hiss items: they were recorded too close to the background to say anything, so the hisses will need a louder probe some day.

**Result: the work holds up on data it never saw.** Spectrogram match below 4 kHz, then the error above it:

                         Unit A        Unit B      Above 4 kHz (A / B)
Original library         27%  10.6 dB  27%  10.6
Before the rebuild       58%   5.6 dB  58%   5.6
Before full-band fix     64%   3.74    64%   3.74    18.6 / 19.4 dB
Now                      64%   3.79    63%   3.77     1.7 /  2.0 dB

The full-band fix costs about half a point below 4 kHz and buys roughly 17 dB of accuracy above it. Above 4 kHz the library used to have nothing where the chip has a quiet sizzle; it now matches the chip's level there to within about 2 dB (barely noticeable), at the cost of about half a point of match below 4 kHz.

**What VoxProbe 4 showed about the chip:**

- **Gated effects follow Pitch.** C0, C2, C3, C4 and C6 gate at the voicing frequency plus a fixed offset of their own (−3, −22, −29, −1 and +37 Hz). C2's gate at pitches 60 and 150 lands within 1 Hz of that rule. C8 and C9 stay at 52 Hz whatever the pitch. I haven't put this in yet: with the right rates, C0–C6 at pitch 150 actually scored worse, so something else in how the library builds them only holds at the default pitch.
- **Bend moves an effect's noise as well as its tones.** C8 and C9's noise shifts about 200 Hz down at bend 0 and 440 Hz up at bend 15. The library now does the same, for effects; whether it applies to speech hiss isn't measured yet.
- **A3 buzzes at the voicing frequency.** It had been traced at 470–490 Hz, a harmonic. Fixed, and it now follows Pitch like A1 and M2.
- **M2 has a strong component near 2.1 kHz** that Bend doesn't move. The library's M2 doesn't have it yet.
- **Effects at bend 15 are still well off** (C3 and R8 by about 12 dB). More than the noise is involved; not solved yet.


JetSetIlly

Quote from: Andrew Davie on 28 Oct 2026, 01:03 AM
Quote from: SpiceWare on 28 Oct 2026, 12:59 AMMan Goes Down from original AtariVox

@JetSetIlly make sure you use the latest code for testing!  I've just updated.
I've merged pull requests #1, #2 and #5
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Andrew Davie

Quote from: Andrew Davie on 28 Oct 2026, 02:04 AM
Quote from: JetSetIlly on 28 Oct 2026, 02:00 AM
Quote from: Andrew Davie on 28 Oct 2026, 01:03 AM
Quote from: SpiceWare on 28 Oct 2026, 12:59 AMMan Goes Down from original AtariVox

@JetSetIlly make sure you use the latest code for testing!  I've just updated.
I've merged pull requests #1, #2 and #5

Sorry I need to do another PR

Done!


JetSetIlly

Quote from: Andrew Davie on 28 Oct 2026, 03:02 AM
Quote from: SpiceWare on 28 Oct 2026, 12:58 AMMan Goes Down from AtariVox+ Vectrex Enhanced.

Thanks for that!
I have had a listen and, despite my hearing issues, I'm quite impressed with the emulation.
I do hear some weirdness in the sound effect though - a sort of throbbing in the Gopher version.
Let's see what @JetSetIlly thinks.
I've increased the volume gain because it was hard to hear the atarivox against the TIA output (I suppose that should be made a user option). It sounds closer to the recording but the G in "goes" sounds too soft to me. Also, the screech when you fall off the screen needs work.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social