#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('pylab', 'inline') # only display first 30 seconds from pyannote.core.notebook import set_notebook_crop from pyannote.core import Segment set_notebook_crop(Segment(0, 30)) # # The Big Bang Theory TVD Plugin # ## Install # The following command will install **The Big Bang Theory TVD plugin** (and **TVD** if it is missing) # ```bash # pip install TVDTheBigBangTheory # ``` # ## Download all resources # The following command will download all resources for **The Big Bang Theory** into `/tmp/` directory. # ```bash # python -m tvd.create metadata /tmp/ TheBigBangTheory # ``` # ## Available resources # Initialize TheBigBangTheory TVD plugin # In[2]: from tvd import TheBigBangTheory theBigBangTheory = TheBigBangTheory('/tmp') # Get first episode # In[3]: episode = theBigBangTheory.episodes[0] episode # ### Outlines # Source: http://wiki.the-big-bang-theory.com # Provides # - scene summary # - scene location # In[9]: outline = theBigBangTheory.get_resource('outline', episode) outline # ### Transcripts # Source: http://foreverdreaming.org/ # Provides: # # - speaker label # - speech content # # Does not provide timestamps. # In[6]: transcript = theBigBangTheory.get_resource('transcript', episode) transcript # ### Force-aligned transcripts # Source: [LIMSI](http://www.limsi.fr) # Provides: # # - word-level timestamps (start & end time) # In[7]: transcript_aligned = theBigBangTheory.get_resource('transcript_aligned', episode) transcript_aligned.crop(0, 30) # ### Speaker # Source: [Makarand Tapaswi](https://cvhci.anthropomatik.kit.edu/~mtapaswi/projects/personid.html) # Provides: # # - speaker label with manual timestamps (five main characters + *other*) # In[10]: speaker = theBigBangTheory.get_resource('speaker', episode) speaker