deepgram / deepgram-js-sdk

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

Mistyping on LiveTranscriptionEvent.channel.alternatives.confidence #213

Closed cstigler closed 6 months ago

cstigler commented 6 months ago

What is the current behavior?

LiveTranscriptionEvent.channel.alternatives.confidence has the type boolean, when I believe it should be a numerical confidence level. This means it will give type errors every time I try to use it in my TypeScript code.

Steps to reproduce

Try to use that variable, or look at your type code here: https://github.com/deepgram/deepgram-node-sdk/blob/2734f695bfe574cd0bdfcd19227283bffae0acba/src/lib/types/LiveTranscriptionEvent.ts#L11

Expected behavior

It should be a number, unless the Deepgram docs are wrong.

Please tell us about your environment

TypeScript (NextJS 13)

Other information