Prerequisites
- A TruGen API key (get one here)
- A TruGen Agent ID (create and get one here)
- Node.js installed on your machine
- A modern web browser with microphone access
Project Setup
1
Install Dependencies
2
Set Up Project Structure
Create the following directory layout:
3
Add Your Credentials
Create a
.env file and add your API key and Agent ID:4
Create the Server
Create
server.js — this keeps your API key on the server and returns a session token to the browser:5
Create the HTML
Create
public/index.html:6
Run
http://localhost:3000 in your browser, allow microphone access when prompted, then click Connect.