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

import { AgentBase } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'support', route: '/support' });
agent.addLanguage({ name: 'English', code: 'en-US', voice: 'rime.spore' });
agent.setLanguageParams('en-US', { speed: 1.1 });
console.log(agent.getLanguageParams('en-US')); // { speed: 1.1 }