Updated: May 30
Author: Leonel Silima
Date of Publication: 29/05/2023
Hello! Welcome to our second stage with Julie. I didn't explain the reasons why I chose this name for our AI app. Well, it’s due to a tribute to a friend of the same name!
However, in this step you don't need to code practically anything. You just need attention to implement it properly and talk to Julie. So, you can ask her by voice or written messages everything you want to know!
Point out that our friend Julie understands English and Spanish well-written or well-pronounced including phrasal verbs which is amazing.
What do I need to tell her?
Well, I could even say that you don't need anything! Everything runs so smoothly. The question is what if everything is already done? Of course, everything is done, but it’s important for her to hear you well. That’s why you should make sure that your computer's microphone is working properly. Otherwise, you can connect an external microphone. That's all. Also, remember that Smart Julie can run on Windows or Linux except for Android at this stage.
How can I say “Goodbye” to Julie and end our Conversation?
Obviously, when we want to say goodbye to a friend there are specific expressions. So, there is no difference with Julie. For this purpose we need to use one of the following expressions: bye, I must go, see you later, see off, or end.
How to implement the Project?
Most of the necessary tools have already been described in the previous article, so we added a few technologies below.
At this phase, we need the following tools:
The Tkinter library is based on the Tk toolkit, which is a cross-platform GUI library. Tk provides the necessary building blocks for creating a graphical interface. What’s more, it’s an abstraction layer that allows the use of Tk in Python. Since Tkinter is part of the standard Python library, there is no need to install anything additional to use it. In particular, it is available virtually on all platforms where Python runs, including Windows, macOS, and Linux.
The "threading" library provides a simple API for working with threads. Developers can create threads using the "Thread" class and implement the thread's logic within a method. Additionally, the library provides mechanisms for synchronization and communication between threads. Some examples are locks, semaphores, and condition variables, which help avoid concurrency issues. Such issues could be race conditions and simultaneous access to shared resources. So, you can find it available virtually on all platforms where Python runs, including Windows, macOS, and Linux.
Auto-py-to-exe is a Python utility that allows you to convert a Python script into a standalone executable file. In fact, it simplifies the process of converting your Python code into an executable format. This way, it’s easier to distribute and run on systems that don't have Python installed.
Therefore, it simplifies the usage of PyInstaller by providing a user-friendly interface and pre-configured settings. In particular, it abstracts away some of the complexities and technical details involved in the conversion process. Apart from that, it makes it accessible to users with varying levels of Python and packaging knowledge. So if you want to install it, run: pip install auto-py-to-exe on your terminal.
Converting Code to Executable File
As we explained before, at this point we will be using the auto-py-to-exe library. Check this figure out for more details:
In my case, I used upgrade because I already have it installed and I'm just updating it and in your case remove the upgrade and run it.
Then find the full code here and run auto-to-py-exe to open the GUI window and load the file you want to convert. Like the figure below:
Once done, load your file and select the one file options for just one file and Windows based on the graphical user interface (GUI). In the additional file option insert another file and click the convert py to exe option. You can see the figure to make it clear:
Finally, locate your converted project in the previous project directory in an automatically generated folder with the name output. Alternatively, you can click the open output folder button as in the figure below:
Finally, we can talk to Julie by simply downloading the files available here and running them on the operating systems. If you want to contribute to the progress of this project, contact me! Enjoy and join us often for more Python news.