Hacker News new | past | comments | ask | show | jobs | submit login

Needs to mention afplay for playing audio! You can easily use this to make a command-line MP3 player.

Others have mentioned the “say” utility for speech synthesis. There is a lot you can do with it, it supports the TUNE format, which allows you to "shape the overall melody and timing of an utterance... for example ... to make an utterance sound as if it is spoken with emotion".

See: Apple's Speech Synthesis Programming Guide, https://josh8.com/blog/img/speech-synthesis.pdf

I also wrote more about this here: https://josh8.com/blog/commandline-audio-mac.html




Unfortunately, the TUNE format turned out to be a bit of an evolutionary dead end; the last generation of Speech Synthesis that supports it is the Alex voice which shipped in 2007, and it's highly unlikely in my opinion that we'll ever see it again — pinpoint control of synthesis and naturalness are inherently in tension, and the latter is a lot more valuable.


It is unfortunate. But Alex does sound pretty good! Not up to 2023 standards maybe but still pretty good.


Thanks for posting! I'm always glad when I discover good blogs like yours.


Thank you for the article :) One small correction, the command to list the voices is `say -v '?'`




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: