setLanguageParams

View as MarkdownOpen in Claude

Set or replace the engine-specific params dictionary on a language previously added via addLanguage(). Read them back with getLanguageParams().

Parameters

code
stringRequired

Language code previously passed to addLanguage() (e.g. "en-US"). Unknown codes are a no-op.

params
Record<string, unknown>Required

Engine-specific params dictionary to attach. Passing an empty object removes the params key.

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.addLanguage({ name: 'English', code: 'en-US', voice: 'rime.spore' });
5
6agent.setLanguageParams('en-US', { speed: 1.1, stability: 0.5 });
7await agent.serve();