AtmoWire  
  Adobe Atmosphere tutorials, resources, directory, reviews, and news.  
 
  Home
  Features
  Directory
  Forum
  Tutorials
  Resources
  Reference
  Calendar
  Contests
  Job Listings
  Builder Profiles
  Store
  Links
  Contact








Chat-Bots in Adobe Atmosphere
     Part three of a six part tutorial by Stuart Forbes

Setting up text to speech system
What's Part 3 all about?
In Part 3 of the tutorial we'll show you how to set up a text to speech system so you can hear your bot talk. This uses the Speaks for Itself plugin. If other people want to hear the bot talk they can download this plugin for themselves from your page - this only has to be done once and it only takes a minute or two,

Step 1: Fill in licensing form
Using the plugin on your site is free for non commercial use, but you first have to fill in their licensing form here then click the I accept the terms and Conditions button at the bottom of the page (if you agree with them of course!).

Step 2: Download speech plugin
Click here to go to the SpeaksForItself main page, then click on Download SpeechPlugin at the top left of the page. On the new screen, enter your name and email address then click on the Download SpeechPlugin button and follow the instructions on the next screens until the process is complete.

Step 3: Setting up your new page
Once you have received your licence from SpeaksForItself (ours took about 48 hours to arrive by email) you're ready to set up your talking bot page on your site. We've already set up a basic page for you which:
  • includes the SpeaksForItself script and images
  • loads the bot world you created in Part 1 and Part 2 of this tutorial
  • sends the output from your bot to the SpeaksForItself plugin so you can hear it speak
Download the files for this here. Unzip the files and upload all of them to your bot directory. The file base.js is a different version of the file you uploaded in the first tutorial. Delete the old one before uploading this new version, or simply overwrite it when prompted by your FTP program. To access your speaking bot visit the page botframe.htm in your bot's directory on your site e.g. www.yoursite.com/bot/botframe.htm You should now be able hear your bot speak any answers he gives as well as display them in the chat window.
 
Submit your talking site
Under the terms and conditions of SpeaksForItself you have to submit your new talking site. Click here to access their submission form for sending on your details.

How do these new pages work?
In the first Part of the tutorial you created a bot world with only one page (bot.htm). Now you have three pages:
  • Botframe.htm is a frames page with two frames.
  • The left hand frame (frame[0] in javascript)) holds the page botmain.htm, which contains the atmo world and the java applet for the bot.
  • The right hand frame (frame[1]) in javascript) holds the page botcontrol.htm which contains the speech plugin.

Why two frames pages?
Under the conditions of the SpeaksForItself licence you have to display their (quite large) logo.

You could just have it in the same page on top of the atmo world but it doesn't look very good! It's neater tucked away on the right (and we'll be putting some other thing on the right later for controlling the bot)

I haven't found a way of using tables to do this as I can't get atmo to resize itself inside a table when you resize the page.

I also tried iframes but these don't seem work with a width set to 100% in Internet Explorer 5 (they do in IE 6).

You may well find a more elegant solution - please let us hear about it on the forum if you do.

You may want to experiment with these html pages, and they are commented to explain how they work.

Basically:
  • The base.js script sends the bot's answers from the atmo world to the function speak in its container page (botmain.htm in frame[0])
  • This sends the answers to the function speak on the speech plugin page (botcontrol.htm in frame[1])

  Go to:     Part 1     Part 2     Part 3     Part 4     Part 5     Part 6 Coming soon  


Please be sure to check out Stuart Forbes' website at http://www.hsworlds.com.

To view more great worlds that Stuart has built Click Here.


Copyright© 2004 AtmoWire.com - All rights reserved.