{"id":18275348,"url":"https://github.com/rahiel/audioquranbot","last_synced_at":"2025-04-05T03:30:53.503Z","repository":{"id":69156849,"uuid":"101544470","full_name":"rahiel/AudioQuranBot","owner":"rahiel","description":"Listen to the Holy Qur'an on Telegram.","archived":false,"fork":false,"pushed_at":"2017-11-27T12:35:18.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T21:33:52.128Z","etag":null,"topics":["bot","quran","telegram"],"latest_commit_sha":null,"homepage":"https://telegram.me/AudioQuranBot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahiel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-27T10:14:52.000Z","updated_at":"2023-07-06T14:56:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"68460474-f5ae-4c89-8166-7cafa1020405","html_url":"https://github.com/rahiel/AudioQuranBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahiel%2FAudioQuranBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahiel%2FAudioQuranBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahiel%2FAudioQuranBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahiel%2FAudioQuranBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahiel","download_url":"https://codeload.github.com/rahiel/AudioQuranBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284911,"owners_count":20913691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","quran","telegram"],"created_at":"2024-11-05T12:12:34.461Z","updated_at":"2025-04-05T03:30:53.482Z","avatar_url":"https://github.com/rahiel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AudioQuranBot\n\nبِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ\n\nAudioQuranBot is a bot on Telegram that shares audio recitations of the Holy\nQur'an. [Talk with it][AudioQuranBot] to request audio tracks of surahs recited\nby [Shaykh Mahmoud Khalil al-Husary][qari].\n\nAlso see [BismillahBot][], a bot that serves an English translation, tafsir and\nArabic of individual verses.\n\n[AudioQuranBot]: https://telegram.me/AudioQuranBot\n[qari]: https://en.wikipedia.org/wiki/Mahmoud_Khalil_Al-Hussary\n[BismillahBot]: https://github.com/rahiel/BismillahBot\n\n\n# Installation\n\nGet the code and dependencies:\n\n``` shell\nsudo apt install redis-server git python3-pip python3-dev virtualenv\ngit clone https://github.com/rahiel/AudioQuranBot.git\ncd AudioQuranBot/\nvirtualenv -p python3 venv\n. venv/bin/activate\npip install --upgrade git+https://github.com/rahiel/BismillahBot.git\npip install -r requirements.txt --upgrade\n```\n\nPut the bot's API token in a `secret.py` file:\n\n```python\ntoken = \"\u003cyour-token-here\u003e\"\n```\n\n## Data\n\nDownload [this torrent][torrent] with the audio files and save the data in the\nbot's main directory.\n\nGet Quran metadata:\n\n``` shell\nwget 'http://tanzil.net/res/text/metadata/quran-data.xml'\n```\n\nTelegram bots are currently only allowed to send files up to 50 MB. Some audio\ntracks are bigger, so they need to be split. In the directory with the audio,\nsplit them with ffmpeg:\n\n``` shell\nffmpeg -t 46:41 -i 002.mp3 -codec:a copy -vn -metadata title=\"Al-Baqarah (part 1/4)\" 002_1.mp3              # ayah 1 - 86\nffmpeg -ss 46:41 -t 49:57 -i 002.mp3 -codec:a copy -vn -metadata title=\"Al-Baqarah (part 2/4)\" 002_2.mp3    # ayah 87 - 167\nffmpeg -ss 1:36:38 -t 50:26 -i 002.mp3 -codec:a copy -vn -metadata title=\"Al-Baqarah (part 3/4)\" 002_3.mp3  # ayah 168 - 231\nffmpeg -ss 2:27:04 -i 002.mp3 -codec:a copy -vn -metadata title=\"Al-Baqarah (part 4/4)\" 002_4.mp3           # ayah 232 - end\n\nffmpeg -t 38:09 -i 003.mp3 -codec:a copy -vn -metadata title=\"Al-Imran (part 1/3)\" 003_1.mp3                # ayah 1 - 71\nffmpeg -ss 38:09 -t 39:01 -i 003.mp3 -codec:a copy -vn -metadata title=\"Al-Imran (part 2/3)\" 003_2.mp3      # ayah 72 - 143\nffmpeg -ss 1:17:10 -i 003.mp3 -codec:a copy -vn -metadata title=\"Al-Imran (part 3/3)\" 003_3.mp3             # ayah 144 - end\n\nffmpeg -t 40:48 -i 004.mp3 -codec:a copy -vn -metadata title=\"An-Nisa' (part 1/3)\" 004_1.mp3                # ayah 1 - 59\nffmpeg -ss 40:48 -t 34:54 -i 004.mp3 -codec:a copy -vn -metadata title=\"An-Nisa' (part 2/3)\" 004_2.mp3      # ayah 60 - 112\nffmpeg -ss 1:15:42 -i 004.mp3 -codec:a copy -vn -metadata title=\"An-Nisa' (part 3/3)\" 004_3.mp3             # 113 - end\n\nffmpeg -t 43:44.7 -i 005.mp3 -codec:a copy -vn -metadata title=\"Al-Ma'idah (part 1/2)\" 005_1.mp3            # ayah 1 - 50\nffmpeg -ss 43:44.7 -i 005.mp3 -codec:a copy -vn -metadata title=\"Al-Ma'idah (part 2/2)\" 005_2.mp3           # ayah 51 - end\n\nffmpeg -t 50:04 -i 006.mp3 -codec:a copy -vn -metadata title=\"Al-An'am (part 1/2)\" 006_1.mp3                # ayah 1 - 90\nffmpeg -ss 50:04 -i 006.mp3 -codec:a copy -vn -metadata title=\"Al-An'am (part 2/2)\" 006_2.mp3               # ayah 91 - end\n\nffmpeg -t 53:44 -i 007.mp3 -codec:a copy -vn -metadata title=\"Al-A'raf (part 1/2)\" 007_1.mp3                # ayah 1 - 100\nffmpeg -ss 53:44 -i 007.mp3 -codec:a copy -vn -metadata title=\"Al-A'raf (part 2/2)\" 007_2.mp3               # ayah 101 - end\n\nffmpeg -t 44:48 -i 009.mp3 -codec:a copy -vn -metadata title=\"At-Taubah (part 1/2)\" 009_1.mp3               # ayah 1 - 66\nffmpeg -ss 44:48 -i 009.mp3 -codec:a copy -vn -metadata title=\"At-Taubah (part 2/2)\" 009_2.mp3              #  ayah 67 - end\n\nffmpeg -t 34:32 -i 010.mp3 -codec:a copy -vn -metadata title=\"Yunus (part 1/2)\" 010_1.mp3                   # ayah 1 - 60\nffmpeg -ss 34:32 -i 010.mp3 -codec:a copy -vn -metadata title=\"Yunus (part 2/2)\" 010_2.mp3                  # ayah 61 - end\n\nffmpeg -t 26:49 -i 011.mp3 -codec:a copy -vn -metadata title=\"Hood (part 1/2)\" 011_1.mp3                    # ayah 1 - 60\nffmpeg -ss 26:49 -i 011.mp3 -codec:a copy -vn -metadata title=\"Hood (part 2/2)\" 011_2.mp3                   # ayah 61 - end\n\nffmpeg -t 27:02.3 -i 012.mp3 -codec:a copy -vn -metadata title=\"Yusuf (part 1/2)\" 012_1.mp3                 # ayah 1 - 49\nffmpeg -ss 27:02.3 -i 012.mp3 -codec:a copy -vn -metadata title=\"Yusuf (part 2/2)\" 012_2.mp3                # ayah 50 - en\n\nffmpeg -t 27:19 -i 016.mp3 -codec:a copy -vn -metadata title=\"An-Nahl (part 1/2)\" 016_1.mp3                 # ayah 1 - 65\nffmpeg -ss 27:19 -i 016.mp3 -codec:a copy -vn -metadata title=\"An-Nahl (part 2/2)\" 016_2.mp3                # ayah 66 - end\n```\n\n[torrent]: http://torrent.mp3quran.net/details.php?id=3f2404b9cc6dfb5ccf70580a149fd8b87de0d8f1\n\n# License\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the Free\nSoftware Foundation, either version 3 of the License, or (at your option) any\nlater version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahiel%2Faudioquranbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahiel%2Faudioquranbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahiel%2Faudioquranbot/lists"}