Giter Club home page Giter Club logo

prophet's Introduction

prophet

prophet is a command-line application that allows you to have a conversation with ChatGPT - the newly released GPT-3 model from OpenAI - with your voice.

Video

This prophet application was presented in a video on The Sound of AI YouTube channel. You can watch it here:

Installation

To install prophet, you can use the following command:

poetry install

After installing poetry, run the following command:

python -m playwright install

This will install the required browser plugins that enable prophet to connect to ChatGPT via the revChatGPT library.

Dependencies

Python version

prophet requires Python 3.8.

revChatGPT

prophet uses the revChatGPT library to interact with the ChatGPT model.

You have to create a chatgptconfig.json file in the prophet directory and pass a field called session_token. This is the session token that you get from the ChatGPT website. To know how to do this, please check revChatGPT's wiki page.

Setting up Google Cloud Text-To-Speech

poetry uses Google Cloud Text-To-Speech to synthesise speech.

In order to be able to use this service, you should:

  • create an account on Google Cloud,
  • create a Cloud Platform project,
  • enable the Text-To-Speech API in the project
  • setup authentication
  • download a Json private key

pydub

prophet uses pydub to play back MP3 files. You need to install ffmpeg to be able to use MP3s with pydub.

On Debian-like machines, you can install ffmpeg with the following command:

$ sudo apt install ffmpeg

SpeechRecognition

prophet uses the SpeechRecognition library to convert your speech input to text. You need to install portaudio and its Python bindings (pyaudio) to be able to use SpeechRecognition.

Environment variables

The app uses an environment variable called GOOGLE_APPLICATION_CREDENTIALS to connect to Google Cloud Text-To-Speech safely.

In config.env, set GOOGLE_APPLICATION_CREDENTIALS to the path of the Json private key you previously downloaded while setting up the Google service.

Without this step, you won't be able to connect to Google Cloud Text-To-Speech, and the app will throw an error.

Usage

To run prophet, you can use the following command from the terminal:

$ prophet

Once you run this script, you'll be asked to log in to your OpenAI account. After logging in, you're good to go. Enjoy your convo with ChatGPT!

prophet's People

Contributors

musikalkemist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.