Metadata-Version: 2.1
Name: jarvis_conversationalist
Version: 0.2.0
Summary: A voice assitant for the command line
Author-email: Elias Weston-Farber <eweston4@jhu.edu>
Project-URL: url, https://github.com/elias-jhsph/jarvis-conversationalist
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai-whisper==20231106
Requires-Dist: openai==1.2.3
Requires-Dist: chromadb<=0.4.15
Requires-Dist: soundfile==0.12.1
Requires-Dist: PyAudio==0.2.14
Requires-Dist: pydub==0.25.1
Requires-Dist: gtts==2.4.0
Requires-Dist: spacy==3.7.2
Requires-Dist: beautifulsoup4==4.12.2
Requires-Dist: googlesearch-python==1.2.3
Requires-Dist: tiktoken==0.5.1
Requires-Dist: geocoder==1.38.1
Requires-Dist: scrapy==2.11.0

# Jarvis Conversationalist

Jarvis Conversationalist is a Python-based project that provides a conversational interface using OpenAI's GPT-4 model. It uses text-to-speech and speech-to-text functionalities to facilitate a more interactive and engaging user experience.

## Features

- Real-time text-to-speech conversion: The application converts text responses from the GPT-4 model into speech, providing an auditory response to the user.
- Speech-to-text conversion: The application can convert spoken user input into text, which is then processed by the GPT-4 model.
- Multiprocessing and threading: The application uses Python's multiprocessing and threading capabilities to handle multiple tasks concurrently, ensuring smooth and responsive operation.
- Configurable: The application allows users to set their OpenAI API username and key, and also provides an option to reset these settings.

## Installation

This project requires Python 3.11 or later. For mac, install portaudio and then pip install the package:

```bash
brew install portaudio
pip install jarvis_conversationalist
```

## Usage

To start the application, run the `cli.py` script from the command line:

```bash
jarvis
```

You can interrupt the conversation by pressing "Enter". To quit the application, press "Esc" then "Enter".

## Configuration

You can set your OpenAI API username and key using the `--user` and `--key` command-line arguments, respectively:

```bash
jarvis --user YOUR_USERNAME --key YOUR_KEY
```

To reset the saved username and key, use the `--reset` command-line argument:

```bash
jarvis --reset
```

## Non Technical Installation Instructions

**Installing Jarvis Conversationalist on a Mac**\=

1\. Install Python:  
Jarvis Conversationalist requires Python 3.11 or later.  
Go to the Python official website and download the version 3.11 for Mac.
or just download this... 
[https://www.python.org/ftp/python/3.11.0/python-3.11.0-macos11.pkg](https://www.python.org/ftp/python/3.11.0/python-3.11.0-macos11.pkg)

Open the downloaded file and follow the installation instructions.  
  

2\. Install Homebrew (if you don't have it installed already):

In Terminal, type:

```bash
brew install portaudio
```

Then press Enter.

If that doesn't work then you need to install homebrew.

Homebrew is a package manager for Mac that simplifies the installation of software.  
Open the Terminal app on your Mac (you can find it in Applications > Utilities).  
Copy and paste the following command into Terminal and press Enter:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Follow the on-screen instructions to complete the installation.  
  

3\. Install Portaudio
Portaudio is needed for the audio functionalities of Jarvis.  
In Terminal, type:

```bash
brew install portaudio
```

Then press Enter.

  
4\. Install Jarvis Conversationalist:  
In Terminal, type:

```bash
pip3.11 install jarvis_conversational
```

Then press Enter.  
Wait for the installation to complete.
  
5\. Finding Your OpenAI API Key - Create Open an OpenAI Account:  
Visit OpenAI's website and sign up or log in. After logging in, navigate to the API section.
[https://platform.openai.com/api-keys](https://platform.openai.com/api-keys)


6\. Generate an API Key:  
In the API section, you should see an option to create a new API key.  
Follow the instructions to generate a new key.  
Once generated, make sure to copy and save your API key in a secure place.  
Using Jarvis Conversationalist  

7\. Start the Application:  
  
To set your OpenAI API username and key, use:  
```bash
jarvis --u= ser YOUR_USERNAME --key YOUR_KEY 
```
Replace YOUR_USERNAME and YOUR_KEY = with your actual OpenAI username and API key.  
After your first successful use go to terminal

```bash
jarvis
```

Then press Enter, to use Jarvis!  

8\. Updating Jarvis Conversationalist:

To update Jarvis Conversationalist, use:  
```bash
pip3.11 install --upgrade jarvis_conversationalist 
```

## Contributing

Contributions are welcome! Please feel free to submit a pull request.

## License

This project is licensed under the terms of the GPL 3 license.
