YAAQ (yet another apple question)
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
YAAQ (yet another apple question)
Someone asked me how to set up Crafty's "speech" on a mac. I had no idea. Worked trivially under linux, but I do not see anything similar to "esdplay" or anything close for the mac. Most are running Yosemite. Any suggestions?
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
The "say" command is what you want
Code: Select all
say "This is a test."
-
- Posts: 730
- Joined: Fri Oct 19, 2012 2:23 am
-
- Posts: 859
- Joined: Mon Aug 10, 2009 10:05 pm
- Location: Italy
- Full name: Stefano Gemma
Re: The "say" command is what you want
It is better to use single quotes, as you can see by executing the following commands:sje wrote:Code: Select all
say "This is a test."
Code: Select all
say "This is a Test!"
say 'This is a Test!'
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: The "say" command is what you want
stegemma wrote:It is better to use single quotes, as you can see by executing the following commands:sje wrote:Code: Select all
say "This is a test."
The first one gives an error related to a missing event (?) and the second one works fine.Code: Select all
say "This is a Test!" say 'This is a Test!'
Code: Select all
say 'You'll see that's not always a good idea.'
-
- Posts: 859
- Joined: Mon Aug 10, 2009 10:05 pm
- Location: Italy
- Full name: Stefano Gemma
Re: The "say" command is what you want
sje wrote:stegemma wrote:It is better to use single quotes, as you can see by executing the following commands:sje wrote:Code: Select all
say "This is a test."
The first one gives an error related to a missing event (?) and the second one works fine.Code: Select all
say "This is a Test!" say 'This is a Test!'
Code: Select all
say 'You'll see that's not always a good idea.'
Code: Select all
say Yes but it works even without quotes!
-
- Posts: 608
- Joined: Wed Oct 13, 2010 9:44 am
- Location: Australia
Re: The "say" command is what you want
You are just running into a bash (the modern default unix command shell) nuance/feature.say "This is a Test!"
Single quotes (') are literal, but bash will try to do variable expansion inside double quotes ("). The exclamation mark has significance.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
And in the other direction
And in the other direction:
https://developer.apple.com/library/mac ... index.html
I did some work with this long ago. The basic idea is to supply a library recognition routine with a list of strings, each string being the text version of speech to be recognized. A spoken phrase is compared to the voice synthesis data for each of the strings and the best match is returned.
https://developer.apple.com/library/mac ... index.html
I did some work with this long ago. The basic idea is to supply a library recognition routine with a list of strings, each string being the text version of speech to be recognized. A spoken phrase is compared to the voice synthesis data for each of the strings and the best match is returned.
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: The "say" command is what you want
I tested this and this case works fine.sje wrote:Code: Select all
say 'You'll see that's not always a good idea.'
[Account deleted]