Giter Club home page Giter Club logo

verbiage-gpt's Introduction

Sample

verbiage-gpt

verbiage-gpt is a quick script to enable a console-style interface for relaying the following flow:

  1. Speak some surrounding flavor into your configured microphone for the script to process.
  2. Script extracts text from your speech and passes that to ChatGPT.
  3. ChatGPT generates a response from your flavor plus added character-specific context [configured beforehand.]
  4. The ChatGPT response is sent to Elevenlabs for audio processing using an AI voice.
  5. The vocalized response from Elevenlabs is relayed back & played locally.

Sample Use Case

This is something that can be used to toy around with personally or even use in a wider setting, such as with friends or streaming via Twitch/YouTube.

(This utility essentially mimics DougDoug's setup for doing the same thing on some of his livestreams during gameplay.)

For example:

  • You've decided to play Skyrim with a modded Geralt follower.
  • You can configure a mock-Geralt voice in Elevenlabs by using personal-use copycat samples.
  • You provide the necessary keys & setup values in your own config.json spun out from the config_template.json reference in the repo.
  • You run the script and are then able to ask "Geralt" questions via voice, such as where he'd like to go next.
  • The mock voice speaking ChatGPT's response is relayed back, allowing Geralt to respond back to you with where he'd like to head to next in Skyrim.

Installation

Just clone the project here locally & install the required libraries using pip install -r requirements.txt. Then, configure a config.json file filled out with:

  • A working Open AI API key.
  • A working Elevenlabs API key.
  • Add the name of the voice configured in Elevenlabs.
  • Add context info for the character you're interacting with.

Usage

python main.py -f config.json

Note: keyboard for using a key to trigger the microphone recording & cut-off seems to need admin access, so running as admin / via sudo is necessary.

The Laundry List

  • Store some added context locally or via Pinecone so that a proper memory with the GPT agent is established.
  • More to come...

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.