Hello i made a batch ai that learns and i just wanted to ask, is it possible to make my bot randomly say something without the user's response? or like when the use forgets to type for a certain amount of time, the ai will say are you there?
@ECHO OFF
COLOR 0b
Title %TIME% Visu
mode con cols=55 lines=10
if not exist data.txt Type Nul >data.txt
ECHO HELLO I AM A VISU. WHAT IS YOUR NAME?
set /p name=
echo I will not forget your name is %name% again I promise.
ECHO %NAME%, IS A COOL NAME.
goto begin
:begin
cls& Echo Talk to Visu
set "text=" & set /p text="%NAME%: "
if not defined text exit /B
for /f "tokens=1,* delims=@" %%i in (data.txt
) do if /i "%text%"=="%%i" Call :Aye "%%~j" & Goto :begin
:Learn
echo Visu: I don't know that.
echo Visu: What would be a good answer to '%text%'
set /p answer=?
echo %text%@%answer%>>data.txt
Call :Aye "%answer%"
goto :begin
:Aye
echo Visu: %~1
echo Visu: Thinking..
echo set speech = Wscript.CreateObject("SAPI.spVoice") > "temp.vbs"
echo speech.speak "%~1" >> "temp.vbs"
cscript //Nologo temp.vbs
Timeout /T 3 /Nobreak >Nul
del temp.vbs
goto :Eof
Aucun commentaire:
Enregistrer un commentaire