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 


C64SamTTS [CE6.5.1][TTS]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting -> Lua Extensions
View previous topic :: View next topic  
Author Message
mgr.inz.Player
I post too much
Reputation: 146

Joined: 07 Nov 2008
Posts: 4109
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Aug 09, 2016 5:04 pm    Post subject: C64SamTTS [CE6.5.1][TTS] This post has 3 review(s) Reply with quote

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.



 



demo.CT
 Description:
extract C64SamTTS package in autorun folder
then try this demo

Download
 Filename:  demo.CT
 Filesize:  3.07 KB
 Downloaded:  441 Time(s)


_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting -> Lua Extensions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites