Coder Social home page Coder Social logo

arfticle-three's Introduction

arfticlethree

  • Follow my cmusphinx-alignment-example instructions to get cmusphinx set up with my driver class and align.sh.

  • Get an oral argument audio file (MP3) and transcript text from Oyez.org (e.g. here. From the case page, click on the Argument audio link. Download the MP3, and then click Full Transcript Text and copy and paste the transcript into a similarly named text file. You should have files like 13-553_20141209-argument.mp3 and 13-553_20141209-argument.txt.

  • Convert the MP3 to a 16khz 16bit mono WAV:

    sox 13-553_20141209-argument.mp3 -b 16 13-553_20141209-argument.wav channels 1 rate 16k

  • Run the transcript parser to segment the transcript by speaker:

    python3 parse_transcript.py 13-553_20141209-argument.txt

  • It won't necessarily get the speakers right. Look at 13-553_20141209-argument.speakers.txt and put #-marks before any line that is not actually a speaker. If you made any change, re-run the script above (it'll look for this file this time and use the list of speakers in the file). The script will write out 13-553_20141209-argument.words.txt which contains just the spoken words.

  • Run the aligner. This part will take about 2-3 times as long as real time. If the oral argument was an hour, expect the alignment process to take 2-3 hours to finish.

    path/to/align.sh 13-553_20141209-argument.wav 13-553_20141209-argument.words.txt > 13-553_20141209-argument.csv

  • Extract the speaker turn times by running the last script:

    python3 get_alignment.py 13-553_20141209-argument.txt > 13-553_20141209-argument.turns.csv

You'll get 13-553_20141209-argument.turns.csv, which is a CSV file where the first column is the name of a speaker and the second and third columns are the start and end times (in miliseconds) of when that speaker was speaking.

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.