MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / read_mp3_file

Function read_mp3_file

data/unit_test/tests.py:1446–1453  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

1444import struct
1445
1446def read_mp3_file(file_path):
1447 audio = MP3(file_path)
1448 audio_data = audio.tags.get('TXXX:replaygain_track_gain')
1449 if audio_data:
1450 gain = float(audio_data.text[0].split()[0])
1451 else:
1452 gain = 0
1453 return gain
1454
1455def test_task_149(trajectory):
1456 audio_path = "./output/149.mp3"

Callers 1

test_task_149Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected