{"id":19684940,"url":"https://github.com/boolfalse/simple-question-complex-answer","last_synced_at":"2026-05-08T03:09:41.514Z","repository":{"id":185513283,"uuid":"641354600","full_name":"boolfalse/simple-question-complex-answer","owner":"boolfalse","description":"A Telegram bot that answers your questions with a voice message","archived":false,"fork":false,"pushed_at":"2023-11-10T09:48:29.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T06:58:54.955Z","etag":null,"topics":["bard","googlebard","node","python","telegram-bot"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=YFpR8x7sPQY","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boolfalse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-16T09:49:08.000Z","updated_at":"2023-11-10T09:49:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2d296ca-c3b6-4953-ba06-821c83711dc1","html_url":"https://github.com/boolfalse/simple-question-complex-answer","commit_stats":null,"previous_names":["boolfalse/simple-question-complex-answer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolfalse%2Fsimple-question-complex-answer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolfalse%2Fsimple-question-complex-answer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolfalse%2Fsimple-question-complex-answer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolfalse%2Fsimple-question-complex-answer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boolfalse","download_url":"https://codeload.github.com/boolfalse/simple-question-complex-answer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993432,"owners_count":19890418,"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":["bard","googlebard","node","python","telegram-bot"],"created_at":"2024-11-11T18:19:23.311Z","updated_at":"2026-05-08T03:09:36.475Z","avatar_url":"https://github.com/boolfalse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### A Simple Question =\u003e A Complex Answer\n\n---\n\n- The Article on **Medium**: [Create your own AI voice assistant bot with Node.js using Google Bard](https://medium.com/@boolfalse/create-your-own-ai-voice-assistant-bot-with-node-js-using-google-bard-8d3572ed5272)\n- A short video on [**YouTube**](https://www.youtube.com/shorts/YFpR8x7sPQY) on how it works.\n- Demo Telegram channel: [**sqca_bot**](https://t.me/sqca_bot)\n\n\u003e A Telegram bot that answers your questions with a voice message.\n\n\u003cimg src=\"https://i.imgur.com/mKNNZNv.jpg\" alt=\"sqca\" /\u003e\n\n_A Simple Question =\u003e A Complex Answer_\n\n\n\n#### Prerequisites:\n\n- [Node.js](https://nodejs.org/en/download) 18.* or higher installed\n- [Python](https://www.python.org/downloads/) 3.* and pip installed\n- [FFmpeg](https://www.ffmpeg.org/download.html) installed\n\n\n\n#### Installation:\n\n- Create a new AWS IAM user, give it access to [Polly](https://aws.amazon.com/polly/).\n\n- Create a new Telegram bot with [@BotFather](https://t.me/botfather/).\n\n- Create a new [Telegram channel](https://web.telegram.org/) and add the bot as an admin.\n\n- Create a new [MongoDB Atlas](https://cloud.mongodb.com/) cluster and set up IP whitelist.\n\n- Have a [Google Bard](https://bard.google.com/) account.\nIn a browser open inspect element. `__Secure-1PSID`, `__Secure-1PSIDTS` cookie values from `Application` -\u003e `Cookies` -\u003e `https://accounts.google.com`\n\n- Clone the repo and install dependencies:\n```shell\ngit clone git@github.com:boolfalse/simple-question-complex-answer.git \u0026\u0026 cd simple-question-complex-answer/\nnpm install\n```\n\n- Install python dependencies (you may use `pip3` instead of `pip` for your case):\n```shell\npip install SpeechRecognition\npip install bardapi\npip install --upgrade GoogleBard\n```\n\n- Create a `.env` file in the root directory of the project and add the following:\n```shell\n# @BotFather token here\nTELEGRAM_BOT_TOKEN=\"\"\n\n# Usually it's \"python3\" or kind of \"/usr/local/bin/python3.10\"\nPYTHON_EXEC_PATH=\"python3\"\n\n# Copy values and add it here respectively\nGOOGLE_BARD_SECURE_1PSID=\"\"\nGOOGLE_BARD_SECURE_1PSIDTS=\"\"\n\n# AWS IAM user keys\nAWS_ACCESS_KEY=\"\"\nAWS_SECRET_KEY=\"\"\n\n# MongoDB Atlas connection string\nMONGODB_URI=\"mongodb+srv://\u003cUSER\u003e:\u003cPASSWORD\u003e@cluster0.mzcsh.mongodb.net/\u003cDB_NAME\u003e?retryWrites=true\u0026w=majority\"\n```\n\n- Run the app:\n  - Development:\n  ```shell\n  npm run dev\n  ```\n  - Production:\n  ```shell\n  npm run start\n  ```\n  - Command samples on production:\n  ```shell\n  # start\n  forever start -c \"npm run start\" ./\n  # list\n  forever list\n  # stop\n  forever stop \u003cpid\u003e\n  ```\n\n\n\n#### TODOs:\n- [ ] Add used resources to the \"Resources\" section\n- [ ] Refactor codebase (middlewares)\n- [ ] Logging/error-handling (file writing, Slack/Telegram notification)\n- [ ] Modify DB for multiple sessions\n- [ ] Add \"/new\" command with session management\n- [ ] Add command to leave chat\n- [ ] Add invitation functionality\n- [ ] Add usage limit to non-invited users\n- [ ] Queue messages to avoid any 3rd party APIs limitations\n- [ ] Use messaging system (e.g. Kafka, RabbitMQ)\n\n\n\n#### Resources:\n\n- [Telegram Bot API](https://core.telegram.org/bots/api)\n- [Non-official python package Google Bard API](https://github.com/dsdanielpark/Bard-API/)\n- [Python SDK/API for reverse engineered Google Bard](https://github.com/acheong08/Bard/)\n- [Basics of creation of a similar project, but not the same](https://www.youtube.com/watch?v=-6ufFPvp6CY)\n- [Creating an IAM user in your AWS account](https://docs.aws.amazon.com/whitepapers/latest/how-aws-pricing-works/get-started-with-the-aws-free-tier.html)\n- [Changing permissions for an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html)\n- [Managing access keys for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)\n\n\n\n#### Author:\n\n- [BoolFalse](https://boolfalse.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboolfalse%2Fsimple-question-complex-answer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboolfalse%2Fsimple-question-complex-answer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboolfalse%2Fsimple-question-complex-answer/lists"}