Skip to content

mikkac/bro_listen

Repository files navigation

bro, listen 🤖

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

animated


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

Installation

Via PyPI

To install bro_listen package via PyPI, execute following command:

pip install bro-listen

Note: Consider creating a separate virtual environment if you want to avoid polluting system with dependencies of bro_listen package.

From source

poetry is required to install the package from the source code. You can get it here

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

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.
One can use the default configuration file. The only thing that needs to be provided is OpenAI API key that can be generated here.

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 and Azure Speech to text.
  • language - language used by voice_api. Currently available languages are listed in Vosk's documentation.
  • 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

If package has been installed via PyPI, run following command:

bro_listen

If it was installed from source, start the application with command:

poetry run bro_listen

or

poetry shell
bro_listen

License

This project is licensed under the LICENSE file that can be found here

About

Interact with openAI's GPT API via voice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages