Welcome to the Text-to-Speech Application, an innovative solution for converting text and text files into natural-sounding speech using AWS Polly. This application supports multiple languages and voice options, allowing for a highly customizable user experience.
- Introduction
- Features
- Prerequisites
- Installation
- Usage
- API Endpoints
- Voice Options
- Data Analytics
- Contributing
- License
This project leverages AWS Polly's advanced text-to-speech capabilities to convert textual input into speech. It supports multiple languages and a variety of voices, making it suitable for diverse applications such as educational tools, accessibility enhancements, and more.
- Multiple Input Options: Convert plain text or text files to speech.
- Voice Selection: Choose from a wide range of male and female voices.
- Language Support: Supports multiple languages.
- Real-Time Processing: Quick conversion with AWS Polly.
- Downloadable Output: Get your synthesized speech as downloadable MP3 files.
Before you begin, ensure you have met the following requirements:
- Python 3.7+
- Node.js and npm
- AWS account with access to AWS Polly
- AWS CLI configured with appropriate permissions
- Clone the Repository
```bash git clone https://github.com/yourusername/text-to-speech-app.git cd text-to-speech-app ```
- Backend Setup
```bash
python -m venv venv source venv/bin/activate
pip install -r requirements.txt ```
- Frontend Setup
```bash
cd frontend
npm install
npm start ```
- Start the Flask Server
```bash
cd .. export FLASK_APP=app.py flask run ```
- Open your browser and navigate to
http://localhost:3000
. - Select either the "Text" or "Files" option.
- Enter your text or upload a text file.
- Choose a voice and language.
- Click the "Convert" button to generate the speech.
- Download the generated MP3 file from the provided link.
Fetches available voices categorized by gender.
Response:
```json { "Male": [ {"Name": "Matthew", "SupportedEngines": ["standard", "neural"]}, {"Name": "Brian", "SupportedEngines": ["standard"]} ], "Female": [ {"Name": "Joanna", "SupportedEngines": ["standard", "neural"]}, {"Name": "Emma", "SupportedEngines": ["standard"]} ] } ```
Sets the selected voice and engine for speech synthesis.
Request:
```json { "Voice": "Joanna", "Engine": "standard" } ```
Response:
```json { "selectedVoice": "Joanna" } ```
Uploads text or a text file for conversion to speech.
Request (Text):
```json { "text": "Hello, world!" } ```
Request (File):
Upload a .txt
file using multipart/form-data.
Response:
```json { "message": "Task Completed", "uri": "https://your-bucket.s3.amazonaws.com/task-id.mp3" } ```
The application supports a variety of voices provided by AWS Polly. Here’s a breakdown of the voices and their supported engines:
- English (US):
- Male: Matthew, Brian
- Female: Joanna, Emma
- English (UK):
- Male: Brian
- Female: Emma
- Spanish (ES):
- Male: Enrique
- Female: Conchita
We welcome contributions from the community. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.