AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

AIML to WSRM converter?
 
 

Well I know they have other code converters like PHP to C++ and others but I was just wondering if it was possible to have an AIML to Windows Speech Macros converter, because I was planning on building a desktop system for myself in my spare time, and if I could just convert my already built AIML files to Windows Speech Macro, then it would cut down the development time a lot because I wouldn’t have to develop the chat as much

Just a little idea, what do you guys think?

 

 
  [ # 1 ]

Interesting thought..  Can WSRM do everything you do in AIML?  If so, mapping that should be fairly straight forward.  If you can map all the variations in AIML against the WSRM equivalent, I’m sure we can wip up a perl script or something similar to do a one time mapping.

The thing to watch out though is if WSRM is capable to do what you need it to do.  If you load a massive amount of rules into it, will it be able to cope?  That’s a question we’ll only really know once we do some stress testing against it.

Now looking at alternatives, what is the main reason you want to run under WSRM?

 

 
  [ # 2 ]

Given the recursive nature of AIML, I would have to say that a direct mapping isn’t going to be possible. But if you run an AIML interpreter first, then the output could be mapped directly without any hassles. This is not my area of expertise, though, so don’t take my response as “law”. wink

 

 
  [ # 3 ]

I doubt you’ll be able to convert the full scope of AIML functions. Speech Macros do have a wildcard * and you can make e.g. lists of words to refer to, and you can have multiple input patterns activate the same response. But that’s about it as far as I know. Simple pattern-template pairs should be feasable. To communicate with my AI through windows speech macros, I wrote a simple text file with all the input “patterns” I wanted passed to it like so:

Hello
I’m [name]
My name is [name]
How are you
I’m fine

I then wrote a small program that converted each line into Speech Macro format, which is a fairly simple matter of adding tags fore and aft each pattern. A Speech Macro file is basically just a text file so the conversion is straightforward.
I did something rather custom for the output by passing the recognised pattern through to my actual running AI instead of having the Speech Macro reply, but you should be able to do the latter. It should be a matter of replacing all <category> tags with <command> and all < pattern > with <ListenFor> and <template> tags with <speak>.
Additional challenge for AIML conversion would be to omit the pattern parts that Speech Macros can’t process. Also, you may want to check the limits of Windows Speech Macros, I read it gets pretty slooooooow if it has to listen for 1000 patterns.

I have to add that despite half a day of voice training and only 20 patterns in my Macro, it was still driving me up the wall. I told it to “warn me at 17:14” and instead it warned me 40 minutes later. My dinner was totally burnt smile

 

 
  [ # 4 ]

Alternatively, you can already communicate with online chatbots through Windows Speech Recognition dictation if the chatbot has a text input field. No conversion necessary, except you have to yell “Enter.” all the time, or do something clever with timers and tracking activity on the input field.
I think the “Switch to (program)” Macro command would allow you to switch between the chatbot’s input field and desktop functions.
Seems a lot easier.

 

 
  [ # 5 ]

When I wrote a simple talking GUI for ChatScript, I used silence detection to emulate hitting [ENTER], and it worked fairly well. That may be an avenue of investigation. smile

 

 
  [ # 6 ]

I’ll look into it thanks guys!

I’ll also look into making a custom solution with an AIML interpreter… which could also allow me to add home automation into the mix, something which I have been looking into for a long while. I guess I will see where it leads.

 

 
  [ # 7 ]

And thank you for bringing this up. It’s brought me to the idea of making a one-line Speech Macro that passes -any- voice input on to my program instead of only specific patterns. Now I finally have a real voice interface! grin
(as good and bad as MS speech recognition can manage, anyway)

It also caused my program to talk to itself in a loop rolleyes, because the microphone kept hearing its own voice output. Definitely need a headset or develop self-awareness.

 

 
  [ # 8 ]

I ran into the same thing at one point, and while I don’t remember the method, there is a way to suppress the mic while the computer is “speaking”, so as to avoid such things.

 

 
  [ # 9 ]
Dave Morton - Jan 31, 2014:

Given the recursive nature of AIML, I would have to say that a direct mapping isn’t going to be possible. But if you run an AIML interpreter first, then the output could be mapped directly without any hassles. This is not my area of expertise, though, so don’t take my response as “law”. wink

Dave’s advice seems to be how the Microsoft source code samples are designed to work:

http://archive.msdn.microsoft.com/wsrmacros/Release/ProjectReleases.aspx?ReleaseId=1453

Quickly browsing the sample source codes, it would seem… A chatbot that is a desktop application may be bridged via the clipboard.  A chatbot that is a web application may be bridged via URL parameters.  Other options almost certainly exist as well.  In short, using a bridge keeps things modular with chatbots, which is usually much easier, faster and cooler than converting an entire language to a huge set of macros.

 

 
  [ # 10 ]
Dave Morton - Feb 1, 2014:

I ran into the same thing at one point, and while I don’t remember the method, there is a way to suppress the mic while the computer is “speaking”, so as to avoid such things.

That would be convenient, but I can’t find any solution other than a macro command that blocks speech recognition for x seconds. Oh well, I do have a fancy headset so I’ll just use that, or some high-tech cardboard over the speakers.

 

 
  login or register to react