Page 1 of 2

Text to speech AIFF

Posted: Mon Jun 02, 2008 7:25 pm
by Hayz
Does anyone know the exact command I need to save text-to-speech on Leopard. I know the basic say command but how do you save an aiff of the text to a specific location? Many thanks Hayz ;)

Posted: Mon Jun 02, 2008 8:55 pm
by doc holiday
you can specify the voice with -v argument, the voice name is the same as the OSX name for the voices.



cd ~/Desktop

say -v Vicki -o vicki.aiff stuff to say

you'll have the file on your desktop

Posted: Mon Jun 02, 2008 10:57 pm
by Hayz
Hi Doc, thanks for the reply. I did as you said but it does't work and comes up with an error. Can you type exactly what should be typed ilcuding an speech marks please?

Posted: Mon Jun 02, 2008 11:01 pm
by doc holiday
What is the error?

I copy/pasted those two lines from this message into the terminal.
(not at the same time)

I now have a file named "vicki.aiff" on my desktop which, when opened in quick time says "stuff to say"

Posted: Tue Jun 03, 2008 12:07 am
by Hayz
I get syntax error "An unknown token can't go after this identifier". I'm tying both lines out in Apple script and then clicking RUN...maybe I'm doing it wrong?

Posted: Tue Jun 03, 2008 12:58 am
by doc holiday
Open up your Utilities Folder, and open up the Terminal.app application.

simply type in the two lines at the prompt and hit enter after each.

Posted: Tue Jun 03, 2008 2:06 am
by Hayz
doc holiday wrote:Open up your Utilities Folder, and open up the Terminal.app application.

simply type in the two lines at the prompt and hit enter after each.
I type in the first line and press enter but it says "no such file or directory"
I'm on a Macbook Pro does this make a difference, I was originally opening the Applescript window to type stuff to say...but now I'm trying to type it in the Terminal.app as you advsied and getting this error now...

Hayz :(

Posted: Tue Jun 03, 2008 2:07 am
by bleepsnbreaks
theres a free cool little GUI for doing this you can download.
Google "cakehole"
I have used that on tracks...

Posted: Tue Jun 03, 2008 2:11 am
by Hayz
I dont believe this...cakehole works great (thanks bleeps) but doesnt include the Leopard voice of Alex, which is the voice I wanted to use..arggghhh..never simple..can anyone help....the commands are not working in terminal...

Posted: Tue Jun 03, 2008 2:42 am
by bragi0
You need to type things exactly. Cut-n-paste this in a new terminal, then cut-n-paste the whole output back in here, and I mean everything in that terminal.

Code: Select all

pwd
cd ~
pwd
ls -lad *esktop*
ls -lad .
ls -lad ~
ls -lad ~/*esktop*
and I might be able to figure out what went wrong.

By default OSX uses a non-case sensitive filesystem, so

Code: Select all

cd ~/Desktop
cd ~/desktop
should both give the same result.

Unless you've done something really weird and non-standard to your install?

you could try just opening terminal and doing the say line

Code: Select all

say -v Alex -o ~/alex.aiff Alex is talking
Then in finder the file should appear in your home directory, making any non-standard install irrelevant and hoping that your permissions aren't screwed.

Posted: Tue Jun 03, 2008 4:24 am
by hacktheplanet
Damn. All this time I was Audiohijacking the stream from Textedit. This is a lot easier.
Thanks Mr. Holiday!

Posted: Tue Jun 03, 2008 4:25 am
by Hayz
I have a new Macbook Pro, which came with Leopard and everything works great, so I doubt there is anything wrong with the install....
I'll try it out and report back soon.

Posted: Tue Jun 03, 2008 4:32 am
by Hayz
ok huge apologies because It worked, I thought I was copying it exactly but I copied and pasted it rather than typed it, as I should have done earlier and it worked. Not quite sure what I got wrong as I even copied the case etc but most importantly it worked :) Thanks Doc!

Posted: Tue Jun 03, 2008 4:58 am
by doc holiday
bragi0 wrote: By default OSX uses a non-case sensitive filesystem, so

Code: Select all

cd ~/Desktop
cd ~/desktop
it is case sensitive actually, D.


the_planet wrote:Damn. All this time I was Audiohijacking the stream from Textedit. This is a lot easier.
Thanks Mr. Holiday!

:wink:

You can use all the voices also

Hayz wrote:ok huge apologies because It worked, I thought I was copying it exactly but I copied and pasted it rather than typed it, as I should have done earlier and it worked. Not quite sure what I got wrong as I even copied the case etc but most importantly it worked :) Thanks Doc!

you were doing something wrong, that works on all os x macs. maybe adding a space or something? i'm defiantly on an intel with 10.5.3

I'm glad you got it. save that someplace for future reference.

Posted: Tue Jun 03, 2008 4:06 pm
by djsynchro
it just works! :D