
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@humeai/voice-embed-react
Advanced tools
@humeai/voice-embed-react Integrate Hume's Empathic Voice Interface directly into your web application </
Integrate Hume's Empathic Voice Interface directly into your web application
This package enables you to integrate a widget that runs Hume's Empathic Voice Interface into your React application. It abstracts away the complexities of managing websocket connections, capturing user audio via the client's microphone, and handling the playback of the interface's audio responses. The widget is embedded into your web page through an iframe.
There are two packages needed to embed your own widget. Install this package to embed the widget to your application. Code for the widget itself can be found at https://github.com/HumeAI/empathic-voice-embed-renderer.
Before installing this package, please ensure your development environment meets the following requirement:
v18.0.0 or higher).To verify your Node.js version, run this command in your terminal:
node --version
If your Node.js version is below 18.0.0, update it to meet the requirement. For updating Node.js, visit Node.js' official site or use a version management tool like nvm for a more seamless upgrade process.
Add @humeai/voice-embed-react to your project by running this command in your project directory:
npm install @humeai/voice-embed-react
This will download and include the package in your project, making it ready for import and use within your React components.
import { EmbeddedVoice } from '@humeai/voice-embed-react';
Here's a simple example to get you started with the EmbeddedVoice component:
import React, { useState } from 'react';
import { EmbeddedVoice } from '@humeai/voice-embed-react';
function App() {
const apiKey = process.env.HUME_API_KEY || '';
const [isEmbedOpen, setIsEmbedOpen] = useState(false);
return (
<div>
<button onClick={() => setIsEmbedOpen(true)}>Open Widget</button>
<EmbeddedVoice
auth={{ type: 'apiKey', value: apiKey }}
onMessage={(msg) => console.log('Message received: ', msg)}
onClose={() => setIsEmbedOpen(false)}
isEmbedOpen={isEmbedOpen}
/>
</div>
);
}
Note: For integration within server components, instantiate EmbeddedVoice within a client component. For more information checkout the Next.js documentation on client components.
EmbeddedVoice accepts all props that are accepted by the VoiceProvider in the @humeai/voice-react package.
In addition, it accepts a few other props specific to creating a widget:
| Prop | Required | Description |
|---|---|---|
isEmbedOpen | yes | Determines the initial visibility of the widget. Assign true to render the widget as open on initial load, and false to start with the widget closed. While the widget's UI provides a trigger to toggle its visibility, this prop also enables external control over the widget's visibility state through a parent component. |
| rendererUrl | no | URL where the widget itself is hosted. If blank, this defaults the Hume AI widget, https://voice-widget.hume.ai. An example of this widget can be found at http://hume.ai. |
onMessage | no | Callback function to invoke upon receiving a message through the web socket. |
onClose | no | Callback function to invoke upon the web socket connection being closed. |
openOnMount | no | Boolean which indicates whether the widget should be initialized in an open or closed state. Set as true if you want it to be open. The default value is false. |
If you have questions or require assistance pertaining to this package, reach out to us on Discord!
FAQs
@humeai/voice-embed-react Integrate Hume's Empathic Voice Interface directly into your web application </
We found that @humeai/voice-embed-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.