A mobile-friendly, dark-themed web application to showcase OpenAI's GPT-4o-mini-tts API. This app allows users to test various text-to-speech features with a modern, gaming-inspired UI.
- 🎭 Choose from all 11 OpenAI TTS voices (alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse)
- 🎮 Modern, gaming-inspired dark UI with responsive design
- 🎛️ Adjust speech speed from 0.25x to 4.0x
- 📝 Input custom text (up to 4096 characters) with character count tracking
- 🎯 Add custom voice instructions to personalize the output
- 🎨 10 preset "personalities" with example scripts and instructions
- 🔒 Securely use your own OpenAI API key (stored only in browser's localStorage)
- 📥 Download and share functionality for generated audio
- 💻 Source code display with JavaScript, Python, and cURL examples
- 📊 Complete API request and response visualization
- Node.js (v16 or higher)
- npm or yarn
- An OpenAI API key with access to the GPT-4o-mini-tts model
-
Clone this repository
git clone https://github.com/lagna360/gpt-4o-mini-tts.git cd gpt-4o-mini-tts -
Install dependencies
npm install # or yarn -
Start the development server
npm run dev # or yarn dev -
Open your browser and navigate to
http://localhost:5173
- Enter your OpenAI API key (it will be stored only in your browser's local storage)
- Select a voice from the available options
- Choose a pre-built vibe or customize your own
- Enter text in the script area
- Add custom instructions if desired
- Adjust the speech speed
- Click "Generate Speech" to create the audio
- Listen, download, or share the generated audio
This application uses the OpenAI API's text-to-speech endpoint:
POST https://api.openai.com/v1/audio/speech
For more information, visit the OpenAI API documentation.
- React
- Vite
- Tailwind CSS
- OpenAI API
MIT