Skip to content

First prototype of a youtube autodubber using APIs and libraries provided by Python.

Notifications You must be signed in to change notification settings

Jiaqi07/youtubeAutoDub_0.1

Repository files navigation

Install FFmpeg

https://www.wikihow.com/Install-FFmpeg-on-Windows

Install ffmpeg-python ffmpeg-python API Docs

pip install ffmpeg-python

Play sounds

pip3 install gTTS playsound

import gtts
from playsound import playsound
# play the audio file
playsound("hello.mp3")

Language transalation

import speech_recognition as sr
r = sr.Recognizer()

with sr.AudioFile("hello_world.wav") as source:
    audio = r.record(source)
try:
    s = r.recognize_google(audio)
    print("Text: "+s)
except Exception as e:
    print("Exception: "+str(e))

Remove orginal audio channel from MP4

import subprocess
command = 'for file in *.mp4; do ffmpeg -i "$file" -c copy -an "noaudio_$file"; done'
subprocess.call(command, shell=True)

Combine MP4 and MP3

pip install ffmpeg-python

import ffmpeg
infile1 = ffmpeg.input(combine + "/" + name + ".mp4")
infile2 = ffmpeg.input(combine + "/" + name + ".mp3")
ffmpeg.concat(infile1, infile2, v=1, a=1).output(final_save_path + "/" + name + ".mp4").run()

Text-to-Speech generation

API to retrieve videos and meta data from Youtube

Twitch API to retrieve videos and meta data from Twitch

twitch-python (Current and release recently)

python-twitch-client (rich functionalities, but no update for two years)

5 Manual Ways to Subtitle and Caption Videos Automatically Using Speech Recognition

It's always good ideas to start manually to work out the concept and workflow manully before you developed software and tool to automate them.

Video Captioning API and Code

Sequence to Sequence -- Video to Text

Automated Video Captioning using S2VT

References

Twitch Stream Highlights Detection with Machine Learning

About

First prototype of a youtube autodubber using APIs and libraries provided by Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages