{"id":26299273,"url":"https://github.com/perrette/bard","last_synced_at":"2026-02-19T11:32:19.206Z","repository":{"id":278833941,"uuid":"936927992","full_name":"perrette/bard","owner":"perrette","description":"A text to speech application","archived":false,"fork":false,"pushed_at":"2025-03-10T10:51:17.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T23:18:24.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perrette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["perrette"]}},"created_at":"2025-02-22T00:09:00.000Z","updated_at":"2025-03-10T10:51:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a67f6845-0847-4787-9cfc-ac80ac059551","html_url":"https://github.com/perrette/bard","commit_stats":null,"previous_names":["perrette/bard"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/perrette/bard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Fbard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Fbard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Fbard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Fbard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perrette","download_url":"https://codeload.github.com/perrette/bard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Fbard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29611088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"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":[],"created_at":"2025-03-15T06:47:56.848Z","updated_at":"2026-02-19T11:32:19.152Z","avatar_url":"https://github.com/perrette.png","language":"Python","funding_links":["https://github.com/sponsors/perrette"],"categories":[],"sub_categories":[],"readme":"[![pypi](https://img.shields.io/pypi/v/bard-cli)](https://pypi.org/project/bard-cli)\n![](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fperrette%2Fbard%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)\n\n# Bard  \u003cimg src=\"https://github.com/perrette/bard/raw/main/bard_data/share/icon.png\" width=48px\u003e\n\nBard is a text to speech client that integrates on the desktop\n\n## Install\n\nInstall libraries or system-specific dependencies:\n\n```bash\nsudo apt-get install portaudio19-dev xclip #  portaudio19-dev becomes portaudio with Homebrew\nsudo apt install libcairo-dev libgirepository1.0-dev gir1.2-appindicator3-0.1  # Ubuntu ONLY (not needed on MacOS)\npip install PyGObject # Ubuntu ONLY (not needed on MacOS)\n```\n\nInstall the main app with all its optional dependencies:\n\n```bash\npip install bard-cli[all]\n```\n\n### GNOME\n\nOn GNOME desktop you can subsequently run:\n```bash\nbard-install [...] --openai-api-key $OPENAI_API_KEY\n```\nto produce a `.desktop` file for GNOME's quick-launch\n(the `[...]` indicates any argument that `bard` takes)\n\n## Usage\n\nIn a terminal:\n\n```bash\nbard\n```\nwhich defaults to:\n```bash\nbard --backend openaiapi --voice allow --model tts-1\n```\n(this assumes the environment variable `OPENAI_API_KEY` is defined)\n\nAn icon should show up almost immediately in the system tray, with options to copy the content of the clipboard (the last thing you copy-pasted)\nand send that to the AI model for reading aloud.\n\n\u003cimg src=https://github.com/user-attachments/assets/a90ccd1c-7431-4554-9d41-0e9c1b4399f2 width=300px\u003e\n\nYou can also do a one-off reading by indicating the source content with one of the following:\n\n```bash\nbard --text \"Hello world, how are you today\"\nbard --clipboard\nbard --url \"example.com\" # also accepts file://\nbard --html-file /path/to/downloaded.html # access a page with paywal, download it, feed it to bard\nbard --pdf-file /path/to/document.pdf  # careful if you pay for it... (the full thing will be transcribed even if you listen to a small bit of it)\nbard --audio-file /path/to/audio.mp3 # no actual request, only useful for testing the audio player\n```\nThe above command will still launch the system tray icon, and so provide access to the audio player's (basic) controls.\nThere is also a terminal version via the `--no-tray` parameter, with the same elementary controls as in the system tray.\nAnd for a one-off execution of the program without controls, use `--no-prompt`.\n\nThe clipboard parsing capabilities are elaborate enough so that it can detect an URL, a file path or common HTML markup.\nIf a file path is detected, the extension is checked for `.html`-ish and `.pdf`, and the data is extracted accordingly.\nHere we make good use of the most useful work on [readability](https://pypi.org/project/readability-lxml).\nIn particular, this allows relatively easy reading out of webpages behind paywals, by right-clicking on \"View Page Source\" (or download the html file if the source doesn't contain the text), select all text, copy and just proceed with bards' \"Process Copied Text\" or `--clipboard` options.\nFor other articles not protected by a paywall, copying the URL should suffice.\n\nYou can resume the previous recording (the audio won't play right away in this case, but you can use the reader):\n```bash\nbard --resume\n```\nYou can ask also ask the app to removed your (local) traces:\n```bash\nbard --clean-cache-on-exit\n```\n\n## Fine-tuning\n\n```bash\nbard --chunk-size 500  # that's the default\n```\nsets the maximum length (in characters) of a request. That means about 30 seconds of speech.\nThe program will split up the text in chunks (according to the punctuation) and download them sequentially.\nThe reading will start with the first chunk, that's why it is convenient to keep it small.\nYou can set that smaller or up to the maximum allowed by the openai API (4096).\n\n## Player\n\nThe player was devised in conversation with Mistral's Le Chat and Open AI's Chat GPT, and my own experience with `pystray` on [scribe](https://github.com/perrette/scribe). It works.\nI'm open for suggestion for other, platform-independent integrations to the OS.\nTODO: I want to add a functioning \"Open with external reader\" option. At the moment it is experimental and only accounts for the first file.\n\n## Android\n\nI was able to install bard on Android via the excellent [Termux](https://termux.dev) emulator. Not everything works: the tray system app does not work, the clipboard option only partially works (**only plain text is copied**). However I could obtain a decent workflow for one-off reading (no player controls) via:\n```bash\nbard --no-tray --clipboard\n```\nFor paywalled articles, I ended up opening them in Firefox, acessing the Reading mode (excellent, though sometimes the icon is hidden in the URL bar), selecting all text, copying, and running the above command (for free articles just copy paste the URL). This requires the termux API `pkg install termux-api`.\n\n\n## Roadmap\n\nInclude more backends including local ones.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrette%2Fbard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperrette%2Fbard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrette%2Fbard/lists"}