Coder Social home page Coder Social logo

overcrash66 / audio-file-translator---s2st Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 2.51 MB

Audio file translator is a multilingual speech to speech and speech to text translator with other cool features

License: MIT License

Python 100.00%
english-translation s2st translation multiple-languages speech-recognition audio-translation text-translation s2tt

audio-file-translator---s2st's Introduction

Audio file translator - Speech To Speech and Speech to text Translator - Online mode (No api keys are needed )

Audio file translator, Speech To Speech Translator is a tool that allows you to translate the content of an Audio file using:

  • S2T: OpenAI's Whisper multilingual whisper-large-v2,
  • T2T: Google Speech Recognizer
  • TTS: Python gtts

Features

  1. Multi-Language Support

    • The translator supports various target languages, including English, Spanish, French, German, Japanese, Korean, Turkish, Arabic, Russian, Hebrew, Hindi, Italian, and Portuguese.
  2. YouTube Downloader

    • Integrated YouTube downloader for downloading audio from YouTube videos. Users can choose between MP3 and MP4 formats.
  3. Audio Conversion Tools

    • Convert Audio to MP3: Converts audio files to the MP3 format.
    • Extract Audio from Video: Extracts audio from video files and saves it as an MP3 file.
  4. Memory Management Improvements

    • Improved memory management for better performance, especially with large audio files.
    • Added support for translating large audio files without running out of memory.
  5. FFMpeg Integration

    • FFMpeg is utilized to split large audio files, preventing out-of-memory errors and enhancing translation quality.
  6. GUI Improvements

    • Updated GUI style for a more user-friendly experience.
    • Stop button to halt the playback of translated audio files.
  7. Version History

  • v1.0: Initial version.
  • v1.1: Improved memory management, support for large audio files, FFMpeg integration, audio-to-MP3 conversion, and GUI updates.
  • v1.2: Fixed audio-to-MP3 conversion, added MP4 to MP3 converter, and introduced YouTube downloader.
  • v1.3: Minor GUI updates, fix extract audio from video exception.
  • v1.4: Add missing Flag image, fix exception with Torchaudio backend not being able to handle the specified URI and format.
  • v1.5: 7gxycn08 GUI updates
  • v1.6: New GUI updates, Add Voice to text translation, Added a portable version (No python or package installs are needed, you need to copy and replace 'AudioFileTranslator-S2ST.py' file from 'main' folder to '/AudioFileTranslatror-Portable/resources')
  • v1.7: New GUI updates.
  • V1.8: Some Youtube Downloader fixes and improvements.
  • V1.9: Add a tool who replaces mp4 Video file Audio with translation audio file. (Go to: file > Replace Audio in Video) - Improve text translation by fixing a bug of duplicate successive words, except for English.
  • V2.0:- Fix Arabic translated text to be shown from right to left on textBox. - Fix Save to text file arabic translated text to be shown from right to left. - Fix a bug of duplicate successive words for English language.
  • V2.1: - Improve code readability.
    - Add load model to GPU if available.
    - Minor GUI updates. - Remove portable version.

Requirements

Make sure you have the following dependencies installed:

  • Python >= 3.10
  • Pip (Python package installer)
  • FFmpeg #Should be installed manually

Dependencies

  • pygame: Used for audio playback.
  • transformers: OpenAI's Whisper for speech-to-text translation.
  • gtts: Google Text-to-Speech for text-to-speech conversion.
  • torchaudio: Audio processing library.
  • pydub: Audio processing library.
  • pytube: YouTube video download library.
  • PIL: Python Imaging Library for image processing.
  • Customtkinter
  • httpx
  • CTkMenuBar

Usage

1- Install using pip

pip install audio-file-translator

2- Run

audio-file-translator

Or Manual installation

1- Clone the repository:

git clone https://github.com/overcrash66/Audio-File-Translator---S2ST.git

2- Navigate to folder:

cd Audio-File-Translator---S2ST

3- Create a vitrual env:

py -3.10 -m venv venv
venv\Scripts\activate

4- Install the required Python packages using:

pip install -r requirements.txt

5- Run the Script:

python audio_file_translator.py

Options:

1- File Menu:

  • Convert Audio file to MP3
  • Extract audio from Video
  • YouTube Downloader
  • Replace Audio in Video
  • Exit

2- Help Menu:

  • About

3- Select Audio File:

  • Browse to choose the input audio file.

4- Select Target Language:

  • Choose the target language from the dropdown menu.

5- Translate:

  • Click the "Translate" button to start the translation process.

6- Stop Playing Translated File:

  • Click the "Stop Playing Translated File" button to stop audio playback.

GUI Preview

Redesigned (Custom)

Configuration

  • You can customize the translation model and other settings by modifying the script.

License

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

audio-file-translator---s2st's People

Contributors

7gxycn08 avatar overcrash66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

audio-file-translator---s2st's Issues

Flag?

Why do you have a large Palestinian flag in the center? (Just out of curiosity.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.