<filename>nullrecords/convert.py
from pydub import AudioSegment


# import required module
import os
# assign directory
directory = 'Explorations'

# iterate over files in
# that directory
for filename in os.listdir(directory):
    f = os.path.join(directory, filename)
    # checking if it is a file
    if os.path.isfile(f):
        print(f)
    if ".m4a" in f:
        audio = AudioSegment.from_file(f, format="m4a")
        audio.export(f + ".mp3", format="mp3")

<filename>nullrecords/convert.py
from pydub import AudioSegment


# import required module
import os
# assign directory
directory = 'Explorations'

# iterate over files in
# that directory
for filename in os.listdir(directory):
    f = os.path.join(directory, filename)
    # checking if it is a file
    if os.path.isfile(f):
        print(f)
    if ".m4a" in f:
        audio = AudioSegment.from_file(f, format="m4a")
        audio.export(f + ".mp3", format="mp3")

# import required module # assign directory # iterate over files in # that directory # checking if it is a file