A Python + Tkinter application with OpenAI-powered sentence generation and real-time analytics.
The Typing Speed Test is an interactive application designed to measure typing speed and accuracy. Built using Python with the Tkinter GUI toolkit, it integrates with OpenAI’s API to dynamically generate test sentences. The system calculates Words per Minute (WPM), Accuracy, and Characters per Second (CPS) in real-time, providing users with an accurate benchmark of their typing abilities.
generate_sentence()
to fetch unpredictable content using OpenAI.FuzzyWuzzy
ratio to compare input string with target string.time.sleep(1)
increments to tick down remaining seconds.threading.Timer
to trigger periodic writes to progress.txt
.TypingTestApp
→ Main class that initializes and runs the GUI.generate_sentence()
→ Calls OpenAI API for random sentence generation.start_test()
→ Resets state, starts timer and analytics threads.update_timer()
→ Updates countdown and handles timeout logic.update_wpm()
→ Monitors live typing speed.update_accuracy()
→ Calculates similarity score between user input and target text.auto_save_progress()
→ Persists input every 5 seconds.finish_test()
→ Consolidates results and opens summary popup.
1. User clicks "Start Test".
2. OpenAI generates a sentence → displayed on screen.
3. Timer starts counting down in a non-blocking thread.
4. User types → real-time WPM and accuracy update.
5. Auto-save captures progress every 5 seconds.
6. Time expires → input is locked, results summary shown.