Added support for CreateSpeech Azure models (#657)

This commit is contained in:
xuanming.zhang
2024-02-08 15:40:39 +08:00
committed by GitHub
parent 69e3fcbc27
commit 6c2e3162df

View File

@@ -74,7 +74,7 @@ func (c *Client) CreateSpeech(ctx context.Context, request CreateSpeechRequest)
err = ErrInvalidVoice
return
}
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/audio/speech", request.Model),
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/audio/speech", string(request.Model)),
withBody(request),
withContentType("application/json; charset=utf-8"),
)