This problem has been bugging me for the past few days. I've tried all sorts of different things to get it to work, studied my books, but nothing.
It goes like this:
Let's say I want my robot to recite the three laws of robotics. I can say, "Recite the three laws of robotics," and the computer will recognize my speech and recite them perfectly via TTS. Now, let's say that this time I want to ask my robot if it knows the three laws? My robot will say "Yes, I know them well. Would you like me to recite them for you?"
Right after it says this a variable in the script called LawRecite changes to True. I know it is changing to True in my script because I have this code snipet:
speaker.Speak ('Yes, I know them well. Would you like me to recite them for you?')
LawRecite = True
if LawRecite == True:
print 'Lets talk about the three laws of Robotics'
and that string in the end is coming up, so I know nothing's wrong there.
The problem is, when I say "Yes please," which has this code snipet attatched to it:
while LawRecite == True:
speaker.Speak('Yes please what?')
my robot just keeps asking, "Yes please what?" as if the value to LawRecite is still False (or something else).
Logically, if the value for LawRecite is True, it should recite strings LOR1-LOR4.
Anyone have any idea what's going on? Thanks.