Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Voice Chat with OpenAI

A React TypeScript application that allows users to interact with OpenAI's GPT model using voice input. The application converts speech to text and displays the AI's response.

Features

  • Real-time speech-to-text conversion using Web Speech API
  • Integration with OpenAI's GPT-3.5 Turbo model
  • Modern React with TypeScript
  • Responsive and user-friendly interface
  • Error handling and status feedback

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • OpenAI API key
  • Modern web browser (Chrome or Edge recommended for best speech recognition support)

Setup

  1. Clone the repository:
git clone <repository-url>
cd voice-chat
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your OpenAI API key:
VITE_OPENAI_API_KEY=your_api_key_here
  1. Start the development server:
npm run dev

The application will be available at http://localhost:5173

Usage

  1. Click the "Start Listening" button
  2. Allow microphone access when prompted by your browser
  3. Speak your question or message
  4. The application will convert your speech to text and send it to OpenAI
  5. The AI's response will be displayed on the screen

Browser Support

The Web Speech API is best supported in:

  • Google Chrome
  • Microsoft Edge
  • Safari (limited support)

Technologies Used

  • React
  • TypeScript
  • Vite
  • OpenAI API
  • Web Speech API

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

πŸŽ™οΈ Voice-powered AI assistant using React, TypeScript & OpenAI GPT-3.5. Features real-time speech recognition via Web Speech API, instant AI responses, and responsive design. Built with React 19, TypeScript 5.8, Vite 6, OpenAI API.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages