Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"postpublish": "npm run clean-docs"
},
"dependencies": {
"@jambonz/schema": "^0.4.2",
"@jambonz/schema": "^0.4.26",
"ajv": "^8.17.1",
"ws": "^8.18.0"
},
Expand Down
4 changes: 4 additions & 0 deletions typescript/src/types/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ export interface Recognizer {
gladiaOptions?: Record<string, unknown>;
elevenlabsOptions?: Record<string, unknown>;
verbioOptions?: Record<string, unknown>;
gradiumOptions?: Record<string, unknown>;
mistralOptions?: Record<string, unknown>;
modulateOptions?: Record<string, unknown>;
zoomOptions?: Record<string, unknown>;
customOptions?: Record<string, unknown>;
}

Expand Down
29 changes: 28 additions & 1 deletion typescript/src/types/verbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,24 @@ export interface QwenS2sVerb extends LlmBaseOptions {
};
}

export interface GptliveS2sVerb extends LlmBaseOptions {
verb: 'gptlive_s2s';
}

export interface NovaS2sVerb extends LlmBaseOptions {
verb: 'nova_s2s';
}

export interface VoiceliveS2sVerb extends LlmBaseOptions {
verb: 'voicelive_s2s';
}

export interface DialogflowVerb {
verb: 'dialogflow';
/** The deployment to use (CES). Omit to use the app's default. */
deployment?: string;
/** Names the conversation on the Dialogflow side; reuse it on a later dialogflow verb in the same call to resume the same conversation. */
sessionId?: string;
id?: string;
/** Google service account credentials as JSON object or stringified JSON. */
credentials: Record<string, unknown> | string;
Expand Down Expand Up @@ -371,6 +387,10 @@ export interface AgentVerb {
greeting?: boolean;
/** Speculatively prompt the LLM on final transcript before Krisp end-of-turn. Default: false. */
earlyGeneration?: boolean;
/** false: the agent's text is never sent to TTS (e.g. an agent that drives a DTMF-only phone menu with tools). Text is still kept in history and llm_response events; toolFiller and earlyGeneration are turned off. Default: true. */
speak?: boolean;
/** Keep stage-direction-only paragraphs ('(silence)', '[No response needed]', '*pauses*') and <think>/<thinking>/<reasoning> blocks out of TTS. History and events keep the raw text. Default: true. */
speechCleanup?: boolean;
/** Enable server-side noise isolation to reduce background noise on call audio. Defaults to inbound (caller) audio; set direction to 'write' for outbound. */
noiseIsolation?: 'krisp' | 'rnnoise' | {
mode: string;
Expand All @@ -380,8 +400,10 @@ export interface AgentVerb {
};
/** External MCP servers that provide tools to the LLM. */
mcpServers?: McpServerConfig[];
/** Seconds to wait after assistant finishes speaking before prompting user to respond. 0 disables. Default: 0. */
/** Seconds to wait after assistant finishes speaking before prompting user to respond. 0 disables. Default: 12. */
noResponseTimeout?: number;
/** End the agent after this many unanswered no-response prompts in a row (actionHook completionReason 'no_response'). Resets when the user speaks. 0 or unset: no limit. */
noResponseMaxPrompts?: number;
/** Auto-adjust STT/TTS based on detected language. true=lock on first, 'always'=adapt every turn. */
autoLockLanguage?: boolean | 'always';
/** Per-language TTS overrides. Keys are BCP-47 codes (e.g., 'es', 'fr'). */
Expand Down Expand Up @@ -538,6 +560,8 @@ export interface DialVerb {
tag?: Record<string, unknown>;
/** Forward P-Asserted-Identity header. */
forwardPAI?: boolean;
/** Codec names, in preference order, to offer on the outbound INVITE (e.g. ['G722', 'PCMU']). */
codecs?: string[];
}

export interface ConferenceVerb {
Expand Down Expand Up @@ -948,6 +972,9 @@ export type Verb =
| DeepgramS2sVerb
| UltravoxS2sVerb
| QwenS2sVerb
| GptliveS2sVerb
| NovaS2sVerb
| VoiceliveS2sVerb
| DialogflowVerb
| AgentVerb
| ConferenceVerb
Expand Down
12 changes: 12 additions & 0 deletions typescript/src/verb-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ export class VerbBuilder {
return this.addVerb({ verb: 'qwen_s2s', ...opts });
}

gptlive_s2s(opts: Omit<LlmBaseOptions, 'vendor'>): this {
return this.addVerb({ verb: 'gptlive_s2s', ...opts });
}

nova_s2s(opts: Omit<LlmBaseOptions, 'vendor'>): this {
return this.addVerb({ verb: 'nova_s2s', ...opts });
}

voicelive_s2s(opts: Omit<LlmBaseOptions, 'vendor'>): this {
return this.addVerb({ verb: 'voicelive_s2s', ...opts });
}

/** Shortcut for s2s with vendor='google'. */
google_s2s(opts: Omit<LlmBaseOptions, 'vendor'>): this {
return this.addVerb({ verb: 'google_s2s', ...opts });
Expand Down
3 changes: 3 additions & 0 deletions typescript/src/websocket/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ export class Session extends EventEmitter {
/** Shortcut for s2s with vendor='openai'. */
openai_s2s(opts: Parameters<VerbBuilder['openai_s2s']>[0]): this { this.builder.openai_s2s(opts); return this; }
qwen_s2s(opts: Parameters<VerbBuilder['qwen_s2s']>[0]): this { this.builder.qwen_s2s(opts); return this; }
gptlive_s2s(opts: Parameters<VerbBuilder['gptlive_s2s']>[0]): this { this.builder.gptlive_s2s(opts); return this; }
nova_s2s(opts: Parameters<VerbBuilder['nova_s2s']>[0]): this { this.builder.nova_s2s(opts); return this; }
voicelive_s2s(opts: Parameters<VerbBuilder['voicelive_s2s']>[0]): this { this.builder.voicelive_s2s(opts); return this; }
/** Shortcut for s2s with vendor='google'. */
google_s2s(opts: Parameters<VerbBuilder['google_s2s']>[0]): this { this.builder.google_s2s(opts); return this; }
/** Shortcut for s2s with vendor='elevenlabs'. */
Expand Down
Loading