Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of GUI based on PyQt5 and PyOpenGL #896

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

AhmetFurkann
Copy link
Contributor

Implementing the PyQt5 GUI

Hello, I have completed a development for initial version implementation of a PyQt5 GUI idea which I spoke of in #421 three days ago. In the GUI, there is a widget includes a circular shape which is created by PyOpenGL draw. And the GUI works like an audio visualizer but not all the way. A tracer function trace the say method, and works with respect to this method. Whenever the say method is called, the circular shape animate, so it looks like Jarvis speaks.

And a screenshot from the GUI is shown below which is run with python --with-gui --with-voice.

gui_pull_request

Important Points

  1. I had to change the logical order in the start function which is inside of the main.py file. The reason for this, a PyQt5 application must run in main thread according to docs. (https://doc.qt.io/qt-5/thread-basics.html#gui-thread-and-worker-thread)

    That's why the PyQt5 GUI application lives in main thread and the Jarvis CLI runs on another thread in the same process
    with the PyQt5 GUI.

  2. On the other hand, in the custom_circle_widget.py file, there is an inheritance from QOpenGLWidget. That is why I could not change the some of method names (initializeGL and paintGL) which violate the PEP 8 naming convention.

I hope, you like the my idea on GUI. :)
Note: For right now, there are some docs are missing, but in the future developments I will add those.

@pnhofmann
Copy link
Collaborator

I hope, you like the my idea on GUI. :)

I do like it a lot!

Interesting, your approach completely differs from mine - but that's great ;). I think, especially if I'll finally manage to improve speech recognition a bit ( ;) ), this GUI will work out really nice!

@AhmetFurkann
Copy link
Contributor Author

It is really great to hear that it's been liked the GUI idea!. Thank you.

And I have also more interesting ideas on this GUI implementation. For example one of them is, maybe it can be developed a 3D visualizer to indicate the Jarvis speaking instead of a 2D circle for future developments.

@pnhofmann pnhofmann added the todo label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants