Comprehensive-Vocab-CLI is a command-line tool designed to help you learn and remember new words and their meanings. You can input a word, and the tool will provide you with the meaning of the word, synonyms, antonyms, and usage of the word. It also has the ability to play the pronunciation of the word.
- Fetches and displays detailed explanations of words including their meanings, synonyms, antonyms, and usage.
- Plays the pronunciation of the word.
- Caches the words and their explanations for quick future references.
- Implement a database to store the words and their pronunciations.
- Improve the Text-to-Speech feature by using Google Text-to-Speech API.
This project requires Python and pip. Once you have these installed, you can install the project dependencies with:
pip install -r requirements.txt
It also requires OpenAI API key to explain the words. Once you have the API key, you can set it as an environment variable:
touch .env
echo "OPENAI_API_KEY=your_api_key" > .env
To use the Comprehensive-Vocab-CLI, follow these steps:
python main.py
You will be asked to choose an action:
- Enter 1 to explain a word. You will be prompted to enter the word. If the word has been searched before, the cached explanation will be displayed. Otherwise, the tool will fetch the explanation and cache it for future use. After the explanation is displayed, you will be asked if you want to play the word's pronunciation.
- Enter 2 to exit the program.
You can go to cache
folder to see the previous asked vocabulary result in md
and mp3
format.