deepgram / deepgram-go-sdk

Go SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
31 stars 27 forks source link

For Analyze APIs, If Wrapped in JSON, Dont Wrap a Second Time #229

Open dvonthenen opened 3 months ago

dvonthenen commented 3 months ago

Proposed changes

Since the input is a file or a stream, usually a file but could be a StringBuffer), you wouldnt want the user to modify the document first to include the JSON.

We can detect if the input is valid JSON, then omit wrap in JSON if it is.

Please see: https://github.com/deepgram/deepgram-go-sdk/blob/main/pkg/client/analyze/client.go#L148

Context

Possible Implementation

Other information