WordDice is a modern, interactive web application designed to help users learn and practice new vocabulary words through engaging exercises and real-time feedback.
WordDice presents users with random vocabulary words daily, complete with definitions, pronunciations, and example sentences. Users can practice using these words through three different interactive modes: repeating sentences, filling in blanks, and creating their own sentences.
- Random Word Selection: Fetches random words from a CSV file or default word list
- Complete Word Information:
- Word spelling
- Phonetic pronunciation
- Definition
- Example sentence
- Audio Pronunciation: Click the audio button to hear the word pronounced
- Smooth Transitions: Beautiful fade-in/fade-out animations when loading new words
- Listen to an example sentence containing the word
- Practice pronunciation by repeating the sentence
- Uses browser's speech recognition to capture your speech
- Real-time feedback on your pronunciation
- View a sentence with a blank where the word should go
- Type the correct word to complete the sentence
- Instant feedback on correctness
- Create your own sentence using the vocabulary word
- Type a complete sentence that includes the word
- Validation ensures the word is used correctly
- Loading Animation: Animated GIF displayed while fetching new words
- Smooth Fade Transitions: Gentle fade-in/fade-out effects when switching between words
- Modern UI: Clean, responsive design with gradient background
- Mobile-Friendly: Responsive layout that works on all devices
-
Initial Load:
- App loads and displays a loading screen with animated GIF
- Fetches word list from CSV file (if configured) or uses default word list
- Selects a random word from the list
- Fetches word details from Free Dictionary API
- Displays word with smooth fade-in animation
-
Loading New Word (when clicking "Next Word"):
- Current word fades out smoothly
- Loading screen with GIF animation fades in
- New random word is selected and fetched
- Word details are fetched from API
- New word fades in smoothly
- Word List:
- Primary: CSV file from GitHub repository (configurable via
CSV_URL) - Fallback: Built-in default word list
- Primary: CSV file from GitHub repository (configurable via
- Word Definitions: Free Dictionary API (
https://api.dictionaryapi.dev/api/v2/entries/en/) - Example Sentences:
- Primary: From API response
- Enhanced: Generated using local LLM (GPT-2 via Transformers.js) when available
- Uses Web Speech API (SpeechRecognition)
- Works best in Chrome and Edge browsers
- Automatically stops after 3 seconds of silence
- Provides real-time transcription feedback
-
Open the Application:
- Simply open
index.htmlin a modern web browser - No installation or setup required!
- Simply open
-
View Today's Word:
- The app automatically loads a random word on page load
- Review the word, pronunciation, definition, and example
-
Listen to Pronunciation:
- Click the circular audio button to hear the word pronounced
- Uses browser's built-in text-to-speech
-
Practice Using the Word:
- Select one of three practice modes:
- Repeat Sentence: Click record and repeat the example sentence
- Fill in Blank: Type the word to complete the sentence
- Create Sentence: Write your own sentence using the word
- Select one of three practice modes:
-
Get Feedback:
- In Repeat mode: See your transcribed speech
- In Fill mode: Get instant correct/incorrect feedback
- In Create mode: Validation confirms word usage
-
Load New Word:
- Click the "Next Word" button to load a new random word
- Watch the smooth fade transition with loading animation
- HTML5: Structure and semantic markup
- CSS3: Styling with gradients, transitions, and responsive design
- JavaScript (ES6+): Core functionality and interactivity
- Web Speech API: Speech recognition and synthesis
- Transformers.js: Local LLM for sentence generation (optional)
- Free Dictionary API: Word definitions and pronunciations
- Speech Recognition: Chrome or Edge (recommended)
- Modern Browser: Supports ES6+ JavaScript
- Microphone Access: Required for speech practice features
To use your own word list, update the CSV_URL variable in the JavaScript:
const CSV_URL = 'https://your-url-to-csv-file.csv';The CSV file should contain words separated by commas or newlines.
WordDice/
โโโ index.html # Main application file
โโโ README.md # This documentation
โโโ CNAME # Domain configuration (if using GitHub Pages)
- Handles the complete word loading process
- Manages fade transitions between states
- Fetches word data from API
- Displays word information
- Smooth transition helpers
- Control opacity and visibility
- Used for loading and word container animations
- Sets up Web Speech API
- Configures recognition parameters
- Handles speech events and transcription
- Uses local LLM to create example sentences
- Enhances word learning experience
- Falls back to API examples if LLM unavailable
- Endpoint:
https://api.dictionaryapi.dev/api/v2/entries/en/{word} - Returns: Word definitions, pronunciations, examples, and more
- Rate Limit: No official limit, but be respectful
Update the image source in the HTML:
<img src="your-gif-url-here.gif" alt="Loading animation">Modify CSS transition durations:
.loading {
transition: opacity 0.4s ease-in-out; /* Adjust duration */
}
#word-container {
transition: opacity 0.5s ease-in-out; /* Adjust duration */
}All styles are contained in the <style> tag within index.html. Modify colors, fonts, and layouts as needed.
- The app works offline for basic functionality (using cached words)
- Internet connection required for fetching new word definitions
- Speech recognition requires microphone permissions
- Local LLM (Transformers.js) is optional and loads in the background
- Push your code to a GitHub repository
- Enable GitHub Pages in repository settings
- Set source to
mainbranch - Your app will be live at
https://yourusername.github.io/WordDice/
Simply upload index.html to any web hosting service. No build process required!
This project is open source and available for personal and educational use.
Feel free to fork, modify, and improve this application. Suggestions and contributions are welcome!
Enjoy learning new words with WordDice! ๐ฒ๐