Install* as any other module (Modules > Install/Uninstall > Upload File & Install) and publish. Grab a beer while uploading...
1. Edit module parameters
Mambo location: Modules > Site Modules > Alf Interactive Talking Character
Under the parameters tab, among several other things, you can change the character template (movie parameter). You can download character templates here or you can build your own from a master template.
2. Edit alf_brains.txtServer location: mamboroot/modules/alf/alf_brains.txt
welcomeText //what you want your bot to say when the page loads.
hideWelcomeText //set to Y if you don't want your bot to say anything when the page loads.
questionArray, answerArray //here goes the bot's
Nascent Artificial Intelligence.
menuQuestionArray //here you put the questions you want to appear in the menu items. Make sure you also included them in your NAI questionArray.
IMPORTANT NOTE: make sure to surround every parameter with &-signs. questionArray, answerArray and menuQuestionArray each count as one parameter. Clear cache before viewing changes in browser.
3. Edit soundfiles directory
Server location: mamboroot/modules/alf/soundfiles/
The soundfiles directory contains 2 types of files: audio files (.mp3) and amplitude files (.txt). The latter ones contain the data by which the lip movements are controlled.
You can record your own audio files with any recording software available to you. I use Audacity. Note: if you want to export MP3 files from Audacity you'll also have to get the LAME encoder.
Naming your files - You should name both your audio files and amplitude files before the extension the first 25 characters of the corresponding NAI answerArray element (= the corresponding text output), all lowercase, replacing special characters with hyphens (-) and spaces with underscores (_). Example: if you program the answerArray element "I'm being sold like hot cakes!", you have to name the corresponding mp3 file: "i-m_being_sold_like_hot_c.mp3". Please note not all special signs are converted to hyphens, only the ones I found on my keyboard. To get an idea of the filename the bot will be looking for for its reply, use the fileNameTool. Just type or paste the NAI answerArray element in the botOutput field and press Enter. In fact, as the fileNameTool contains the same filename algorithm the bot does, I'd recommend to always use it to name your files. In case the filename it generates still contains special characters (apart from "-" and "_"), change the bot output.
Generating the amplitude files - the free way
Download WaveSurfer and use it to open the sound file, in our case an MP3 file (set file type when opening). First time, choose standard Configuration. Right-click on the wave form and select Create Pane -> Power Plot. Right-click the Power Plot that was generated and choose Properties. Under the Power plot tab, set Frame interval to 0.0666666666667, click Apply and OK. Right-click the Power Plot again and this time choose Save Configuration. Next time when opening a file, instead of choosing standard configuration, choose the configuration you just saved. For now, right-click the Power Plot again and select Save Data File. Keep the name if you generated it with the fileNameTool. Then go to the file you just saved (it will be a PWR file) and open it in a text editor. Select everything, copy and paste in the pwrPlotValues window of the amplitudeConvertor and press Enter. Copy the array that appears in the amplitude window and paste in a text file with the following format:
&faFile=i-m_being_sold_like_hot_c.mp3&fps=15&scale=10&smoothing=0&dBValues=0&litude=(0, 0, 0, 0, 1, 1, 3, 1, 2, 3, 2, 2, 2, 1, 1, 4, 2, 2, 2, 2, 7, 8, 8, 1, 4, 4, 3, 2, 3, 4, 5, 6, 3, 7, 6, 6, 2, 3, 7, 5, 5, 4, 3, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0)&Done=1
Replace the amplitude array with the array generated by the amplitudeConvertor and the faFile name with the name of the sound file. Save this file under the same name (replace the extension with ".txt"). Example: if your sound file is called "my_name-s_alfredo.mp3", faFile will be called the exact same and your amplitude file will be called "my_name-s_alfredo.txt".
IMPORTANT NOTE: amplitude files don't allow any formatting or white space between the "&"-separated parameters.
Upload both sound and amplitude files to the soundfiles folder (mamboroot/modules/alf/soundfiles).
For a description of the use of Wavesurfer in a similar context go here. Don't use the EasyLipSyncConverter you'll find over there, however. Instead, use the amplitudeConvertor you'll find in the downloads section (under Tools).
Generating the amplitude files - the fast way
FlashAmp does all of the above in the wink of an eye. With the standard version you can even batch-process a whole folder of sound files at the same time! Except for the About and Registration tabs (the unregistered version only turns out 10 values per amplitude array) the tool has 3 other tabs. For best lip sync performance in conjunction with Alf you should tick "Amplitude list" and "Normalize" under the Settings tab. Scale should be set to 10 and Frame rate to 15. Under the Input tab browse for the file or folder of files (standard version) you want to process and choose Runtime LoadVariables() under Output. When you press the Process button, Flashamp generates the amplitude file(s).
Bet you already finished that beer.
*When upgrading from a trial version, you only need to replace alf_bot.swf in mamboroot/modules/alf.