getLanguageParams

View as MarkdownOpen in Claude

Read the engine-specific params dictionary for a language previously added via addLanguage() or set via setLanguageParams().

Parameters

code
stringRequired

Language code previously passed to addLanguage().

Returns

Record<string, unknown> | undefined — The params dictionary if set, or undefined when the code is unknown or has no params.

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' });
5agent.setLanguageParams('en-US', { speed: 1.1 });
6
7console.log(agent.getLanguageParams('en-US')); // { speed: 1.1 }