Code Monkey home page Code Monkey logo

voice.ai's Introduction

Voice AI

Voice AI is a Python application that leverages the OpenAI's Whisper and GPT-3.5 APIs to convert speech into text and generate responses.

Features

  • Transcribes audio into text
  • Generates human-like text using the OpenAI GPT-3.5 model
  • Copies the AI response to clipboard

Requirements

  • Python 3.6+
  • OpenAI Python v0.27.0+
  • Packages: openai, pyaudio, pynput, clipboard, tkinter
  • A microphone to record audio
  • Install these packages using pip: pip install openai pyaudio pynput clipboard tkinter

Setup

  1. Clone the repository or download the code.
  2. Install the necessary Python packages if not already installed.
  3. Run the script with the command python your_script.py, replacing your_script.py with the name of the Python file you have this script saved in.

Usage

  1. Start the application.
  2. Enter your OpenAI API key in the "API Key" field.
  3. Enter a system message for the GPT-3.5 API in the "System Message" field. This will act as a prompt to guide the AI's responses.
  4. Set a push-to-talk key. This key will be used to start and stop recording. Make sure to choose a key that does not interfere with your system's hotkeys.
  5. Click the "Start" button to start the application. Once started, the input fields and the start button will be disabled.
  6. Press and hold the push-to-talk key to start recording. Release the key to stop recording.
  7. The application will then transcribe the recorded audio into text using the Whisper API, and then generate a response using the GPT-3.5 API.
  8. The transcript and the AI response will be displayed in the text area and the AI response will be copied to your clipboard.

Disclaimer

This might not work

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.