Skip to content

Philipelima/video-translate

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.

video-translate

python python Python azure

Have you ever thought about translate a YouTube video? That is the idea for this project.

Dependencies and API Integrations:


module version link
pytube v12.1.0 documentation
deep_translator v1.9.1 documentation
pymovie v1.0.2 documentation

api version link
AssemblyAI v2 AssemblyAI Speech to Text
Azure TTS Service v3 Azure Text to Speech

Basic usage:

    python3 video-translate/video-translate.py

How it works?


Consuming a set of python modules, a speech-to-text api from AssemblyAI and the Azure text-to-speech service, the video-translate system downloads the video with the pytube module based on its url, which must be entered by the user.

When the download is finished, the pymovie module is called to create an .mp3 file from the downloaded .mp4.

When the file creation is finished, the api for AssemblyAI's text-to-speech service is requested, sending the .mp3 file as data, the api returns a text containing what is said in the audio.

With the speech-to-text process finished and the AssemblyAI api returned, the Translate module is now called so that the text translation can take place with deep_translator.

With the translation of the text said in the audio finished, the Azure text-to-speech service is now called so that the translation can become an audio mp3.

With the audio mp3 translation created, now moviepy is called again so that it can replace the original audio, with the translated audio.

Below you can see a flowchart of how the translation is done:



Supported languages:

  • Portuguese

Note: english to spanish comming soon

About

Have you ever thought about translate a YouTube video? That is the idea for this project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages