capabilities.work

Chat then Speak

A 2-step recipe with OpenAI. We can help you get access.

Recipe · 2 steps

Chat then Speak

with OpenAI

Create a chat reply and convert it to speech audio.

  1. Create a chat completion answering the user prompt.
  2. Synthesize the chat reply into spoken audio.
What you'll need to have ready
  • apiKey: OpenAI API key used as a Bearer token.
  • chatModel: The chat model id (e.g. gpt-4o-mini).
  • prompt: The user prompt to answer.
  • speechModel: The text-to-speech model id (e.g. gpt-4o-mini-tts or tts-1).
  • voice: The voice to use for synthesis (e.g. alloy).
For your developer

Arazzo workflow openai:chat-then-speak, 2 operations: createChatCompletion → createSpeech. Specs on APIs.io.