Created
February 15, 2013 18:05
-
-
Save tkell/4962179 to your computer and use it in GitHub Desktop.
one.py with LocalAudioStream!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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