Nov 16

Leopard includes a new “voice” in the “speech” section of Leopard (system prefs). This voice was designed to sound more human with fine tuning of speed, pauses, breathing, etc.

“Alex” can be used for a wide variety of neat things, like reading text files, or converting text or text files to audio files for later listening. There’s a lot of neat tricks you can do with speech and Automator too.

Try some of these commands in Terminal (if your brave):

say -v Alex -f ~/Documents/yourtextfile.txt
(this will read the file “yourtextfile.txt” to you with the Alex voice from the Documents folder)

say -v Alex -f ~/Documents/yourtextfile.txt -o ~/Desktop/yourtextfile.aiff
(this will create an audio file on the desktop with a recorded reading of the text file by Alex)

say -v Alex -o ~/Desktop/youraudiofile.aiff Hello, my name is Alex
(this will create an audio file on the desktop with a recording of “Hello, my name is Alex”)

Have a play, see what you can come up with! I like to have Alex read my email to me, sometimes!

alexvoice.png

written by James \\ tags: , ,

28 Responses to “Alex Speech Tricks”

  1. Joseph Crawford Says:

    How do you have it read your email?

  2. James Says:

    while in mail while looking at your email go to “edit -> speech -> start speaking”

    This isn’t new to Leopard, it’s just the “Alex” voice which is new, with some rather innovative technology within

  3. Matt Says:

    i am trying to set up my mail program right now… does anyone happen to know the “account type” and “incoming mail server” for hotmail? and any other settings i would need to set up a hotmail account? i already have a premium account, so it’s just a matter of forwarding it… i would appreciate any help!

  4. Johann Says:

    If u select any text on your computer you wish to be read out and press ctrl-S, Alex will read it out..

  5. Dan Says:

    How can we convert text or text files to audio files for later listening?

  6. Joseph Crawford Says:

    nice thanks, could be handy at times :)

  7. Don S. Says:

    Dan, I record with the old (free) WireTap. I typed out out directions in TextEdit, clicked Record in WireTap, and had Alex (with a slight increase in speed) read the directions. When finished, stopped recording, and WireTap created an audio file. I opened iMovie ’08, imported the screen capture video (using iShowU) and the WireTap audio, and created a video help file for my Leopard users. Pretty nice!

  8. Don S. Says:

    I’ve tried to increase the duration of pauses by adding periods, spaces, and, spaces and periods, but text-to-speech ignores them and just keeps going. How do I make Alex (text-to-speech in general) pause several seconds?

  9. Matt Says:

    Quote: If u select any text on your computer you wish to be read out and press ctrl-S, Alex will read it out..

    this doesn’t work for anything… is there something i need to activate before this will work? i can’t get alex to say anything :(

  10. James Says:

    Matt, ctrl-S didn’t work for me either, this kind of text to speech isn’t activated by default. Go into system prefs -> speech -> text to speech. Then click the checkbox for “Speak selected text when the key is pressed”. then press “set key” and choose your key combination. If you press ctrl-S, it will set it up for ctrl-S. it’s actually pretty neat!

    As for quickly converting text files to audio files, the best option would be to play around with “Automator”. Don’t be scared by it, it’s very easy to use. Open Automator and create a ‘workflow’. things like “ask for text”, then “text to speech”. You can do cool things like prompt for files, give confirmation messages, etc. Automator is powerful!

  11. Matt Says:

    thanks james… that is awesome!

  12. Dan Says:

    I dont know how to use Automator at all (maybe on the following posts you could teach us some cool stuff with automator!) :)

  13. Chris Says:

    This is a great tip!

    Now that I have recorded:

    - Alex is online. Hello sir.-

    to an aiff file. Is there a way to make this play automatically at start-up??

  14. Darreece Says:

    Thank you so much for all the great tips! I am new to the Mac family, i have had the Mac Mini for about two weeks now and for the first few days, i was completely lost. there are still a ton of basic things the i can not perform yet, but with great people like you and all the great videos online, i know I am a Mac user for the rest of my life.

  15. James Says:

    Darreece, welcome to the Mac family! There’s heaps of information around on the net, you’ll be fine! Enjoy

  16. Chris Says:

    Found out how to do this….

    Open the Script Editor in the /Applications/AppleScript/ folder and paste in either any text or:

    say “Alex is online. Hello.”

    Save the script as an application and add it to the list of login items for your account in the Accounts pane of System Preferences.

  17. James Says:

    Nice work Chris!

  18. Allan Says:

    Thanks for the Automator tips, so far I have stitched 2 applications one for converting mobile phone movies to QT movies and one to convert text to speech. Stitching is the word I used because I felt exactly that way using Automator for the first time. I will try to learn more about this cool program. BTW also new to the Mac family, I bought a new MBP and I can say its worth every penny!

  19. tehnicheskie harakteristiki bmw Says:

    motocikly bmw bamper bmw razborka bmw avtomobil bmw tehnicheskie harakteristiki bmw serii bmw bamper bmw oficialnye dilery bmw oficialnyy diler bmw

  20. Don S. Says:

    On November 16th I wrote: I’ve tried to increase the duration of pauses by adding periods, spaces, and, spaces and periods, but text-to-speech ignores them and just keeps going. How do I make Alex (text-to-speech in general) pause several seconds?
    Here is what I found out: Add [[slnc 300]] for a short pause; increase the number to lengthen the pause. The abbreviation is SLNC, not SINC. Use Alex to listen to the difference between “This is a [[slnc 300]] short pause.” and “This is a [[slnc 900]] longer pause.” to hear the what I mean.
    Hope this helps some of you.

  21. michael Says:

    Is there a way to pause test-to-speech dynamically ? I’m using it to help read papers, sometimes I need to pause it , take some notes and start it where it left off.

    thanks

  22. Nik Says:

    The tip with the pauses was really helpful. I’ve also been playing around with
    [[inpt TUNE]]
    and managed to get the computer to sing a song.
    Are there any more clever commands like this? Surely there must be a list of them somewhere. I would particularly like to be able specify emphasis.

  23. Chris Zwaenepoel Says:

    You can find a list of the embedded speech commands at :
    http://developer.apple.com/documentation/mac/Sound/Sound-200.html

    Although it’s stated that the info is deprecated as from OS X on, it stil works fine on Leopard.

  24. Roger Says:

    Do you know by any chance the name of the company behind the “Alex” Text-to-Speech engine?

  25. benegal Says:

    use
    say file.txt -o file.aiff
    A large aiff file is generated (audio file).

    To reduce the size, you may convert to AAC within iTunes, or better, use “lame” to convert to mp3. Install the lame macport using:

    sudo port install lame

  26. When ds106 Radio Sucks You In - CogDogBlog Says:

    [...] file and save it as an audi file “whereat.aif” (I learned this from http://www.leopardtricks.com/leopard/alex-speech-tricks. In Audacity, I slid things around, and slowed down the tempo of the Alex file (I added a few extra [...]

  27. WidgetPhreak Says:

    Have Fred or Ralph read the text bellow. :^)
    [[inpt TUNE]]
    _
    d {D 90; P 130:0}
    1EY {D 500; P 130:0 130.8:39 130.9:47 130.5:56 130.8:94 130.6:97}
    _
    z {D 85; P 110.2:0}
    1IY {D 400; P 110.3:0 109.0:14 110.7:29 110.7:93 110.9:96}
    ~
    d {D 75 ; P 87.7:0 87.6:33}
    2EY {D 500; P 87.2:0 87.5:93 87.4:96}
    ~
    z {D 75; P 65.8:0}
    2IY {D 400; P 65.6:0 65.8:100}
    . {D 100}
    _
    g {D 100; P 73.2:0}
    1IH {D 165; P 73.2:0 73.5:67 73.1:94 73.8:97}
    v {D 80; P 73.0:0 73.7:88}
    ~
    m {D 50; P 82.4:0}
    IY {D 120; P 82.2:0 82.2:88}
    ~
    y {D 60; P 87.7:0}
    AO {D 105; P 87.4:0}
    r {D 65; P 87.8:0 87.9:46}
    _
    1AE {D 220; P 73.4:0 73.2:36 73.9:79 73.0:91}
    n {D 35; P 73.5:0}
    s {D 75; P 87.0:0 87.0:7}
    AX {D 200; P 87.1:0 87.3:15 87.5:31 87.2:54}
    r {D 45; P 87.3:0}
    _
    d {D 75; P 65.1:0 65.9:7 65.3:13}
    UW {D 700; P 65.5:0 65.8:100}
    . {D 400}
    ~
    2AY {D 350; P 97.1:0 97.6:93}
    m {D 70; P 97.4:0}
    _
    h {D 55; P 130.4:0}
    1AE {D 450; P 130.1:0 130.8:41 130.6:84 130.8:94}
    f {D 95; P 130.9:0 130.0:89 130.9:95}
    _
    k {D 60; P 10.6:0 110.6:17 110.6:25 110.8:92}
    r {D 75; P 109.9:0 110.7:7 110.9:13 110.7:27 110.4:40 110.5:73}
    1EY {D 400; P 110.6:0 110.1:61 110.6:95 110.4:98}
    ~
    z {D 75; P 87.7:0}
    2IY {D 400; P 87.9:0 87.8:100}
    . {D 100}
    _
    1AO {D 250; P 73.8:0 73.8:22 73.5:78}
    l {D 65; P 73.9:0 73.6:85}
    ~
    f {D 70; P 82.5:0 82.6:93}
    AO {D 150; P 82.4:0 82.7:13 82.5:25}
    r {D 55; P 82.8:0 82.3:91}
    ~
    D {D 75; P 87.1:0 87.6:9}
    AX {D 120; P 87.5:0}
    _
    l {D 85; P 97.5:0 97.1:6 97.3:47 97.0:71}
    1UX {D 400; P 97.1:0 97.5:24 97.2:35 97.1:97}
    v {D 95; P 97.9:0 97.2:5 97.9:21}
    ~
    AX {D 150; P 110.3:0 110.8:92}
    v {D 65; P 110.8:0 110.2:5}
    ~
    y {D 120; P 97.0:0 97.5:67 97.4:83}
    UW {D 600; P 97.3:0 97.8:58 95.9:100}
    . {D 10}
    [[inpt TEXT]]

  28. The Secret Revolution Revealed at Keene State College « Idea Dog Says:

    [...] of the computer voice, my “inner techno soul” who talked back to me using the command line generation tool. I added this time the “hacking” of my presentation also including some entity sending [...]

Leave a Reply