Skip to main content

Interact with openAI API with voice

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bro_listen-0.2.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

bro_listen-0.2.0-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page