GitHub - SpeakJet C-Library and Go-Library releases

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

**AtariVox / SpeakJet emulation 0.5.3**

0.5.3 is out. The C library is at **andrew-davie/SpeakJet** (tag v0.5.3), and the Go library is a pull request to JetSetIlly (#21) for Gopher2600. The two produce the same sound, sample for sample.

**What changed since 0.5.2**

Two things the chip does that the emulation didn't:
- **Nasals carry a little noise.** On both AtariVoxes, MM, NE and the other nasals change slightly from one voice pulse to the next above 700 Hz. A purely periodic tone can't do that, so the four nasals that lacked it now have a small noise band. 140 MM 1.21 → 1.01, 144 NGO 1.09 → 1.02, 145 LE 1.16 → 1.09.
- **A voiced stop's hum is part noise.** The "bar" you hear before BE, BO, DE and DO is regular below 700 Hz and noisy above it. BE and BO's upper part is now noise instead of faint formants; DE, DO, ED and OD get noise alongside theirs. GE and GO are unchanged, because their bar really is regular on the chip. BE 1.21 → 1.14, BO 1.24 → 1.20, DE 1.29 → 1.24, DO 1.14 → 1.09.

Also:
- **238 C8:** its sweeping hiss now moves in straight lines, as on the chip, and repeats every 20 ms instead of 21 (1.75 → 1.63).
- **161 AXUW:** its third formant holds steady until the end instead of sliding (1.21 → 1.18).
- **156 NGO and 194 KE** start quieter, as the chip does (KE 0.84 → 0.76).
- **198 PE and 199 PO** now share one timing, a short closure with the low thump 25 ms in (PE 1.11 → 1.05).

**How close it is now**

Every sound is scored against four recordings of the real chip, two from each of two AtariVoxes. A lower score is closer.

                        0.4.3   0.5.3
allophones (72)         1.07    0.92
sound effects (55)      1.22    0.97
joins and phrases (88)  1437     513   (mean cost)

**A correction.** I said earlier that a score of 1.0 means "as far from the chip as another recording of the chip". That isn't quite right. Scoring each real recording the same way as the emulation, the original AtariVox's recordings come out near 1.0, but my AtariVox+'s come out at 1.2-2.4. Its oldest recording has a noisier background and stands out from the rest. So 1.0 means "about as close as the original AtariVox's recordings are to each other". The docs now say so.

By that measure most sounds are now about as close to the chip as one real recording is to another. The clearest exception is 238 C8.

**VoxProbe 15** is in its own thread. It records every sound again, so that noisy recording can be replaced, and it tests three things the emulation still gets wrong:
- when a Pitch change really takes effect partway through a phrase;
- how a vowel starts after a short pause;
- how loud TT and TH are next to a vowel.

Recordings from either kind of AtariVox are very welcome.

JetSetIlly

https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Andrew Davie

#17
**AtariVox / SpeakJet emulation 0.5.5 released**

Version 0.5.5 of the C library (andrew-davie/SpeakJet, tag v0.5.5) and the matching Go library (pull request #23 to JetSetIlly) are ready. This release is about connected speech: how sounds join. Solo sounds are unchanged apart from two effects. The C and Go libraries stay sample-identical, so Stella and Gopher2600 play the same thing.

**What's new**

- **Joins rebuilt from measurements.** Thirteen join rules fitted to Man Goes Down's phrases are gone. They were compensating for each other rather than modelling the chip. In their place are six mechanisms measured on both AtariVoxes with VoxProbe 16:
  - A nasal hands over to the next vowel early (MM ~22 ms, NE ~13 ms), and a vowel hands over to a nasal ~15 ms early.
  - LE and LO join like nasals; WW and RR follow the vowel rule.
  - Speech below Speed 114 follows its own length law (Speed 90: x1.65, previously x1.84).
  - A stop after a pause closes 15 ms longer, not 30.
  - NGE's and MM's second formants are their 2249 and 1430 Hz lines, the ones that glide into the next vowel.
- **The effects' tone switch.** When an oscillator jumps to a new frequency, the chip plays the midpoint of the old and new for ~1.5 ms first. This gives 226 B6 the hump the chip has at 2.2-3.1 kHz.
- **Three spurious tones removed** from 226 B6, 232 C2 and 214 A4. They were images of real tones at the chip's 8026 Hz rate.

**How it measures**

                                              0.5.4      0.5.5
joins, VoxProbe 16's 76 join items            4.57 dB    4.07 dB   (real unit vs real unit: 2.77)
joins, VoxProbe 13's 87 pairs, length error   18.1 ms    13.5 ms   (not fitted on: independent check)
Man Goes Down phrase 1 (units 1490 ms)        1480       1475
Man Goes Down phrase 2 (units 1690 / 1685)    1725       1725
Man Goes Down phrase 4 (units 930 / 935)      945        930
226 B6 (real take = 1.0)                      1.06       1.02
225 B5                                        0.88       0.86

Joins are 11 % closer to a real unit, and 25 % closer on the independent set. Man Goes Down's phrases 1 and 4 are within 15 ms of both chips, and the engine has no per-phrase patches left.

**Known issues**

- Man Goes Down phrase 2 runs 37 ms long. Slowed vowels at Speed 108-118 come out ~30 ms longer than on the chip, and BE after a pause isn't right yet.
- PO after a nasal; AY IY and AW IH AW about 30 ms long; IY SE ending 15 ms early.

Technical manual 1.24 is included. Thanks to everyone who recorded VoxProbe 16.