I post too much
Joined: 07 Nov 2008
Location: W kraju nad Wisla. UTC+01:00
|Posted: Tue Aug 09, 2016 5:04 pm Post subject: C64SamTTS [CE6.5.1][TTS]
|What is S.A.M.?
Software Automatic Mouth - it is speech synthesizer for the Commodore C64 published in the year 1982 by "Don't Ask Software". Program was also available for non-Macintosh Apple computers (including the Apple II, and the Lisa) and various Atari models.
Sebastian Macke's SAM
It is a very small Text-To-Speech (TTS) program written in C, that runs on most popular platforms. It is an adaption to C of the speech software SAM for the Commodore C64.
It is a fully stand alone program. For immediate output it uses the SDL-library, otherwise it can save .wav files.
The software is a reverse-engineered version of C64 S.A.M.
Fork of Sebastian Macke's SAM project. Simple modifications such as:
- removed debug code
- untangled trans function (I just look/checked this fork https://github.com/vidarh/SAM )
- removed WriteWav, PrintUsage, MixAudio, OutputSound functions and SDL library dependency, don't need them
- changed to shared library, for now we can pass text and get the results,
- default setting will be used (standard sam sound: speed = 72;pitch = 64;mouth = 128;throat = 128;)
instead of original:
|int main(int argc, char **argv) |
|char* sayThis(char *text) // return buffer with speech |
- then I realized it would be easier to just use this function:
|int __fastcall sayThis(char* outsideBuffer) // gets text from buffer, fills buffer with speech. And returns error code |
So we can pass text inside outsideBuffer and get the result in the same buffer. Function returns error codes.
0=no errors, 1=TextToPhonemes() error, 2=SAMMain() error
Check "DLL more compatible with CheatEngine" branch here:
Libraries compiled with MinGW-W64-builds-4.3.0 (GCC 6.1.0, threads: posix, exception: dwarf or seh)
There are only two functions you can freely use in your Cheat Table:
- C64SamTTS_init() - Injects sam-x86_64.dll (or sam-i686) module into CE process. Also winmm.dll module (just in case). Once. This function is also called by C64SamTTS_sayThis function.
- C64SamTTS_sayThis(texttosay, waittilldone OPTIONAL) - similar to playSound(sound, waittilldone OPTIONAL)
We can change speech parameters, e.g. with writeBytesLocal('sam-x86_64.speed', 100)
CE6.5.1 and above.
Lua script relies on executeCodeLocal function.
|extract C64SamTTS package in autorun folder
then try this demo
|| 3.07 KB
|| 620 Time(s)