Jump to content


Photo

Simple Say


  • Please log in to reply
4 replies to this topic

#1 vertex67

vertex67

    GMC Member

  • GMC Member
  • 515 posts

Posted 10 December 2010 - 05:22 PM


Simple Say
An easy-to-use GUI for terminal command 'say'
Download Now
Source Code


Type into the textbox and click "say" to have your computer speak what you typed. Choose from 23 different voices.

You can even have it read from a text file, or convert the speech into an audio file 'voice.aiff' in your working directory.

Use Simple Say to create your own audiobooks, or speech sounds for your Game Maker projects, but most of all use it to have fun!! :lol:
and yes, this was made in game maker ( i ripped the mac graphics)
Please give credit if you expand upon the source code
Posted Image


Uses the run_terminal extension created by ugriffin

Edited by vertex67, 15 December 2010 - 06:16 PM.

  • 0

#2 ugriffin

ugriffin

    Idiot

  • Global Moderators
  • 1583 posts
  • Version:Mac

Posted 10 December 2010 - 08:40 PM

Pretty nice! I didn't know you could export to audio like that: I guess you learn something new every day... :whistle:

I don't really know how that export say command works, but for some reason, it failed to export the sound with my modded code.

Here is the code: it tells the finder where you want to save the .aiff file:

if image_index=1{
alarm[0]=10
 if o_field_import.input
 {
 voicevar=get_save_filename('aiff file|*.aiff',false);
 run_terminal("say -v " +chr(39) + o_window.voices[o_window.v] +chr(39) + " -o "+voicevar+" -f "+chr(39) + o_window.sayStr +chr(39));
 }
 else //no import
 {
voicevar=get_save_filename('aiff file|*.aiff',false);
run_terminal("say -v " +chr(39) + o_window.voices[o_window.v] +chr(39) + " -o "+voicevar+chr(39) + o_window.sayStr +chr(39));
}
}
//show_message("say -v " +chr(39) + o_window.voices[o_window.v] +chr(39) + " -o voice.aiff "+chr(39) + string_lettersdigits(o_window.sayStr) +chr(39))
//run_terminal("say -v Alex -o voice.aiff monkey tits")                       

  • 0

#3 vertex67

vertex67

    GMC Member

  • GMC Member
  • 515 posts

Posted 11 December 2010 - 04:01 AM

yeah the audio export seems to be very sensitive, some strings just dont seem to want to export, while other times it works fine.

It is possible to change the audio format from aiff, read the man entry for say.

i also did not play with the -n option which I think lets you execute the say command on another computer over a network (not quite sure about that one)
  • 0

#4 goldsonic46

goldsonic46

    GMC Member

  • GMC Member
  • 581 posts

Posted 11 December 2010 - 04:36 AM

When you export, where does the file go?
  • 0

#5 vertex67

vertex67

    GMC Member

  • GMC Member
  • 515 posts

Posted 11 December 2010 - 10:18 AM

the file goes in the same directory as the app, it should be called voice.aiff

EDIT: If your 'type to say' field contains any apostrophes (or double quotes i think) it will not say anything or export.
I will fix this in the future but for now, if you cant find the audio file this might be the reason.
note if you read from a file, the file can contain any punctuation

Edited by vertex67, 11 December 2010 - 10:44 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users