def mp3convert(self): # make mp3 to work with open(self.mp3file, "wb").write(conversions.converttomp3(self.file, int(self.bitrate.GetStringSelection()), int(self.samplerate.GetStringSelection()), int(self.channels.GetStringSelection()))) self.afi=fileinfo.getmp3fileinfo(self.mp3file) print "result is",len(self.afi.frames),"frames" # and corresponding wav to play conversions.converttowav(self.mp3file, self.wavfile)
def _trim_and_adjust_vol_mp3(self, start, duration, volume): conversions.converttowav(self.file, self.wavfile, start=start, duration=duration) conversions.adjustwavfilevolume(self.wavfile, volume) return conversions.converttomp3(self.wavfile, int(self.bitrate.GetStringSelection()), int(self.samplerate.GetStringSelection()), int(self.channels.GetStringSelection()))
def _trim_and_adjust_vol_mp3(self, start, duration, volume): # trim, adjust volume, and write mp3 out # use the original to make a new wav, not the one that went through foo -> mp3 -> wav conversions.converttowav(self.file, self.wavfile, start=start, duration=duration) # adjust the volume conversions.adjustwavfilevolume(self.wavfile, volume) # convert to mp3 return conversions.converttomp3(self.wavfile, int(self.bitrate.GetStringSelection()), int(self.samplerate.GetStringSelection()), int(self.channels.GetStringSelection()))
def mp3convert(self): open(self.mp3file, "wb").write(conversions.converttomp3(self.file, int(self.bitrate.GetStringSelection()), int(self.samplerate.GetStringSelection()), int(self.channels.GetStringSelection()))) self.afi=fileinfo.getmp3fileinfo(self.mp3file) print "result is",len(self.afi.frames),"frames" conversions.converttowav(self.mp3file, self.wavfile)