{"id":15103102,"url":"https://github.com/vlad324/listen4me-bot","last_synced_at":"2026-02-26T19:41:47.129Z","repository":{"id":242068287,"uuid":"808591741","full_name":"vlad324/listen4me-bot","owner":"vlad324","description":"Listen4Me bot converts audio messages into text.","archived":false,"fork":false,"pushed_at":"2024-07-08T19:00:11.000Z","size":21,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T22:37:29.711Z","etag":null,"topics":["speech-to-text","telegram","telegram-bot","whatsapp","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlad324.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-05-31T11:43:51.000Z","updated_at":"2025-09-01T16:34:59.000Z","dependencies_parsed_at":"2024-07-08T23:27:43.102Z","dependency_job_id":null,"html_url":"https://github.com/vlad324/listen4me-bot","commit_stats":null,"previous_names":["vlad324/listen4me-bot","vlad324/listen4me-bot-telegram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vlad324/listen4me-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlad324%2Flisten4me-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlad324%2Flisten4me-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlad324%2Flisten4me-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlad324%2Flisten4me-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlad324","download_url":"https://codeload.github.com/vlad324/listen4me-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlad324%2Flisten4me-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29868937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["speech-to-text","telegram","telegram-bot","whatsapp","whatsapp-bot"],"created_at":"2024-09-25T19:21:12.909Z","updated_at":"2026-02-26T19:41:47.111Z","avatar_url":"https://github.com/vlad324.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Listen4Me bot repository\n\nThe repository contains the code for the Listen4Me bot. The bot is available on Telegram and WhatsApp and designed to transcribe audio\nmessages to text.\n\nTelegram bot: [@Listen4Me](https://t.me/l4me_bot)\n\nWhatsApp bot: [@Listen4Me](https://wa.me/message/CZS3B3D7YNL3C1)\n\n## Self-hosting options\n\nThe bot can be run on a local machine or deployed to a cloud platform.\nThere is an option to run the bot only for one of the platforms (Telegram or WhatsApp) or for both of them.\n\n### Prerequisites\n\n1. OpenAI API key. You can get it by signing up on the [Open AI website](https://platform.openai.com/signup).\n2. Telegram bot token. You can create a new bot using [@BotFather](https://t.me/botfather). If you plan to run the bot only for WhatsApp,\n   you can omit this step.\n3. WhatsApp API key and phone number id. You can get it by creating WhatsApp app\n   on [Meta for Developers](https://developers.facebook.com/apps) platform. If you plan to run the bot only for Telegram, you can omit this\n   step.\n4. Two random string. First one to use as a webhook secret for Telegram, and the second one for verify token for WhatsApp.\n\nThere are several ways to run the bot locally:\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLocal run with ngrok endpoint\u003c/b\u003e\u003c/summary\u003e\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/vlad324/listen4me-bot\n```\n\n2. Install the necessary dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n3. Create a `.env` file in the root of the project and specify the following environment variables in it:\n\n```\nOPEN_AI_API_KEY=your_open_ai_api_key\n\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nTELEGRAM_WEBHOOK_SECRET=first_random_string_generated_in_prerequisites_section\n\nWA_API_KEY=api_key_of_your_whatsapp_app\nWA_PHONE_NUMBER_ID=phone_number_id_of_your_whatsapp_app\nWA_VERIFY_TOKEN=second_random_string_generated_in_prerequisites_section\n```\n\nIf you plan to run the bot only for Telegram or WhatsApp, you can omit the corresponding variables. `OPEN_AI_API_KEY` is required for both\nplatforms.\n\n4. Run the bot:\n\n```bash\nfastapi run app/main.py --port 8000\n```\n\nThe bot will be waiting for webhooks at `http://localhost:8000/telegram/l4me_bot/webhook` for Telegram\nand `http://localhost:8000/whatsapp/l4me_bot/webhook` for WhatsApp.\n\n5. Using `ngrok`, expose your local server to the internet:\n\n```bash\nngrok http 8000\n```\n\n6. Set the webhook for Telegram the bot:\n\n```bash\ncurl -X POST --location \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setWebhook\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n          \"url\": \"\u003curl_provided_by_ngrok\u003e/telegram/l4me_bot/webhook\",\n          \"secret_token\": \"\u003cfirst_random_string_generated_in_prerequisites_section\u003e\"\n        }'\n```\n\n7. Use Meta for Developers platform to set the webhook for WhatsApp bot. URL should be `\u003curl_provided_by_ngrok\u003e/whatsapp/l4me_bot/webhook`\n   and verify token should be `\u003csecond_random_string_generated_in_prerequisites_section\u003e`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLocal run with Docker and ngrok endpoint\u003c/b\u003e\u003c/summary\u003e\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/vlad324/listen4me-bot\n```\n\n2. Build the Docker image:\n\n```bash\ndocker build -t listen4me-bot .\n```\n\n3. Create a `.env` file in the root of the project and specify the following environment variables in it:\n\n```\nOPEN_AI_API_KEY=your_open_ai_api_key\n\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nTELEGRAM_WEBHOOK_SECRET=first_random_string_generated_in_prerequisites_section\n\nWA_API_KEY=api_key_of_your_whatsapp_app\nWA_PHONE_NUMBER_ID=phone_number_id_of_your_whatsapp_app\nWA_VERIFY_TOKEN=second_random_string_generated_in_prerequisites_section\n```\n\nIf you plan to run the bot only for Telegram or WhatsApp, you can omit the corresponding variables. `OPEN_AI_API_KEY` is required for both\nplatforms.\n\n4. Run the Docker container:\n\n```bash\ndocker run --env-file .env -p 8080:8080 listen4me-bot\n```\n\n5. Using `ngrok`, expose your local server to the internet:\n\n```bash\nngrok http 8080\n```\n\n6. Set the webhook for Telegram the bot:\n\n```bash\ncurl -X POST --location \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setWebhook\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n          \"url\": \"\u003curl_provided_by_ngrok\u003e/telegram/l4me_bot/webhook\",\n          \"secret_token\": \"\u003cfirst_random_string_generated_in_prerequisites_section\u003e\"\n        }'\n```\n\n7. Use Meta for Developers platform to set the webhook for WhatsApp bot. URL should be `\u003curl_provided_by_ngrok\u003e/whatsapp/l4me_bot/webhook`\n   and verify token should be `\u003csecond_random_string_generated_in_prerequisites_section\u003e`.\n\n\u003c/details\u003e\n\n### Deployment to [fly.io](https://fly.io)\n\nThe bot can be deployed to the [fly.io](https://fly.io) platform. The platform provides a free tier for small applications and could be a\ngood option to host your own instance of the bot.\n\n1. Install the `flyctl` CLI tool by following the instructions on\n   the [official website](https://fly.io/docs/getting-started/installing-flyctl/).\n2. Sign in or sing up to the [fly.io](https://fly.io/docs/hands-on/sign-up-sign-in/) platform.\n3. Launch a new app:\n\n```bash\nflyctl launch\n```\n\n4. Set the necessary secrets for the bot:\n\n```bash\nflyctl secrets set OPEN_AI_API_KEY=\u003cyour_open_ai_api_key\u003e\n```\n\nTelegram related secrets:\n\n```bash\nflyctl secrets set TELEGRAM_BOT_TOKEN=\u003cyour_telegram_bot_token\u003e \\\n TELEGRAM_WEBHOOK_SECRET=\u003cfirst_random_string_generated_in_prerequisites_section\u003e\n```\n\nWhatsApp related secrets:\n\n```bash\nflyctl secrets set WA_API_KEY=\u003capi_key_of_your_whatsapp_app\u003e \\\n WA_PHONE_NUMBER_ID=\u003cphone_number_id_of_your_whatsapp_app\u003e \\\n WA_VERIFY_TOKEN=\u003csecond_random_string_generated_in_prerequisites_section\u003e\n```\n\nIf you plan to run the bot only for Telegram or WhatsApp, you can omit the corresponding secrets. `OPEN_AI_API_KEY` is required for both\n\n5. Deploy the bot to the platform:\n\n```bash\nfly deploy\n```\n\n6. Set the new webhook URL for Telegram bot:\n\n```bash\ncurl -X POST --location \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setWebhook\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n          \"url\": \"\u003curl_provided_by_fly_io\u003e/telegram/l4me_bot/webhook\",\n          \"secret_token\": \"\u003cfirst_random_string_generated_in_prerequisites_section\u003e\"\n        }'\n```\n\n7. Use Meta for Developers platform to set the webhook for WhatsApp bot. URL should be `\u003curl_provided_by_fly_io\u003e/whatsapp/l4me_bot/webhook`\n   and verify token should be `\u003csecond_random_string_generated_in_prerequisites_section\u003e`.\n\n## Restricting access to your Telegram bot\n\nTo limit access to your version of the Telegram bot, you'll need to know your Telegram id or the Telegram ids of users you want to grant\naccess to.\nHere's how to obtain this information:\n\n1. Start a conversation with [@GetIDs Bot](https://t.me/getidsbot) on Telegram.\n2. The bot will send you a message containing your Telegram id. Copy this id.\n\nOnce you have the necessary ids, follow these steps to restrict access:\n\n### For local deployment:\n\nAdd the following line to your `.env` file:\n\n```\nTELEGRAM_ALLOWED_USER_IDS=\u003cid_1,id_2,...\u003e\n```\n\nReplace `\u003cid_1,id_2,...\u003e` with a single Telegram ID or a comma-separated list of allowed Telegram IDs. For example:\n\n- For a single user: `TELEGRAM_ALLOWED_USER_IDS=123456789`\n- For multiple users: `TELEGRAM_ALLOWED_USER_IDS=123456789,987654321`\n\n### For fly.io deployment:\n\nExecute the following command:\n\n```bash\nflyctl secrets set TELEGRAM_ALLOWED_USER_IDS=\u003cid_1,id_2,...\u003e\n```\n\nReplace `\u003cid_1,id_2,...\u003e` with the comma-separated list of Telegram IDs for users you want to allow access to your bot.\n\nBy setting this environment variable, you'll ensure that only specified users can interact with your Telegram bot.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlad324%2Flisten4me-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlad324%2Flisten4me-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlad324%2Flisten4me-bot/lists"}