谈论批处理AI(学习),但我有一个问题

时间:2017-08-08 01:48:30

标签: batch-file artificial-intelligence

当我使用它时,它只会在我教另一个词时说话,我不能在目录中说出具体的答案,你们对如何解决这个问题有任何意见,我很难过......

@ECHO OFF 
@mode con cols=55 lines=10
if not exist data.txt echo.>data.txt
:begin
set /p text="Talk: "
for /f "tokens=1,* delims=@" %%i in (data.txt) do (
if /i "%text%"=="%%i" (

 echo Visu: %%j
 goto begin
 )
 )
 :Learn
  echo --- I don't know that.
  set /p answer=--- What would be a good answer to '%text%'? 
echo %text%@%answer%>>data.txt
echo Visu: thank you
goto Aye

:Aye
echo set speech = Wscript.CreateObject("SAPI.spVoice") >> "temp.vbs"
echo speech.speak "%answer%" >> "temp.vbs"
start temp.vbs
pause
del temp.vbs
goto begin

2 个答案:

答案 0 :(得分:0)

start temp.vbs替换为cscript /nologo temp.vbs

也许你想要 echo set speech = Wscript.CreateObject("SAPI.spVoice") > "temp.vbs"
>而不是>>)每次都要覆盖文件?

答案 1 :(得分:0)

  • 让Aye成为一个子程序/功能,你可以用文字说话。
  • 在被叫子中,第一个参数是%1
<CheckBox IsChecked="{Binding Features[FEATURE1].Selected, Mode=TwoWay}" />