This is a vanilla Javascript port of the Text-To-Speech (TTS) software SAM (Software Automatic Mouth) for the Commodore C64 published in the year 1982 by Don't Ask Software (now SoftVoice, Inc.).
It is based on the adaption to C by Stefan Macke and the refactorings by Vidar Hokstad and 8BitPimp
It includes a Text-To-Phoneme converter called reciter and a Phoneme-To-Speech routine for the final output.
It aims for low memory impact and file size which is the reason I want to avoid the Emscripten conversion by Stefan (which weights about 414kb).
For further details, refer to retrobits.net
Some analytics of S.A.M. in general can be found in Artyom Skrobov's (@tyomitch) blog who also provided pretty insightful PRs. Visit his blog https://habr.com/ru/post/500764/ (russian) or the google translated version here.