This fixes #177 ("Specifiying UtteranceSplit parameter with a fractional value causes HttpException")
When calling DeepgramClient.Transcription.Prerecorded.GetTranscriptionAsync(...) with a PrerecordedTranscriptionOptions parameter that contains a PrerecordedTranscriptionOptions.UtteranceSplit value which has a fractiuonal value (i.e. 1.2, 2.5) causes HttpException. Values like 2.0, 1.0 do not cause exception.
The issue is the way the float value is being serialized in Deepgram.Utilities.QueryParameterUtil.GetParameters(...)
A parameter value of 2.2
is serialized into this url parameter: utt_split=2%2c2
I added a "Float" type branch in Deepgram.Utilities.QueryParameterUtil.GetParameters(...) which does not url encode the float value and stringifies it with an invariant culture.
This fixes #177 ("Specifiying UtteranceSplit parameter with a fractional value causes HttpException")
When calling
DeepgramClient.Transcription.Prerecorded.GetTranscriptionAsync(...)
with aPrerecordedTranscriptionOptions
parameter that contains aPrerecordedTranscriptionOptions.UtteranceSplit
value which has a fractiuonal value (i.e. 1.2, 2.5) causes HttpException. Values like 2.0, 1.0 do not cause exception.The issue is the way the float value is being serialized in
Deepgram.Utilities.QueryParameterUtil.GetParameters(...)
A parameter value of 2.2 is serialized into this url parameter: utt_split=2%2c2
I added a "Float" type branch in
Deepgram.Utilities.QueryParameterUtil.GetParameters(...)
which does not url encode the float value and stringifies it with an invariant culture.