Add New AIML Categories with Your Voice

Add Main Script Code - Change the Path as Needed

Code:

saywait("Starting A I M L learning")

##SoundNote("c2",2000)
$UniqueTime = $year + "." + $month + "." + $day + "-" + $hour + "." + $minute + "." + $second
$AIMLPath = "C:\Users\Thomas\Documents\AIML_Simone\aiml"
$AIMLFilename = $AIMLPath + "\0AIMLCode" + $UniqueTime + ".aiml"
print($AIMLFilename)

FileWriteLine($AIMLFilename,"")

$bLearningAIML = true

:AddNewAIML


################# ADD INPUT ###############
saywait("When you hear the beep please add new input.")
sleep(1000)

saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
#sleep(2000)
$sAIMLInput = $BingSpeech
print($BingSpeech)
saywait("New input was learned.")


################# ADD OUTPUT ###############
sleep(2000)
saywait("When you hear the beep please add new output.")
sleep(1000)

$bLearnAIML = true
saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(2000)
$sAIMLOutput = $BingSpeech
saywait("New output was learned.")
print("Heard:" + $BingSpeech)

$sAIMLLineOfCode = ""+ $sAIMLInput + " " + $sAIMLOutput + " "
print($sAIMLLineOfCode)

FileWriteLine($AIMLFilename,$sAIMLLineOfCode)
saywait("New AIML was added to the file")
sleep(1000)


############ DOES USER WANT TO ADD MORE? #############
saywait("do you want to add another category?")
sleep(1000)

saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(2000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(1000)
$sAnotherYesNo = $BingSpeech
print("Heard:" + $BingSpeech)

if($sAnotherYesNo = "Yes")
goto(AddNewAIML)
endif
print("Heard:" + $BingSpeech)


############ FINALIZE AND WRITE NEW FILE ##############
sleep(1000)
saywait("Finalizing A I M L document.")



FileWriteLine($AIMLFilename,"")
sleep(2000)
controlCommand("AimlBot", "ReloadConfig")

saywait("The new A I M L file is ready to use.")

$bLearningAIML = false

Open the settings dialog of the new script you created. Paste the above code into it. save the settings.

#1  
Hello
Super le code . Merci beaucoup .
PRO
USA
#2   — Edited
nice program will try it out