Skip to main content

A Python application to assist in waking up for Fajr prayer by providing 3 interactive verses/explanations from the Quran + ChatGPT explanations accompanied by a soothing Islamic prayer fade-in and fade-out audio file from YouTube.

Project description

fajrGPT


This Python Command-Line application assists in helping you wake up for Fajr prayer by providing automatically selected verses + explanations from the Quran after a set alarm time along with a soothing Islamic prayer fade-in and fade-out from Mishari bin Rashid Alafasy. The program uses the Quran Module to obtain Quran verses in English as well as OpenAI's API GPT models to produce corresponding Tafsir (explanation).

Features

  • Plays Alafsay's Quran recitation audio for user-selected Surah (default is Surah Al-Fathiha) from Tahfeem
  • Includes option to play Alafsay's Quranic recitation with its corresponding English translation obtained from The Chosen One
  • Plays the downloaded audio after a user-specified countdown time (i.e. 10s, 15m, 7h), with volume gradually fading in.
  • Option to select and display a Name of Allah and provide corresponding explanation of its meaning with the GPT API
  • Displays automatically selected verses from the Quran and provides corresponding explanations.
  • Depending on the length of the countdown, one, two, or three verses will be selected for display
  • After each explanation, the program waits for the user to press Enter before proceeding.
  • Once all explanations are provided, the audio volume gradually fades out over a 5-second period.

Usage

  1. Clone repo and install packages (for developers):
    git clone https://github.com/malekinho8/quran-wake-up.git
    pip install -r requirements.txt
    pip install .
    
  2. Alternatively, install one dependency manually and fajrGPT through PyPI:
    pip install git+https://github.com/UBISOFT-1/Quran_Module.git fajrGPT
    
  3. Run the main.py script, passing the required parameters:
    fajrGPT --countdown-time <Seconds, Minutes, or Hours until Alarm> --surah <Which Surah (number) to play for the alarm, default is 1>
    

Required Parameters

  • --countdown-time: The amount of time

Dependencies

  • Python 3.8 or later.
  • click
  • pygame
  • pydub
  • moviepy
  • openai
  • scipy
  • mutagen
  • TheQuranModule

Notes

  • The OpenAI API key must be set in an environment variable named OPENAI_API_KEY. See instructions here for more details.

License

MIT

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

fajrGPT-1.5.7.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

fajrGPT-1.5.7-py3-none-any.whl (13.4 kB view hashes)

Uploaded Python 3

Supported by

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