Multi-Modal Systems with the OpenAI API
James Chapman
Curriculum Manager, DataCamp

.speech.create()response = client.audio.speech.create(model="gpt-4o-mini-tts",voice="onyx",input="Creating human-like speech is now possible with just a few lines of code. Pretty neat, right?")response.stream_to_file("output.mp3")
response_format: "mp3", "opus", "aac", "flac", "wav", and "pcm"


Multi-Modal Systems with the OpenAI API