1674081000
An implementation of Tacotron speech synthesis in TensorFlow.
@npuichigo fixed a bug where dropout was not being applied in the prenet.
@begeekmyfriend created a fork that adds location-sensitive attention and the stop token from the Tacotron 2 paper. This can greatly reduce the amount of data required to train a model.
In April 2017, Google published a paper, Tacotron: Towards End-to-End Speech Synthesis, where they present a neural text-to-speech model that learns to synthesize speech directly from (text, audio) pairs. However, they didn't release their source code or training data. This is an independent attempt to provide an open-source implementation of the model described in their paper.
The quality isn't as good as Google's demo yet, but hopefully it will get there someday :-). Pull requests are welcome!
Install Python 3.
Install the latest version of TensorFlow for your platform. For better performance, install with GPU support if it's available. This code works with TensorFlow 1.3 and later.
Install requirements:
pip install -r requirements.txt
Download and unpack a model:
curl https://data.keithito.com/data/speech/tacotron-20180906.tar.gz | tar xzC /tmp
Run the demo server:
python3 demo_server.py --checkpoint /tmp/tacotron-20180906/model.ckpt
Point your browser at localhost:9000
Note: you need at least 40GB of free disk space to train a model.
Download a speech dataset.
The following are supported out of the box:
Unpack the dataset into ~/tacotron
After unpacking, your tree should look like this for LJ Speech:
tacotron
|- LJSpeech-1.1
|- metadata.csv
|- wavs
or like this for Blizzard 2012:
tacotron
|- Blizzard2012
|- ATrampAbroad
| |- sentence_index.txt
| |- lab
| |- wav
|- TheManThatCorruptedHadleyburg
|- sentence_index.txt
|- lab
|- wav
Preprocess the data
python3 preprocess.py --dataset ljspeech
--dataset blizzard
for Blizzard dataTrain a model
python3 train.py
Tunable hyperparameters are found in hparams.py. You can adjust these at the command line using the --hparams
flag, for example --hparams="batch_size=16,outputs_per_step=2"
. Hyperparameters should generally be set to the same values at both training and eval time. The default hyperparameters are recommended for LJ Speech and other English-language data. See TRAINING_DATA.md for other languages.
Monitor with Tensorboard (optional)
tensorboard --logdir ~/tacotron/logs-tacotron
The trainer dumps audio and alignments every 1000 steps. You can find these in ~/tacotron/logs-tacotron
.
Synthesize from a checkpoint
python3 demo_server.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000
Replace "185000" with the checkpoint number that you want to use, then open a browser to localhost:9000
and type what you want to speak. Alternately, you can run eval.py at the command line:
python3 eval.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000
If you set the --hparams
flag when training, set the same value here.
TCMalloc seems to improve training speed and avoids occasional slowdowns seen with the default allocator. You can enable it by installing it and setting LD_PRELOAD=/usr/lib/libtcmalloc.so
. With TCMalloc, you can get around 1.1 sec/step on a GTX 1080Ti.
You can train with CMUDict by downloading the dictionary to ~/tacotron/training and then passing the flag --hparams="use_cmudict=True"
to train.py. This will allow you to pass ARPAbet phonemes enclosed in curly braces at eval time to force a particular pronunciation, e.g. Turn left on {HH AW1 S S T AH0 N} Street.
If you pass a Slack incoming webhook URL as the --slack_url
flag to train.py, it will send you progress updates every 1000 steps.
Occasionally, you may see a spike in loss and the model will forget how to attend (the alignments will no longer make sense). Although it will recover eventually, it may save time to restart at a checkpoint prior to the spike by passing the --restore_step=150000
flag to train.py (replacing 150000 with a step number prior to the spike). Update: a recent fix to gradient clipping by @candlewill may have fixed this.
During eval and training, audio length is limited to max_iters * outputs_per_step * frame_shift_ms
milliseconds. With the defaults (max_iters=200, outputs_per_step=5, frame_shift_ms=12.5), this is 12.5 seconds.
If your training examples are longer, you will see an error like this: Incompatible shapes: [32,1340,80] vs. [32,1000,80]
To fix this, you can set a larger value of max_iters
by passing --hparams="max_iters=300"
to train.py (replace "300" with a value based on how long your audio is and the formula above).
Here is the expected loss curve when training on LJ Speech with the default hyperparameters:
Author: Keithito
Source Code: https://github.com/keithito/tacotron
License: MIT license
#python #machinelearning #tensorflow
1619247660
The liquid-cooled Tensor Processing Units, built to slot into server racks, can deliver up to 100 petaflops of compute.
The liquid-cooled Tensor Processing Units, built to slot into server racks, can deliver up to 100 petaflops of compute.
As the world is gearing towards more automation and AI, the need for quantum computing has also grown exponentially. Quantum computing lies at the intersection of quantum physics and high-end computer technology, and in more than one way, hold the key to our AI-driven future.
Quantum computing requires state-of-the-art tools to perform high-end computing. This is where TPUs come in handy. TPUs or Tensor Processing Units are custom-built ASICs (Application Specific Integrated Circuits) to execute machine learning tasks efficiently. TPUs are specific hardware developed by Google for neural network machine learning, specially customised to Google’s Machine Learning software, Tensorflow.
The liquid-cooled Tensor Processing units, built to slot into server racks, can deliver up to 100 petaflops of compute. It powers Google products like Google Search, Gmail, Google Photos and Google Cloud AI APIs.
#opinions #alphabet #asics #floq #google #google alphabet #google quantum computing #google tensorflow #google tensorflow quantum #google tpu #google tpus #machine learning #quantum computer #quantum computing #quantum computing programming #quantum leap #sandbox #secret development #tensorflow #tpu #tpus
1674081000
An implementation of Tacotron speech synthesis in TensorFlow.
@npuichigo fixed a bug where dropout was not being applied in the prenet.
@begeekmyfriend created a fork that adds location-sensitive attention and the stop token from the Tacotron 2 paper. This can greatly reduce the amount of data required to train a model.
In April 2017, Google published a paper, Tacotron: Towards End-to-End Speech Synthesis, where they present a neural text-to-speech model that learns to synthesize speech directly from (text, audio) pairs. However, they didn't release their source code or training data. This is an independent attempt to provide an open-source implementation of the model described in their paper.
The quality isn't as good as Google's demo yet, but hopefully it will get there someday :-). Pull requests are welcome!
Install Python 3.
Install the latest version of TensorFlow for your platform. For better performance, install with GPU support if it's available. This code works with TensorFlow 1.3 and later.
Install requirements:
pip install -r requirements.txt
Download and unpack a model:
curl https://data.keithito.com/data/speech/tacotron-20180906.tar.gz | tar xzC /tmp
Run the demo server:
python3 demo_server.py --checkpoint /tmp/tacotron-20180906/model.ckpt
Point your browser at localhost:9000
Note: you need at least 40GB of free disk space to train a model.
Download a speech dataset.
The following are supported out of the box:
Unpack the dataset into ~/tacotron
After unpacking, your tree should look like this for LJ Speech:
tacotron
|- LJSpeech-1.1
|- metadata.csv
|- wavs
or like this for Blizzard 2012:
tacotron
|- Blizzard2012
|- ATrampAbroad
| |- sentence_index.txt
| |- lab
| |- wav
|- TheManThatCorruptedHadleyburg
|- sentence_index.txt
|- lab
|- wav
Preprocess the data
python3 preprocess.py --dataset ljspeech
--dataset blizzard
for Blizzard dataTrain a model
python3 train.py
Tunable hyperparameters are found in hparams.py. You can adjust these at the command line using the --hparams
flag, for example --hparams="batch_size=16,outputs_per_step=2"
. Hyperparameters should generally be set to the same values at both training and eval time. The default hyperparameters are recommended for LJ Speech and other English-language data. See TRAINING_DATA.md for other languages.
Monitor with Tensorboard (optional)
tensorboard --logdir ~/tacotron/logs-tacotron
The trainer dumps audio and alignments every 1000 steps. You can find these in ~/tacotron/logs-tacotron
.
Synthesize from a checkpoint
python3 demo_server.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000
Replace "185000" with the checkpoint number that you want to use, then open a browser to localhost:9000
and type what you want to speak. Alternately, you can run eval.py at the command line:
python3 eval.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000
If you set the --hparams
flag when training, set the same value here.
TCMalloc seems to improve training speed and avoids occasional slowdowns seen with the default allocator. You can enable it by installing it and setting LD_PRELOAD=/usr/lib/libtcmalloc.so
. With TCMalloc, you can get around 1.1 sec/step on a GTX 1080Ti.
You can train with CMUDict by downloading the dictionary to ~/tacotron/training and then passing the flag --hparams="use_cmudict=True"
to train.py. This will allow you to pass ARPAbet phonemes enclosed in curly braces at eval time to force a particular pronunciation, e.g. Turn left on {HH AW1 S S T AH0 N} Street.
If you pass a Slack incoming webhook URL as the --slack_url
flag to train.py, it will send you progress updates every 1000 steps.
Occasionally, you may see a spike in loss and the model will forget how to attend (the alignments will no longer make sense). Although it will recover eventually, it may save time to restart at a checkpoint prior to the spike by passing the --restore_step=150000
flag to train.py (replacing 150000 with a step number prior to the spike). Update: a recent fix to gradient clipping by @candlewill may have fixed this.
During eval and training, audio length is limited to max_iters * outputs_per_step * frame_shift_ms
milliseconds. With the defaults (max_iters=200, outputs_per_step=5, frame_shift_ms=12.5), this is 12.5 seconds.
If your training examples are longer, you will see an error like this: Incompatible shapes: [32,1340,80] vs. [32,1000,80]
To fix this, you can set a larger value of max_iters
by passing --hparams="max_iters=300"
to train.py (replace "300" with a value based on how long your audio is and the formula above).
Here is the expected loss curve when training on LJ Speech with the default hyperparameters:
Author: Keithito
Source Code: https://github.com/keithito/tacotron
License: MIT license
1598383290
The Google computer engine exchanges a large number of scalable virtual machines to serve as clusters used for that purpose. GCE can be managed through a RESTful API, command line interface, or web console. The computing engine is serviced for a minimum of 10-minutes per use. There is no up or front fee or time commitment. GCE competes with Amazon’s Elastic Compute Cloud (EC2) and Microsoft Azure.
https://www.mrdeluofficial.com/2020/08/what-are-google-compute-engine-explained.html
#google compute engine #google compute engine tutorial #google app engine #google cloud console #google cloud storage #google compute engine documentation
1596830700
This article is a quick guide to help you embed images in google colab markdown without mounting your google drive!
Google colab is a cloud service that offers FREE python notebook environments to developers and learners, along with FREE GPU and TPU. Users can write and execute Python code in the browser itself without any pre-configuration. It offers two types of cells: text and code. The ‘code’ cells act like code editor, coding and execution in done this block. The ‘text’ cells are used to embed textual description/explanation along with code, it is formatted using a simple markup language called ‘markdown’.
If you are a regular colab user, like me, using markdown to add additional details to your code will be your habit too! While working on colab, I tried to embed images along with text in markdown, but it took me almost an hour to figure out the way to do it. So here is an easy guide that will help you.
STEP 1:
The first step is to get the image into your google drive. So upload all the images you want to embed in markdown in your google drive.
Step 2:
Google Drive gives you the option to share the image via a sharable link. Right-click your image and you will find an option to get a sharable link.
On selecting ‘Get shareable link’, Google will create and display sharable link for the particular image.
#google-cloud-platform #google-collaboratory #google-colaboratory #google-cloud #google-colab #cloud
1597776900
_“We want to use AI to augment the abilities of people, to enable us to accomplish more and to allow us to spend more time on our creative endeavors.” _-- Jeff Dean, Google Senior Fellow
Calling Google just a search giant would be an understatement with how quickly it grew from a mere search engine to a driving force behind innovations in several key IT sectors. Over the past couple of years, Google has planted its roots into almost everything digital, be it consumer electronics such as smartphones, tablets, laptops, its underlying software such as Android and Chrome OS or the smart software backed by Google’s AI.
Google has been actively innovating in the smart software industry. Backed by its expertise in search and analytical data acquired over the years have helped Google create various tools like TensorFlow, ML Kit, Cloud AI, and many more for enthusiasts and beginners alike who are trying to understand the capabilities of AI.
#ai #automl #data science platforms #datasets #google #google cloud #google colab #machine learning #tensorflow