integrations/dist/voice/openai
Interfaces
Properties
client
model
OpenAIRealtimeSocket
Methods
close()
Parameters
| Parameter |
Type |
props? |
{ code: number; reason: string; } |
props.code? |
number |
props.reason? |
string |
Returns
void
on()
Call Signature
on(event, listener): void;
Parameters
| Parameter |
Type |
event |
"event" |
listener |
(event) => void |
Returns
void
Call Signature
on(event, listener): void;
Parameters
| Parameter |
Type |
event |
"error" |
listener |
(error) => void |
Returns
void
send()
Parameters
| Parameter |
Type |
event |
RealtimeClientEvent |
Returns
void
OpenAIVoiceProviderOptions
Properties
apiKey?
optional apiKey?: string;
baseURL?
optional baseURL?: string;
client?
optional client?: OpenAI;
model?
optional model?: "gpt-realtime-2";
realtime?
optional realtime?: OpenAIRealtimeFactory;
sessionDefaults?
optional sessionDefaults?: Partial<RealtimeSessionCreateRequest>;
transcriptionLanguage?
optional transcriptionLanguage?: string;
voice?
VoiceOpenaiJsonObject
Extended by
Indexable
[key: string]: VoiceOpenaiProviderExtensionValue
VoiceOpenaiProviderExtensionFields
Extends
Indexable
[key: string]: VoiceOpenaiProviderExtensionValue
VoiceOpenaiProviderResponse
Extends
Indexable
[key: string]: VoiceOpenaiProviderExtensionValue
Type Aliases
OpenAIRealtimeFactory
type OpenAIRealtimeFactory = (input) => Promise<OpenAIRealtimeSocket>;
Parameters
Returns
Promise\<OpenAIRealtimeSocket>
VoiceOpenaiJsonPrimitive
type VoiceOpenaiJsonPrimitive = string | number | boolean | null;
VoiceOpenaiJsonValue
type VoiceOpenaiJsonValue =
| VoiceOpenaiJsonPrimitive
| VoiceOpenaiJsonObject
| readonly VoiceOpenaiJsonValue[];
VoiceOpenaiProviderExtensionValue
type VoiceOpenaiProviderExtensionValue = VoiceOpenaiJsonValue | object | undefined;
VoiceOpenaiProviderPayload
type VoiceOpenaiProviderPayload = VoiceOpenaiJsonObject | object;
VoiceOpenaiProviderQuery
type VoiceOpenaiProviderQuery = Record<string, VoiceOpenaiProviderExtensionValue>;
Variables
createOpenAIVoiceAdapter
const createOpenAIVoiceAdapter: typeof createOpenAIVoiceProvider;
OPENAI_REALTIME_V1_MODEL
const OPENAI_REALTIME_V1_MODEL: "gpt-realtime-2" = "gpt-realtime-2";
openAIVoiceProviderManifest
const openAIVoiceProviderManifest: {
capabilities: {
audiences?: ("customer-facing" | "internal-support" | "mixed")[];
capability: string;
changesWorkflow?: boolean;
description?: string;
exposesSensitiveData?: boolean;
extension?: boolean;
label?: string;
metadata?: Record<string, unknown>;
providerObjects?: {
description?: string;
kind: string;
label?: string;
metadata?: Record<string, unknown>;
schemaName?: string;
}[];
requiresCredential?: boolean;
sideEffect?: boolean;
}[];
category: string;
channelAudiences: ("customer-facing" | "internal-support" | "mixed")[];
coverage: {
evidence: {
label: string;
url?: string;
}[];
notes: string[];
scope: | "support-workflow-subset"
| "provider-api-subset"
| "connector-required"
| "local-protocol"
| "full-provider-api";
};
credentialRequirements: {
description?: string;
id: string;
label?: string;
metadata?: Record<string, unknown>;
required: boolean;
scopes: string[];
}[];
directions: (
| "receive-only"
| "send-only"
| "inbound-only"
| "outbound-only"
| "bidirectional")[];
id: string;
limitations: string[];
maintainers: {
name: string;
type: "community" | "official" | "unknown" | "partner";
url?: string;
}[];
metadata?: Record<string, unknown>;
name: string;
operations: {
alias: string;
audience?: "customer-facing" | "internal-support" | "mixed";
audiences?: ("customer-facing" | "internal-support" | "mixed")[];
capability: string;
changesWorkflow?: boolean;
description?: string;
exposesSensitiveData?: boolean;
extension: boolean;
externallyVisible?: boolean;
inputSchema?: unknown;
inputSchemaName?: string;
inputSchemaRef?: string;
label?: string;
metadata?: Record<string, unknown>;
outputSchema?: unknown;
outputSchemaName?: string;
outputSchemaRef?: string;
providerObject?: string;
providerObjects?: {
description?: string;
kind: string;
label?: string;
metadata?: Record<string, unknown>;
schemaName?: string;
}[];
providerOperation?: string;
requiredPolicyIds?: string[];
requiresApproval?: boolean;
requiresCredential?: boolean;
sideEffect?: boolean;
}[];
packageName: string;
privacyNotes: string[];
provider: string;
trustLevel: "community" | "official" | "verified" | "experimental";
};
Type Declaration
| Name |
Type |
capabilities |
{ audiences?: ("customer-facing" | "internal-support" | "mixed")[]; capability: string; changesWorkflow?: boolean; description?: string; exposesSensitiveData?: boolean; extension?: boolean; label?: string; metadata?: Record\<string, unknown>; providerObjects?: { description?: string; kind: string; label?: string; metadata?: Record\<string, unknown>; schemaName?: string; }[]; requiresCredential?: boolean; sideEffect?: boolean; }[] |
category |
string |
channelAudiences |
("customer-facing" | "internal-support" | "mixed")[] |
coverage |
{ evidence: { label: string; url?: string; }[]; notes: string[]; scope: | "support-workflow-subset" | "provider-api-subset" | "connector-required" | "local-protocol" | "full-provider-api"; } |
coverage.evidence |
{ label: string; url?: string; }[] |
coverage.notes |
string[] |
coverage.scope |
| "support-workflow-subset" | "provider-api-subset" | "connector-required" | "local-protocol" | "full-provider-api" |
credentialRequirements |
{ description?: string; id: string; label?: string; metadata?: Record\<string, unknown>; required: boolean; scopes: string[]; }[] |
directions |
( | "receive-only" | "send-only" | "inbound-only" | "outbound-only" | "bidirectional")[] |
id |
string |
limitations |
string[] |
maintainers |
{ name: string; type: "community" | "official" | "unknown" | "partner"; url?: string; }[] |
metadata? |
Record\<string, unknown> |
name |
string |
operations |
{ alias: string; audience?: "customer-facing" | "internal-support" | "mixed"; audiences?: ("customer-facing" | "internal-support" | "mixed")[]; capability: string; changesWorkflow?: boolean; description?: string; exposesSensitiveData?: boolean; extension: boolean; externallyVisible?: boolean; inputSchema?: unknown; inputSchemaName?: string; inputSchemaRef?: string; label?: string; metadata?: Record\<string, unknown>; outputSchema?: unknown; outputSchemaName?: string; outputSchemaRef?: string; providerObject?: string; providerObjects?: { description?: string; kind: string; label?: string; metadata?: Record\<string, unknown>; schemaName?: string; }[]; providerOperation?: string; requiredPolicyIds?: string[]; requiresApproval?: boolean; requiresCredential?: boolean; sideEffect?: boolean; }[] |
packageName |
string |
privacyNotes |
string[] |
provider |
string |
trustLevel |
"community" | "official" | "verified" | "experimental" |
Functions
createOpenAIRealtimeSocket()
function createOpenAIRealtimeSocket(input): Promise<OpenAIRealtimeSocket>;
Parameters
Returns
Promise\<OpenAIRealtimeSocket>
createOpenAIVoiceProvider()
function createOpenAIVoiceProvider(options?): VoiceProvider;
Parameters
Returns
VoiceProvider