Domo Arigato, Mr. Roboto
Awhile ago, I posted this goofy MP3 Jesper had made of my goofier interview, spoken via the built-in voices on the Mac. Jesper used a perl script, along with the 'say' command. The say command is...
- A CLI tool included with Mac OS X which pumps your text through the old speech synthesis engine that's also included, which can be sent to your speakers or to an .AIFF file.
- Is a fantastic way to play a prank on someone via SSH, along with a bit of AppleScript to set the volume (Not going to give it to you, but think 'tell application "System Events" to set volume')
- The largest improvement to speech on the Mac since it was first introduced with the AV Macs almost 13 years ago that I'm aware of. I'm really not kidding, although it was ported to OS X.
It's one of those technologies where I don't know if it wasn't really used because it was a ahead of its time, the implementation sucks, or the whole ideal sucks in general, but it's one I keep in mind during every hype cycle.
Anyways, some of you thought it was kind of a clever idea, I certainly did, and Jesper threw together the script he calls "Interview to Speech" under the BSD license with some basic instructions here...
Do remember this is really just a w00t hack Jesper put together, and it's not for everyone, even those that understand the prerequisites:
You'll need to have a clue how to install Perl modules and the "LAME" software to be able to configure your Mac to use this script. A general sense of how to use *nix-style commands, pipes and Perl are preferable. If you don't know how to do these things, try to get someone that does know these things to help you, or turn back at once. This is more of a *nix hack than a Mac application - don't expect the latter.
Since the say command pipes out a big AIFF file, LAME is used to stunt it down to an .MP3, and Perl is used for parsing and decoding entities and such, and an app named mp3cat is used which is why you have to install some perl modules via CPAN.
You're on your own with Perl on the Mac, because I've tried to avoid using it on OS X after some bad experiences... but for LAME, while (as mentioned in the script you can get it via Fink or Darwinports), that may seem overkill if you just need one thing, and there are a whole slew of compiled binaries of LAME out there (and it has few dependencies, so building from source isn't a nightmare).
The other thing you need to deal with is, well, letting the script know which parts of the text should be spoken with which voice, which the script notes in the comments and just involve an H3 tag for the interviewee. Pretty simple, so maybe someone will do something suitably goofy with it.
Comments (8)
Posted by: eggsnatcher at July 13, 2005 02:07 PM
Can you still convert regular files to .MP3 in iTunes if you are not importing from CD? All I see now is "convert to AAC"
Posted by: somebody at July 13, 2005 03:01 PM
Sure you can. I'm not in front of my Mac right now so I don't know the exact steps, but I usually convert my Garageband AIFF output to MP3 through iTunes...
Posted by: Twist at July 13, 2005 03:08 PM
Yes you can still encode to mp3 with iTunes. You have to set it to use the mp3 encoder in the Importing pane of the Preferences. There are some 3rd party extensions to add other encoders such as mp3-lame and ogg I believe. Right now your choices are AAC, Apple Lossless, Mp3, AIFF, and WAV.
Posted by: Rory at July 13, 2005 05:50 PM
Nihongo ga wakarimasu ka?
Posted by: Carl at July 13, 2005 06:37 PM
wakaran'ne. chau kara.
Posted by: LEGO Boy at July 14, 2005 07:00 AM
Ha! I love say. A week after I got married, I was at work, and the wife was at home, watching DVDs on the Mac. I thought, "Hmmm... this'd be a good prank!" So, I ssh'd in and started saying stuff to her. Freaked her out! She's not a techie at all and thought the new TV was posessed. I tried calling her, but she didn't answer, so I "say"'d, "pick up the phone", and she did. She still hasn't forgiven me, either. It was fun, though!
Posted by: Jesper at July 14, 2005 08:09 AM
somebody: Using iTunes was one of the first things I considered (one in few ways of which I hate *nix command line tools on Mac OS X is that you have to have them installed) but it's a bitch because iTunes wants to add everything to the library, not to mention that it might conflict with current operations - a lot of people listen to music all the time and may well be into a rip or a burn or another conversion and I didn't want to test that at 2AM when I wrote this script originally. In hindsight, it'd also make porting significantly harder.
I'm in the process of writing something up to make this whole script thing a bit clearer. Stay tuned. Or don't.








Couldn't you just use iTunes to convert from AIFF to MP3 instead of going through the whole LAME process?