Skip to main content

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, used for audio format conversion)
  • Platform-specific dependencies (automatically installed):
    • Windows: Uses native winsound library (no additional dependencies)
    • 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 native winsound library for reliable 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:

  1. Check audio system: Make sure your system's audio is working properly
  2. Check dependencies: Ensure platform-specific dependencies are installed
  3. Enable silent mode: If audio issues persist, use silent mode
import iitjp
iitjp.enable_silent_mode(True)
  1. 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 functions
    • rajlaxmi.py: Core functionality for the virtual teacher
    • __main__.py: Command-line interface
  • data/: Contains audio files and quiz questions
    • greeting.mp3: Welcome message
    • start_quiz.mp3: Quiz introduction
    • end_quiz.mp3: Quiz conclusion
    • farewell.mp3: Goodbye message
    • questions.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 demo
python simple_demo.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iitjp-0.2.12.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iitjp-0.2.12-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file iitjp-0.2.12.tar.gz.

File metadata

  • Download URL: iitjp-0.2.12.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for iitjp-0.2.12.tar.gz
Algorithm Hash digest
SHA256 dc7bd8f2d7b050e1f6e06f04b3074f77f5c4306b81bc98ef7c4a6061c7978b27
MD5 d25000a93bab3063b49d731c19010282
BLAKE2b-256 624a54eb21646b0999ada262c5bfa5b53deebee7dbfcdd248cb88fae88cdc3b4

See more details on using hashes here.

File details

Details for the file iitjp-0.2.12-py3-none-any.whl.

File metadata

  • Download URL: iitjp-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for iitjp-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1b88cbcfc5b0097d8dcb02b8e4d37017edfe2a0aca4c631262935075f3f64025
MD5 f1029e2c87815b2d8e66d4343e4d4f5d
BLAKE2b-256 732cd901183ef656972cf456013aa4c61619abee9f3c7b348c8833331a6d5a60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page