{"id":13827415,"url":"https://github.com/italankin/samplevoicebot","last_synced_at":"2026-01-23T20:19:25.096Z","repository":{"id":47489988,"uuid":"332326737","full_name":"italankin/samplevoicebot","owner":"italankin","description":"TTS Telegram bot","archived":false,"fork":false,"pushed_at":"2024-07-11T06:26:30.000Z","size":82,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-20T06:34:25.731Z","etag":null,"topics":["amazon-polly","python-telegram-bot","telegram-bot","tts"],"latest_commit_sha":null,"homepage":"http://t.me/samplevoicebot","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/italankin.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":"2021-01-23T23:09:52.000Z","updated_at":"2024-08-07T08:01:28.000Z","dependencies_parsed_at":"2024-07-11T08:04:47.928Z","dependency_job_id":null,"html_url":"https://github.com/italankin/samplevoicebot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/italankin/samplevoicebot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italankin%2Fsamplevoicebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italankin%2Fsamplevoicebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italankin%2Fsamplevoicebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italankin%2Fsamplevoicebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/italankin","download_url":"https://codeload.github.com/italankin/samplevoicebot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italankin%2Fsamplevoicebot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28699377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: 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":["amazon-polly","python-telegram-bot","telegram-bot","tts"],"created_at":"2024-08-04T09:01:55.966Z","updated_at":"2026-01-23T20:19:25.079Z","avatar_url":"https://github.com/italankin.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Sample Voice Bot\n\nTelegram text-to-speech bot. It works in both inline and text mode and offers a convenient interface to generate voice from the text.\n\nTry it out: [@samplevoicebot](https://t.me/samplevoicebot).\n\n## Requirements\n\nBot requires an AWS account to work. It uses [Amazon Polly](https://aws.amazon.com/polly/) to generate voice\nand [S3](https://aws.amazon.com/s3/) to store and share generated voice files.\n\n## Configuration\n\nBot is configured via environmental variables, listed in [`config.py`](src/config.py).\n\nThe table below shows required parameters:\n\nParameter|Description\n---|---\n`TELEGRAM_BOT_TOKEN`|Token issued by [@BotFather](https://t.me/botfather)\n`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`|AWS credentials\n`AWS_S3_BUCKET`|AWS bucket name where files will be stored\n`AWS_REGION_NAME`|AWS region name where your bucket is located e.g. `us-east-1`\n\nOther parameters:\n\nParameter|Values|Default|Description\n---|---|---|---\n`TELEGRAM_ADMIN_ID`|_int_|`-1`|User ID - admin of this bot\n`TELEGRAM_MIN_MESSAGE_LENGTH`|_int_|`1`|Minimal message length to generate voice\n`TELEGRAM_MAX_MESSAGE_LENGTH`|_int_|`255`|Maximum message length to generate voice (inline messages cannot exceed 256 characters)\n`TELEGRAM_INLINE_DEBOUNCE_MILLIS`|_int_|`1000`|Debounce interval for incoming inline requests to avoid unnecessary voice generations\n`LANGUAGE_DETECT_MAPPINGS`|_str_| |Language mappings in format `from=to`. Multiple substitutions can be joined with commas e.g. `mk=ru,bg=ru,uk=ru`\n`MAX_WORKERS`|_int_|`4`|A number of workers used for concurrent jobs (e.g. speech synthesis)\n`PREFETCH_LANGUAGES`|_str_| |List languages (e.g. `ru,en`) to prefetch voices list\\* on bot startup\n`VOICES`|_str_| |Specify voices to use, e.g. `ru-RU=Tatyana,Maxim`. Join multiple mappings with `;`. List of [supported voices](https://docs.aws.amazon.com/polly/latest/dg/voicelist.html)\n`DEBUG`|`1`, `0`|`0`|Enable/disable verbose logging\n\n\\* *In inline mode bot uses only 2 voices per language to minimize synthesize requests*\n\n### AWS configuration\n\nAn unrestricted, unauthorized public access to the objects in the bucket is required. This can be achieved with bucket policy:\n\n\u003cdetails\u003e\n\u003csummary\u003eBucket policy\u003c/summary\u003e\n  \n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"PublicRead\",\n            \"Effect\": \"Allow\",\n            \"Principal\": \"*\",\n            \"Action\": \"s3:GetObject\",\n            \"Resource\": \"arn:aws:s3:::samplebucket/*\"\n        }\n    ]\n}\n```\n_\\* `samplebucket` must be substituted with your backet name._\n\u003c/details\u003e\n\nSee [docs](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html) for more info.\n\n## Docker\n\n### Images\n\nImages are available at [ghcr.io](https://github.com/italankin/samplevoicebot/pkgs/container/samplevoicebot).\n\n### Build image\n\n```\n$ docker build -t samplevoicebot .\n```\n\n### Run image\n\nCreate a file named `.env` and put your credentials, for example:\n\n```\nAWS_ACCESS_KEY_ID=\u003cyour-aws-access-key-id\u003e\nAWS_SECRET_ACCESS_KEY=\u003cyour-aws-secret-access-key\u003e\nAWS_REGION_NAME=\u003caws-region-name\u003e\nAWS_S3_BUCKET=\u003cyour-s3-bucket-name\u003e\nTELEGRAM_BOT_TOKEN=\u003cyour-telegram-bot-token\u003e\n\u003cany-additional-parameters\u003e\n```\n\nRun:\n\n```\n$ docker run -d --env-file .env samplevoicebot\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitalankin%2Fsamplevoicebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitalankin%2Fsamplevoicebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitalankin%2Fsamplevoicebot/lists"}