Hroof Arabic Alphabet Game Study Guide
Dissertation Overview: Hroof Arabic Alphabet Game
- Student Details: Huda Ayman (Student ID: 3456646).
- Supervision: Supervised by Mr. William, March 2026.
- Academic Submission: Dissertation submitted for the degree of Bachelor of Science with Honours Software Engineering at the University Of Stirling.
- Document Statistics: Word count of 10,095 words.
Introduction and Educational Context
- Background of the Arabic Language:
* Arabic is a widely spoken global language.
* The alphabet consists of 28 letters written from right to left.
* Complexity arises because letter shapes change depending on their position within a word (initial, medial, or final forms).
- Challenges in Traditional Learning:
* Traditional methods often rely on repetition, memorization, and textbook exercises, which can be boring for young learners.
* The Arabic script and pronunciation rules are inherently difficult for beginners and non-native speakers.
- The Role of Technology:
* Technology provides interactive systems like the Hroof game to make learning enjoyable and engaging.
* Active participation, pictures, and sounds enhance information retention and understanding, particularly for children.
- Project Goal: To develop a version of the Hroof game for children aged 7 to 12 that uses pictures, sounds, and speech recognition to teach the alphabet.
System Objectives and Problem Statement
- Problem Statement:
* There is a lack of simple, focused digital tools for early-stage Arabic alphabet learning.
* Existing applications are often too complex, lack interactivity, or do not provide pronunciation support.
* Limited use of speech recognition restricts speaking practice opportunities.
- Aims and Objectives:
* Design a user-friendly graphical interface for young learners.
* Implement a level-based system for structured learning.
* Integrate audio playback for correct letter pronunciation.
* Implement speech recognition for speaking practice.
* Evaluate system effectiveness and usability.
Literature Review and Educational Theory
- Game-Based Learning: This approach provenly enhances motivation and engagement by integrating content into environments with levels, rewards, and challenges.
- Comparative Analysis: Platforms like Duolingo and Rosetta Stone use repetition and feedback but focus on widely spoken languages like English or Spanish, with limited emphasis on specialized Arabic alphabet learning for kids.
- Modality of Learning: Combining visual (pattern recognition), auditory (pronunciation), and kinesthetic (active participation) approaches caters to different learning styles.
- Speech Recognition in Education: Allows for immediate feedback on pronunciation, which is difficult to assess via traditional methods, though accurate recognition can be hindered by background noise or accents.
System Architecture and Design
- Modular Architecture: The system uses a modular design where components communicate through defined interfaces for better maintainability and scalability.
- Technological Integration:
* Java: Used to manage the Graphical User Interface (GUI), level logic, and user interactions.
* Python: Used for complex tasks like audio playback and speech recognition.
* MySQL: Used for user account management and progress tracking.
- Key Interface Screens:
* Home Screen: Entry point with Sign In and Sign Up options.
* Map Screen: Displays levels in a grid layout; each level represents an Arabic letter and is unlocked progressively.
* Game Screen: Displays the specific letter and features "Listen" and "Speak" buttons.
- Data Flow:
1. User selects a level.
2. Java retrieves the Arabic letter from the
Levels class.
3. User interacts (Listen/Speak).
4. Request sent to Python via ProcessBuilder.
5. Python processes audio and returns recognized text.
6. Java compares text to expected letter and provides feedback.
Technical Implementation Details
- Java GUI (Swing): Uses components like
JFrame, JPanel, JButton, and JLabel. Layouts are managed via BorderLayout and GridLayout. - Java-Python Communication: Achieved through the
ProcessBuilder class.
* The system executes Python as an external process.
* Standard output is captured via a BufferedReader.
* Final communication used a file-based approach (result.txt) to avoid pipe buffering issues. - Speech Recognition Workflow (
Listen.py):
* Utilizes the SpeechRecognition library and Google Web Speech API.
* Uses the sounddevice library for audio capture to avoid driver conflicts.
* Includes a normalization process to handle letter variants (e.g., "أ", "إ", "آ", "ا"). - Class Structure:
*
Game: Main controller for navigation and interaction.
* Levels: Stores alphabet data and mappings to sound files.
* Buttons: Handles reusable UI components.
* Home: Manages the initial login/registration interface.
Database Schema and User Management
- Database Table (
ArabicGameUser):
* id: unique user ID (int).
* Full_name: user's full name (Varchar).
* Age: user's age (Int).
* Country: user's country (Varchar).
* Username: unique login ID (Varchar).
* Password: user password (Varchar).
* Last_Level: tracker for completed levels (int).
* score: user's score (int). - Input Validation Constraints:
* Age must be between 5 and 50.
* Country field must contain valid text (no numbers/symbols).
* Usernames must be unique (checked against database before registration).
Critical Debugging and Technical Challenges
- Speech Recognition Timeout:
* Issue: Consistently returned "Listening timed out" errors.
* Solution: Corrected microphone device selection (configuring specifically for "Intel SST Microphone Array"), lowered energy threshold (default 300 was too high), and increased recording duration from 3 to 4 seconds.
- PyAudio WASAPI Subprocess Error:
* Issue: PyAudio failed with
[Errno -9999] Unanticipated host error when run as a Java child process due to Windows blocking microphone access.
* Solution: Replaced sr.Microphone with the sounddevice library. Audio is recorded, saved as a temporary WAV file, and then processed via sr.AudioFile. - Python Compatibility:
* Python version 3.10 was used specifically because newer versions had installation issues with
PyAudio.
Evaluation and Results
- Usability: User testing indicated the interface is intuitive for the target age group (7-12). Large buttons and cloud-based design were effective.
- Functionality: Real-time communication between Java and Python was successful. Audio playback was a highly praised feature.
- Performance: The system runs smoothly on standard hardware with minimal delay.
- Success Metric: Recognition reliability increased significantly after implementing noise calibration and switching to the
sounddevice approach. - Limitations:
* Dependency on external Python scripts and Google Web Speech API (internet required).
* Lack of advanced feedback (hints/explanations) and advanced gameplay (animations/scoring).
* Sensitivity to environmental noise levels and individual pronunciation variations.
- IDEs & Languages: Eclipse, Python 3.10.
- Libraries:
SpeechRecognition, PyAudio, sounddevice, SciPy, MySQL Connector/J. - APIs: Google Web Speech API.