uneeq-js 3.6.8 → 3.6.10
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 +61 -7
- package/README.npm.md +15 -0
- package/dist/deepgram-stt.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/session.d.ts +2 -15
- package/dist/signaling.d.ts +1 -0
- package/dist/speech-recognition.d.ts +4 -3
- package/dist/types/SpeechHandlerOptions.d.ts +1 -0
- package/dist/types/SpeechRecognitionInterface.d.ts +2 -2
- package/dist/types/UneeqConfig.d.ts +2 -0
- package/package.json +1 -1
- package/dist/node_modules_ws_browser_js.index.js +0 -22
package/README.md
CHANGED
|
@@ -1,15 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DHOP Web SDK
|
|
2
|
+
This project is a web npm package used to connect to Uneeq's Digital Human Orchestration Platform (DHOP)
|
|
2
3
|
|
|
3
|
-
##
|
|
4
|
+
## Usage
|
|
5
|
+
#### Install dependencies:
|
|
6
|
+
`npm i`
|
|
7
|
+
|
|
8
|
+
#### Start:
|
|
9
|
+
`npm start`
|
|
10
|
+
|
|
11
|
+
#### Run Tests:
|
|
12
|
+
`npm test`
|
|
13
|
+
|
|
14
|
+
#### Local testing
|
|
15
|
+
|
|
16
|
+
See [./example/README.md](./example/README.md)
|
|
17
|
+
|
|
18
|
+
#### Local Development with Angular Apps
|
|
19
|
+
|
|
20
|
+
When developing uneeq-js alongside an Angular app (e.g., `hosted-experience`):
|
|
4
21
|
|
|
5
22
|
```bash
|
|
6
|
-
|
|
23
|
+
# From uneeq-js directory:
|
|
24
|
+
npm link
|
|
25
|
+
npm start # Runs in watch mode, auto-compiles changes
|
|
26
|
+
|
|
27
|
+
# From the consuming app (e.g., apps/hosted-experience):
|
|
28
|
+
npm link uneeq-js
|
|
29
|
+
npm start
|
|
7
30
|
```
|
|
8
31
|
|
|
9
|
-
|
|
32
|
+
Changes to uneeq-js are automatically picked up without restarting.
|
|
33
|
+
|
|
34
|
+
**Why this works:** Angular apps should configure `prebundle.exclude: ["uneeq-js"]` in `angular.json` to prevent caching during prebundling.
|
|
35
|
+
|
|
36
|
+
**Reverting to npm version:**
|
|
37
|
+
```bash
|
|
38
|
+
npm unlink uneeq-js
|
|
39
|
+
npm install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Lint
|
|
43
|
+
|
|
44
|
+
Eslint is used in this project and can be run with `npm run lint`. You may find it easier to install VSCode plugin `eslint` to see lint errors in editor. Additionally adding the following option to the plugin settings will fix errors on save:
|
|
45
|
+
|
|
46
|
+
`"editor.codeActionsOnSave": {
|
|
47
|
+
"source.fixAll.eslint": true
|
|
48
|
+
}`
|
|
49
|
+
|
|
50
|
+
#### Logging
|
|
51
|
+
A custom logger has been implemented using `pino` library. You can use it to log strings with values.
|
|
52
|
+
`Logger.info('Logging just a string')`
|
|
53
|
+
`Logger.info('Logging with value', { some: 'thing' })`
|
|
54
|
+
`Logger.info('Logging with multiple values', { some: 'thing' }, { another: 'thing' })`
|
|
55
|
+
|
|
56
|
+
There are multiple log levels which are defined in `src/types/LogLevels.ts`:
|
|
57
|
+
`Logger.debug('a debug log')`
|
|
58
|
+
`Logger.info('an info log')`
|
|
59
|
+
`Logger.warn('a warning log')`
|
|
60
|
+
`Logger.error('an error log')`
|
|
61
|
+
|
|
62
|
+
Logs will only be displayed if they are at or above the log level specified when initializing the Uneeq class via UneeqConfig. The default log level is 'info'.
|
|
10
63
|
|
|
11
|
-
|
|
64
|
+
Log messages will be prefixed with the string 'UneeQ: ' so that uneeq-js logs can be differentiated from client logs easily.
|
|
12
65
|
|
|
13
|
-
## Looking for Hosted Experience?
|
|
14
66
|
|
|
15
|
-
|
|
67
|
+
## Notes
|
|
68
|
+
#### onnxruntime-web
|
|
69
|
+
onnxruntime-web only works on version 1.15.1 at this time. Upgrading this package will likely break VAD funtionality.
|
package/README.npm.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# uneeq-js
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install uneeq-js
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
For direct SDK integration (build your own), see: https://docs.uneeq.io/unlisted
|
|
12
|
+
|
|
13
|
+
## Looking for Hosted Experience?
|
|
14
|
+
|
|
15
|
+
If you're looking for UneeQ's Hosted Experience, visit: https://docs.uneeq.io/hosted-experience
|
package/dist/deepgram-stt.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type Subject } from 'rxjs';
|
|
|
2
2
|
import { type UneeqMessage } from './types/UneeqMessages';
|
|
3
3
|
import { type DataChannelMessage } from './webrtc-data-channel/DataChannelMessage';
|
|
4
4
|
import { type PromptMetadata } from './types/PromptMetadata';
|
|
5
|
+
import { type SpeechRecognitionInterface } from './types/SpeechRecognitionInterface';
|
|
5
6
|
export interface DeepgramSTTOptions {
|
|
6
7
|
connectionUrl: string;
|
|
7
8
|
jwtToken: string;
|
|
@@ -21,11 +22,12 @@ export interface DeepgramSTTOptions {
|
|
|
21
22
|
echoCancellation?: boolean;
|
|
22
23
|
noiseSuppression?: boolean;
|
|
23
24
|
autoGainControl?: boolean;
|
|
25
|
+
microphoneDeviceId?: string;
|
|
24
26
|
promptMetadata: PromptMetadata;
|
|
25
27
|
messages: Subject<UneeqMessage>;
|
|
26
28
|
sendMessage: (msg: DataChannelMessage) => void;
|
|
27
29
|
}
|
|
28
|
-
export declare class DeepgramSTT {
|
|
30
|
+
export declare class DeepgramSTT implements SpeechRecognitionInterface {
|
|
29
31
|
private readonly options;
|
|
30
32
|
private connection;
|
|
31
33
|
private isConnected;
|