deepgram / deepgram-js-sdk

Official JavaScript SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
138 stars 51 forks source link

Undocumented times argument is required for live transcription #109

Closed MasterOdin closed 1 year ago

MasterOdin commented 1 year ago

What is the current behavior?

I'm getting the following type error when I try to use deepgram.transcription.live following the transcribe sdk docs:

Property 'times' is missing in type '{ interim_results: true; punctuate: true; }' but required in type 'LiveTranscriptionOptions'.

Looking at the API docs, any times argument is not mentioned at all.

Steps to reproduce

Have the following code with TS:

import { Deepgram } from '@deepgram/sdk';

const deepgram = new Deepgram("API_KEY");
const socket = deepgram.transcription.live({
  punctuate: true,
});

Expected behavior

That I wouldn't get a TS error.

Please tell us about your environment

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

Other information

I'm using @deepgram/sdk@1.17.0. This is the TS type that's throwing an error:

https://github.com/deepgram/deepgram-node-sdk/blob/7821a6d573b3e1a068607273973b7d9e38269962/src/types/liveTranscriptionOptions.ts#L210-L214

Given how everything else is optional in this file, I feel like this should be to?

briancbarrow commented 1 year ago

@MasterOdin Thanks for pointing this out. We'll get a fix out today.

briancbarrow commented 1 year ago

Fixed in #110