OpenAI-TTS is a web app that allows you to convert text into natural, human-like speech using OpenAI's cutting-edge Text-to-Speech API. It supports multiple voices, languages, and accents for a variety of use cases.
- Multi-Language Support: Convert text to speech in various languages.
- Voice Customization: Choose from multiple voice options like Alloy, Echo, Fable, and more.
- Lightweight: Optimized for fast and efficient use on modern browsers.
- Responsive Design: Works seamlessly on desktops, tablets, and mobile devices.
- API Key Secure Input: Protect your OpenAI API key with client-side processing.
This project is for educational purposes only and is not affiliated with OpenAI. Use responsibly and ensure compliance with OpenAI's terms of service.
Please also note that the OpenAI API is a paid service, and you may incur charges based on your usage. The developers are not responsible for any costs associated with using the OpenAI API.
Check out the live demo here: OpenAI-TTS Web App
Follow these steps to set up the project locally:
-
Clone the Repository:
git clone https://github.com/Dor-sketch/OpenAI-TTS.git cd OpenAI-TTS
-
Run the App:
Open the
index.html
file in your browser or use a local server to run the app.# Using Python python -m http.server 8000
Open
http://localhost:8000
in your browser to view the app.
-
Enter API Key: Copy your OpenAI API key from the OpenAI dashboard and paste it into the API Key field in the app.
-
Enter Text: Type or paste the text you want to convert into the text area.
-
Select Voice: Choose one of the available voices (e.g., Alloy, Echo, Fable) from the dropdown menu. These voices are optimized for various styles and languages.
-
Click 'Convert to Speech': The app will send the text and voice preferences to the OpenAI TTS API and generate a downloadable audio file.
-
Play & Download: Listen to the generated audio in the built-in player or download it for offline use.
OpenAI TTS offers several advanced features:
- Multi-Language Support: Convert text into natural-sounding speech in over 30 languages.
- Customizable Voices: Choose from a range of expressive voices for specific use cases like audiobooks, tutorials, or accessibility tools.
- High-Quality Audio: Uses AI models to generate clear and realistic audio output.
For details about pricing and API limits, visit the OpenAI API documentation.
-
Invalid API Key: Ensure your API key is copied correctly and has the necessary permissions for text-to-speech.
-
API Limits Exceeded: Check your OpenAI usage and upgrade your account if needed.
-
Slow Conversion: Response times depend on the text length and server load. For optimal performance, try shorter texts or off-peak hours.
-
Browser Compatibility: Use modern browsers like Chrome, Firefox, or Edge for the best experience.
If you encounter issues or have feature requests, please open an issue in this repository or contact us via GitHub Discussions.
Don’t forget to ⭐ the repository if you found this project useful!
This project is licensed under the MIT License. For more information, see the LICENSE file.