mp3

Finding the length of an mp3 file

Finding the length of an mp3 file Question: So i have the code: import glob,os import random path = ‘C:\Music\’ aw=[] for infile in glob.glob( os.path.join(path,’*.mp3′) ): libr = infile.split(‘Downloaded’,1) aw.append(infile) aww = -1 while 1: aww += 1 print len(aw),aww random.shuffle(aw) awww = aw[aww] os.startfile(awww) but all it does is go through all of …

Total answers: 5

Writing a Python Music Streamer

Writing a Python Music Streamer Question: I would like to implement a server in Python that streams music in MP3 format over HTTP. I would like it to broadcast the music such that a client can connect to the stream and start listening to whatever is currently playing, much like a radio station. Previously, I’ve …

Total answers: 5

Python module to change MP3 files to play back faster?

Python module to change MP3 files to play back faster? Question: I have a number of MP3 files containing lectures where the speaker talks very slowly and I would like to alter the MP3 file so that the playback rate is about 1.5 times as fast as normal. Can someone suggest a good Python library …

Total answers: 4

Compare two audio files

Compare two audio files Question: Basically, I have a lot of audio files representing the same song. However, some of them are worse quality than the original, and some are edited to where they do not match the original song anymore. What I’d like to do is programmatically compare these audio files to the original …

Total answers: 3

How do I concatenate files in Python?

How do I concatenate files in Python? Question: I have multiple (between 40 and 50) MP3 files that I’d like to concatenate into one file. What’s the best way to do this in Python? Use fileinput module to loop through each line of each file and write it to an output file? Outsource to windows …

Total answers: 4

Python library for playing fixed-frequency sound

Python library for playing fixed-frequency sound Question: I have a mosquito problem in my house. This wouldn’t usually concern a programmers’ community; However, I’ve seen some devices that claim to deter these nasty creatures by playing a 17Khz tone. I would like to do this using my laptop. One method would be creating an MP3 …

Total answers: 5

abstracting the conversion between id3 tags, m4a tags, flac tags

abstracting the conversion between id3 tags, m4a tags, flac tags Question: I’m looking for a resource in python or bash that will make it easy to take, for example, mp3 file X and m4a file Y and say “copy X’s tags to Y”. Python’s “mutagen” module is great for manupulating tags in general, but there’s …

Total answers: 6

Python library to modify MP3 audio without transcoding

Python library to modify MP3 audio without transcoding Question: I am looking for some general advice about the mp3 format before I start a small project to make sure I am not on a wild-goose chase. My understanding of the internals of the mp3 format is minimal. Ideally, I am looking for a library that …

Total answers: 5