A CLI tutor library for Statistics with audio-visual interactions.
Project description
IITJP Python Library
A Python library for an interactive quiz assistant named RajLaxmi, featuring audio-visual interactions for learning Statistics.
Installation
Quick Install from PyPI
# Install from PyPI (when available)
pip install iitjp
# Or install directly from GitHub
pip install git+https://github.com/yutkarsh.brainstorm/ourusername/IITJP.git
Install from Source
# Clone the repository
git clone https://github.com/yutkarsh.brainstorm/ourusername/IITJP.git
cd IITJP
# Install in development mode
pip install -e .
Requirements
- Python 3.7+
- pydub (automatically installed)
- Platform-specific dependencies (automatically installed):
- Windows: pywin32
- macOS: pyobjc-framework-Cocoa
- Linux: python-dbus
Usage
Python API
import iitjp
# Basic usage with audio
from iitjp import mam
# Greet the user
mam.greetings()
# Start a quiz
mam.quiz()
# End the quiz with a farewell
mam.thanks()
Command Line Interface
The library also provides a command-line interface:
# Show welcome message
iitjp greetings
# Start an interactive quiz
iitjp quiz
# Display thank you message
iitjp thanks
# Show version information
iitjp version
# Enable silent mode (no audio)
iitjp --silent quiz
Silent Mode
If you experience audio playback issues, you can enable silent mode:
import iitjp
# Enable silent mode to avoid audio playback
iitjp.enable_silent_mode(True)
# Now use the library as normal
iitjp.mam.greetings() # This will not play audio
Cross-Platform Support
The library is designed to work across Windows, macOS, and Linux with appropriate audio playback methods for each platform:
- Windows: Uses PowerShell and winsound for audio playback
- macOS: Uses afplay and native macOS audio capabilities
- Linux: Tries multiple common audio players (aplay, paplay, ffplay)
Troubleshooting
If you encounter issues with audio playback:
- Check audio system: Make sure your system's audio is working properly
- Check dependencies: Ensure platform-specific dependencies are installed
- Enable silent mode: If audio issues persist, use silent mode
import iitjp
iitjp.enable_silent_mode(True)
- Update the library: Make sure you're using the latest version
pip install --upgrade iitjp
Project Structure
iitjp/: Main package directory__init__.py: Package initialization with exposed functionsrajlaxmi.py: Core functionality for the virtual teacher__main__.py: Command-line interface
data/: Contains audio files and quiz questionsgreeting.mp3: Welcome messagestart_quiz.mp3: Quiz introductionend_quiz.mp3: Quiz conclusionfarewell.mp3: Goodbye messagequestions.json: Quiz questions and answers
temp/: Temporary directory for audio processing
Development
# Clone the repository
git clone https://your-repo-url.git
cd iitjp
# Create temp directory if it doesn't exist
mkdir -p temp
# Install in development mode
pip install -e .
# Run the audio troubleshooter
python multi_method_audio_test.py
# Run the demo
python audio_demo.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iitjp-0.2.15.tar.gz.
File metadata
- Download URL: iitjp-0.2.15.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab37d53c6ad9549f3afc51451ac81462d7bd5f16cf30e24f24f4916c40341791
|
|
| MD5 |
115a41c86d78d64ea310c4903f1d0ba8
|
|
| BLAKE2b-256 |
8af1183086f7d5103e81028c60dd676abfc6264c5c1008145bd8ff8cd3522679
|
File details
Details for the file iitjp-0.2.15-py3-none-any.whl.
File metadata
- Download URL: iitjp-0.2.15-py3-none-any.whl
- Upload date:
- Size: 753.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9872113ea9afd65125f84d086c65a609b896261271b9db2f99ceee28956b0739
|
|
| MD5 |
ba2e8cbf809587acfba285a090ea8891
|
|
| BLAKE2b-256 |
6a886bc6c07eb8023a2ad1178d04c5b5c061a0621f497f1017908ebbf97863b4
|