News for hackers. Stuff that matters.
Re:OS X Command Line Utilities by reuven on Sunday August 30, 2015 @09:42AM (#10143260)
This article was nice, but it indicated that you need to change the system preferences in order to change the voice. It turns out that you can pass the -v flag to use a different voice, or "-v ?" to get a list of names.

So you can do

    say -v Samantha Help, I'm trapped in this castle!
or

    say -v Princess Help, I'm trapped in this castle!
But wait, it gets even better: The Mac comes with a number of voices for other languages, such as French, Hebrew, Chinese, and Arabic. And it turns out that the voices will work in English as well, using that country's accent. I just tried it with a few different languages, and was amazed by how well this worked, within reason:

    say -v Sin-ji  "Hello, I am Chinese.  What do you want to eat?"
    say -v Thomas  "Hello, I am French.  What do you want to eat?"
    say -v Carmit  "Hello, I am  Israeli.  What do you want to eat?"
And yes, I should get back to work...
Re:OS X Command Line Utilities by nyc640 on Sunday August 30, 2015 @04:09PM (#10144343)
Another fun one:

    say -v cellos dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo
Edit: 'In the Hall of the Mountain King' if anyone is curious.

There is also 'Pomp and Circumstance':

    say -v Good dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum
and Chopin's 'Funeral March':

    say -v Bad dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum
Re:OS X Command Line Utilities by sal_paradise on Sunday August 30, 2015 @05:14PM (#10144498)
And yet another:

   say --voice='?' | perl -lane 'my $v = $F[0]; system("say -v $v \"Hi $ENV{'USER'}\"")'
Re:OS X Command Line Utilities by nxpnsv on Monday August 31, 2015 @03:33AM (#10145864)
Or just stay in the shell...

   for voice in `say --voice="?" | awk '{print $1}'`; do say -v $voice "Hello $USER, I'm $voice"; done
Re:OS X Command Line Utilities by MrBuddyCasino on Monday August 31, 2015 @02:35AM (#10145739)
How do these work? Built-in patterns?
Re:OS X Command Line Utilities by ScotterC on Sunday August 30, 2015 @11:11PM (#10145257)
Those are awesome!
Re:OS X Command Line Utilities by pavel_lishin on Sunday August 30, 2015 @09:51AM (#10143286)
This is great, and the voices apparently only know how to speak English, and their own language!

That is, typing

    say -v Milena "Здравствуйте, меня зовут Milena.
Actually says, "Zdravstvuyte...", while typing

    say -v Bruce "Здравствуйте, меня зовут Milena.
Results in "Cyrillic capital letter 'Z'. Cyrillic small leter 'd'.", etc.
Re:OS X Command Line Utilities by Bud on Sunday August 30, 2015 @01:23PM (#10143904)
They don't actually know how to speak English. If you listen carefully, what they are doing is sounding out English using the pronunciation rules of their "native" language. It's not an accent at all, just a literal parsing using different rules.
Re:OS X Command Line Utilities by reuven on Sunday August 30, 2015 @02:15PM (#10144065)
That's precisely what ends up causing an accent, no? Using the sounds and pronunciation of your native language in another one, with different rules.

I don't think that Apple has created the World's Best Accent Impersonator here, but it's good for a few laughs.

Re:OS X Command Line Utilities by Bud on Monday August 31, 2015 @02:08AM (#10145650)
An accent is when you do it occasionally and accidentally, not pervasively, the wrong way, every single time for every single sound. That's something else.
Re:OS X Command Line Utilities by pavel_lishin on Sunday August 30, 2015 @02:18PM (#10144075)
Two-part response.

1, the pedantic: technically none of them know how to speak English, or any other language - there's just a rule set for making phonemes based on characters out of waveforms.

2. Ignoring the pedantic response, I still don't think that's true - if that were the case, then Milena wouldn't be able to speak an English sentence!

    say -v Milena "Hello, I am Milena"
If they only speak their own language, then Milena should be saying "Прописная буква Х, строчная буква и", etc.
Re:OS X Command Line Utilities by microtherion on Sunday August 30, 2015 @04:01PM (#10144320)
It's even more complicated than that: Some voices DO speak multiple languages, e.g. the German voice "Anna" (downloaded from System Preferences) speaks excellent German, English, Spanish, Italian, and French:

   say -v Anna 'über allen Wipfeln ist Ruh'
   say -v Anna '[[lang fr_FR]] que restet-il de nos amours'
   say -v Anna '[[lang it_IT]] chi nasce asino non muore cavallo'
   say -v Anna '[[lang es_SP]] nosotros tenemos mas influencia  con sus hijos que su tiene'
   say -v Anna '[[lang en_UK]] are we having fun yet?'
Re:OS X Command Line Utilities by carlob on Monday August 31, 2015 @02:12AM (#10145665)
No, it doesn't speak Italian, for one 'chi' is pronounced like 'she' and not like 'ki'.
Re:OS X Command Line Utilities by pavel_lishin on Sunday August 30, 2015 @06:11PM (#10144638)
Hm, do you know how many speak languages that aren't "ascii"?
Re:OS X Command Line Utilities by the_mitsuhiko on Sunday August 30, 2015 @04:59PM (#10144475)
They actually do, but only if you also download the entire language packs for them.
Re:OS X Command Line Utilities by microtherion on Sunday August 30, 2015 @04:02PM (#10144325)
It's not a question of handling languages but of handling scripts. I believe all voices can handle Latin, in addition to their native script (So Russian voices can handle Latin & Cyrillic, but English voices handle only Latin).
Re:OS X Command Line Utilities by clw8 on Sunday August 30, 2015 @01:28PM (#10143924)
"Bruce" triggered the English response? That's a weird ML algorithm.
Re:OS X Command Line Utilities by XMPPwocky on Sunday August 30, 2015 @02:00PM (#10144021)
No, "-v Bruce" did (forcing the use of the "Bruce" voice, which is in English).
Re:OS X Command Line Utilities by kylek on Sunday August 30, 2015 @10:47AM (#10143451)
I must say...being a sysadmin with the ability to ssh into developers' laptops remotely in our domain...this is one of the more fun commands ;)
Re:OS X Command Line Utilities by zwily on Sunday August 30, 2015 @11:31AM (#10143555)
I hope that ssh'ing into anyone's laptop using your sysadmin credentials in order to play a prank is a fireable offense at your company.
Re:OS X Command Line Utilities by bluejekyll on Sunday August 30, 2015 @11:43AM (#10143597)
Agree. Though until people never mess up their computers, we'll always need root. All super user interactions should be logged and audited, always. Not just "this was logged..." Which most people know means no one will ever look at it. But if everyone knew that was backed up with a call as to why that interaction happened with no associated case, etc.
Re:OS X Command Line Utilities by zwily on Sunday August 30, 2015 @12:28PM (#10143724)
You're in the minority then... My original comment has been downvoted quite a bit. It's strange to me that people think this is okay. If someone is willing to use that power for a prank, it seems to me more likely that they'll use it for... whatever.

I like a good prank. Leave your screen unlocked? You deserve the abuse you get. :) But accessing my laptop in this way is just creepy.

Re:OS X Command Line Utilities by toomuchtodo on Sunday August 30, 2015 @12:41PM (#10143758)
I don't agree with your logic and think you need a more nuanced sense of humor. Spying on someone remotely? Fireable offense. Remotely kicking off speech utils between people on a team once? Not so much.

Disclaimer: I have managed tech teams before. It is better to forgive then have knee jerk managerial reactions.

Re:OS X Command Line Utilities by iamdave on Sunday August 30, 2015 @08:10PM (#10144863)
I guess I'll take the downvotes and somewhat agree with them; probably not as far as to say a fireable matter for the first offense. Definitely a strong and unambiguous warning/disciplinary action (repeat offender, however? Fired)

Sorry, I get office pranks but there's no reason to be doing anything on an end-user's workstation without their permission or consent that isn't maintenance or security related. I guess I lack a sense of humor, but I've also seen too many instances where a prank on someone's machine resulted in severely unintended consequences and breaches of trust that rippled through the team.

Just not worth it, IMO.

Re:OS X Command Line Utilities by zwily on Sunday August 30, 2015 @04:32PM (#10144408)
Sure, getting fired for doing it the first time would definitely be a bit strong. However, an admin who was regularly using his remote management capabilities to play pranks I would hope would be let go.
Re:OS X Command Line Utilities by toomuchtodo on Sunday August 30, 2015 @11:11PM (#10145255)
We agree on this.
Re:OS X Command Line Utilities by kylek on Sunday August 30, 2015 @01:01PM (#10143824)
...and jumping on someone's unlocked computer without authorization is different but OK? right...here's your sign
Re:OS X Command Line Utilities by zwily on Sunday August 30, 2015 @04:28PM (#10144398)
Jumping on an unlocked computer is more of an "equal opportunity" thing. Only a handful of people in a company (IT) have the ability to remotely manage employees workstations. That creates an imbalance of power that needs to be respected. Using it for pranks against people who don't have that power isn't really fair.

That said, I don't really find the whole "recursihoffing unlocked laptops" thing all that funny either, but it doesn't bother me as much.

Re:OS X Command Line Utilities by Poiesis on Sunday August 30, 2015 @04:02PM (#10144326)
Count me on your side (former admin--windows, alas). It always seemed to me to be kind of a bullying thing to do when the mark has less privileges as you. Seems like if they can't retaliate in kind, it's just not as fun. I'm sure there are people who have widely varying views on this, though.
Re:OS X Command Line Utilities by bsagert on Tuesday September 01, 2015 @12:05PM (#10153362)
> former admin--windows, alas.

Honest question, why the need to apologize for being a former Windows admin?

Re:OS X Command Line Utilities by rconti on Sunday August 30, 2015 @01:38PM (#10143960)
I, for one, neither wish ill will on people I don't know, nor do I wish a miserable workplace with uptight, excessively punitive policies on anyone.
Re:OS X Command Line Utilities by biafra on Sunday August 30, 2015 @03:43PM (#10144277)
I think you're right. But I also have the luxury to work in a company where not one except me has root on my work computer.
Re:OS X Command Line Utilities by kylek on Sunday August 30, 2015 @11:49AM (#10143617)
And I hope that I would get fired for a little rare, light-hearted humor as I wouldn't want to work there anyways. Chill out, winston.
Re:OS X Command Line Utilities by dang on Sunday August 30, 2015 @02:02PM (#10144028)
> Chill out, winston

Please don't do this here. This comment would be fine with just the first sentence.

Re:OS X Command Line Utilities by steve19 on Sunday August 30, 2015 @03:47PM (#10144288)
"Chill out, winston"

It's a British expression made popular by a movie. He is not calling out the guy by his first name.

Re:OS X Command Line Utilities by dang on Sunday August 30, 2015 @04:41PM (#10144431)
Yes, I know. But telling someone to "chill out" is a jab and superfluous.

People do this kind of thing in online comments all the time, to make the other person look bad and rub in a little extra insult. Any one comment isn't much, of course, but they compound into a degraded discourse, and all of it goes against the civility we try to practice here.

Re:OS X Command Line Utilities by steve19 on Sunday August 30, 2015 @06:36PM (#10144682)
Fair enough. I didn't want you to think he was doxing someone.
Re:OS X Command Line Utilities by dang on Sunday August 30, 2015 @08:43PM (#10144913)
Ah, I see. Probably should've left Winston out of this :)
Re:OS X Command Line Utilities by _delirium on Sunday August 30, 2015 @01:21PM (#10143894)
Imo the non-English voices speaking English aren't that useful as accented voices, because, at least for the Latin-alphabet ones, they're dominated by spelling-to-phonology mapping errors, like misreading diphthongs. It's an okay representation of someone who really speaks no English trying to sound out written English as if it were German, but it's not very similar to what a German accent in English sounds like, since a typical German accent isn't dominated by misreadings.

If it were open source you could probably get better results by hacking it up to parse in the "right" language and then only realizing the phonology in the "wrong" language, instead of both parsing and speaking in the "wrong" language.

Re:OS X Command Line Utilities by 1000hz on Monday August 31, 2015 @02:29AM (#10145721)
just gonna leave this here...

  say -vjun "[[inpt TUNE]] h {D 100; P 233.08:0 233.08:100} OW {D 200; P 233.08:0 233.08:100} l {D 100; P 220:0 220:100} IY {D 200; P 220:0 220:100} f {D 100; P 233.08:0 233.08:100} AA {D 500; P 233.08:0 233.08:100} k {D 100; P 174.61:0 174.61:100} IY {D 500; P 174.61:0 174.61:100} n {D 50; P 174.61:0 174.61:100} g {D 50; P 174.61:0 174.61:100} S {D 100; P 155.56:0 155.56:100} IH {D 400; P 155.56:0 155.56:100} t {D 100; P 155.56:0 155.56:100} IH {D 200; P 233.08:0 233.08:100} t {D 100; P 233.08:0 233.08:100} s {D 100; P 233.08:0 233.08:100} AA {D 200; P 220:0 220:100} d {D 100; P 233.08:0 233.08:100} AY {D 500; P 233.08:0 233.08:100} n {D 100; P 174.61:0 174.61:100} OW {D 400; P 174.61:0 174.61:100} s {D 200; P 155.56:0 155.56:100} OW {D 500; P 155.56:0 155.56:100} r {D 200; P 155.56:0 155.56:100}"
Re:OS X Command Line Utilities by Doctor_Fegg on Sunday August 30, 2015 @12:10PM (#10143666)
This is how iPod Voiceover titles are recorded.

Which is rather lovely, because someone in Apple HQ has decided that the (London) band Saint Etienne must be French, and so Thomas faithfully reports that the current track is "Leek a Motorweh".

Re:OS X Command Line Utilities by wsc981 on Sunday August 30, 2015 @10:14AM (#10143357)
OMG the Dutch voice sounds perfect.

   say -v Xander "Ik houdt van appeltaart met slagroom in Scheveningen op zondag."
Re:OS X Command Line Utilities by mverwijs on Sunday August 30, 2015 @12:08PM (#10143661)
Except: s/dt/d/g
Re:OS X Command Line Utilities by rosege on Sunday August 30, 2015 @10:18PM (#10145130)
Lekker!
Re:OS X Command Line Utilities by greggman on Sunday August 30, 2015 @07:08PM (#10144731)
You can also use the voice from html5 but support is really shoddipy and buggy. Safari provided all the voices. Chrome not so much.

http://greggman.github.io/text2speech/

There's also some singing like voices.

Re:OS X Command Line Utilities by fanf2 on Monday August 31, 2015 @09:08AM (#10146610)
`say` reminds me of the *SAY command that came with Superior Software's Speech! program for the BBC Micro. Software-only speech synthesis on an 8 bit micro with limited sound hardware was very impressive!
Re:OS X Command Line Utilities by uxwtf on Sunday August 30, 2015 @03:26PM (#10144240)
Awesome! I'll definitely use an American voice for recording a product video next time.
Re:OS X Command Line Utilities by hbbio on Sunday August 30, 2015 @03:20PM (#10144220)
say -v Thomas "My English is very well."