OSX Tcl/Tk and snack

So I finally figured out how to install snack on OSX. I went down many different paths and ended up building from source and getting lucky. I’m sorry, what is snack? Apparently it’s some audio tool kit for scripting engines like Tcl, Python, and Ruby. Woah, I’ve probably lost you. Let me back up. Why am I messin’ with Tcl/Tk and snack? I’ve been trying off and on to build a custom voice for MaryTTS. It’s sortr of a pain b/c I don’t have time to mess with this in the office. I’d like to experiment at home but my development linux install is in the office and I haven’t figured out how to get audio over remote desktop on Linux yet. (I’ve gotten close but that’d take a whole ‘nother round of experimenting!) So I’m running OSX on my Mac of course for my MaryTTS tinkering but it’s difficult to get things intended for Linux to work the same way on Mac. I’ve installed Mac Ports which dumped a bunch of stuff somewhere on my hard drive. I managed to get sox from it. Wait, let me start over again! Hi, I’m Cliff. You’re here because you were having the same troubles installing snack on your Mac. I’m here because the prior sentence creates an interesting rhyme.

In experimentation with Mary custom voices I’ve learned that you can spend an entire month just getting the required dependencies for using the voice import stuff. The list of required tools is huge and I wish it could be simplified. To add on that, each tool spins its own dependency web. For eg, installing ehmm (or was it speech tools?) requires sox which requires Mac heads to go out and install Mac Ports or something similar. Running “./configure” for hts just to create the dumb make file requires tcl/and snack. God help you if you’re on modern 64bit hardware like I am. The web site for snack offers a PPC version of snack. It’s best (and painful) to build from source.

So I download the source tar and carefully follow the steps in the README which are incorrect. According to the README the tcl framework should be located in “/Library/Frameworks/Tcl.framework/Headers”. On my system I found it under “/System/Library/Frameworks/Tcl.framework/Headers”, though this might vary depending on how you install Tcl. And that’s the problem. With all the different paths for frameworks and libraries it’s a wonder you can get anything to work! After getting no satisfaction after running “make install” from the source bundle and many failed attempts to copy the libraries into the different Tcl and Tk framework folders I stumbled across a post somewhere that hinted that Tcl extensions should be found/loaded in “/Library/Tcl”. You would never know this unless you were a Tcl veteran. There wasn’t even a “/Library/Tcl” folder on my system! I created the structure and voila! Where was I? Oh yeah, I was trying to install the hts package. Now I’m struggling with a another dumb error that complains it “can’t find swab of SPTK”. What in blue blazes is SPTK and why do I need a swab of it? In conclusion, to build your own voices in Mary you have to be Tcl’ish, have a snack, get a swab of SPTK, oh and make sure you’re wearing sox! That’s only scratching the surface.

2 thoughts on “OSX Tcl/Tk and snack

  1. I got a similar question “Can’t findframe of SPTK” Do you know why. I promise I give the correct path and frame is indeed in the bin folder. Thank you very much

  2. Wow, this was so long ago, I don’t think I ever found an answer to my SPTK error. The best I could suggest is that you check your $PATH and $LD_LIBRARY_PATH to make sure the $SPTK_HOME/bin folder or where ever the frame is, can be found during run-time or compile time. I would also suggest you double check the binaries to ensure they are the correct executable format for your system and that they have the correct permissions. (when in doubt, “sudo chmod -R a+x”)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s