How to give interface to the voice assistant. When you start the program it opens one window there it run the voice assistant program .it shows image when voice recognising.when you close the window the program will should also stop .
the whole program i done in python.so i tried using tkinter.when i create window as function and call it in main function the window only show but the voice assistant program not start working.
Related
We are now working on a thesis based on drowsiness detection within a car. Our code is on a while loop and every time it detects up to 5 or more seconds to be driver is drowsy, the GUI must show up to alert the user that the car is slowly breaking. My problem is while the opencv webcam is runnning (for the drowsiness detection), the tkinter GUI won't show up. Is there any way to like overlap the tkinter window from the webcam frame running in the background?
I want to make Queue Management application using Raspberry pi. I want to design my window using tkinter. On that window I want some portion will show the token no and counter no and other portion will show videos. How could i embed video on my window. Other functions I could manage easily but no idea about video. Please help me how could i embed video in my window.
I want to build an app on my raspberry pi using Python that uses a curses-style display over part of the screen and keeping the terminal visible (whilst printing scrolling status messages in it) over the rest of the screen. I also want to be able to take user input from the terminal prompt. Is this possible and how would I go about implementing this?
I've been working on a media player in python that uses pygame.mixer to play music and PyQt4 to build the UI.
I'm currently using a while loop to check if a song is finished so the next song can be loaded in from the queue. In order to make sure that the user can still interact with the PyQt buttons while the while loop is running, I have put QtCore.QCoreApplication.processEvents() into the while loop.
However, now when I close the main window while music is playing, the program does not stop (as it normally does) and the music keeps playing.
The program also can't detect the app.aboutToQuit.connect() command while the music is playing (meaning it can when music isn't playing).
Any help would be greatly appreciated.
I found the answer to this issue a while ago so thought I should put it here for anyone else.
I gave the program an internal exit button in the ui, then made the button call os._exit(0). It worked perfectly then.
Checking the Python and PyQt documentation gave no comment on closing a application window while a while loop is being performed.
Any other solutions would be appreciated though.
I am making a Non-malicious Twitch TV bot that runs a few commands in chat. I have been using the bot for 2 months and decided to create a small GUI for basic changes to variables whilst it is running. Both the GUI and the Bot work fine separately but I am having issues making them work together.
I have used Tkinter to create the GUI and it requires a Loop to make the window remain open. This loop therefore stops the rest of the code continuing on and launching the bot. I need to work out how to keep the loop running but also continuing on to the rest of the Bot and run that behind the GUI.
This is the start of the Bot where it launches the GUI;
app = Geekster_Bot_GUI(None)
app.title('Geekster_Bot')
app.geometry('450x100')
app.mainloop()
It then continues to the bot connecting to the IRC.
How do I continue after the mainloop()?
You can use threading or multiprocessing. Simple example:
import Tkinter
import threading
def create_frame():
MessFrame = Tkinter.Tk()
MessFrame.geometry('800x400+200+200')
MessFrame.title('Main Frame')
Framelabel = Tkinter.Label(MessFrame, text='Text Here', fg= 'red')
Framelabel.place(x=10,y=10)
MessFrame.mainloop()
t1 = threading.Thread(target=create_frame)
t1.start()
#continue
print 1234
But...it's generally best to keep the GUI in the main thread.