@hivegpt/hiveai-angular 0.0.568 → 0.0.570
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/bundles/hivegpt-hiveai-angular.umd.js +150 -274
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/bot.service.js +1 -1
- package/esm2015/lib/components/voice-agent/services/daily-voice-client.service.js +55 -137
- package/esm2015/lib/components/voice-agent/services/voice-agent.service.js +58 -103
- package/fesm2015/hivegpt-hiveai-angular.js +111 -238
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/bot.service.d.ts.map +1 -1
- package/lib/components/voice-agent/services/daily-voice-client.service.d.ts +1 -33
- package/lib/components/voice-agent/services/daily-voice-client.service.d.ts.map +1 -1
- package/lib/components/voice-agent/services/voice-agent.service.d.ts +5 -16
- package/lib/components/voice-agent/services/voice-agent.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/bot.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"bot.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/bot.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKlD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,qBAGa,WAAW;IAGR,OAAO,CAAC,IAAI;IAFxB,gBAAgB,mBAAiB;IACjC,OAAO,SAAmC;gBACtB,IAAI,EAAE,UAAU;IAEpC,6BAA6B,CAAC,KAAK,KAAA,EAAE,MAAM,KAAA,EAAE,MAAM,KAAA;IAiBnD,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC;IAUnD,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC;CAQjE"}
|
|
@@ -1,61 +1,29 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
/**
|
|
4
|
-
* Daily.js WebRTC client for voice agent audio.
|
|
5
|
-
* Responsibilities:
|
|
6
|
-
* - Create and manage Daily CallObject
|
|
7
|
-
* - Join Daily room using room_url
|
|
8
|
-
* - Handle mic capture + speaker playback
|
|
9
|
-
* - Bot speaking detection via AnalyserNode on remote track (instant)
|
|
10
|
-
* - User speaking detection via active-speaker-change
|
|
11
|
-
* - Expose speaking$ (bot speaking), userSpeaking$ (user speaking), micMuted$
|
|
12
|
-
* - Expose localStream$ for waveform visualization (AudioAnalyzerService)
|
|
13
|
-
*/
|
|
14
3
|
export declare class DailyVoiceClientService {
|
|
15
4
|
private ngZone;
|
|
16
5
|
private callObject;
|
|
17
6
|
private localStream;
|
|
18
7
|
private localSessionId;
|
|
19
|
-
/** Explicit playback of remote (bot) audio; required in some browsers. */
|
|
20
8
|
private remoteAudioElement;
|
|
21
|
-
/** AnalyserNode-based remote audio monitor for instant bot speaking detection. */
|
|
22
9
|
private remoteAudioContext;
|
|
23
10
|
private remoteSpeakingRAF;
|
|
24
11
|
private speakingSubject;
|
|
25
12
|
private userSpeakingSubject;
|
|
26
13
|
private micMutedSubject;
|
|
27
14
|
private localStreamSubject;
|
|
28
|
-
/** True when bot (remote participant) is the active speaker. */
|
|
29
15
|
speaking$: Observable<boolean>;
|
|
30
|
-
/** True when user (local participant) is the active speaker. */
|
|
31
16
|
userSpeaking$: Observable<boolean>;
|
|
32
|
-
/** True when mic is muted. */
|
|
33
17
|
micMuted$: Observable<boolean>;
|
|
34
|
-
|
|
35
|
-
localStream$: Observable<MediaStream | null>;
|
|
18
|
+
localStream$: Observable<MediaStream>;
|
|
36
19
|
constructor(ngZone: NgZone);
|
|
37
|
-
/**
|
|
38
|
-
* Connect to Daily room. Acquires mic first for waveform, then joins with audio.
|
|
39
|
-
* @param roomUrl Daily room URL (from room_created)
|
|
40
|
-
* @param token Optional meeting token
|
|
41
|
-
*/
|
|
42
20
|
connect(roomUrl: string, token?: string): Promise<void>;
|
|
43
21
|
private setupEventHandlers;
|
|
44
|
-
/**
|
|
45
|
-
* Play remote (bot) audio track via a dedicated audio element.
|
|
46
|
-
* Required in many browsers where Daily's internal playback does not output to speakers.
|
|
47
|
-
*/
|
|
48
22
|
private playRemoteTrack;
|
|
49
|
-
/**
|
|
50
|
-
* Monitor remote audio track energy via AnalyserNode.
|
|
51
|
-
* Polls at ~60fps and flips speakingSubject based on actual audio energy.
|
|
52
|
-
*/
|
|
53
23
|
private monitorRemoteAudio;
|
|
54
24
|
private stopRemoteAudioMonitor;
|
|
55
25
|
private stopRemoteAudio;
|
|
56
|
-
/** Set mic muted state. */
|
|
57
26
|
setMuted(muted: boolean): void;
|
|
58
|
-
/** Disconnect and cleanup. */
|
|
59
27
|
disconnect(): Promise<void>;
|
|
60
28
|
private cleanup;
|
|
61
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-voice-client.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/voice-agent/services/daily-voice-client.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AAInD
|
|
1
|
+
{"version":3,"file":"daily-voice-client.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/voice-agent/services/daily-voice-client.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AAInD,qBAGa,uBAAuB;IAmBtB,OAAO,CAAC,MAAM;IAlB1B,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,kBAAkB,CAAiC;IAE3D,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,iBAAiB,CAAuB;IAEhD,OAAO,CAAC,eAAe,CAAuC;IAC9D,OAAO,CAAC,mBAAmB,CAAuC;IAClE,OAAO,CAAC,eAAe,CAAsC;IAC7D,OAAO,CAAC,kBAAkB,CAAiD;IAE3E,SAAS,sBAAuC;IAChD,aAAa,sBAA2C;IACxD,SAAS,sBAAuC;IAChD,YAAY,0BAA0C;gBAElC,MAAM,EAAE,MAAM;IAE5B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiD7D,OAAO,CAAC,kBAAkB;IAmD1B,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,kBAAkB;IA8C1B,OAAO,CAAC,sBAAsB;IAS9B,OAAO,CAAC,eAAe;IAQvB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IASxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC,OAAO,CAAC,OAAO;CAgBhB"}
|
|
@@ -9,23 +9,11 @@ export interface TranscriptData {
|
|
|
9
9
|
text: string;
|
|
10
10
|
final: boolean;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Voice agent orchestrator. Coordinates WebSocket (signaling) and Daily.js (WebRTC audio).
|
|
14
|
-
*
|
|
15
|
-
* CRITICAL: This service must NEVER use Socket.IO or ngx-socket-io. Voice flow uses only:
|
|
16
|
-
* - Native WebSocket (WebSocketVoiceClientService) for signaling (room_created, transcripts)
|
|
17
|
-
* - Daily.js (DailyVoiceClientService) for WebRTC audio. Audio does NOT flow over WebSocket.
|
|
18
|
-
*
|
|
19
|
-
* - Maintains callState, statusText, duration, isMicMuted, isUserSpeaking, audioLevels
|
|
20
|
-
* - Uses WebSocket for room_created and transcripts only (no audio)
|
|
21
|
-
* - Uses Daily.js for all audio, mic, and real-time speaking detection
|
|
22
|
-
*/
|
|
23
12
|
export declare class VoiceAgentService implements OnDestroy {
|
|
24
13
|
private audioAnalyzer;
|
|
25
14
|
private wsClient;
|
|
26
15
|
private dailyClient;
|
|
27
16
|
private platformTokenRefresh;
|
|
28
|
-
/** `Object` not `object` — ngc metadata collection rejects the `object` type in DI params. */
|
|
29
17
|
private platformId;
|
|
30
18
|
private callStateSubject;
|
|
31
19
|
private statusTextSubject;
|
|
@@ -47,11 +35,12 @@ export declare class VoiceAgentService implements OnDestroy {
|
|
|
47
35
|
audioLevels$: Observable<number[]>;
|
|
48
36
|
userTranscript$: Observable<TranscriptData>;
|
|
49
37
|
botTranscript$: Observable<string>;
|
|
50
|
-
constructor(audioAnalyzer: AudioAnalyzerService, wsClient: WebSocketVoiceClientService, dailyClient: DailyVoiceClientService, platformTokenRefresh: PlatformTokenRefreshService,
|
|
51
|
-
/** `Object` not `object` — ngc metadata collection rejects the `object` type in DI params. */
|
|
52
|
-
platformId: Object);
|
|
38
|
+
constructor(audioAnalyzer: AudioAnalyzerService, wsClient: WebSocketVoiceClientService, dailyClient: DailyVoiceClientService, platformTokenRefresh: PlatformTokenRefreshService, platformId: Object);
|
|
53
39
|
ngOnDestroy(): void;
|
|
54
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Tear down transports and reset UI state so a new `connect()` can run.
|
|
42
|
+
* `connect()` only proceeds from `idle`; use this after `ended` or when reopening the modal.
|
|
43
|
+
*/
|
|
55
44
|
resetToIdle(): void;
|
|
56
45
|
connect(apiUrl: string, token: string, botId: string, conversationId: string, apiKey: string, eventToken: string, eventUrl: string, domainAuthority: string, usersApiUrl?: string): Promise<void>;
|
|
57
46
|
private onRoomCreated;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-agent.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/voice-agent/services/voice-agent.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAe,MAAM,eAAe,CAAC;AAC3E,OAAO,EAGL,UAAU,EAGX,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,oBAAY,SAAS,GACjB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,WAAW,GACX,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED
|
|
1
|
+
{"version":3,"file":"voice-agent.service.d.ts","sourceRoot":"/Users/rohitthakur/hive-gpt/HiveAI-Packages/Angular/projects/hivegpt/eventsgpt-angular/src/","sources":["lib/components/voice-agent/services/voice-agent.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAe,MAAM,eAAe,CAAC;AAC3E,OAAO,EAGL,UAAU,EAGX,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AA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