13 ms·
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
by reuven 11y ago
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...
- pavel_lishin 11y agoThis 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.
- Bud 11y agoThey 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.
- reuven 11y agoThat'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.
- Bud 11y agoAn 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.
- pavel_lishin 11y agoTwo-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.
- microtherion 11y agoIt'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?'
- pavel_lishin 11y agoHm, do you know how many speak languages that aren't "ascii"?
- carlob 11y agoNo, it doesn't speak Italian, for one 'chi' is pronounced like 'she' and not like 'ki'.
- the_mitsuhiko 11y agoThey actually do, but only if you also download the entire language packs for them.
- clw8 11y ago"Bruce" triggered the English response? That's a weird ML algorithm.
- XMPPwocky 11y agoNo, "-v Bruce" did (forcing the use of the "Bruce" voice, which is in English).
- microtherion 11y agoIt'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).
- wsc981 11y agoOMG the Dutch voice sounds perfect. say -v Xander "Ik houdt van appeltaart met slagroom in Scheveningen op zondag."
- kylek 11y agoI 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 ;)
- deleted 11y ago[deleted]
- zwily 11y agoI 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.
- bluejekyll 11y agoAgree. 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.
- zwily 11y agoYou'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.
- toomuchtodo 11y agoI 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.
- Doctor_Fegg 11y agoThis 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".
- _delirium 11y agoImo 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.
- hbbio 11y agosay -v Thomas "My English is very well."
- uxwtf 11y agoAwesome! I'll definitely use an American voice for recording a product video next time.
- nyc640 11y agoAnother 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
- sal_paradise 11y agoAnd yet another: say --voice='?' | perl -lane 'my $v = $F[0]; system("say -v $v \"Hi $ENV{'USER'}\"")'
- nxpnsv 11y agoOr just stay in the shell... for voice in `say --voice="?" | awk '{print $1}'`; do say -v $voice "Hello $USER, I'm $voice"; done
- ScotterC 11y agoThose are awesome!
- MrBuddyCasino 11y agoHow do these work? Built-in patterns?
- greggman 11y agoYou 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/ http://greggman.github.io/text2speech/ There's also some singing like voices.
- 1000hz 11y agojust 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}"
- fanf2 11y ago`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!