This chrome extension is an example implementation project which enables a user to capture a video on a web page, open a Web Socket connection, and send the captured frames through the Web Socket connection for realtime inference.
-
Clone the repo with
git clone origin https://github.com/HumeAI/hume-chrome-extension.git
-
Install dependencies with
npm i
-
Build project with
npm run build
-
Open Extensions (Manage Extensions) in Chrome Browser
-
Make sure "Development mode" is turned on (top right corner of the Manage Extensions dashboard)
-
Click the "Load unpacked" button and select
dist
folder generated by the build script in step 3
To make authenticated requests using Hume's Streaming API, open the extension's options page and input your API key. Click the Hume logo at the top to be navigated to the Hume Portal to get your account's API key, or click the "Get an API key" link to be navigated to the Hume Sign Up page to create an account.
To begin streaming open the popup and click the "Start" button. A WebSocket connection will be opened, and the video's frames will be captured and sent as base64 encoded image files for processing.
Clicking the pause button will close the socket and pause the video. Clicking the play button will open a new socket and resume streaming for inference results.
- This extension is not published to the Chrome Web Store.
- Pausing the video, or the video ending, will terminate the stream.
- The video which is processed will always be the first
<video>
element in the DOM