Skip to content

VTT_formatter using Jupyter Notebooks

Georgie Wellock edited this page Jul 8, 2019 · 12 revisions

VTT_formatter and Jupyter Notebooks

VTT_formatter is a python package that can be executed using python in the command line or through an interface such as a Jupyter Notebook. Jupyter Notebooks are human-readable documents which contain both computer code and text elements allowing the project to be documented, executed and analysed in one view.

Using Jupyter Notebooks

Using Microsoft Azure Notebooks (recommended)

Jupyter Notebooks can be run on a local machine (see below) or alternatively can be run remotely using Microsoft's cloud platform Azure. Using Azure Notebooks allows you to access your notebooks from anywhere as they are stored on a remote server which you log into using your credentials.

  • Head to the Azure Notebooks website

  • Select sign in from the top right hand corner and log in using your existing Microsoft credentials or create an account

  • Select My Projects from the top bar





  • Select New Project




  • Define the project name and ID




  • Upload your WEBVTT transcript from your computer




  • Open a new Jupyter Notebook




  • Name the notebook and select either python 3.5 or python 3.6




  • This should open a Jupyter Notebook which looks like




  • Write the following in each cell, where filename = the name of the .vtt file you uploaded previously. Click run following each completed line




  • This will run the code and create the reformatted .txt file in the folder




  • The reformatted .txt file can then be downloaded back onto your local machine.




Using Jupyter locally through Anaconda

Jupyter Notebooks can be set up locally on an individual computer by installing Anaconda (for Windows select Python 3.7 version, 64-Bit Graphical Installer (662 MB)). Follow the instructions for the install keeping the default settings, this will install Anaconda on the C: drive.

  • Once installed select Anaconda prompt from the windows menu.




  • Create a conda environment by typing conda create -n env_name in the prompt where env name is the name of your python environment. Type y when prompted.




*Activate conda environment by typing conda activate env_name



  • Install jupyter by typing conda install jupyter which will install the jupyter project.




  • To access notebooks, type jupyter notebook into the prompt.




  • This will open a view of your files in your web browser where you can then navigate to a folder in which you wish to start a new notebook




  • Select new --> python 3




  • Run through the Jupyter notebook as described for Azure Notebooks however locally filename = the full path to where the .vtt file is stored.




The generated .txt file will be in the same directory as the original .vtt file.