***

title: addDynamicHints
slug: /reference/typescript/agents/function-result/add-dynamic-hints
description: Add speech recognition hints dynamically during a call.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Add speech recognition hints dynamically during a call. Hints improve recognition
accuracy for domain-specific vocabulary, product names, or uncommon words. Each
hint can be a simple string or a pronunciation pattern object that maps
misrecognized speech to the correct text.

## **Parameters**

<ParamField path="hints" type={"(string | { pattern: string; replace: string; ignore_case?: boolean })[]"} required={true} toc={true}>
  List of hints. Each entry is either:

  * A `string` -- a word or phrase to boost recognition (e.g., `"SignalWire"`)
  * An object with pronunciation pattern fields:

  | Field         | Type      | Description                                 |
  | ------------- | --------- | ------------------------------------------- |
  | `pattern`     | `string`  | Regex pattern to match in recognized speech |
  | `replace`     | `string`  | Replacement text when the pattern matches   |
  | `ignore_case` | `boolean` | Case-insensitive matching (optional)        |
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Examples**

### Simple Word Hints

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .addDynamicHints(['visa', 'mastercard', 'amex']);
```

### Pronunciation Patterns

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .addDynamicHints([
    { pattern: '\\d{4}', replace: 'four digits', ignore_case: true },
  ]);
```