From 2014f544f00ea51192c0a0c6366c6ec475e7ca11 Mon Sep 17 00:00:00 2001 From: James Gilmore Date: Wed, 8 Nov 2023 17:42:45 +0000 Subject: [PATCH] Update StartRecognitionMessage.cs Do not serialize translation_config if it's null, because the server doesn't accept null (None) here. --- SmRtAPI/SmRtAPI/Messages/StartRecognitionMessage.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SmRtAPI/SmRtAPI/Messages/StartRecognitionMessage.cs b/SmRtAPI/SmRtAPI/Messages/StartRecognitionMessage.cs index b17f613..b484956 100644 --- a/SmRtAPI/SmRtAPI/Messages/StartRecognitionMessage.cs +++ b/SmRtAPI/SmRtAPI/Messages/StartRecognitionMessage.cs @@ -81,6 +81,7 @@ public StartRecognitionMessage(SmRtApiConfigBase smConfig, AudioFormatSubMessage public AudioFormatSubMessage audio_format { get; } public Dictionary transcription_config { get; } = new Dictionary(); + [JsonProperty("translation_config", NullValueHandling = NullValueHandling.Ignore)] public Dictionary? translation_config { get; } } } \ No newline at end of file