@humeai/voice-embed-react 0.1.10 → 0.1.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
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.
|
|
11
|
+
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.
|
|
12
12
|
|
|
13
|
-
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](https://github.com/HumeAI/empathic-voice-embed-renderer).
|
|
13
|
+
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](https://github.com/HumeAI/empathic-voice-embed-renderer).
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
@@ -76,13 +76,13 @@ function App() {
|
|
|
76
76
|
|
|
77
77
|
In addition, it accepts a few other props specific to creating a widget:
|
|
78
78
|
|
|
79
|
-
| Prop
|
|
80
|
-
|
|
|
81
|
-
| `isEmbedOpen`
|
|
82
|
-
| rendererUrl
|
|
83
|
-
| `onMessage`
|
|
84
|
-
| `onClose`
|
|
85
|
-
| `openOnMount`
|
|
79
|
+
| Prop | Required | Description |
|
|
80
|
+
| ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
81
|
+
| `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. |
|
|
82
|
+
| 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](http://hume.ai). |
|
|
83
|
+
| `onMessage` | no | Callback function to invoke upon receiving a message through the web socket. |
|
|
84
|
+
| `onClose` | no | Callback function to invoke upon the web socket connection being closed. |
|
|
85
|
+
| `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`. |
|
|
86
86
|
|
|
87
87
|
## Support
|
|
88
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humeai/voice-embed-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-dom": "^18.2.0",
|
|
23
|
-
"@humeai/voice-embed": "0.1.
|
|
23
|
+
"@humeai/voice-embed": "0.1.11-beta.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@testing-library/react": "^14.2.2",
|