Codes for Spelling
New: Page added on 2/3/2026.
New: Page added on 2/3/2026.
*For more info, review my Python tab above before proceeding.
I found these codes while doing research for a more efficient way to do spelling words in Python.
First install PYTTSX3.
Open your terminal or command prompt.
Type the following command and press Enter: pip install pyttsx3
Installation should start and you should be good.
Note: If your pip needs to update, python will let you know. Just follow directions in the prompt on how to update.
Once PYTTSX3 is installed, open your Python that you already have installed and create a new Python file. Copy and paste all from below to the new file and run it. Save to any name you wish.
You can add new words, remove words, or create more than one spelling file. Save and organize as many python spelling files as you want.
These codes are much faster and easier to do when learning new spelling words. Note how the words are placed in the codes. Just type in the words you want to learn and run it in Python. It's more efficient than what I have explained in the past dropdowns. However, some words may not be pronounced correctly. It's not perfect.
Literally Copy all the codes below starting at "import random" to the end and paste them to your New File in Python and run it.
Enjoy!
______________________________________
import random
import pyttsx3
import time
print('')
print('')
print('Get ready to spell 110 words!')
print('')
# List of words to speak
words = ["auspicious", "antithesis", "allegiance", "angst", "abstract", "archipelago", "abominable", "acquittal", "benign", "bureaucracy",
"capitulate", "chandelier", "concurrent", "crevasse", "corroborate", "consecutively", "contemptuous", "connotation", "disappointed", "degenerate",
"diminution", "duplicity", "dendrite", "deterrence", "diabolical", "disturbing", "euthanasia", "eminent", "epiphany", "enigma",
"erroneous", "epithet", "exonerate", "err", "expulsion", "feisty", "finicky", "feud", "floored", "ferocious",
"fandango", "fathom", "gorge", "glorify", "glabrous", "hypochondriac", "hubris", "homage", "hypocrite", "happenstance",
"imbecile", "improbable", "imminent", "immaculate", "impudent", "impeccable", "incognito", "knee-jerk", "ludicrous", "loitering",
"munchausen syndrome by proxy", "munchausen syndrome", "medicinal", "mitochondria", "moniker", "mercurial", "metastasize", "nefarious", "obtuse", "obsessed",
"onery", "organelles", "psychoanalyze", "prudent", "precocious", "precarious", "presumed", "prosecutor", "paradox", "procrastinate",
"psyche", "pious", "plaintiff", "pragmatic", "quintessential", "remission", "red herring", "rekindle", "reciprocity", "relegated",
"repercussion", "straggler", "sassy", "assuage", "specificity", "significant", "spruce", "tempestuous", "therapeutic", "translucent",
"transparent", "tunnel vision", "trailblazer", "undermine", "unsustainable", "usurp", "vigilante", "vociferous", "voracious", "vex"]
# Initialize TTS engine
engine = pyttsx3.init()
# Set a slower speaking rate
engine.setProperty('rate', 115)
def speak_word(word):
engine.say(word)
engine.runAndWait()
def main():
# Start timer
start_time = time.time()
# Randomize order
random.shuffle(words)
total_questions = len(words)
questions_left = total_questions
for word in words:
print('')
print(f'📝 Questions left: {questions_left}')
while True:
# Speak the current word
speak_word(word)
# Prompt user
user_input = input("Type the word you heard: ").strip().lower()
# Check answer
if user_input == word:
print("✅ Correct!")
questions_left -= 1
break
else:
print("❌ Incorrect — try again.")
# End timer
end_time = time.time()
elapsed_time = end_time - start_time
minutes = int(elapsed_time // 60)
seconds = round(elapsed_time % 60, 2)
print('')
print("🎉 All done! You've typed every word correctly.")
print(f'⏱️ Time taken: {minutes} minutes and {seconds} seconds')
if __name__ == "__main__":
main()