mirror of
https://github.com/davesarmoury/GLaDOS.git
synced 2025-09-26 22:31:26 +08:00
Making training more generic
This commit is contained in:
parent
d67690c1eb
commit
855a69cfdd
@ -13,6 +13,24 @@
|
|||||||
"#!pip3 install nemo_toolkit[all]"
|
"#!pip3 install nemo_toolkit[all]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "ab5977d6-964e-4ebf-bbd8-e5418fdf67ea",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"## GLaDOS ##\n",
|
||||||
|
"blocklist = [\"potato\", \"_ding_\", \"00_part1_entry-6\", \"_escape_\"]\n",
|
||||||
|
"sources = [\"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Portal)\", \"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Portal_2)\", \"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Other)\"]\n",
|
||||||
|
"base_dir=\"glados_out\"\n",
|
||||||
|
"\n",
|
||||||
|
"## Wheatley ##\n",
|
||||||
|
"#blocklist = [\"jailbreakdooropens08\", \"jailbreakdooropens05\", \"jailbreakdooropens07\", \"jailbreakdooropens01\", \"sp_a1_intro7_pickupnags07\", \"sp_a1_wakeup_panic01\", \"sp_a1_wakeup_hacking09\", \"sp_a1_wakeup_hacking12\", \"sp_a1_wakeup_hacking10\", \"sp_a1_wakeup_hacking12\", \"sp_trust_flingalt08\", \"nanobotow03\", \"sp_a2_wheatley_ows\", \"bw_a4_2nd_first_test_solve_nags\", \"bw_sp_a2_core_actually05\", \"bw_sp_a2_core_actually01\", \"bw_sp_a2_core_potato04\", \"bw_sp_a4_tb_trust_drop_solve05\", \"bw_sp_a4_tb_trust_drop_impatient02\", \"bw_sp_a4_tb_wall_button_solve09\", \"bw_sp_a4_tb_polarity_solve04\", \"bw_a4_finale04_whitegel_break01\", \"bw_finale04_portal_opens_short05\", \"bw_finale04_portal_opens_short06\", \"bw_finale04_portal_opens_short07\", \"bw_finale04_portal_opens_short08\", \"bw_a4_finale04_wakeupa09\", \"bw_finale04_portal_opens17\", \"bw_finale04_portal_opens15\", \"bw_finale04_portal_opens13\", \"bw_finale04_portal_opens03\", \"openingwallhitone01\", \"demospherepowerup02\"]\n",
|
||||||
|
"#sources = [\"https://theportalwiki.com/wiki/wheatley_voice_lines\"]\n",
|
||||||
|
"#base_dir=\"wheatley_out\"\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
@ -75,8 +93,6 @@
|
|||||||
" BOLD = '\\033[1m'\n",
|
" BOLD = '\\033[1m'\n",
|
||||||
" UNDERLINE = '\\033[4m'\n",
|
" UNDERLINE = '\\033[4m'\n",
|
||||||
"\n",
|
"\n",
|
||||||
"blocklist = [\"jailbreakdooropens08\", \"jailbreakdooropens05\", \"jailbreakdooropens07\", \"jailbreakdooropens01\"]\n",
|
|
||||||
"\n",
|
|
||||||
"audio_dir = 'audio'\n",
|
"audio_dir = 'audio'\n",
|
||||||
"download_threads = 64\n",
|
"download_threads = 64\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -127,9 +143,6 @@
|
|||||||
" print(bcolors.FAIL + \"[\" + u'\\u2715' + \"] \" + bcolors.ENDC + result[0])\n",
|
" print(bcolors.FAIL + \"[\" + u'\\u2715' + \"] \" + bcolors.ENDC + result[0])\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def main():\n",
|
"def main():\n",
|
||||||
" sources = [\"https://theportalwiki.com/wiki/wheatley_voice_lines\"]\n",
|
|
||||||
" #sources = [\"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Portal)\", \"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Portal_2)\", \"https://theportalwiki.com/wiki/GLaDOS_voice_lines_(Other)\"]\n",
|
|
||||||
" \n",
|
|
||||||
" urls = []\n",
|
" urls = []\n",
|
||||||
" filenames = []\n",
|
" filenames = []\n",
|
||||||
" texts = []\n",
|
" texts = []\n",
|
||||||
@ -280,11 +293,11 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# additional files\n",
|
"# additional files\n",
|
||||||
"!mkdir -p tts_dataset_files && cd tts_dataset_files \\\n",
|
"#!mkdir -p tts_dataset_files && cd tts_dataset_files \\\n",
|
||||||
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/tts_dataset_files/cmudict-0.7b_nv22.10 \\\n",
|
"#&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/tts_dataset_files/cmudict-0.7b_nv22.10 \\\n",
|
||||||
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/tts_dataset_files/heteronyms-052722 \\\n",
|
"#&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/tts_dataset_files/heteronyms-052722 \\\n",
|
||||||
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/dataset_processing/tts/ljspeech/lj_speech.tsv \\\n",
|
"#&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/r1.23.0/scripts/dataset_processing/tts/ljspeech/lj_speech.tsv \\\n",
|
||||||
"&& cd .."
|
"#&& cd .."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -362,8 +375,8 @@
|
|||||||
" sup_data_path=./fastpitch_sup_data \\\n",
|
" sup_data_path=./fastpitch_sup_data \\\n",
|
||||||
" phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.10 \\\n",
|
" phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.10 \\\n",
|
||||||
" heteronyms_path=tts_dataset_files/heteronyms-052722 \\\n",
|
" heteronyms_path=tts_dataset_files/heteronyms-052722 \\\n",
|
||||||
" +whitelist_path=tts_dataset_files/lj_speech.tsv \\\n",
|
"# +whitelist_path=tts_dataset_files/lj_speech.tsv \\\n",
|
||||||
" exp_manager.exp_dir=./wheatley_out \\\n",
|
" exp_manager.exp_dir=./{base_dir} \\\n",
|
||||||
" +init_from_nemo_model=./tts_en_fastpitch_align.nemo \\\n",
|
" +init_from_nemo_model=./tts_en_fastpitch_align.nemo \\\n",
|
||||||
" trainer.max_epochs=300 \\\n",
|
" trainer.max_epochs=300 \\\n",
|
||||||
" trainer.check_val_every_n_epoch=25 \\\n",
|
" trainer.check_val_every_n_epoch=25 \\\n",
|
||||||
@ -430,7 +443,7 @@
|
|||||||
" return spectrogram, audio\n",
|
" return spectrogram, audio\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def get_best_ckpt_from_last_run(\n",
|
"def get_best_ckpt_from_last_run(\n",
|
||||||
" base_dir=\"./wheatley_out\", \n",
|
" base_dir=\"./\" + base_dir, \n",
|
||||||
" model_name=\"FastPitch\"\n",
|
" model_name=\"FastPitch\"\n",
|
||||||
" ): \n",
|
" ): \n",
|
||||||
" \n",
|
" \n",
|
||||||
@ -589,7 +602,7 @@
|
|||||||
" ~model.optim.sched \\\n",
|
" ~model.optim.sched \\\n",
|
||||||
" train_dataset=./hifigan_manifest_train.json \\\n",
|
" train_dataset=./hifigan_manifest_train.json \\\n",
|
||||||
" validation_datasets=./hifigan_manifest_validation.json \\\n",
|
" validation_datasets=./hifigan_manifest_validation.json \\\n",
|
||||||
" exp_manager.exp_dir=./wheatley_out \\\n",
|
" exp_manager.exp_dir=./{base_dir} \\\n",
|
||||||
" +init_from_pretrained_model=tts_en_hifigan \\\n",
|
" +init_from_pretrained_model=tts_en_hifigan \\\n",
|
||||||
" trainer.check_val_every_n_epoch=10 \\\n",
|
" trainer.check_val_every_n_epoch=10 \\\n",
|
||||||
" model/train_ds=train_ds_finetune \\\n",
|
" model/train_ds=train_ds_finetune \\\n",
|
||||||
@ -613,8 +626,6 @@
|
|||||||
"# Only need to set speaker_id if there is more than one speaker\n",
|
"# Only need to set speaker_id if there is more than one speaker\n",
|
||||||
"speaker_id = None\n",
|
"speaker_id = None\n",
|
||||||
"\n",
|
"\n",
|
||||||
"base_dir=\"wheatley_out\"\n",
|
|
||||||
"\n",
|
|
||||||
"last_fastpitch_ckpt = get_best_ckpt_from_last_run(base_dir=base_dir, model_name=\"FastPitch\")\n",
|
"last_fastpitch_ckpt = get_best_ckpt_from_last_run(base_dir=base_dir, model_name=\"FastPitch\")\n",
|
||||||
"last_hifigan_ckpt = get_best_ckpt_from_last_run(base_dir=base_dir, model_name=\"HifiGan\")\n",
|
"last_hifigan_ckpt = get_best_ckpt_from_last_run(base_dir=base_dir, model_name=\"HifiGan\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -671,6 +682,10 @@
|
|||||||
"id": "9706d079-fd76-49f6-bce9-1a902d930699",
|
"id": "9706d079-fd76-49f6-bce9-1a902d930699",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
|
"#### NAMING WILL CHANGE DEPENDING ON CHARACTER ####\n",
|
||||||
|
"#### NAMING WILL CHANGE DEPENDING ON CHARACTER ####\n",
|
||||||
|
"#### NAMING WILL CHANGE DEPENDING ON CHARACTER ####\n",
|
||||||
|
"\n",
|
||||||
"# pip3 install whl\n",
|
"# pip3 install whl\n",
|
||||||
"# pip3 install nemo2riva\n",
|
"# pip3 install nemo2riva\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user