Skip to content

Instantly share code, notes, and snippets.

@tkell
Created February 15, 2013 18:05
Show Gist options
  • Save tkell/4962179 to your computer and use it in GitHub Desktop.
Save tkell/4962179 to your computer and use it in GitHub Desktop.
one.py with LocalAudioStream!
def main(input_filename, output_filename):
input_file = open(input_filename, 'rb')
audio_stream = audio.LocalAudioStream(input_file)
print audio_stream.analysis.pyechonest_track.id
bars = audio_stream.analysis.bars
collect = []
for bar in bars:
collect.append(audio_stream[bar.children()[0]])
out = audio.assemble(collect)
out.encode(output_filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment