Metadata-Version: 2.1
Name: bro-listen
Version: 0.1.0
Summary: Interact with openAI API with voice
Home-page: https://github.com/mikkac/bro_listen
License: MIT License (MIT)
Keywords: voice recognition,chat,transcription,vosk,openai
Author: Mikolaj Kaczmarek
Author-email: m.kaczmarek9@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: openai (>=0.25.0,<0.26.0)
Requires-Dist: pyttsx3 (>=2.90,<3.0)
Requires-Dist: rich (>=12.6.0,<13.0.0)
Requires-Dist: sounddevice (>=0.4.5,<0.5.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: vosk (>=0.3.45,<0.4.0)
Description-Content-Type: text/markdown

# bro, listen 🤖
Tool that allows for voice interaction with OpenAI chat without need to type long, detailed requests. <br>
It's an terminal application that captures audio from microphone and queries chat with transcripted message.

<p align="center">
  <img src="https://github.com/mikkac/bro_listen/blob/master/demo/bro_demo.gif" alt="animated" />
</p>


---
**Note:** Currently `text-davinci-003` model is used as a chat backend. Unfortunately API for chatGPT is not yet provided by OpenAI.


## Installation

`poetry` is required to install the package from the source code. You can get it [here](https://python-poetry.org/docs/)

Once `poetry` is enabled in the system, to install the project and its dependencies, execute following command:

```bash
git clone https://github.com/mikkac/bro_listen.git && cd bro_listen && poetry install
```

## Configuration

After installation, configuration file has to be provided.
Default location used by the application is `$HOME/.config/bro_listen/config.toml`. <br>
One can use the default [configuration file](https://github.com/mikkac/bro_listen/blob/master/src/bro_listen/config.toml). The only thing that needs to be provided is OpenAI API key that can be generated [here](https://beta.openai.com/account/api-keys).

### Configuration details

Application supports several configuration parameters.
* `voice_api` - Voice recognition API. Currently only `"vosk"` is supported, but it's planned to also enable usage of [Google Speech-To-Text](https://cloud.google.com/speech-to-text) and [Azure Speech to text](https://azure.microsoft.com/en-us/products/cognitive-services/speech-to-text/).
* `language` - language used by `voice_api`. Currently available languages are listed in [Vosk's documentation](https://github.com/alphacep/vosk-api).
* `enable_audio_response` - chat's responses are only written to console by default. However, it's possible to vocalize them by setting this parameter to `true`.
* `device_id` - ID of recording device. It should be commented out or completely removed from configuration if default device shall be used.

## Usage

Once configuration file has been provided, start the application with command:
```bash
poetry run bro_listen
```
or

```bash
poetry shell
bro_listen
```

## License

This project is licensed under the LICENSE file that [can be found here](https://github.com/mikkac/bro_listen/blob/master/LICENSE.md)
