deepgram/deepgram-dotnet-sdk

Incorrect type for `Entity.Value`

Closed this issue · 1 comments

What is the current behavior?

Entity.Value is currently defined as a decimal, but it should be a string.

The value field of an entity is the transcribed word in which we found the entity in the label field. ex:

{
   transcript: "...",
   confidence: ...,
   words: [...]
   entities: [
      {
         label: MULTIPLICATIVE,   
         value: once,
         confidence: 0.92194,
         start_word: 0,
         end_word: 1              
      },
      {
         label: MULTIPLICATIVE,   
         value: twice,
         confidence: 0.85835,
         start_word: 20,
         end_word: 21              
      },
      ...   
   ]
} 

Steps to reproduce

set DetectEntities = true results in

Unhandled exception. Newtonsoft.Json.JsonReaderException: Could not convert string to decimal: once. Path  
'results.channels[0].alternatives[0].entities[0].value'

Expected behavior

Properly decode results.channels[0].alternatives[0].entities[0].value as a string

Please tell us about your environment

Willing to provide privately, but this is not an environment specific issue

This Issue seems to have been resolved may it should be closed