U herd Mac spek
From nswccWiki
U herd it thru Mac
- with apologies to Marvin Gaye's : You heard it through the Grapevine
Over the years, the Macintosh has developed excellent but little known and even less understood text-to-speech(TTS) capabilities. Even less known is the native speech recognition capabilities. But that is another topic. Along with TTS has come more natural sounding "voices". One of the latest, called Alex, is a very natural sounding voice.
say "[[emph +]]Hello; [[volm +0.3]] there [[volm -0.3]] [[emph -]]" using "Alex"
is how you would write a simple sentence that the Mac can speak from AppleScript. The emphasis modifier makes the following speech more pronounced. The volume modifiers raises the volume by 30% (in the range 0.0 to 1.0) for the word "there", and decreases it afterwards. Lastly the emphasis modifier is turned off.
The string (without surrounding quotes) could be embedded in any application that has TTS capabilities. TextEdit, Smultron, and Skim are three text editors supporting TTS.
Any application that allows AppleScript to "read" text it holds, such as the notes field in each Keynote slide gives the Mac TTS capabilities for that application using the say <text> command.
Apple have for some time incorporated the ability to modify the way in which TTS output is heard. In many cases, people naturally use modifiers. For example, these text modifiers perform expected modifications.
- " <quote> - opening quote places a short pause and expanded pitch, while a closing quote places a short pause and expanded pitch
- , <comma> inserts a short pause and a slight rise in pitch
- ; <semicolon> inserts a short pause
- : <colon> inserts a short pause
- . <full stop> inserts a short cause and a slight fall in pitch
It is possible to use phonetic spelling so that non standard text to speech nuances can be inserted. Note in this next example E23 is actually automatically said as "E twenty three".
say " Hello [[inpt PHON]] IYAEn [[inpt TEXT]], you have a lesson with Year 8 in E23" -- but this still sounds better ! say " Hello Ian, you have a lesson with Year 8 in E23"
Of course there are some examples where you need to use the phonetic spelling such as when the spelling looks nothing like the way it is spoken (by the local population).
say " Where in the world is Goonoo Goonoo" -- but this sounds (a bit) more like the way the locals say it say " Where in the world is [[inpt PHON]] gUXnnIY gUWnUW"
More (that are very user friendly) details.
