CoolFace
Apppublic

lukerocks78/coaching-v-4

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

Cursor Coaching App

A voice assistant web app using OpenAI's Realtime API. This app allows real-time voice interaction with an AI assistant.

Features

  • —Real-time voice input processing
  • —OpenAI-powered responses
  • —Clean web interface
  • —Express.js backend

Usage

  1. 1.Allow microphone access when prompted
  2. 2.Start speaking to interact with the AI assistant
  3. 3.View responses in real-time

Prerequisites

  • —Node.js installed on your system
  • —An OpenAI API key with access to the Realtime API
  • —A modern web browser that supports WebRTC

Setup

  1. 1.Clone this repository
  2. 2.Install dependencies:
bash
   npm install
  1. 1.Create a .env file in the root directory with your OpenAI API key:
   OPENAI_API_KEY=your_api_key_here

Running the App

  1. 1.Start the server:
bash
   npm start
  1. 1.Open your web browser and navigate to http://localhost:3000
  2. 2.Click the microphone button to start a conversation
  3. 3.Speak naturally - the voice assistant will respond both with voice and text

Usage

  • —Click the microphone button once to connect and start recording
  • —Click again to stop recording
  • —The conversation history will be displayed in the chat window
  • —The status indicator will show the current state (connecting, listening, processing, etc.)

Technical Details

  • —Uses WebRTC for real-time audio streaming
  • —Implements voice activity detection for natural conversation flow
  • —Uses ephemeral tokens for secure client-side connections
  • —Built with Express.js for the backend server
  • —Pure JavaScript frontend with no additional frameworks

Security Notes

  • —The app uses ephemeral tokens for client-side API access
  • —Your OpenAI API key is only used server-side
  • —All communication with OpenAI is done over HTTPS