Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Michael 90f99d8a7b
feat(providers): add support for gpt-4o-audio-preview (#3302)
5 months ago
..
90f99d8a7b
feat(providers): add support for gpt-4o-audio-preview (#3302)
5 months ago
90f99d8a7b
feat(providers): add support for gpt-4o-audio-preview (#3302)
5 months ago
90f99d8a7b
feat(providers): add support for gpt-4o-audio-preview (#3302)
5 months ago
90f99d8a7b
feat(providers): add support for gpt-4o-audio-preview (#3302)
5 months ago

README.md

You have to be logged in to leave a comment. Sign In

OpenAI Audio Example

This example demonstrates how to use promptfoo to test OpenAI's audio capabilities using audio-capable models. The example focuses on audio input processing (speech-to-text) and audio output generation (speech-to-speech).

Quick Start

You can initialize this example in a new directory using:

npx promptfoo@latest init --example openai-audio

This will create all necessary files and folder structure to get started quickly.

Setup

  1. Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY=your-api-key-here
  1. The example includes sample audio files in the assets directory:
    • Armstrong_Small_Step.mp3 - Neil Armstrong's moon landing speech
    • Kennedy_berliner.mp3 - JFK's "Ich bin ein Berliner" speech

Files

  • promptfooconfig.yaml: Configuration file defining the providers and tests
  • audio-input.json: JSON template for the audio input prompt

Running the Example

From the root directory of promptfoo, run:

npx promptfoo eval -c examples/openai-audio/promptfooconfig.yaml
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...