Reputation: 21
I am trying to dwonload some podcasts and title them accordingly. Here is my code
s_out_dir = os.path.join(source_dir, pod_label, owner)
source_file = s_out_dir + '/' + pod_title + '.mp3'
audio_file_name = wget.download(link, out=source_file)
try:
sound = AudioSegment.from_mp3(audio_file_name)
#audio_file_name = source_dir + '/' + pod_label + '/' + owner + '/' + pod_title + '.wav'
audio_file_name = s_out_dir + + '/' + pod_title + '.wav
sound.export(audio_file_name, format="wav")
return audio_file_name
except:
print(audio_file_name)
The code workd if i replace source_file like
source_file = s_out_dir + 'tmp.mp3'
Having the same issue saving the .wav files
Any help appreciated
Upvotes: 2
Views: 21