



import { writeFileSync } from 'node:fs';
import OpenAI from 'openai';
const api = new OpenAI({
baseURL: 'https://api.ai.cc/v1',
apiKey: '',
});
const main = async () => {
const answer = await api.chat.completions.create({
model: 'gpt-4o-audio-preview',
modalities: ['text', 'audio'],
audio: { voice: 'alloy', format: 'wav' },
messages: [
{
role: 'user',
content: 'Tell me, why is the sky blue?'
}
],
});
console.log(answer.choices[0]);
writeFileSync(
'answer.wav',
Buffer.from(answer.choices[0].message.audio.data, 'base64'),
{ encoding: 'utf-8' }
);
};
main();
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.ai.cc/v1",
api_key="",
)
response = client.chat.completions.create(
model="gpt-4o-audio-preview",
modalities=["text", "audio"],
audio={"voice": "alloy", "format": "wav"},
messages=[
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
print(response.choices[0])
wav_bytes = base64.b64decode(response.choices[0].message.audio.data)
with open("answer.wav", "wb") as f:
f.write(wav_bytes)

Product Detail
✨ Introducing GPT-4o Audio Preview
The GPT-4o Audio Preview ushers in a new era of seamless human-AI interaction, bridging the gap between text and speech with remarkable fluidity. Engineered for real-time voice conversations and sophisticated audio interpretation, it's an indispensable tool for a wide array of applications, from intelligent assistants to advanced accessibility solutions and intuitive voice interfaces.
🚀 Key Capabilities
- Real-time Responsiveness: Achieve human-like conversational pace with audio transcription and voice generation response times averaging just ~320 milliseconds.
- Global Language Support: Comprehension and generation across 50+ languages, featuring optimized tokenization for non-Latin scripts, serving 97% of global speakers.
- Emotional Intelligence: Advanced sentiment analysis coupled with nuanced voice generation enables richer, more emotionally expressive communication.
- Enhanced Reliability: Significantly reduced hallucination rates and robust safety mechanisms are built-in to ensure consistent and dependable outputs.
- Extensive Context: A large context window of up to 128k tokens allows for coherent, long-form interactions without losing track of the conversation's flow.
💡 Intended Applications
- 🤖 Voice Assistants: Powering natural, real-time conversational experiences.
- ♿ Accessibility Tools: Providing intuitive audio interaction for visually impaired users and beyond.
- 📞 Customer Support: Delivering fast, expressive, and efficient support via voice channels.
🌐 Language Capabilities
GPT-4o boasts support for over 50 languages, encompassing roughly 97% of the world's speakers. Its advanced tokenization is specifically optimized for non-Latin languages, ensuring broad and inclusive global reach.
⚙️ Technical Underpinnings
Architecture
The core of GPT-4o is built upon the robust Transformer architecture, enhanced with deep multimodal integration. It seamlessly processes both text and audio modalities within a unified model. Its audio processing pipeline incorporates advanced Voice Activity Detection (VAD) to facilitate genuine real-time response generation.
Training Data
Training involved an extensive and diverse array of datasets, covering a vast spectrum of text and audio content. The audio corpus includes a rich collection of multilingual speech samples, various music datasets, environmental sounds, and meticulously crafted synthetic voice data.
Diversity & Bias Considerations
While GPT-4o integrates significant safeguards to mitigate bias, its performance can exhibit variability across different tasks, often influenced by the nuances of instructions or input quality. Recognized biases include inconsistent refusal rates for highly complex tasks, such as speaker verification or pitch extraction.
📊 Performance Highlights
- ✅ Accuracy: Achieved state-of-the-art results on key benchmarks like Massive Multitask Language Understanding (MMLU), scoring an impressive 88.7. Performance may vary in highly specialized tasks such as music pitch classification.
- ⚡ Speed: Boasts an average audio response time of 320 milliseconds, enabling near-instantaneous and natural conversational flow.
- 🛡️ Robustness: Demonstrates strong generalization across a multitude of languages and accents. However, it may encounter challenges with extremely specific or ambiguous tasks, like spatial distance prediction or audio duration estimation.
🔌 How to Get Started
Code Samples
Access to the GPT-4o Audio Preview model is available on the AI/ML API platform under the identifier "gpt-4o-audio-preview". Integrate it into your applications using the provided tools and examples.
<snippet data-name="open-ai.audio" data-model="gpt-4o-audio-preview"></snippet> API Documentation
For comprehensive guidelines and detailed integration instructions, refer to the API Documentation available on the AI/ML API website. This resource provides everything you need to successfully implement GPT-4o.
🔒 Ethical Considerations & Licensing
Ethical Guidelines
OpenAI has integrated stringent ethical considerations throughout the development of GPT-4o, prioritizing safety and robust bias mitigation. The model has undergone extensive evaluations to ensure its responsible and beneficial deployment across various applications.
Licensing
GPT-4o is offered under commercial usage rights, empowering businesses and developers to seamlessly integrate this advanced model into their own applications and services.
❓ Frequently Asked Questions (FAQs)
Q1: What is GPT-4o Audio Preview primarily designed for?
A1: It's designed for seamless, real-time interaction across text and speech, making it ideal for voice assistants, accessibility tools, and customer support applications requiring natural, human-like voice conversations.
Q2: How fast is GPT-4o's audio response time?
A2: GPT-4o boasts an average audio response time of approximately 320 milliseconds, enabling near-instantaneous conversational interactions.
Q3: What languages does GPT-4o support?
A3: It supports over 50 languages, covering approximately 97% of global speakers, with optimized tokenization for non-Latin scripts.
Q4: Can businesses use GPT-4o in their applications?
A4: Yes, GPT-4o is available under commercial usage rights, allowing businesses to integrate the model into their own applications.
AI Playground



Log in