Metadata-Version: 2.2
Name: bard-cli
Version: 0.1.0
Summary: bard is a text to speech tool based on existing open-source models (local install) and APIs to install on your desktop
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Mahé Perrette
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        ---
        
        Note: This project relies on external packages that may have more restrictive
        licenses. Please review the
        licenses of all dependencies before using or distributing this software to
        ensure compliance with their respective terms.
Project-URL: Homepage, https://github.com/perrette/bard
Keywords: text to speech,AI,language,openai
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: app
Requires-Dist: pystray; extra == "app"
Requires-Dist: PyGObject; extra == "app"
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Provides-Extra: all
Requires-Dist: openai; extra == "all"
Requires-Dist: pystray; extra == "all"

[![pypi](https://img.shields.io/pypi/v/bard-cli)](https://pypi.org/project/bard-cli)
![](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fperrette%bard%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)

# Bard  <img src="bard_data/share/icon.png" width=48px>

Bard is a text to speech client that integrates on the desktop

Dependencies include:
- `openai`
- `pystray`
- `sounddevice`
- `soundfile`

## Install

```bash
pip install bard-cli
```

### GNOME

On GNOME desktop you can subsequently run:
```bash
scribe-install [...]
```
to produce a `.desktop` file for GNOME's quick-launch
(the `[...]` indicates any argument that `bard` takes)

## Usage

In a terminal:

```bash
bard
```
which defaults to:
```bash
bard --backend openaiapi --voice allow --model tts-1
```
(this assumes the environment variable `OPENAI_API_KEY` is defined)

An 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)
and send that to the AI model for reading aloud.

<img src=https://github.com/user-attachments/assets/a90ccd1c-7431-4554-9d41-0e9c1b4399f2 width=300px>

For testing you can also start the app with

```bash
bard --default-file /path/to/audio.mp3
```
