PhxDemo.TTS.OpenAI (phx_demo v0.1.1)

Copy Markdown View Source

Narration with OpenAI's text-to-speech API.

config :phx_demo, :tts, {PhxDemo.TTS.OpenAI, voice: "nova"}

Options:

  • :api_key: defaults to the OPENAI_API_KEY environment variable
  • :model: default "gpt-4o-mini-tts"
  • :voice: default "alloy"
  • :instructions: speaking style, e.g. "Calm, friendly product demo"
  • :base_url: default "https://api.openai.com/v1"