GithubHelp home page GithubHelp logo

lalitm14 / talk-2-chatgpt Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.06 MB

Code project to demonstrate setting up a simple app for having a conversation with OpenAI ChatpGPT innovation. The idea is to show that using simple APIs the interaction can ve multi-modal out-of-the-box

License: MIT License

Python 100.00%

talk-2-chatgpt's Introduction

Talk-2-ChatGPT

Purpose

Code project to demonstrate setting up a simple app for having a conversation with OpenAI ChatGPT innovation. The idea is to show that using available APIs a multi-modal interactive experience can be easily developed.

Description

This is a demonstration using a rudimentary application written in few lines of Python code to demonstrate the very human like conversation with the AI Language model is possible, in this case ChatGPT. The benefits maybe limitless including improved productivity and accessibility. The code itself has been developed using the GitHub Co-pilot, including the profuse comments to make the reading and understanding of this short code significantly more friendly. This is a short code, but this Co-pilot assisted coding and commenting is a huge productivity gain for developers. Saving their time to focus on the code logic and features, without sacrificing the readability and the ease of maintenance of the code itself.

Here is a short ~4 minutes video depicting the experience of talking to OpenAI ChatGPT model in a YouTube video [click on the picture below] :-

YouTube Video

Installation Steps

  1. Download the code to your Windows Device
  2. Ensure your Windows device is setup for running the Python .py program file
  3. Launch the "talk-2-chatgpt.py" program file.
  4. Click on the local http:// URL that this program provides, which may take a few seconds.

Using the App

  1. Click on recording button.
  2. Record your query.
  3. Stop recording.
  4. Submit recording.

Workflow system design of this use case

The Program GUI will capture your speech query. It stores this speech in a audio file locally on your windows device. The program will send this audio file to OpenAI Wisper API for using the speech-to-text conversation AI model services. Upon receiving this converted response from the Wisper AI model, this program will store the message in a message array. The aggregated array members together will form the input prompt that this program will not send to the OpenAI ChatGPT-n model. The response received from the ChatGPT-n model is appended to the same message array referred to in the previous sentences. This progressively aggregating conversation enables ChatGPT to main the all-important context of the on-going conversation. Additionally, the immediate response is converted back to speech using google GTTS (Google-text-to-speech) library and read back to the user through the Windows device speaker. Also the entire prompt text that is progressively growing is printed in the app on the text box on the right for user reading reference. The System diagram for this system is shown in the schematic below.

YOUR-ALT-TEXT

talk-2-chatgpt's People

Contributors

lalitm14 avatar

Stargazers

 avatar  avatar

Watchers

 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.