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

Function test_task_146

data/unit_test/tests.py:1420–1433  ·  view source on GitHub ↗
(trajectory)

Source from the content-addressed store, hash-verified

1418 return dbfs
1419
1420def test_task_146(trajectory):
1421 audio_path = "./output/146.wav"
1422 ref_path = "./data/Ghostrifter Official - Serenity.wav"
1423
1424 # 读取音频文件
1425 audio_array, _ = read_wave_file(audio_path)
1426 ref_audio_array, _ = read_wave_file(ref_path)
1427
1428 # 计算音频的分贝(dBFS)
1429 audio_dbfs = calculate_dbfs(audio_array)
1430 ref_audio_dbfs = calculate_dbfs(ref_audio_array)
1431
1432 # 比较音量
1433 assert ref_audio_dbfs < audio_dbfs
1434
1435def test_task_147(trajectory):
1436 audio_path = "./output/147.mp3"

Callers

nothing calls this directly

Calls 2

read_wave_fileFunction · 0.85
calculate_dbfsFunction · 0.85

Tested by

no test coverage detected