Skip to content

Commit 3aefaac

Browse files
authored
feat: streaming keyterms prompt (#398)
* update streaming info * minor verbiage tweak * minor updates on format_turns behaviour
1 parent 6f9dd2a commit 3aefaac

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

fern/pages/02-speech-to-text/universal-streaming/universal-streaming-keyterms.mdx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
The keyterm prompting feature helps improve recognition accuracy for specific words and phrases that are important to your use case.
44

55
<Warning>
6-
Keyterms Prompting is currently in beta and available to all users free of charge. Pricing is still being finalized and may apply in the future.
76

8-
As we continue to develop this feature, functionality may evolve. For the latest updates and code examples, please refer to this page.
7+
Keyterms Prompting costs an additional $0.04/hour.
98

109
</Warning>
1110

@@ -562,13 +561,25 @@ if __name__ == "__main__":
562561
To utilize keyterm prompting, you need to include your desired keyterms as query parameters in the WebSocket URL.
563562

564563
- You can include a maximum of 100 keyterms per session.
565-
- Each individual keyterm string must be between 5 and 50 characters in length.
566-
- The `format_turns` parameter must be set to `True` for keyterm prompting to be applied.
564+
- Each individual keyterm string must be 50 characters or less in length.
565+
566+
## How it works
567+
568+
Streaming Keyterm Prompting has two components to improve accuracy for your terms.
569+
570+
### Word-level boosting
571+
572+
The streaming model itself is biased during inference to be more accurate at identifying words from your keyterm list. This happens in real-time as words are emitted during the streaming process, providing immediate improvements to recognition accuracy. This component is enabled by default.
573+
574+
### Turn-level boosting
575+
576+
After each turn is completed, an additional metaphone-based boosting pass analyzes the full transcript using your keyterm list. This post-processing step, similar to formatting, provides a second layer of accuracy improvement by examining the complete context of the turn. To enable this component, set `format_turns` to `True`.
577+
578+
Both stages work together to maximize recognition accuracy for your keyterms throughout the streaming process.
567579

568580
## Important notes
569581

570-
- Only final formatted transcripts receive keyterm prompting.
571-
- Keyterm phrases outside the 5-50 character range are ignored.
582+
- Keyterm prompts longer than 50 characters are ignored.
572583
- Requests containing more than 100 keyterms will result in an error.
573584

574585
## Best practices

0 commit comments

Comments
 (0)