Skip to main content

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

Installing FFmpeg

FFmpeg is a necessary dependency for this package in order to play audio mp3 files. Follow the instructions below based on your operating system:

Windows

Option 1: Using Conda (recommended for Conda users)

If you have Anaconda or Miniconda installed, you can install FFmpeg using the following command:

conda install -c conda-forge ffmpeg
Option 2: Manual Installation
  1. Go to the FFmpeg official download page and download the Windows version.
  2. Extract the ZIP archive.
  3. Add the path to the bin directory (where ffmpeg.exe is located) to your system's PATH variable.

macOS

Using Homebrew (recommended):

brew install ffmpeg

Or follow the manual installation process similar to Windows by downloading from the FFmpeg official site.

Linux (e.g., Ubuntu)

Using the package manager:

sudo apt install ffmpeg

For other Linux distributions, adjust the command according to your package manager.

CLI Installation with PyPI Distribution

  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/malekinho8/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.x
  • 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

Metadata

Release files for fajrGPT 1.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fajrGPT 1.7.2
File Size Uploaded
fajrGPT-1.7.2.tar.gz 3.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for fajrGPT 1.7.2
File Interpreter ABI Platform
fajrGPT-1.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / fajrGPT-1.7.2.tar.gz

Download URL fajrGPT-1.7.2.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
21f0caad5efc557a660dc4ba295c8b0bb79615d26cb41661793033bbbe1b7ea0
BLAKE2b-256 checksum
How to use checksums
298523b5b5135dca19ed2e027ad25f2d23873aacef35439a42800652c6ddfbd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / fajrGPT-1.7.2-py3-none-any.whl

Download URL fajrGPT-1.7.2-py3-none-any.whl
Size 5.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a4b1958abab102872ded843e56e78d3fc899bfd6e93fb88cb20bbabfec442f2d
BLAKE2b-256 checksum
How to use checksums
1e18ba8cd9e3b60c67081de92cb0e8a791f7cd73d8c4804945eb23e34bec6fd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.7.2 This release

2 release files

1.7.1

2 release files

1.7

2 release files

1.6.9

2 release files

1.6.8

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3

2 release files

1.2.1

2 release files

1.2

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page