@telnyx/ai-agent-lib 0.1.8 → 0.1.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 CHANGED
@@ -147,6 +147,7 @@ function VoiceChat() {
147
147
  | `agentId` | `string` | ✅ | - | Your Telnyx AI agent ID |
148
148
  | `versionId` | `string` | ❌ | `"main"` | Agent version to use |
149
149
  | `environment` | `"production" \| "development"` | ❌ | `"production"` | Telnyx environment |
150
+ | `debug` | `boolean` | ❌ | `false` | Enable debug logging |
150
151
 
151
152
  ### Hooks
152
153
 
@@ -245,7 +246,8 @@ await agent.startConversation({
245
246
  customHeaders: [
246
247
  { name: 'X-User-Plan', value: 'gold' },
247
248
  { name: 'X-Session-Id', value: 'session-abc' }
248
- ]
249
+ ],
250
+ audio: { autoGainControl: true, noiseSuppression: true }
249
251
  });
250
252
 
251
253
  // Send messages during an active conversation
package/dist/client.d.ts CHANGED
@@ -5,12 +5,15 @@ export type TelnyxAIAgentConstructorParams = {
5
5
  agentId: string;
6
6
  versionId?: string;
7
7
  environment?: "production" | "development";
8
+ debug?: boolean;
9
+ trickleIce?: boolean;
8
10
  };
9
11
  export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
10
12
  private telnyxRTC;
11
13
  private transcription;
12
14
  agentId: string;
13
15
  versionId: string;
16
+ debug: boolean;
14
17
  private audioStreamMonitor;
15
18
  activeCall: Call | null;
16
19
  constructor(params: TelnyxAIAgentConstructorParams);
@@ -68,6 +71,7 @@ export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
68
71
  * ]
69
72
  * });
70
73
  * // These headers will be available in your AI assistant as {{user_name}} and {{agent_session}}
74
+ * @param options.audio - Audio constraints for the call (boolean or MediaTrackConstraints)
71
75
  */
72
76
  startConversation(options?: {
73
77
  destinationNumber?: string;
@@ -77,6 +81,7 @@ export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
77
81
  name: string;
78
82
  value: string;
79
83
  }[];
84
+ audio?: boolean | MediaTrackConstraints;
80
85
  }): Promise<void>;
81
86
  /**
82
87
  * Ends the current active conversation with the AI agent.
package/dist/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from "./react/use-client-connection-state";
5
5
  export * from "./react/use-client";
6
6
  export * from "./react/use-conversation";
7
7
  export * from "./react/use-agent-state";
8
+ export * from "./types";