Skip to content

repo for storing code related to Youtube subtitles generator

Notifications You must be signed in to change notification settings

NileshGule/YoutubeSubtitlesGenerator

Repository files navigation

Youtube Subtitles generator

This repo contains the source code for generating the Youtube subtitles in multiple languages. The input file is a .vtt file. This is generated from Youtube video subtitle. The default language is English. This input file is converted to multiple languages uses Azure Cognitive service named Translator.

Prerequisites

Create the Translator service in Azure.

Follow the documentation to create a new instance of Translator service in Azure.

Get the API key and store it in the Machine level environment variable

Retrieve the API key for Translator from Azure portal and store it in an environment variable. I have used Powershell to add the environment variable. You can use any other approach to create an environment variable named TranslatorAPIkey.

[System.Environment]::SetEnvironmentVariable('TranslatorAPIkey','YOUR__API__KEY', 'Machine')

If you are on MacOS, you can store the API key in the .bashrc or .zshrc file as an environment variable.

export TranslatorAPIKey="<<replace_with_your_PAI-key>>"

List of Languages for subtitles

The subtitles are translated into the languages listed below. For the complete list of languages supported by the translator service, refer to the documentation.

Language code Language name
af Afrikaans
sq Albanian
ar Arabic
hy Armenian
bn Bangla
bg Bulgarian
zh-Hans ChineseSimplified
hr Croatian
cs Czek
da Danish
nl Dutch
fil Filipino
fi Finnish
fr French
de German
el Greek
he Hebrew
hi Hindi
hu Hungarian
id Indonesian
ga Irish
it Italian
ja Japanese
ko Korean
ms Malay
my Myanmar
ne Nepali
nb Norwegian
fa Persian
pl Polish
pt-pt Portuguese
ro Romanian
ru Russian
es Spanish
sv Swedish
th Thai
tr Turkish
uk Ukrainian
vi Vietnamese

Create project using YouTube Data API

Follow the instructions in the YouTube Data API and create a project in the console

Watch the two YouTUbe videos listed below to know how to generate and upload subtitles in multiple languages.

References

YouTube videos

How to generate Youtube subtitles in multiple languages using Microsoft Translator

How to generate Youtube subtitles in multiple languages using Microsoft Translator

How to programatically upload Youtube subtitles in multiple languages

How to programatically upload Youtube subtitles in multiple languages

About

repo for storing code related to Youtube subtitles generator

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages