An interactive learning tool designed to help young children become familiar with words in three languages: English, Thai, and Cantonese.
The Multilingual Word Explorer App listens to a spoken word in any of these languages, then presents the word's translation in all three languages along with a relevant image and audio pronunciation for each.
- Speech Recognition: Say a word in English, Thai, or Cantonese and the app will recognize it
- Multilingual Support: See and hear words in English, Thai, and Cantonese
- Visual Learning: Each word comes with a relevant image
- Audio Pronunciation: Hear how each word sounds in all three languages
- Child-Friendly Interface: Designed with simplicity for preschool-aged children
multilingual-word-explorer/
├── index.html # Main HTML file
├── styles.css # CSS styles
├── app.js # Core application logic
├── config.js # Configuration settings
└── README.md # Project documentation
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Internet connection
- API keys for:
- OpenAI Whisper API (for speech recognition)
- Google Cloud Translation API
- Google Cloud Text-to-Speech API
- Google Custom Search API
-
Clone or download this repository
git clone https://github.com/yourusername/multilingual-word-explorer.git cd multilingual-word-explorer -
Install dependencies
npm install
-
Configure environment variables
- Create a
.envfile in the root directory - Add your API keys (see
.env.examplefor reference):GOOGLE_CLOUD_API_KEY=your_google_cloud_api_key TRANSLATION_API_KEY=your_translation_api_key TTS_API_KEY=your_tts_api_key CUSTOM_SEARCH_API_KEY=your_custom_search_api_key CUSTOM_SEARCH_ENGINE_ID=your_search_engine_id
- Create a
- Start the development server:
npm start
- Open your web browser and navigate to:
http://localhost:3000
- Install the Live Server extension for VS Code or use Python's built-in server:
- For Python 3:
python -m http.server 8000
- Then open
http://localhost:8000in your browser
- For Python 3:
- Install the "Live Server" extension in VS Code
- Right-click on
index.htmland select "Open with Live Server"
To deploy as an iOS app:
- Use a tool like Capacitor or Cordova to wrap the web application
- Follow the tool's documentation for building and deploying to iOS
- Tap the microphone button
- Speak a word in English, Thai, or Cantonese
- View the word's translations, image, and hear pronunciations
- Tap "Listen to Another Word" to start again
Access the settings menu by tapping the gear icon in the bottom right:
- Multiple Meanings Handling: Choose how the app handles words with multiple meanings
- "Prompt for clarification" (Default): Shows options for you to choose
- "Show first result": Automatically selects the most common meaning
npm start- Starts the development servernpm test- Runs the test suite for API integrationsnpm run build- Builds the application for production
The application uses the following Google Cloud APIs:
- Google Cloud Translation API - For text translation between languages
- Google Cloud Text-to-Speech - For generating spoken word pronunciations
- Google Custom Search API - For finding relevant images for words
When deploying to production:
- Set up environment variables securely (not in version control)
- Implement proper CORS configuration
- Consider rate limiting and API quota management
- Set up proper error handling and fallback mechanisms
- Enable only the necessary Google Cloud APIs to minimize security surface
This project is created for educational purposes only.