Skip to content

The Multilingual Text-to-Speech Converter is a web-based application that allows users to input text and convert it into speech in various languages.

Notifications You must be signed in to change notification settings

Taskmaster-1/Multilingual-Text-to-Speech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multilingual Text-to-Speech Converter

Description

The Multilingual Text-to-Speech Converter is a web-based application that allows users to input text and convert it into speech in various languages. This project integrates Google's Cloud Text-to-Speech API and Translation API to deliver high-quality speech synthesis in multiple languages. Users can enter text, choose their preferred language, and listen to the generated speech directly in their browser.

This application is built using Flask, a lightweight Python web framework, and leverages HTML5's audio capabilities for seamless playback of the synthesized speech. The project is designed to be user-friendly, enabling real-time speech synthesis without the need for file downloads.

Features

  • Multilingual Support: Convert text to speech in various languages including English, Spanish, French, German, and more.
  • Real-time Speech Playback: Listen to the synthesized speech directly in the browser using an HTML5 audio player.
  • Google Cloud Integration: Utilizes Google's Text-to-Speech and Translation APIs for accurate language processing and high-quality speech synthesis.
  • Simple Web Interface: A clean and straightforward user interface for easy text input and language selection.

Technology Stack

  • Flask: A lightweight WSGI web application framework for Python.
  • Google Cloud Text-to-Speech API: Provides speech synthesis capabilities.
  • Google Cloud Translation API: Allows for text translation into different languages.
  • HTML5 Audio: Enables in-browser audio playback.

Installation

Prerequisites

  • Python 3.8+
  • Google Cloud SDK (for authentication and API access)
  • A Google Cloud Project with Text-to-Speech and Translation APIs enabled

Clone the Repository

git clone https://github.com/your-username/multilingual-text-to-speech.git
cd multilingual-text-to-speech

Setup the Virtual Environment

python -m venv venv

Activate the Virtual Environment

For Windows:

venv\Scripts\activate

For macOS/Linux:

source venv/bin/activate

Install the Required Packages

pip install -r requirements.txt

Set Up Google Cloud Credentials

Create a service account in your Google Cloud Console and download the JSON key file.

Set the environment variable to authenticate with Google Cloud services:

GOOGLE_APPLICATION_CREDENTIALS=path_to_your_service_account_file.json

Or, on macOS/Linux:

export GOOGLE_APPLICATION_CREDENTIALS="path_to_your_service_account_file.json"

Run the Application

python app.py

Visit http://127.0.0.1:5000/ in your browser to use the application.

Usage

Enter the text you want to convert to speech. Select the desired language from the dropdown menu. Click "Convert to Speech". The synthesized speech will play directly in the audio player below the form. Contributing Contributions are welcome! Please feel free to submit a Pull Request or open an issue for any bugs or feature requests.

Acknowledgments

Google Cloud Platform for providing the Text-to-Speech and Translation APIs. Flask for the simple and powerful web framework. The open-source community for their contributions and support.

About

The Multilingual Text-to-Speech Converter is a web-based application that allows users to input text and convert it into speech in various languages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages