(trajectory)
| 1418 | return dbfs |
| 1419 | |
| 1420 | def 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 | |
| 1435 | def test_task_147(trajectory): |
| 1436 | audio_path = "./output/147.mp3" |
nothing calls this directly
no test coverage detected