Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine Forum Index
PostGo back to topic
mgr.inz.Player
I post too much
Reputation: 218
Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Aug 09, 2016 5:04 pm    Post subject: C64SamTTS [CE6.5.1][TTS]

What is S.A.M.?
https://en.wikipedia.org/wiki/Software_Automatic_Mouth
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
https://github.com/s-macke/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.


mgrinzPlayer's SAM
https://github.com/mgrinzPlayer/SAM

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:
Code:
int main(int argc, char **argv)


there is:
Code:
char* sayThis(char *text)  // return buffer with speech


- then I realized it would be easier to just use this function:
Code:
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:
https://github.com/mgrinzPlayer/SAM

Libraries compiled with MinGW-W64-builds-4.3.0 (GCC 6.1.0, threads: posix, exception: dwarf or seh)


CheatEngine C64SamTTS

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)


Download link
https://github.com/mgrinzPlayer/SAM/releases/download/C64SamTTSv1.0/C64SamTTS.7z


Compatibility:
CE6.5.1 and above.
Lua script relies on executeCodeLocal function.



 
_________________
Dark Souls II Item Swap and Item List
My Borderlands2 tables

Recent CheatEngine builds
Back to top
View user's profile Send private message MSN Messenger
Post reviews:   Approve 4
Author Review
ParkourPenguin
Review: Approve
Post reference:
ReviewPosted: Tue Aug 09, 2016 8:26 pm


Back to top
View user's profile Send private message
DaSpamer
Review: Approve
Post reference:
ReviewPosted: Tue Aug 09, 2016 8:38 pm

Very useful and interseting, will allow to create more user friendly trainers.
great job!

Back to top
View user's profile Send private message
Dark Byte
Review: Approve
Post reference:
ReviewPosted: Wed Aug 10, 2016 8:08 am


Back to top
View user's profile Send private message MSN Messenger
AylinCE
Review: Approve
Post reference:
ReviewPosted: Thu Apr 01, 2021 2:54 pm

End 200 Full Masters Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites