-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This is the path where all output is stored | ||
export PYTHONPATH=$PYTHONPATH:$(pwd)/src | ||
out_path=data | ||
|
||
echo "##############################################################" | ||
echo "# Jasperize" | ||
echo "##############################################################" | ||
wave_path=$out_path/full_waverized | ||
jasper_path=$out_path/full_jasperized | ||
python scripts/jasperize.py $wave_path $jasper_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ download/ | |
full/ | ||
full_normalized/ | ||
full_waverized/ | ||
full_jasperized/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
click==7.0 | ||
tqdm==4.39.0 | ||
git+git://github.com/ynop/audiomate.git@92f5725#egg=audiomate | ||
git+git://github.com/ynop/audiomate.git@30488ce#egg=audiomate | ||
git+git://github.com/ynop/spoteno.git@7700d53#egg=spoteno |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
import click | ||
|
||
import audiomate | ||
from audiomate.corpus import io | ||
|
||
|
||
@click.command() | ||
@click.argument('in_folder', type=click.Path(exists=True)) | ||
@click.argument('out_folder', type=click.Path()) | ||
@click.option('--base-folder', default=None, type=click.Path()) | ||
def run(in_folder, out_folder, base_folder): | ||
if not os.path.exists(out_folder): | ||
if base_folder is None: | ||
base_folder = os.path.dirname(out_folder) | ||
|
||
w = io.NvidiaJasperWriter( | ||
num_workers=8, | ||
no_check=True, | ||
data_base_path=base_folder | ||
) | ||
target_audio_path = os.path.join(out_folder, 'audio') | ||
os.makedirs(target_audio_path) | ||
|
||
print('Load source corpus') | ||
ds = audiomate.Corpus.load(in_folder) | ||
print('Save jasper corpus') | ||
w.save(ds, out_folder) | ||
else: | ||
print('Already jasperized') | ||
|
||
|
||
if __name__ == '__main__': | ||
run() |