I'm probably doing something wrong, but when I run the script below the responses from the programAB in the webgui are different to the one in the Swing interface. The swing interface is my bot Ozy, the webgui one just gives me default responses.

webgui = Runtime.createAndStart("webgui","WebGui")
ozy = Runtime.createAndStart("ozy", "ProgramAB")
 
ozy.startSession("C:\MRL\ProgramAB", "ozy", "Ozy")
htmlfilter =  Runtime.createAndStart("htmlfilter", "HtmlFilter") 
# create a Speech service
mouth = Runtime.createAndStart("mouth", "MarySpeech")
ozy.addTextListener(htmlfilter)
htmlfilter.addTextListener(mouth)

kwatters

8 years 5 months ago

I would suspect that the responses should be the same  (unless there's a <random> tag in the AIML) between the swing and the webgui. 

The only differences I could think of might be from differences in one of 3 things.

1. path  - This is the home directory the ProgramAB  (normally MRL/ProgramAB .. it will look here for AIML.)

2. botName - the name of the subdirectory that contains a specific bots brain  ProgramAB/bots/alice2   (for example)

3. session - this is the username of the person currently chatting with the bot.  

When chatting with the bot there are really 2 things you care about .\

1. which bot are you talking to   (this is "botName") 

2. what's the username talking iwth the bot. (this is "session" )

A session must be started for each botName + session combination.

 

Not sure if this will answer your question, but hopefully it helps

 

 

Thanks for the response Kev.

After playing further. It seems to be something to do with the speech recognition, if I type in the uestions in the webgui I get the correct response. If I click on the microphone and talk it looks like it is getting the correct sentence but the response that come back are always the default response to things it doesn't know.

The chat log always has an empty field next to User for the speech results, if I click the ask ProgramAB button the field is filled in and the correct response given.

Hi bensonofjohn.
Could you solve this problem so far? I'm experiencing the same problem. If i type something the bot is answering correctly. If i use the microphone he i can see in the box that he gets the right words from me but somehow he just keeps answering the default phrases.

Not found a solution yet. It is clear that webkit is recognising the speech and returning the correct phrase, but not passing it to programAB. In the bottom window the speech is blank.