27 lines
373 B
Python
Executable File
27 lines
373 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
from pydub import AudioSegment
|
|
|
|
DIR = "/home/kae/git/musicmuster/archive"
|
|
|
|
# Iterate through flac files
|
|
|
|
|
|
def process(path):
|
|
audio = AudioSegment.from_file(path, "flac")
|
|
print(path)
|
|
print(f"{audio.dBFS=}")
|
|
|
|
|
|
|
|
|
|
|
|
print("-----------------")
|
|
|
|
|
|
for f in os.scandir(DIR):
|
|
if f.name.endswith(".flac"):
|
|
process(f.path)
|