A small project for school that I whipped up that pulls random words from the dictionary and displays them on intervals. Very similar to a 'word of the day', but in batches and customizable intervals. Click the 'ear' button to get a pronunciation of the word. Example runs can be found in the media folder
In the secrets.py
file there are 4 fields which need to be updated for your own use.
The SSID of your WiFi. Make sure your wifi uses WPA or WPA2 for the PyPortal.
Password of your WiFi.
Go to Merriam-Webster and sign up for a Collegiate Dictionary API key. Put your API key in this field.
Sometimes Merriam-Webster doesn't have WAV pronunciations, so Voice RSS can be used for pronunciations instead. If opting for MW pronunciations only, set flag USE_VOICERSS
to False
Several settings can be changed to alter the functionality of the program
How many words to pull from the API for a 'batch'. These words are continuously rotated in order until it is time for a new batch.
How many seconds to display a word on screen at once for. Repeated BATCH_REPETITIONS
times
Number of times to display the batch in order before fetching a new batch of words
Flag to tell the program whether to use Voice RSS as your pronunciation source. Has the benefit that it will always have a pronunciation for a word, no matter how strange that word is.