Codes for Spelling
New: Page added on 12/30/2025.
New: Page added on 12/30/2025.
*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 and Paste all the codes below to your New File in Python and run it.
Enjoy!
import random # to spell words in the list randomly
import pyttsx3 # this is the library code to allow you to hear the words
# List of words to speak
words = ["disappointed", "corroborate", "precocious", "exonerate", "disturbing", "euthanasia", "enigma", "translucent", "obtuse", "bureaucracy",
"auspicious", "transparent", "medicinal", "abominable", "acquittal", "unsustainable", "red herring", "rekindle", "gorge", "capitulate",
"abstract", "tunnel vision", "relegated", "fandango", "impeccable", "feisty", "benign", "metastasize", "remission", "prosecutor",
"specificity", "repercussion", "deterrence", "significant", "diminution", "plaintiff", "chandelier", "fathom", "assuage",
"glorify", "vociferous", "connotation", "duplicity", "incognito", "glabrous", "munchausen syndrome", "hypochondriac", "munchausen syndrome by proxy",
"reciprocity", "floored", "ludicrous", "hubris", "concurrent", "consecutively", "happenstance", "loitering", "diabolical", "psyche", "imminent",
"eminent", "vex", "psychoanalyze", "therapeutic", "expulsion", "dendrite", "finicky", "obsessed", "vigilante", "trailblazer", "procrastinate",
"precarious", "pragmatic", "presumed", "mitochondria", "erroneous", "undermine", "organelles", "knee-jerk", "degenerate",
"straggler", "nefarious", "pious", "hypocrite", "homage", "allegiance", "feud", "epithet", "moniker", "mercurial", "antithesis", "paradox","sassy",
"improbable", "tempestuous", "quintessential", "spruce", "contemptuous", "epiphany","prudent","impudent","archipelago","immaculate","ferocious","voracious",
"imbecile","crevasse", "angst", "usurp", "err", "onery"]
# Initialize TTS engine
engine = pyttsx3.init()
# Set a slower speaking rate (default ~200)
engine.setProperty('rate', 125) # adjust between ~100–180 for clarity :contentReference[oaicite:2]{index=2}
def speak_word(word):
engine.say(word)
engine.runAndWait()
def main():
# Randomize order
random.shuffle(words) # ensures each word is used once :contentReference[oaicite:6]{index=6}
for word in words:
while True:
# Speak the current word
speak_word(word)
# Prompt user
print('')
user_input = input("Type the word you heard: ").strip().lower()
# Check answer
if user_input == word:
print("✅ Correct!")
break # move to next word
else:
print("❌ Incorrect—try again.")
print("🎉 All done! You've typed every word correctly.")
if __name__ == "__main__":
main()