Files
local-voice-assistant/frontend
2025-10-09 22:32:04 +02:00
..
2025-10-09 10:12:45 +02:00
2025-10-09 09:49:59 +02:00
2025-10-09 10:12:45 +02:00
2025-10-09 22:32:04 +02:00
2025-10-08 16:37:49 +02:00
2025-10-09 22:32:04 +02:00
2025-10-09 22:32:04 +02:00
2025-10-08 16:37:49 +02:00
2025-10-08 16:37:49 +02:00
2025-10-08 16:37:49 +02:00
2025-10-08 12:56:56 +02:00
2025-10-08 16:37:49 +02:00
2025-10-08 16:37:49 +02:00

Frontend to test /chat endpoint. Uses the browser MediaRecorder API to record audio and POST to the middleware.

Run locally:

  1. Install dependencies
cd frontend
npm install
  1. Start dev server
npm run dev
  1. Open http://localhost:3000 in the browser and press/hold the record button. The app will POST the recorded audio to http://localhost:8000/chat and play the returned audio.

Notes:

  • This simple client posts a webm audio blob (from MediaRecorder). The backend must accept webm or you can adapt the client to encode WAV.
  • If the backend runs on a different origin make sure to enable CORS on the middleware (FastAPI) or run the frontend proxied.