Coder Social home page Coder Social logo

podcastspeedup's Introduction

This package allows to speed up a podcast differently for each speaker. It automatically recognizes the different speakers in the podcast and speed each one up to equalize their speeds (or to the choosing of the user). There are two ways to use this package:

  • Simply suscribing to the RSS links on your favorite podcast app (no need to install the package)
  • Directly changing the speaker speeds of an audio file.

RSS feeds

UPDATE: Due to Anchor's API change, this feature is currently broken. You can still change the speaker speeds of an audio file (see below).

Suscribing

Simply check the list of available podcasts and suscribe to the one you want on your podcast app. For each podcast, the speeds of the speakers are equalized by speeding up the slowest. If the podcast you want is not available, you can add this new podcast to the list:

Adding a podcast

To add a podcast to the list so that it's downloaded, transformed and uploaded to a new RSS link:

  • install the package (see below)

  • create an Anchor account (with a new email adress), and find the rss link of this Anchor account

  • run the following command with your own parameters (this is an example for the podcast Conversation With Tyler)

python download_and_upload/add_podcast.py --name Conversation With Tyler --short-name cwt --original-rss http://cowenconvos.libsyn.com/rss --new-rss https://anchor.fm/s/3b3f2bb4/podcast/rss --anchor-username [email protected] --anchor-password cwtspeedup2324

original_rss should be the RSS link of the original podcast, new_rss should be the RSS link of the Anchor account you've created.

  • (optional) run python download_and_upload/refresh.py

It automatically downloads new episodes, transform them, and upload the new files to Anchor. It might take a long time, but it helps!

  • make a pull request with all the files which have been changed.

Transforming audio files manually

You can also use this package directly to transform podcast audio files. In this case, you'll need to install it first:

Installing

Sox

SoX version 14.4.2 or higher should be installed.

To install SoX on Mac with Homebrew:

brew install sox

on Linux:

apt-get install sox

or install from source.

DeepSpeech models

You'll need to download DeepSpeech models. Simply run:

wget -P models/ -i models/model_links.txt

When SoX is installed and the DeepSpeech models are downloaded, use pip install -r requirements.txt to install the required packages. You're done!

Usage

python audio_treatment/speedup.py -f INPUT_FILE -s SPEED_SPEAKER_1 SPEED_SPKEAKER_2 -save OUTPUT_FILE

Speed-up the speakers in the input file by x2 and x1.3 (in order of appearance of each speaker), and save the result to the output file.

Options:

--show-speakers : play an extract of each speaker before asking the user to choose speeds

--automatic : automatically match the speeds of each speakers (by speeding up the slowest). Can be useful to balance your podcasts before adjusting speed in your favorite podcast app.

Example:

Try python audio_treatment/speedup.py -f audio-files/tyler-trimmed.wav -s 1.8 1.2 -save results/tyler-sped-up.wav to speed up an extract from Conversation With Tyler.

Notes:

The package is quite slow right now (30 minutes for a 1h30 podcast in automatic mode, 10 minutes otherwise).

By default, the speakers are ordered according to their first appearance in the podcast. Given that the host of the podcast is probably the first speaker, -s 2 1.3 should speed-up the host x2 and the guest x1.3. Note that intro music can sometimes mess the default order of the speakers (to be solved).

Uses pysox for sound modification, pyAudioAnalysis for speaker diarization, DeepSpeech for infering speaker speed in automatic mode, and Anchor for storage and RSS feeds.

podcastspeedup's People

Contributors

leogrin avatar

Stargazers

Nathan Grinsztajn avatar  avatar Antoine Goujon avatar

Watchers

James Cloos avatar  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.