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