Skip to content

BUG: TypeError in DeepgramConverter for Nova-2 Model #6

Open
@MerryOscar

Description

@MerryOscar

What is the current behavior?

I am seeing a TypeError when using the srt parser from the @deepgram/captions library:

TypeError: Cannot use 'in' operator to search for 'speaker' in undefined
    at DeepgramConverter.getLines (.../@deepgram/captions/src/converters/DeepgramConverter.ts:22:32)
    at srt (.../@deepgram/captions/src/index.ts:54:20)

Steps to reproduce

This error is occurring when using the deepgram nova-2 model via the REST api:

      method: 'POST',
      url: 'https://api.deepgram.com/v1/listen',
      params: {
        model: 'nova-2',
        punctuate: true,
        smart_format: true,
        paragraphs: true
      }

Expected behavior

The srt parser works on the nova-2 output without any errors

Please tell us about your environment

  • node v18.19.1

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