In playing with a diversion (around here, we call it "seeing a squirrel"), I've been sending strings to the OS 'say' command from a Python script,
- Code: Select all
say "Hello world."
I'm not always satisfied with the inflection and tone of the spoken strings, and wanted to modify them. There are some more obvious examples--like inserting a comma, or using phony phonetics ("oonum" vs "unum") --but it turns out there are many others. I stumbled across
this reference in Apple's Developer library which proved to be really interesting and helpful. For example, consider:
- Code: Select all
Please call me at 5551990.
which results in, "Please call me at five million, five hundred and fifty one thousand, nine hundred ninety", versus:
- Code: Select all
Please call me at [[nmbr LTRL]] 5551990 [[nmbr NORM]].
which results in, "Please call me at five five five one nine nine zero."
These commands work in terminal and with
indigo.server.speak() (which I believe is a wrapper around the OS say command). I'm not sure that they'll necessarily work with Alexa.