uneeq-js 2.55.0 → 3.0.16-preview.8

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.
Files changed (83) hide show
  1. package/README.md +41 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +614 -2
  4. package/dist/lib/api/api.d.ts +6 -0
  5. package/dist/lib/logConfig.d.ts +5 -0
  6. package/dist/lib/logger.d.ts +12 -0
  7. package/dist/session.d.ts +19 -0
  8. package/dist/session.spec.d.ts +1 -0
  9. package/dist/signaling.d.ts +16 -0
  10. package/dist/{src/service/speech-handler.d.ts → speech-recognition.d.ts} +8 -18
  11. package/dist/types/CreateSessionResponse.d.ts +4 -0
  12. package/dist/types/DataChannelMessage.d.ts +5 -0
  13. package/dist/types/LogLevel.d.ts +8 -0
  14. package/dist/types/SignalingEvents.d.ts +16 -0
  15. package/dist/{src/types → types}/SpeechHandlerOptions.d.ts +0 -7
  16. package/dist/{src/types → types}/SpeechRecognitionStartMessage.d.ts +0 -1
  17. package/dist/types/UneeqConfig.d.ts +15 -0
  18. package/dist/{src/types/MessageTypes.d.ts → types/UneeqMessages.d.ts} +6 -43
  19. package/dist/uneeq.d.ts +15 -0
  20. package/dist/webrtc-data-channel/ChatPrompt.d.ts +7 -0
  21. package/dist/webrtc-data-channel/DataChannelAction.d.ts +5 -0
  22. package/dist/webrtc-data-channel/DataChannelActionType.d.ts +3 -0
  23. package/dist/webrtc-data-channel/DataChannelMessage.d.ts +4 -0
  24. package/dist/webrtc-data-channel/chat-prompt.d.ts +7 -0
  25. package/dist/webrtc-data-channel/data-channel-action-type.d.ts +3 -0
  26. package/dist/webrtc-data-channel/data-channel-action.d.ts +5 -0
  27. package/dist/webrtc-data-channel/data-channel-message.d.ts +4 -0
  28. package/package.json +30 -51
  29. package/dist/index.js.LICENSE.txt +0 -29
  30. package/dist/src/index.d.ts +0 -5
  31. package/dist/src/lib/media-utils.d.ts +0 -4
  32. package/dist/src/lib/soundmeter.d.ts +0 -13
  33. package/dist/src/lib/videoeditor.d.ts +0 -4
  34. package/dist/src/service/api.d.ts +0 -39
  35. package/dist/src/service/canvas-service.d.ts +0 -11
  36. package/dist/src/service/device-manager.d.ts +0 -46
  37. package/dist/src/service/digital-human-video-play-manager.d.ts +0 -13
  38. package/dist/src/service/locale-detector.d.ts +0 -14
  39. package/dist/src/service/logger.d.ts +0 -23
  40. package/dist/src/service/media-handler.d.ts +0 -26
  41. package/dist/src/service/message-handler.d.ts +0 -14
  42. package/dist/src/service/messaging/index.d.ts +0 -6
  43. package/dist/src/service/messaging/message.d.ts +0 -3
  44. package/dist/src/service/messaging/messaging-client.d.ts +0 -4
  45. package/dist/src/service/messaging/messaging-options.d.ts +0 -22
  46. package/dist/src/service/messaging/messaging-service.d.ts +0 -21
  47. package/dist/src/service/messaging/messaging-state.d.ts +0 -5
  48. package/dist/src/service/metrics-service.d.ts +0 -13
  49. package/dist/src/service/online-status-service.d.ts +0 -12
  50. package/dist/src/service/prom.d.ts +0 -38
  51. package/dist/src/service/resume-session-check.d.ts +0 -6
  52. package/dist/src/service/stream-manager.d.ts +0 -13
  53. package/dist/src/service/uneeq-local-storage.d.ts +0 -9
  54. package/dist/src/service/uneeq-webrtc.d.ts +0 -66
  55. package/dist/src/service/voice-input-manager.d.ts +0 -35
  56. package/dist/src/types/AvatarAvailableCountResponse.d.ts +0 -3
  57. package/dist/src/types/ChatMetadata.d.ts +0 -9
  58. package/dist/src/types/ClientPerformanceStats.d.ts +0 -16
  59. package/dist/src/types/Devices.d.ts +0 -5
  60. package/dist/src/types/FaceMeMessage.d.ts +0 -3
  61. package/dist/src/types/LogoDimensions.d.ts +0 -6
  62. package/dist/src/types/LogoMargin.d.ts +0 -5
  63. package/dist/src/types/MediaUnavailableRequest.d.ts +0 -5
  64. package/dist/src/types/NewSessionRequest.d.ts +0 -19
  65. package/dist/src/types/NewSessionResponse.d.ts +0 -15
  66. package/dist/src/types/PersonaStartRequest.d.ts +0 -7
  67. package/dist/src/types/PublishSubscribeState.d.ts +0 -6
  68. package/dist/src/types/ResumeSessionCheckResponse.d.ts +0 -4
  69. package/dist/src/types/SourceApp.d.ts +0 -7
  70. package/dist/src/types/UneeqOptions.d.ts +0 -108
  71. package/dist/src/types/VoiceInputMode.d.ts +0 -5
  72. package/dist/src/types/types.d.ts +0 -2
  73. package/dist/src/typings.d.ts +0 -4
  74. package/dist/src/uneeq.d.ts +0 -180
  75. package/dist/umd/index.js +0 -52625
  76. package/readme.md +0 -276
  77. /package/dist/{src/lib → lib}/vad/frame-processor.d.ts +0 -0
  78. /package/dist/{src/lib → lib}/vad/messages.d.ts +0 -0
  79. /package/dist/{src/lib → lib}/vad/models.d.ts +0 -0
  80. /package/dist/{src/lib → lib}/vad/real-time-vad.d.ts +0 -0
  81. /package/dist/{src/types → types}/SpeechRecognitionMessageAction.d.ts +0 -0
  82. /package/dist/{src/types → types}/SpeechRecognitionStopMessage.d.ts +0 -0
  83. /package/dist/{src/types → types}/SpeechTranscriptionResult.d.ts +0 -0
