mirror of https://github.com/coqui-ai/TTS.git
linter + test
parent
fba0c828cd
commit
e769a95916
|
@ -16,16 +16,14 @@ if __name__ == '__main__':
|
|||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='''Resample a folder recusively with librosa
|
||||
Can be used in place or create a copy of the folder as an output.\n\n'''
|
||||
|
||||
'''
|
||||
Example run:
|
||||
Can be used in place or create a copy of the folder as an output.\n\n
|
||||
Example run:
|
||||
python TTS/bin/resample.py
|
||||
--input_dir /root/LJSpeech-1.1/
|
||||
--output_sr 22050
|
||||
--output_dir /root/resampled_LJSpeech-1.1/
|
||||
--n_jobs 24
|
||||
''',
|
||||
''',
|
||||
formatter_class=RawTextHelpFormatter)
|
||||
|
||||
parser.add_argument('--input_dir',
|
||||
|
@ -55,11 +53,11 @@ Example run:
|
|||
|
||||
if args.output_dir:
|
||||
print('Recursively copying the input folder...')
|
||||
shutil.copytree(args.input_dir, args.output_dir)
|
||||
copy_tree(args.input_dir, args.output_dir)
|
||||
args.input_dir = args.output_dir
|
||||
|
||||
print('Resampling the audio files...')
|
||||
audio_files = glob.glob(os.path.join(args.input_dir,'**/*.wav'), recursive=True)
|
||||
audio_files = glob.glob(os.path.join(args.input_dir, '**/*.wav'), recursive=True)
|
||||
print(f'Found {len(audio_files)} files...')
|
||||
with Pool(processes=args.n_jobs) as p:
|
||||
with tqdm(total=len(audio_files)) as pbar:
|
||||
|
|
|
@ -6,6 +6,7 @@ nosetests tests -x &&\
|
|||
|
||||
# runtime tests
|
||||
./tests/test_demo_server.sh && \
|
||||
./tests/test_resample.sh && \
|
||||
./tests/test_tacotron_train.sh && \
|
||||
./tests/test_glow-tts_train.sh && \
|
||||
./tests/test_vocoder_gan_train.sh && \
|
||||
|
|
Loading…
Reference in New Issue