You can also watch this video at YouTube (but with ads).
MacMost Now 424: Convert Text to Spoken Word Audio
Comments: 14 Responses to “MacMost Now 424: Convert Text to Spoken Word Audio”
Comments Closed.
You can also watch this video at YouTube (but with ads).
Hi Gary,
I always forget about Automator, so I was glad to see this presentation. However, the first time I run my TextFileToSpeech.app, it fails to complete. If I leave TextEdit open, it seems to work correctly after that.
Here is the message I get:
---
The action "Get Contents of TextEdit Document" encountered an error.
Check the action's properties and try running the workflow again.
---
I'm running OS 10.6.4. Any ideas?
Thanks!
Drew
So are you saying you need to have TextEdit running in the first place in order for it to work? That's odd. Does it do that even if you run the workflow in Automator instead of a stand-alone app? If so, what happens when you run it step-by-step?
It doesn't seem to do it in Automater, just as an app. However, I found that by adding a "Pause" of 1 second after "Open Finder Items", it works correctly.
Obviously, I have a lot to learn about Automator!
Thanks, Drew
Hi Gary,
I use a couple of these one for text files and one for PDFs. I use the PDF one so that I don't have to read boring files from work, I can just have them read to me on the commute.
Text one:
Set value of variable (use filename)
open finder items (select textedit)
Get contents of textedit document
Text to Audio file (save as Filename (the variable from above))
Import files into iTunes (create a playlist that they will be added to)
PDF one:
extract PDF text
open finder items
Get contents of textedit document
Text to Audio file
Import files into iTunes (create a playlist that they will be added to)
Cheers
Paul
Hi Gary
Please clarify what happens at 2.29, ie how do I choose the doc I want to hear?
Thanks,
Brian
Gary
NB In my earlier post, I mistyped 2.59 as 2.29.
Brian
You select the text document in the Finder and then run the script.
Hi Gary,
Your podcasts are always interesting and informative, but this one was an absolute GEM! Being able to take text with me in the form of audio files is absolutely crucial to someone like me who works full time, AND has a part time job, AND is going to school.
Now for my question: Looking through the built in commands in Automator, I found one which automatically sends the aiff file to iTunes. That's all well and good, but once I have it there, I don't need the original file and would just as soon not have it cluttering up my hard drive. However, every time I tried to have Automator automatically send that file to the Trash, it failed. It either sent the iTunes file to the trash, or trashed the whole "Text to Speech" folder I created. Any ideas?
I am so appreciative of any feedback you can offer.
Best,
Karl
Are you using AppleScript variables? If not, they it won't work. You see, when you move the audio file to iTunes, then and try to put "it" in the trash, it will think "it" is the result of the last action, which is the iTunes audio, not the original file. You'd need to store the file in a variable, then import into iTunes, then recall the variable to put it in the trash -- it gets complex, as you can see.
So you have to decide whether you want to delve more deeply into Automator, AppleScript and variables, or just settle for what you have now.
I did that all the time. But now in iTunes10 it broke. So I rewrote it in Applescript.
Feel free to take a look at it. Its pretty individualized for my needs though. So you have to adapt it to make use of it. http://pastie.org/1135615
I've heard about the Automator bug in iTunes 10, and I'm sure it will be fixed shortly (10.0.1 or whatever).
I forgot to say that I use this with Launchbar. But with some AS knowledge you can easily replace the "handle_string" section with e.g. a dialog.
And yes, there is already a fix for the Automator bug http://cl.ly/2EpY
I'm not sure how quick Apple will be with an official update though. They tend to play rather with there i-products recently.
I do not see Get from clipboard in my Library Actions. What am I missing?
Perhaps you aren't looking at all of the actions. Make sure you haven't selected a subset. Also, which version of OS X do you have?