Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • "Selected text" is not the same as text in the clipboard. If the application reads selected text, you may be out of luck unless OSX provides a means of working on that buffer. Commented Mar 30, 2014 at 22:47
  • @goldilocks Please see my most recent edit. OS X does provide the means via automator. All i need the shell script to do is fetch the data in the clipboard, remove the hyphens, and print it out. The simple echo command I used (in the photo above) successfully spoke the text, "clipboard text here" Commented Mar 30, 2014 at 23:06
  • I see you removed your comment on my answer. If for whatever reason the newlines have been stripped and replaced with spaces your sed 's/- //' would work, otherwise you need the longer one to deal with them. Commented Mar 31, 2014 at 0:24
  • It seems the script works now, but not in all instances. Based on my tests, it seems the Speak Text feature doesn't like formatted text. Is there code I can add so that the text piped to Speak Now isn't formatted? BTW, I genuinely appreciate the help. Commented Mar 31, 2014 at 0:37
  • Probably, you would need to post an example of the raw text stream. I can have a look tomorrow. Btw, if you use @Graeme in your comment, I will get a notification for it. Commented Mar 31, 2014 at 2:01