Skip to content

A simple, easy-to-use web interface for generating high-quality audio from text using OpenAI's Text-to-Speech (TTS) API. This tool allows you to input text, provide optional instructions for tone and cadence, select a voice, and download the resulting audio in various formats.

License

Notifications You must be signed in to change notification settings

mohamadahmadidev/ai-voice-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Text-to-Speech Generator

A simple, easy-to-use web interface for generating high-quality audio from text using OpenAI's Text-to-Speech (TTS) API. This tool allows you to input text, select a voice, and download the resulting audio in various formats.

Screenshot of the AI Text-to-Speech Generator

✨ Features

  • Simple Interface: Clean and intuitive UI built with Tailwind CSS.
  • High-Quality Audio: Uses the tts-1-hd model for high-definition audio.
  • Instruction Templates: Choose from pre-defined instruction templates (e.g., Patient Teacher, Chill Surfer, Medieval Knight) to guide the voice's tone and cadence.
  • Custom Instructions: Write your own detailed instructions for the voice model.
  • Voice Selection: Choose from all available voices: Alloy, Ash, Ballad, Coral, Echo, Fable, Nova, Onyx, Sage, and Shimmer.
  • Multiple Formats: Download the generated audio in MP3, OPUS, AAC, or FLAC.
  • API Key Management: Your API key is saved locally in your browser's localStorage for convenience.
  • Audio Preview: Listen to the generated audio directly in the browser before downloading.
  • Responsive Design: Works on both desktop and mobile devices.

🚀 How to Use

1. Prerequisites

You need a modern web browser and an API key from OpenAI.

2. Setup

  1. Clone the repository:
    git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git)
  2. Navigate to the project directory:
    cd your-repo-name
  3. Open index.html: Simply open the index.html file in your web browser. There are no build steps or dependencies to install.

3. Running the App

  1. Open index.html in your browser.
  2. Enter your OpenAI API Key in the input field.
  3. (Optional) Select an instruction template or write your own custom instructions.
  4. Enter the text you want to convert to speech.
  5. Select the desired voice and output format.
  6. Click "Generate Audio".
  7. The audio will be generated and you can preview it or download the file.

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A simple, easy-to-use web interface for generating high-quality audio from text using OpenAI's Text-to-Speech (TTS) API. This tool allows you to input text, provide optional instructions for tone and cadence, select a voice, and download the resulting audio in various formats.

Topics

Resources

License

Stars

Watchers

Forks

Languages