From dca606b856efbee3466dc8398ec2e3be09efab1f Mon Sep 17 00:00:00 2001 From: Lou Zell Date: Thu, 30 Nov 2023 21:24:23 -0800 Subject: [PATCH] Fix: Readme formatting and correct audioCreateSpeech call --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d9564d4..2f1dadaa 100644 --- a/README.md +++ b/README.md @@ -539,7 +539,7 @@ public struct AudioSpeechQuery: Codable, Equatable { public let model: Model // tts-1 or tts-1-hd public let input: String public let voice: AudioSpeechVoice - public let response_format: AudioSpeechResponseFormat + public let responseFormat: AudioSpeechResponseFormat public let speed: String? // Initializes with Double? //... } @@ -555,13 +555,13 @@ public let audioData: Data? **Example:** ```swift -let query = AudioSpeechQuery(model: .tts_1, input: "Hello, world!", voice: .alloy, response_format: .mp3, speed: 1.0) +let query = AudioSpeechQuery(model: .tts_1, input: "Hello, world!", voice: .alloy, responseFormat: .mp3, speed: 1.0) openAI.audioCreateSpeech(query: query) { result in // Handle response here } //or -let result = try await openAI.audioTranscriptions(query: query) +let result = try await openAI.audioCreateSpeech(query: query) ``` [OpenAI Create Speech – Documentation](https://platform.openai.com/docs/api-reference/audio/createSpeech)