Pages

Friday, June 24, 2011

Fun With Speech Synthesis

This is a fun way to freak out anyone around a remote Mac using SSH and the builtin text to speech libraries in OS X. The idea is to SSH into a remote Mac and execute the say command, which will convert a string of text into speech. You can use this to "talk" to people around your remote Mac. For example:

say -v "Zarvox" "hello world"

Will speak the phrase "hello world", using the voice Zarvox. If you don't specify a voice the default from the System Preferences will be used. Here is a list of other voices you can use:

Alex
Bruce
Fred
Junior
Ralph
Agnes
Kathy
Princess
Vicki
Victoria
Albert
Bad News
Bahh
Bells
Boing
Bubbles
Cellos
Deranged
Good News
Hysterical
Pipe Organ
Trinoids
Whisper
Zarvox

On the off chance that the Mac you are attempting to have speak has its volume turned down or is muted, you can also turn the volume up using the following command:

sudo osascript -e "set Volume 10"

This will set the system volume to maximum to ensure that any bystanders can hear your Mac speak. Setting the volume does however require the root password.

1 comment:

  1. Water jet cutters provide a cooler various for supplies that can’t withstand a high-heat process and are often used within the mining and aerospace industries. Lathes - Lathes are just like mills, Direct CNC only the instruments operate in a round movement. Like mills, lathes can produce advanced designs that may be inconceivable to create with a manual machine.

    ReplyDelete