@webex/internal-plugin-voicea 3.12.0 → 3.13.0-next.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.
@@ -0,0 +1,33 @@
1
+ import {WebexPlugin} from '@webex/webex-core';
2
+ import type LLMChannel from '@webex/internal-plugin-llm';
3
+
4
+ import {VoiceaChannel} from './voicea';
5
+ import {VOICEA} from './constants';
6
+
7
+ /**
8
+ * VoiceaPlugin - factory for creating VoiceaChannel instances
9
+ * @export
10
+ * @class VoiceaPlugin
11
+ */
12
+ export class VoiceaPlugin extends WebexPlugin {
13
+ namespace = VOICEA;
14
+
15
+ /**
16
+ * Creates a VoiceaChannel, optionally bound to an LLMChannel.
17
+ *
18
+ * Note: VoiceaChannel does not take ownership of the LLMChannel.
19
+ * The caller retains ownership and is responsible for the LLMChannel's
20
+ * lifecycle (connection, disconnection, cleanup).
21
+ *
22
+ * @param {LLMChannel} [llmChannel] - The LLM channel to use for voicea (optional)
23
+ * @returns {VoiceaChannel} A new VoiceaChannel instance
24
+ */
25
+ public createChannel(llmChannel?: LLMChannel): VoiceaChannel {
26
+ // @ts-ignore - webex is available on WebexPlugin
27
+ const channel = new VoiceaChannel(llmChannel, this.webex.request.bind(this.webex));
28
+
29
+ return channel;
30
+ }
31
+ }
32
+
33
+ export default VoiceaPlugin;