mirror of
https://github.com/pstrueb/piper.git
synced 2026-04-19 06:44:50 +00:00
Added resampler.
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
"# clone:\n",
|
||||
"!git clone -q https://github.com/rmcpantoja/piper\n",
|
||||
"%cd /content/piper/src/python\n",
|
||||
"!wget -q \"https://raw.githubusercontent.com/coqui-ai/TTS/dev/TTS/bin/resample.py\"\n",
|
||||
"!pip install -q -r requirements.txt\n",
|
||||
"!pip install -q torchtext==0.12.0\n",
|
||||
"!pip install -q torchvision==0.12.0\n",
|
||||
@@ -266,6 +267,14 @@
|
||||
"sample_rate = \"22050\" #@param [\"16000\", \"22050\"]\n",
|
||||
"#@markdown ---\n",
|
||||
"%cd /content/piper/src/python\n",
|
||||
"#@markdown ### Do you want to train using this sample rate, but your audios don't have it?\n",
|
||||
"#@markdown The resampler helps you do it quickly!\n",
|
||||
"resample = False #@param {type:\"boolean\"}\n",
|
||||
"if resample:\n",
|
||||
" !python resample.py --input_dir \"/content/dataset/wavs\" --output_dir \"/content/dataset/wavs_resampled\" --output_sr {sample_rate} --file_ext \"wav\"\n",
|
||||
" !mv \"/content/dataset/wavs_resampled/*\" \"/content/dataset/wavs\"\n",
|
||||
"#@markdown ---\n",
|
||||
"\n",
|
||||
"!python -m piper_train.preprocess \\\n",
|
||||
" --language {final_language} \\\n",
|
||||
" --input-dir /content/dataset \\\n",
|
||||
|
||||
Reference in New Issue
Block a user