generate test

This commit is contained in:
shahules786 2022-10-15 10:13:34 +05:30
parent b8a05c775c
commit 78138c5f93
3 changed files with 11 additions and 10 deletions

View File

@ -36,7 +36,7 @@ pwd
#python transcriber/tasks/embeddings/timit.py --directory /scratch/$USER/TIMIT/data/lisa/data/timit/raw/TIMIT/TEST --output ./data/test #python transcriber/tasks/embeddings/timit.py --directory /scratch/$USER/TIMIT/data/lisa/data/timit/raw/TIMIT/TEST --output ./data/test
python noisyspeech_synthesizer.py python noisyspeech_synthesizer.py
echo "files" echo "files"
mkdir /scratch/c.sistc3/MS-SNSD/DNS10 #mkdir /scratch/c.sistc3/MS-SNSD/DNS10
mv ./CleanSpeech_training/ /scratch/c.sistc3/MS-SNSD/DNS10 mv ./CleanSpeech_testing/ /scratch/c.sistc3/MS-SNSD/DNS10
mv ./NoisySpeech_training/ /scratch/c.sistc3/MS-SNSD/DNS10 mv ./NoisySpeech_testing/ /scratch/c.sistc3/MS-SNSD/DNS10
#python enhancer/cli/train.py #python enhancer/cli/train.py

View File

@ -19,11 +19,12 @@ sampling_rate: 16000
audioformat: *.wav audioformat: *.wav
audio_length: 10 audio_length: 10
silence_length: 0.2 silence_length: 0.2
total_hours: 10 total_hours: 0.5
snr_lower: 0 snr_lower: 0
snr_upper: 40 snr_upper: 40
total_snrlevels: 5 total_snrlevels: 5
naming: test
noise_dir: /scratch/c.sistc3/MS-SNSD/noise_train noise_dir: /scratch/c.sistc3/MS-SNSD/noise_test
speech_dir: /scratch/c.sistc3/MS-SNSD/clean_train speech_dir: /scratch/c.sistc3/MS-SNSD/clean_test
noise_types_excluded: None noise_types_excluded: None

View File

@ -27,23 +27,23 @@ def main(cfg):
noise_dir = cfg["noise_dir"] noise_dir = cfg["noise_dir"]
if not os.path.exists(noise_dir): if not os.path.exists(noise_dir):
assert False, "Noise data is required" assert False, "Noise data is required"
name = cfg["naming"]
fs = float(cfg["sampling_rate"]) fs = float(cfg["sampling_rate"])
audioformat = cfg["audioformat"] audioformat = cfg["audioformat"]
total_hours = float(cfg["total_hours"]) total_hours = float(cfg["total_hours"])
audio_length = float(cfg["audio_length"]) audio_length = float(cfg["audio_length"])
silence_length = float(cfg["silence_length"]) silence_length = float(cfg["silence_length"])
noisyspeech_dir = os.path.join( noisyspeech_dir = os.path.join(
os.path.dirname(__file__), "NoisySpeech_training" os.path.dirname(__file__), f"NoisySpeech_{name}ing"
) )
if not os.path.exists(noisyspeech_dir): if not os.path.exists(noisyspeech_dir):
os.makedirs(noisyspeech_dir) os.makedirs(noisyspeech_dir)
clean_proc_dir = os.path.join( clean_proc_dir = os.path.join(
os.path.dirname(__file__), "CleanSpeech_training" os.path.dirname(__file__), f"CleanSpeech_{name}ing"
) )
if not os.path.exists(clean_proc_dir): if not os.path.exists(clean_proc_dir):
os.makedirs(clean_proc_dir) os.makedirs(clean_proc_dir)
noise_proc_dir = os.path.join(os.path.dirname(__file__), "Noise_training") noise_proc_dir = os.path.join(os.path.dirname(__file__), f"Noise_{name}ing")
if not os.path.exists(noise_proc_dir): if not os.path.exists(noise_proc_dir):
os.makedirs(noise_proc_dir) os.makedirs(noise_proc_dir)