@@ -1,13 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- export declare class DigitalHumanVideoPlayManager {
3
- private messages;
4
- private publicUnmuteDigitalHumanMethod;
5
- private video;
6
- private remoteVideoPlayCount;
7
- constructor(messages: Subject<any>, publicUnmuteDigitalHumanMethod: () => void);
8
- play(video: HTMLVideoElement): void;
9
- unmuteVideo(): void;
10
- private playRemoteVideo;
11
- private digitalHumanFailedToPlayUnmuted;
12
- private playRemoteVideoWithExponentialBackoff;
13
- }
@@ -1,14 +0,0 @@
1
- import { UneeqOptions } from '../types/types';
2
- export declare class LocaleDetector {
3
- /**
4
- * Validates that one or more colon-separated locales is supplied
5
- * If none supplied, detects the user's browser language preferences
6
- *
7
- * @param UneeqOptions
8
- * @returns a colon separated string of locales (language tags)
9
- */
10
- static validateOrDetectSpeechLocales(options: UneeqOptions): string;
11
- private static defaultLocale;
12
- private static localeMappings;
13
- private static sttSupportedLocales;
14
- }
@@ -1,23 +0,0 @@
1
- interface LoggerInterface {
2
- debug(primaryMessage: string, ...supportingData: any[]): void;
3
- warn(primaryMessage: string, ...supportingData: any[]): void;
4
- error(primaryMessage: string, ...supportingData: any[]): void;
5
- log(primaryMessage: string, ...supportingData: any[]): void;
6
- }
7
- export declare enum LogType {
8
- debug = "debug",
9
- log = "log",
10
- warn = "warn",
11
- error = "error"
12
- }
13
- export declare class Logger implements LoggerInterface {
14
- enabled: boolean;
15
- constructor();
16
- log(msg: string, ...supportingDetails: any[]): void;
17
- warn(msg: string, ...supportingDetails: any[]): void;
18
- error(msg: string, ...supportingDetails: any[]): void;
19
- debug(msg: string, ...supportingDetails: any[]): void;
20
- private emitLogMessage;
21
- }
22
- export declare const logger: Logger;
23
- export {};
@@ -1,26 +0,0 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import { PublishSubscribeState } from '../types/PublishSubscribeState';
3
- import { DeviceManagerOptions } from './device-manager';
4
- export declare class MediaHandler {
5
- private options;
6
- private remoteVideoReady;
7
- remoteStream$: BehaviorSubject<any>;
8
- avatarVideoElement: HTMLVideoElement;
9
- localStream$: BehaviorSubject<any>;
10
- publishState$: BehaviorSubject<PublishSubscribeState>;
11
- localVideoElement: HTMLVideoElement;
12
- publishingStream: boolean;
13
- private webRTC?;
14
- constructor(options: DeviceManagerOptions, remoteVideoReady: () => void);
15
- setEdgeNodeId(edgeNodeId: string): void;
16
- unpublishVideo(): void;
17
- pause(): void;
18
- resume(): void;
19
- stopAllLocalStreams(): void;
20
- endSession(): void;
21
- sendDataMessage(msg: string): void;
22
- gatherWebRTCStats(callback: any): void;
23
- private publishVideo;
24
- private performWebRTCConnection;
25
- private initTransparentBackground;
26
- }
@@ -1,14 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { DeviceManager } from './device-manager';
3
- export declare class MessageHandler {
4
- private internalMessages$;
5
- private messages;
6
- private deviceManager;
7
- constructor(internalMessages$: Subject<any>, messages: Subject<any>);
8
- setDeviceManager(deviceManager: DeviceManager): void;
9
- /**
10
- * Returns an observable you can subscribe to in order to handle messages
11
- * @param faceMeMessageType The message type you want to handle
12
- */
13
- private getMessagesOfType;
14
- }
@@ -1,6 +0,0 @@
1
- import { Message } from './message';
2
- import { MessagingClient } from './messaging-client';
3
- import { MessagingOptions } from './messaging-options';
4
- import { MessagingService } from './messaging-service';
5
- import { MessagingState } from './messaging-state';
6
- export { MessagingService, MessagingClient, MessagingOptions, MessagingState, Message };
@@ -1,3 +0,0 @@
1
- export interface Message {
2
- body: any;
3
- }
@@ -1,4 +0,0 @@
1
- export interface MessagingClient {
2
- _subscribe: () => void;
3
- dumpSubscriptions: () => void;
4
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * MessagingOptions
3
- * onDisconnect = Function to call on disconnect
4
- * onConnect = Function to call on connect
5
- * onReconnect = Function to call for each reconnect
6
- * autoReconnect = Whether to automatically reconnect.
7
- * reconnectTime = The time to wait before reconnecting
8
- * maxReconnectAttempts = Maximum amount of reconnection attempts before manual reconnection required.
9
- * maxReconnectLimitReached = Function to call when maximum automatic reconnect limit reached.
10
- * connectionHeaders = Any additional headers for the connection.
11
- */
12
- interface MessagingOptions {
13
- onDisconnect?: () => void;
14
- onConnect?: () => void;
15
- onReconnect?: () => void;
16
- autoReconnect?: boolean;
17
- reconnectTime?: number;
18
- maxReconnectAttempts?: number;
19
- connectionHeaders?: any;
20
- maxReconnectLimitReached?: () => void;
21
- }
22
- export { MessagingOptions };
@@ -1,21 +0,0 @@
1
- import { BehaviorSubject, Subject } from 'rxjs';
2
- import { Message } from './message';
3
- import { MessagingOptions } from './messaging-options';
4
- import { MessagingState } from './messaging-state';
5
- export declare class MessagingService {
6
- state$: BehaviorSubject<MessagingState>;
7
- messages$: Subject<Message>;
8
- private url;
9
- private readonly options;
10
- private stompClient;
11
- private connectionAttempts;
12
- private subscriptions;
13
- constructor(url: string, _options: MessagingOptions);
14
- connect(): void;
15
- disconnect(): void;
16
- send(endpoint: string, message: any): void;
17
- getTopic(topic: string): Subject<any>;
18
- private onStompConnected;
19
- private onStompClientConnectionClosed;
20
- private initMessagingSubscription;
21
- }
@@ -1,5 +0,0 @@
1
- export declare enum MessagingState {
2
- DISCONNECTED = 0,
3
- CONNECTING = 1,
4
- CONNECTED = 2
5
- }
@@ -1,13 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { UneeqOptions } from '..';
3
- export declare class MetricsService {
4
- private uneeqOptions;
5
- private internalMessages;
6
- private messages;
7
- private clientPerformanceStats;
8
- private options;
9
- private internalMessages$;
10
- private messages$;
11
- constructor(uneeqOptions: UneeqOptions, internalMessages: Subject<any>, messages: Subject<any>);
12
- parseAndLogWebRtcStats(stats: any): void;
13
- }
@@ -1,12 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- export declare class OnlineStatusService {
3
- private messages;
4
- private offlineTimeoutLimitHandler;
5
- online: boolean;
6
- private offlineDisconnectTimeLimitMS;
7
- private disconnectTimer;
8
- constructor(messages: Subject<any>, offlineTimeoutLimitHandler: () => void);
9
- private handleOffline;
10
- private handleOnline;
11
- private sendStatusUpdate;
12
- }
@@ -1,38 +0,0 @@
1
- import { Counter } from 'promjs/counter';
2
- import { Histogram } from 'promjs/histogram';
3
- import { Registry } from 'promjs/registry';
4
- export declare enum PromMessageType {
5
- SessionStart = 0,
6
- WebRtcPerformance = 1,
7
- AvailabilityCheck = 2,
8
- QuestionMessageReceived = 3,
9
- AnswerMessageReceived = 4,
10
- SessionEnded = 5
11
- }
12
- export interface PromMessage {
13
- type: PromMessageType;
14
- labels?: any;
15
- value?: any;
16
- }
17
- export declare class Prom {
18
- private apiUrl;
19
- prom_prefix: string;
20
- registry: Registry;
21
- messageTimings: any;
22
- metricsPushedCounter: Counter;
23
- sessionStartTime: Histogram;
24
- availabilityCheckTime: Histogram;
25
- webRtcInboundRTT: Histogram;
26
- webRtcInboundFramesPerSec: Histogram;
27
- webRtcInboundPacketsLost: Histogram;
28
- webRtcFramesDropped: Histogram;
29
- webRtcFrameHeight: Histogram;
30
- webRtcFrameWidth: Histogram;
31
- conversationRoundTripTime: Histogram;
32
- private metricsIntervalId;
33
- constructor(apiUrl: string);
34
- handleMessage(msg: PromMessage): void;
35
- calculateConversationRtt(msg: PromMessage): number;
36
- sendMetrics(): void;
37
- private stopSendingMetrics;
38
- }
@@ -1,6 +0,0 @@
1
- import { ResumeSessionCheckResponse } from '../types/ResumeSessionCheckResponse';
2
- import { UneeqOptions } from '../types/UneeqOptions';
3
- export declare class ResumeSessionCheck {
4
- static validate(options: UneeqOptions): ResumeSessionCheckResponse;
5
- static browserTabIsActive(): boolean;
6
- }
@@ -1,13 +0,0 @@
1
- export declare class StreamManager {
2
- private readonly silentAudioTrack;
3
- private readonly canvasVideoTrack;
4
- private audioContextInstance?;
5
- private audioSourceNode?;
6
- private audioSourceDestination?;
7
- constructor();
8
- addCanvasVideoTrackToStream(stream: MediaStream): MediaStream;
9
- addSilentAudioTrackToStream(stream: MediaStream): MediaStream;
10
- resumeAudioContext(): void;
11
- private generateCanvasVideoTrack;
12
- private generateSilentAudioTrack;
13
- }
@@ -1,9 +0,0 @@
1
- export declare class UneeqLocalStorage {
2
- private localStorageAvailable?;
3
- constructor();
4
- get available(): boolean;
5
- setItemSafely(key: string, value: string): void;
6
- getItemSafely(key: string): any;
7
- removeItemSafely(key: string): void;
8
- private checkIfLocalStorageAvailable;
9
- }
@@ -1,66 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { UneeqMessage } from '..';
3
- import { MessagingService } from './messaging';
4
- /**
5
- * Uneeq WebRTC implementation which hides the complexity of making a WebRTC call.
6
- */
7
- export declare class UneeqWebRTC {
8
- private client;
9
- private readonly uniqueId;
10
- private readonly options;
11
- private readonly fakeDataChannel;
12
- private statTimer?;
13
- private readonly MESSAGING_ENDPOINT;
14
- constructor(options: UneeqWebRTCOptions);
15
- /**
16
- * Start a connection with the given streams.
17
- */
18
- connect(stream: MediaStream): void;
19
- /**
20
- * Close the connection.
21
- */
22
- close(): void;
23
- /**
24
- * Handle the WebRTC answer message
25
- * @return boolean true if we handled this
26
- */
27
- handleAnswerMessage(msg: any): boolean;
28
- /**
29
- * Handle the ice candidate message.
30
- * @return boolean true if we handled this
31
- */
32
- handleIceCandidate(msg: any): boolean;
33
- sendDataMessage(message: string): void;
34
- getStats(callback: any): any;
35
- updateStreamTracks(stream: MediaStream): void;
36
- private onStats;
37
- private enableDiagnostics;
38
- private isMessageForUs;
39
- /**
40
- * Log a message to the console. This will prepend our UneeqWebRTC prefix.
41
- */
42
- private log;
43
- /**
44
- * Log a message to the console as a warning. This will prepend our UneeqWebRTC prefix.
45
- */
46
- private warn;
47
- }
48
- /**
49
- * The options for the WebRTC class.
50
- * Note: this isn't an interface so that we can have default values.
51
- */
52
- export interface UneeqWebRTCOptions {
53
- messaging: MessagingService;
54
- userMessages: Subject<UneeqMessage>;
55
- edgeNodeId: string;
56
- publishStreamName: string;
57
- subscribeStreamName: string;
58
- iceServers?: RTCIceServer[];
59
- forceTurnServerUse?: boolean;
60
- diagnostics?: boolean;
61
- onAddStream?: (stream: any) => void;
62
- onConnect?: () => void;
63
- onData?: (data: any) => void;
64
- onClose?: () => void;
65
- onError?: (error: any) => void;
66
- }
@@ -1,35 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { UneeqOptions } from '../types/UneeqOptions';
3
- import { VoiceInputMode } from '../types/VoiceInputMode';
4
- import { API } from './api';
5
- export declare class VoiceInputManager {
6
- private options;
7
- private api;
8
- private messages;
9
- private enableMicrophone;
10
- private readonly microphoneEngageVolume;
11
- private readonly microphoneDisengageVolume;
12
- private readonly voiceActivityNotSpeakingTimeoutMS;
13
- private readonly voiceActivityAllowInterruptions;
14
- private soundMeter;
15
- private audioContext;
16
- private digitalHumanSpeaking;
17
- private recording;
18
- private silenceTimeout?;
19
- private stream?;
20
- constructor(options: UneeqOptions, api: API, messages: Subject<any>, enableMicrophone: (enabled: boolean) => void);
21
- setVoiceInputMode(mode: VoiceInputMode | string): void;
22
- startRecording(): void;
23
- stopRecording(): void;
24
- handleSessionEnd(): void;
25
- resumeAudioContext(): void;
26
- initMicActivity(stream: MediaStream): void;
27
- private audioContextNotSupported;
28
- private handleAppMessages;
29
- private requestNotSupportedInVoiceActivityMode;
30
- private apiStartRecording;
31
- private apiStopRecording;
32
- private micActivityConnected;
33
- private handleVoiceActivity;
34
- private clearSilenceTimeout;
35
- }
@@ -1,3 +0,0 @@
1
- export interface AvatarAvailableCountResponse {
2
- available: number;
3
- }
@@ -1,9 +0,0 @@
1
- export interface ChatMetadata {
2
- userSpokenLocale?: string;
3
- browserDetectedLocales?: string;
4
- userTimezone?: string;
5
- userScreenWidth?: number;
6
- userScreenHeight?: number;
7
- userAgent?: string;
8
- custom?: string;
9
- }
@@ -1,16 +0,0 @@
1
- export interface ClientPerformanceStats {
2
- inboundRoundTripTime?: ClientPerformanceStat;
3
- inboundNewPacketsLost?: ClientPerformanceStat;
4
- inboundTotalPacketsLost?: ClientPerformanceStat;
5
- outboundQualityLimitationReason?: ClientPerformanceStat;
6
- newFramesDropped?: ClientPerformanceStat;
7
- totalFramesDropped?: ClientPerformanceStat;
8
- framesPerSec?: ClientPerformanceStat;
9
- frameHeight?: ClientPerformanceStat;
10
- frameWidth?: ClientPerformanceStat;
11
- }
12
- export declare class ClientPerformanceStat {
13
- readonly label: string;
14
- readonly value: any;
15
- constructor(label?: string, value?: any);
16
- }
@@ -1,5 +0,0 @@
1
- export interface Devices {
2
- audioInput: MediaDeviceInfo[];
3
- audioOutput: MediaDeviceInfo[];
4
- videoInput: MediaDeviceInfo[];
5
- }
@@ -1,3 +0,0 @@
1
- export interface FaceMeMessage {
2
- faceMeMessageType: string;
3
- }
@@ -1,6 +0,0 @@
1
- export interface LogoDimensions {
2
- width: number;
3
- height: number;
4
- dx: number;
5
- dy: number;
6
- }
@@ -1,5 +0,0 @@
1
- export interface LogoMargin {
2
- left: number;
3
- top: number;
4
- bottom: number;
5
- }
@@ -1,5 +0,0 @@
1
- export interface MediaUnavailableRequest {
2
- audioInputs: number;
3
- videoInputs: number;
4
- hasUserDeniedPermission: boolean;
5
- }
@@ -1,19 +0,0 @@
1
- export interface NewSessionRequest {
2
- sessionType: SessionType;
3
- workspaceName: string;
4
- customData?: NewSessionCustomData;
5
- sdkVersion: string;
6
- tokenId?: string;
7
- clientWidth?: number;
8
- clientHeight?: number;
9
- resumeSessionId?: string;
10
- }
11
- interface NewSessionCustomData {
12
- additionalProp1: string;
13
- additionalProp2: string;
14
- additionalProp3: string;
15
- }
16
- export declare enum SessionType {
17
- WEB = 0
18
- }
19
- export {};
@@ -1,15 +0,0 @@
1
- export interface NewSessionResponse {
2
- avatarStreamId: string;
3
- enableWebRTC: true;
4
- forceTurnServerUse: true;
5
- id: string;
6
- name: string;
7
- sensitiveData: true;
8
- streamId: string;
9
- turnServerAddresses: string[];
10
- turnUsername: string;
11
- turnPassword: string;
12
- edgeNodeId?: string;
13
- sourceApp?: string;
14
- showUneeqLogo: boolean;
15
- }
@@ -1,7 +0,0 @@
1
- export interface PersonaStartRequest {
2
- enableTransparentBackground?: boolean;
3
- resumeSession?: boolean;
4
- backgroundImageUrl?: string;
5
- nameTagImageUrl?: string;
6
- speechToTextLocales?: string;
7
- }
@@ -1,6 +0,0 @@
1
- export declare enum PublishSubscribeState {
2
- DISCONNECTED = "DISCONNECTED",
3
- CONNECTING = "CONNECTING",
4
- CONNECTED = "CONNECTED",
5
- FAILED = "FAILED"
6
- }
@@ -1,4 +0,0 @@
1
- export interface ResumeSessionCheckResponse {
2
- resumeSession: boolean;
3
- resumeSessionId?: string;
4
- }
@@ -1,7 +0,0 @@
1
- export declare enum SourceApp {
2
- HOSTED_EXPERIENCE = "HOSTED_EXPERIENCE",
3
- SHOWCASE = "SHOWCASE",
4
- SPLIT_SCREEN = "SPLIT_SCREEN",
5
- INTERACTIONS = "INTERACTIONS",
6
- UNKNOWN = "UNKNOWN"
7
- }
@@ -1,108 +0,0 @@
1
- import { VoiceInputMode } from './VoiceInputMode';
2
- export interface UneeqOptions {
3
- /** Server URL to connect to. */
4
- url: string;
5
- /** The API Key to access the Uneeq service. */
6
- apiKey?: string;
7
- /** The div element that the avatars video should be placed inside. */
8
- avatarVideoContainerElement: HTMLDivElement;
9
- /** The div element that the local video should be placed inside. */
10
- localVideoContainerElement: HTMLDivElement;
11
- /** Uneeq conversation ID to use for the session. */
12
- conversationId: string;
13
- /**
14
- * @ignore
15
- */
16
- customData?: any;
17
- /** Provide a function to be used for message handler call backs. */
18
- messageHandler?: (msg: any) => void;
19
- /** Whether you want to receive mic activity messages or not. Default value is false. */
20
- micActivityMessages?: boolean;
21
- /** Device ID of the preferred microphone to start the session with. */
22
- preferredMicrophoneId?: string;
23
- /** Device ID of the preferred camera to start the session with. */
24
- preferredCameraId?: string;
25
- /** Device ID of the preferred speaker to start the session with. */
26
- preferredSpeakerId?: string;
27
- /** Enable Logging. Default value is false. */
28
- logging?: boolean;
29
- /** Play Welcome Message. Default value is false. */
30
- playWelcome?: boolean;
31
- /** Enable diagnostic callbacks. Default value is false. */
32
- diagnostics?: boolean;
33
- /** Whether the users local video stream (camera) should be sent on session start. Default value is true. */
34
- sendLocalVideo?: boolean;
35
- /** Whether the users local audio stream (microphone) should be sent on session start. Default value is true. */
36
- sendLocalAudio?: boolean;
37
- /**
38
- * This option controls the visibility of client-side network performance messages in the developer console.
39
- * These WebRTC statistics (eg packetsLost, framesDropped, framesPerSec) help identify if session quality is being
40
- * impacted by client-side conditions.
41
- * Irrespective of this visibility setting, UneeQ's servers receive these messages to help measure platform
42
- * performance and stability for end users.
43
- */
44
- enableClientPerformanceMessage?: boolean;
45
- /**
46
- * This option controls whether the Digital Human is rendered with a transparent background,
47
- * allowing them to be overlaid on top of your experience.
48
- * If true, the digital human's configured background image will be replaced with a transparent background.
49
- * If false, your configured background image will be displayed. Defaults to false.
50
- */
51
- enableTransparentBackground?: boolean;
52
- /**
53
- * This option specifies what the default voice input mode will be.
54
- */
55
- voiceInputMode: VoiceInputMode | string;
56
- /**
57
- * This option specifies whether VAD should be used when voiceInputMode is set to SPEECH_RECOGNITION.
58
- * If set to false, then pauseSpeechRecognition and resumeSpeechRecognition must be called to capture the users audio.
59
- * If set to true, or omitted, then the users audio will be captured automatically.
60
- */
61
- enableVad?: boolean;
62
- /**
63
- * Resume user session if available.
64
- */
65
- resumeSession?: boolean;
66
- /**
67
- * This option specifies the URL of the background image to be used when the digital human is rendered.
68
- */
69
- backgroundImageUrl?: string;
70
- /**
71
- * This option specifies the URL of the name tag image to be used when the digital human is rendered.
72
- */
73
- nameTagImageUrl?: string;
74
- /**
75
- * This option specifies up to four locales that the Digital Human should understand a person speaking (speech recognition)
76
- * The locales are specified in the BCP-47 format e.g "en-US".
77
- * The first locale is considered the primary locale.
78
- * Locales should be separated with a colon e.g "en-US:en-GB:en-AU".
79
- */
80
- speechToTextLocales?: string;
81
- /**
82
- * Override the asset base path.
83
- */
84
- assetBasePath?: string;
85
- /**
86
- * Speech Recognition Hint Phrases
87
- * A comma separated list of phrases the speech recognition system should expect.
88
- */
89
- speechRecognitionHintPhrases?: string;
90
- /**
91
- * Speech Recognition Hint Phrases Boost
92
- * An integer number between 0 and 20 that can be used to boost the hint phrases likely hood to match.
93
- */
94
- speechRecognitionHintPhrasesBoost?: number;
95
- /**
96
- * Custom Metadata
97
- * A stringified value that will be sent to BYO NLPs with all chat calls like playWelcomeMessage and sendTranscript requests.
98
- * This can be set to any stringified value.
99
- */
100
- customMetadata?: string;
101
- /**
102
- * Enable Interrupt By Speech
103
- * When using SPEECH_RECOGNITION mode, this option will allow the user to interrupt the Digital Human by speaking over them.
104
- * If this value is false, the Digital Human will not be interrupted by the user. The default value is false - users cannot
105
- * interrupt the Digital Human. Note: Sending a text message will interrupt the digital human irrespective of this setting.
106
- */
107
- enableInterruptBySpeech?: boolean;
108
- }
@@ -1,5 +0,0 @@
1
- export declare enum VoiceInputMode {
2
- PUSH_TO_TALK = "PUSH_TO_TALK",
3
- VOICE_ACTIVITY = "VOICE_ACTIVITY",
4
- SPEECH_RECOGNITION = "SPEECH_RECOGNITION"
5
- }
@@ -1,2 +0,0 @@
1
- export { UneeqOptions } from './UneeqOptions';
2
- export { Devices } from './Devices';
@@ -1,4 +0,0 @@
1
- import * as _Uneeq from './index';
2
- declare global {
3
- const Uneeq: typeof _Uneeq;
4
- }