Skip to content

Commit

Permalink
Merge pull request #8 from kikirizki/main
Browse files Browse the repository at this point in the history
Add google colab example
  • Loading branch information
heatz123 authored Feb 13, 2023
2 parents 7901d7f + ba142dd commit ca2f814
Showing 1 changed file with 143 additions and 0 deletions.
143 changes: 143 additions & 0 deletions naturalspeech_training.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "OKBM9jO5emtp"
},
"source": [
"## Set up naturalspeech"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "MnnIzNDiO1MH"
},
"outputs": [],
"source": [
"%cd /content/\n",
"!git clone https://github.com/heatz123/naturalspeech\n",
"%cd /content/naturalspeech\n",
"!pip install -r requirements.txt\n",
"%cd /content/\n",
"!wget https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2 "
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "OWKnNm3xjf7g"
},
"source": [
"## Create symbolic link to dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "oXDKCx1FPnzI"
},
"outputs": [],
"source": [
"%cd /content/\n",
"!tar -xf LJSpeech-1.1.tar.bz2\n",
"%cd /content/naturalspeech\n",
"!ln -s /content/LJSpeech-1.1/wavs/ DUMMY1"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Uf63QzpajptC"
},
"source": [
"## Uncompress durations labels"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "jt1t3bhObSji"
},
"outputs": [],
"source": [
"!mv /content/naturalspeech/durations/durations.tar.bz2 /content/naturalspeech/\n",
"!rm -r /content/naturalspeech/durations\n",
"%cd /content/naturalspeech/\n",
"!tar -xf durations.tar.bz2"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "X3dYAXA8j81B"
},
"source": [
"## Warmup Training"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "x49LdKJ_ciuX"
},
"outputs": [],
"source": [
"%cd /content/naturalspeech\n",
"!python3 train.py -c configs/ljs.json -m exp1 --warmup"
]
},
{
"cell_type": "markdown",
"source": [
"## Training"
],
"metadata": {
"id": "qE4YV8C19y3d"
}
},
{
"cell_type": "code",
"source": [
"!python3 attach_memory_bank.py -c configs/ljs.json --weights_path logs/ext/G_500.pth"
],
"metadata": {
"id": "t9JH9TZD9zzx"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!python3 train.py -c configs/ljs.json -m exp1"
],
"metadata": {
"id": "W8bqOU-q98cJ"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": []
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit ca2f814

Please sign in to comment.