• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "Say"
    Differences between revisions 4 and 5
    Revision 4 as of 2012-12-04 21:22:51
    Size: 1478
    Editor: Inanna
    Comment:
    Revision 5 as of 2012-12-04 21:24:45
    Size: 1751
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 12: Line 12:

    You can see a list of language codes here: http://www.loc.gov/standards/iso639-2/php/code_list.php (please note that your TTS reader may not suppose all of these!) The bot will use the two character ones, for example: de for german, es for spanish, en for english, etc.

    Usage:

    say "message"
    say "[language#] message"

    Example:

    say "Your city is under attack."
    say "es# Tu ciudad esta siendo atacada."

    Allows you to instruct the bot to say outloud a given message using the operating system's built-in text-to-speech reader. The say command can be used with expressions and thus requires use of quotation marks around all you want it to say, so that it can differentiate between your string and a variable.

    An optional language value can be given to use that language by the TTS reader. In the 2nd example above, the bot would say the sentence Tu ciudad esta siendo atacada. (Your city is under attack) with a Spanish accent and voice as determined by the language value es.

    An example of a useful line for a defensive script would be:

    say city.name + " has " + city.NumberOfRealAttacks + " incoming attacks"

    You can see a list of language codes here: http://www.loc.gov/standards/iso639-2/php/code_list.php (please note that your TTS reader may not suppose all of these!) The bot will use the two character ones, for example: de for german, es for spanish, en for english, etc.


    ScriptControlStructures

    Say (last edited 2012-12-04 21:24:45 by Inanna)