File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 11import pytest
2- import ndjson
32import boto3
43import json
54import os
65import tarfile
76from pathlib import Path
87from omegaconf import OmegaConf
98from sdp .run_processors import run_processors
9+ from sdp .utils .common import load_manifest
1010
1111DATASET_CONFIGS_ROOT = Path (__file__ ).parents [1 ] / "dataset_configs"
1212
@@ -68,16 +68,14 @@ def test_tts_sdp_end_to_end(get_tts_ytc_data):
6868
6969 assert os .path .exists (cfg .final_manifest )
7070 output_file_data = {}
71- with open (cfg .final_manifest , "r" ) as f :
72- output_data = ndjson .load (f )
73- for item in output_data :
74- output_file_data [item ["audio_item_id" ]] = item
71+ output_data = load_manifest (cfg .final_manifest , encoding = "utf8" )
72+ for item in output_data :
73+ output_file_data [item ["audio_item_id" ]] = item
7574
7675 reference_file_data = {}
77- with open (reference_manifest_file , "r" ) as f :
78- reference_data = ndjson .load (f )
79- for item in reference_data :
80- reference_file_data [item ["audio_item_id" ]] = item
76+ reference_data = load_manifest (reference_manifest_file , encoding = "utf8" )
77+ for item in reference_data :
78+ reference_file_data [item ["audio_item_id" ]] = item
8179
8280 assert len (output_file_data ) == len (reference_file_data )
8381 assert len (output_file_data ) == 2
You can’t perform that action at this time.
0 commit comments