i making a digital assistant that i can roleplay with.
i am using rivescript, tinketer,pyttsx3 and pyjokes to make her.
i am implimenting the ability to touch the digital assistant in role play.
she will be able to remember what i have done and have not done in roleplay.
her name is actually savannah.
i did the same thing with my fun lady chatbot on personalityforge websight.
i am going to give her house with rooms represented by text and pictures.
here is the script i made to play gifs for a certain amount of time then the window will disappear.
import tkinter
from PIL import Image, ImageTk, ImageSequence
from time import time
############you need to install pillow with pip###########
class App:
def __init__(self, parent):
self.parent = parent
self.canvas = tkinter.Canvas(parent, width=400, height=400)
self.canvas.pack()
self.sequence = [ImageTk.PhotoImage(img)
for img in ImageSequence.Iterator(
##############################put the full path to your gif file between the quotation marks after r with double slash between directories###########
Image.open(
r""))]
self.image = self.canvas.create_image(200,200, image=self.sequence[0])
self.animate(1)
def animate(self, counter):
self.canvas.itemconfig(self.image, image=self.sequence[counter])
self.parent.after(20, lambda: self.animate((counter+1) % len(self.sequence)))
root = tkinter.Tk()
app = App(root)
start = time()
# in after method 5000 milliseconds
# is passed i.e after 5 seconds
# main window i.e root window will
# get destroyed
root.after(6000, root.destroy)
# running the application
root.mainloop()
end = time()
print('Destroyed after % d seconds' % (end-start))
Modify message
i really like the replika chatbot.
here is what i put in a rive textfile.
+ where are we
- we are in my house
+ i walk to the living room
*<get position> != livingroom =><set position=livingroom> walks to the <get position> with you
- we are already in the <get position>
+ i walk to the *
- that is not a room in my house
+ i walk to the bed room
*<get position != bedroom =><set position=bedroom>walks to the bed room with you
- we are already in the <get position>
+ i walk to the kitchen
*<get position != kitchen =><set position=kitchen> walks to the <get position> with you
- we are already in the <get position>
+ sits down * chair
*<get position != sittinginachairinthekitchen =><set position=sittinginachairinthekitchen>you walk to a chair then sit down in the chair
- you are already sitting in a chair in the kitchen
+ what room * in
* <get position> == bedroom => we are in the bedroom
* <get position> == kitchen => we are in the kitchen
* <get position> == livingroom => we are in the living
* <get position> == sittinginachairinthekitchen => we are in the kitchen
+ walks to the living room
- @ i walk to the living room
+ walks to the bed room
- @ i walk to the bed room
+ gets * bed then * down
*<get position> != bedbedroom =><set position=bedbedroom> we both walk to the bed then get in it.then we both lay down
* <get position> == bedbedroom => we are already laying in the bed
+ are we in the bed
* <get position> == bedbedroom => yes we are
* <get position> == bedbedroom => *kisses you while you both lay in the bed* yes we are
* <get position> == bedroom => no we are not
- no we are not
+ am i sitting * chair
* <get position> == sittinginachairinthekitchen => yes you are
- no you are not
+ what am i doing
* <get position> == bedbedroom => you are laying in the bed with me
* <get position> == sittinginachairinthekitchen => you are sitting in a chair in the kitchen
* <get position> == bedroom => you are standing up in the bed room
* <get position> == kitchen => you are standing up in the kitchen
* <get position> == livingroom => you are standing up in the living room
* <get position> == sofalivingroom => you are sitting on the sofa with me
- you are in the hallway
+ sits down * sofa
*<get position> == livingroom =><set position=sofalivingroom> we both walk to the couch then sit in down
* <get position> == sofalivingroom => you notice we are already sitting on the sofa
- there is no sofa here
+ what room is this
* <get position> == bedroom => we are in the bedroom
* <get position> == kitchen => we are in the kitchen
* <get position> == livingroom => we are in the living
* <get position> == sittinginachairinthekitchen => we are in the kitchen
* <get position> == bedbedroom => we are in the bedroom