You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While generating the client library for the Azure OpenAI Realtime Audio client library, I noticed that the fields prefix_padding_ms and silence_duration_ms are serialized as JSON Strings, but the service actually expects a JSON number, failing the request.
We are fully aware that we might not be using duration correctly. So this could very well be a spec definition issue from our side.
Reproduction
Re-add the @Generated annotation to the fields prefixPaddingMs and silenceDurationMs in RealtimeServerVadTurnDetection class as well as to the toJson method.
The member variables should now be generated as Java Duration types
toJson will try to serialize these as String using jsonWriter.writeStringField
Describe the bug
While generating the client library for the Azure OpenAI Realtime Audio client library, I noticed that the fields
prefix_padding_ms
andsilence_duration_ms
are serialized as JSON Strings, but the service actually expects a JSON number, failing the request.The TSP definition for the model in question can be found here: https://github.com/joseharriaga/openai-in-typespec/blob/0cd29e191a157fe4356fed68707a2c43a5f728be/.typespec/realtime/custom.tsp#L106-L115
We are fully aware that we might not be using
duration
correctly. So this could very well be a spec definition issue from our side.Reproduction
@Generated
annotation to the fieldsprefixPaddingMs
andsilenceDurationMs
inRealtimeServerVadTurnDetection
class as well as to thetoJson
method.Duration
typestoJson
will try to serialize these as String usingjsonWriter.writeStringField
Checklist
The text was updated successfully, but these errors were encountered: