1. Learn
  2. /
  3. Courses
  4. /
  5. Multi-Modal Systems with the OpenAI API

Connected

Exercise

Preparing the spoken response

You've made it to the final step of the case study! Your task now is to convert the tailored, translated response into speech. Since the customer submitted their query via audio, they'll receive an audio reply in return—how cool is that?

The translated reply from the previous exercise is available as translated_reply.

Instructions

100 XP
  • Use the gpt-4o-mini-tts model with the "onyx" voice to create a speech request for translated_reply.
  • Stream the response to an .mp3 file.