Skip to content

Commit fa2aaf2

Browse files
Remove package dependency
1 parent 22a6bfe commit fa2aaf2

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

docs/src/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"numpy",
4646
"tqdm",
4747
"soundfile",
48-
"ndjson",
4948
"boto3",
5049
"webvtt_py",
5150
"python_docx",

requirements/tts.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
ndjson
21
transformers
32
accelerate
43
torchaudio

tests/test_tts_sdp_end_to_end.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import pytest
2-
import ndjson
32
import boto3
43
import json
54
import os
65
import tarfile
76
from pathlib import Path
87
from omegaconf import OmegaConf
98
from sdp.run_processors import run_processors
9+
from sdp.utils.common import load_manifest
1010

1111
DATASET_CONFIGS_ROOT = Path(__file__).parents[1] / "dataset_configs"
1212

@@ -68,19 +68,16 @@ 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
8482
for audio_item_id in output_file_data:
85-
assert output_file_data[audio_item_id]["segments"] == reference_file_data[audio_item_id]["segments"]
86-
83+
assert output_file_data[audio_item_id]["segments"] == reference_file_data[audio_item_id]["segments"]

0 commit comments

Comments
 (0)