Custom Keywords

Enhanced transcription accuracy guide

VAPI allows you to improve the accuracy of your transcriptions by leveraging Deepgram’s keyword boosting feature. This is particularly useful when dealing with specialized terminology or uncommon proper nouns. By providing specific keywords to the Deepgram model, you can enhance transcription quality directly through VAPI.

Why Use Keyword Boosting?

Keyword boosting is beneficial for:

  • Enhancing the recognition of specialized terms and proper nouns.
  • Improving transcription accuracy without the need for a custom-trained model.
  • Quickly updating the model’s vocabulary with new or uncommon words.

Important Notes

  • Keywords should be uncommon words or proper nouns not frequently recognized by the model.
  • Custom model training is the most effective way to ensure accurate keyword recognition.
  • For more than 50 keywords, consider custom model training by contacting Deepgram.

Enabling Keyword Boosting in VAPI

API Call Integration

To enable keyword boosting, you need to add a keywords parameter to your VAPI assistant’s transcriber section. This parameter should include the keywords and their respective intensifiers.

Example of POST Request

To create an assistant with keyword boosting enabled, you can make the following POST request to VAPI:

$bashCopy code
>curl \
> --request POST \
> --header 'Authorization: Bearer <token>' \
> --header 'Content-Type: application/json' \
> --data '{
> "name": "Emma",
> "model": {
> "model": "gpt-4o",
> "provider": "openai"
> },
> "voice": {
> "voiceId": "emma",
> "provider": "azure"
> },
> "transcriber": {
> "provider": "deepgram",
> "model": "nova-2",
> "language": "bg",
> "smartFormat": true,
> "keywords": [
> "snuffleupagus:1"
> ]
> },
> "firstMessage": "Hi, I am Emma, what is your name?",
> "firstMessageMode": "assistant-speaks-first"
> }' \
> https://api.vapi.ai/assistant

In this configuration:

  • name: The name of the assistant.
  • model: Specifies the model and provider for the assistant’s conversational capabilities.
  • voice: Specifies the voice and provider for the assistant’s speech.
  • transcriber: Specifies Deepgram as the transcription provider, along with the model, language, smart formatting, and keywords for boosting.
  • firstMessage: The initial message the assistant will speak.
  • firstMessageMode: Specifies that the assistant speaks first.

Intensifiers

Intensifiers are exponential factors that boost or suppress the likelihood of the specified keyword being recognized. The default intensifier is 1. Higher values increase the likelihood, while 0 is equivalent to not specifying a keyword.

  • Boosting Example: keywords=snuffleupagus:5
  • Suppressing Example: keywords=kansas:-10

Best Practices for Keyword Boosting

  1. Send Uncommon Keywords: Focus on keywords not successfully transcribed by the model.
  2. Send Keywords Once: Avoid repeating keywords.
  3. Use Individual Keywords: Prefer individual terms over phrases.
  4. Use Proper Spelling: Spell proper nouns as you want them to appear in transcripts.
  5. Moderate Intensifiers: Start with small increments to avoid false positives.
  6. Custom Model Training: For extensive vocabulary needs, consider custom model training.

Additional Resources

For more detailed information on Deepgram’s keyword boosting feature, refer to the Deepgram Keyword Boosting Documentation.

By following these guidelines, you can effectively utilize Deepgram’s keyword boosting feature within your VAPI assistant, ensuring enhanced transcription accuracy for specialized terminology and uncommon proper nouns.