Giter Site home page Giter Site logo

jordanpal / podcast-transcripts Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 189 KB

Home Page: http://transcript-podcast.xyz

Python 61.92% Ruby 23.51% PHP 14.57%
podcast elasticsearch cmu-sphinx speech-to-text speech-recognition spark apache-spark apache-airflow logstash

podcast-transcripts's Introduction

PodText

Searchable podcast transcripts. Link to presentation.

Table of Contents

  1. Summary
  2. Setup
  3. Links

Summary

Introduction

Podcasting is a popular and growing medium, with over $1B in advertising revenue expected in 2021. However, podcast metadata spread around various sources which makes it difficult to perform analytics for brands interested in advertising in the space. Furthermore, one missing piece of data that could be used for analytics (or by interested consumers or bored data scientists...) is full transcriptions of the episodes. While some authors provide transcripts of their podcasts, it is not common practice, and there is currently no way to quickly search transcripts.

This project aims to index podcast transcripts for search, along with other metadata. In order to make these text documents easy and fast to search, the main design choice was made to use an Elasticsearch index for the podcast data. Other pieces of technology followed from that decision:

  • Logstash is used to ingest podcast RSS feeds into Elasticsearch
  • Spark is used to process the raw audio files into text
  • Speech recognition is done with CMU Sphinx (as a UDF in Spark)
  • Audio files are saved in S3
  • Kibana is used to visualize the data

Tech Stack

tech-stack

Setup

In order to run the scripts the following tools must be setup and connected to each other. In my case, everything was set up on AWS EC2 resources:

  • Elasticsearch cluster (mostly default settings suffices)
  • Logstash instance with custom RSS plugin installed (can be co-located with ES)
  • The ruby gem in the logstash dir has been edited to ingest podcast data more effectively. One should install the logstash-rss plugin, then update that file with the one here.
  • logstash-config.py is included to create a logstash.conf file for this pipeline. It reads a text file containing a podcast RSS feed URL on each line.
  • Apache Spark cluster
  • Spark workers should have the following installed via package manager and via pip:
  • (apt or similar) ffmpeg, swig, libpulse-dev libasound2-dev, python3-pip
  • (pip) pydub, SpeechRecognition, pocketsphinx, boto3, requests
  • (optional) Airflow can be installed to manage Spark workflow
  • Kibana installed for visualizations

Once everything is installed, the Elasticsearch, Logstash, and Kibana services can be started. If logstash was configured properly, it will ingest RSS data and populate an Elasticsearch index with podcast metadata (can be quickly checked in Kibana).

In order to start making transcripts, one can use the spark programs in the data-processing directory. The script download_mp3s.py gets all the episodes from Elasticsearch and downloads an MP3 into S3 for each if it does not yet exist. Then, transcribe_S3_to_ES.py finds all the episodes which have an MP3 but no transcription, and uses CMU Sphinx to transcribe each episode, putting the results back into Elasticsearch.

Links

podcast-transcripts's People

Contributors

jordanpal avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.