Skip to content

Instantiating a Flux model LiveClient will error when passing keyterms. #449

@adrianlorikeet

Description

@adrianlorikeet

What is the current behavior?

When trying to provide a keyterm array when using Flux model on v2/listen, we'll get an error that looks like:

name: 'DeepgramError',
message: 'Keyterms are only supported with the Nova 3 models.',
stack: 'DeepgramError: Keyterms are only supported with the Nova 3 models.\n

Despite the docs mentioning that it is supported. Further, I did a test integrating with v2/listen on a native websocket (not using the SDK) and keyterms are indeed supported. Loom here: https://www.loom.com/share/f47e628e97a04f92b53328dd27abb6ec

This is error is due to this line when trying to construct a LiveClient: https://github.com/deepgram/deepgram-js-sdk/blob/main/src/packages/ListenLiveClient.ts#L38

Steps to reproduce

  1. Call ListenLiveClient with transcriptionOptions as below:
{
          encoding: 'linear16',
          sample_rate: 24000,
          eot_threshold: 0.7,
          eot_timeout_ms: 5000,
          eager_eot_threshold: 0.3,
          keyterm: ['Smiggin', 'Holes'],
          model: 'flux-general-en',
        }
  1. You'll get an error with message "Keyterms are only supported with the Nova 3 models."

Expected behavior

No error should occur, and the LiveClient should be instantiated with keyterms passed through the websocket connection.

Please tell us about your environment

We want to make sure the problem isn't specific to your operating system or programming language.

  • Operating System/Version: M4 Pro Mac, Sequoia 15.5
  • Language: TypeScript

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions