← Open Source
buriburisuri

speech-to-text-wavenet

Speech-to-Text-WaveNet : End-to-end sentence level English speech recognition based on DeepMind's WaveNet and tensorflow.

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
4.00k
Stars
785
Forks
+2
This week
4
Contributors
Created 2016-11-14 · Updated 2026-10-11 · #7724 today
Top developers
buriburisurichanil1218marcbelmont

buriburisuri/speech-to-text-wavenet is ranked 7,724 with 4,005 stars.

Same-category comparison

buriburisuri/speech-to-text-wavenet is ranked 7,724 among these 8 peers; MikeChongCan/scylla is ranked 7,720.

Same-category comparison
NameRankMetrics
FedML-AI/FedML7,707
Language:
Python
Stars:
4,070
Forks:
768
Description:
FEDML - The unified and scalable ML library for large-scale distributed training, model serving, and federated learning. FEDML Launch, a cross-cloud scheduler, further enables running any AI jobs on any GPU cloud or on-premise cluster. Built on this library, TensorOpera AI (https://TensorOpera.ai) is your generative AI platform at scale.
sksq96/pytorch-summary7,714
Language:
Python
Stars:
4,050
Forks:
408
Description:
Model summary in PyTorch similar to `model.summary()` in Keras.
kenshohara/3D-ResNets-PyTorch7,716
Language:
Python
Stars:
4,038
Forks:
923
Description:
3D ResNets for Action Recognition (CVPR 2018).
MikeChongCan/scylla7,720
Language:
Python
Stars:
4,021
Forks:
469
Description:
Intelligent proxy pool for Humans™ to extract content from the internet and build your own Large Language Models in this new AI era.
neuraloperator/neuraloperator7,736
Language:
Python
Stars:
3,960
Forks:
936
Description:
Learning in infinite dimension with neural operators.
thuml/Transfer-Learning-Library7,741
Language:
Python
Stars:
3,941
Forks:
604
Description:
Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization.
clovaai/deep-text-recognition-benchmark7,742
Language:
Jupyter Notebook
Stars:
3,939
Forks:
1,129
Description:
Text recognition (optical character recognition) with deep learning methods, ICCV 2019.
cornellius-gp/gpytorch7,743
Language:
Python
Stars:
3,926
Forks:
612
Description:
A highly efficient implementation of Gaussian Processes in PyTorch.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
KeywordsSpeech-to-text
Stars4,005
Forks785
Contributors4
Created date2016-11-14
Updated date2026-10-11
Stars in 1 day0
Stars in 7 days2
Rank7,724
Previous rank7,846
Rank change122
7-day stars rank7,624
Previous 7-day stars rank7,660
7-day stars rank change36
Total stars rank3,452
Previous total stars rank3,447
Total stars rank change-5
CountrySouth Korea
README summary

Speech-to-Text-WaveNet : End-to-end sentence level English speech recognition using DeepMind's WaveNet A tensorflow implementation of speech recognition based on DeepMind's WaveNet: A Generative Model for Raw Audio. (Hereafter the Paper) Although ibab and tomlepaine have already implemented WaveNet with tensorflow, they did not implement speech recognition. That's why we decided to implement it ourselves. Some of Deepmind's recent papers are tricky to reproduce. The Paper also omitted specific details about the implementation, and we had to

fill the gaps in our own way. First, while the Paper used the TIMIT dataset for the speech recognition experiment, we used the free VTCK dataset. Second, the Paper added a mean-pooling layer after the dilated convolution layer for down-sampling. We extracted MFCC from wav files and removed the final mean-pooling layer because the original setting was impossible to run on our TitanX GPU. Third, since the TIMIT dataset has phoneme labels, the Paper trained the model

with two loss terms, phoneme classification and next phoneme prediction. We, instead, used a single CTC loss because VCTK provides sentence-level labels. As a result, we used only dilated conv1d layers without any dilated conv1d layers. Finally, we didn't do quantitative analyses such as BLEU score and post-processing by combining a language model due to the time constraints. The final architecture is shown in the following figure. (Some images are cropped from WaveNet: A Generative Model for Raw

Audio and Neural Machine Translation in Linear Time) Version Current Version : __***0. 2***__ Dependencies ( VERSION MUST BE MATCHED EXACTLY! 0 If you have problems with the librosa library, try to install ffmpeg by the following command. 04 ) Dataset We used VCTK, LibriSpeech and TEDLIUM release 2 corpus. Total number of sentences in the training set composed of the above three corpus is 240,612. Valid and test set is built using only LibriSpeech and TEDLIUM corpuse, because VCTK corpus does

not have valid and test set. After downloading the each corpus, extract them in the 'asset/data/VCTK-Corpus', 'asset/data/LibriSpeech' and 'asset/data/TEDLIUM_release2' directories. Audio was augmented by the scheme in the Tom Ko et al's paper. (Thanks @migvel for your kind information) Pre-processing dataset The TEDLIUM release 2 dataset provides audio data in the SPH format, so we should convert them to some format librosa library can handle. Run the following command in the

'asset/data' directory convert SPH to wave format. If you don't have installed , please installed it first. We found the main bottle neck is disk read time when training, so we decide to pre-process the whole audio data into the MFCC feature files which is much smaller. And we highly recommend using SSD instead of hard drive. Run the following command in the console to pre-process whole dataset. Training the network Execute to train the network. You can

see the result ckpt files and log files in the 'asset/train' directory. We've trained this model on a 3

Frequently asked questions

How many stars and forks are recorded?

buriburisuri/speech-to-text-wavenet has 4,005 stars and 785 forks.

What is the repository rank?

buriburisuri/speech-to-text-wavenet is ranked 7,724.

What language and category are recorded?

buriburisuri/speech-to-text-wavenet has 4,005 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

buriburisuri/speech-to-text-wavenet is compared with MikeChongCan/scylla, ranked 7,720 with 4,021 stars.

README

Speech-to-Text-WaveNet : End-to-end sentence level English speech recognition using DeepMind's WaveNet

A tensorflow implementation of speech recognition based on DeepMind's WaveNet: A Generative Model for Raw Audio. (Hereafter the Paper)

Although ibab and tomlepaine have already implemented WaveNet with tensorflow, they did not implement speech recognition. That's why we decided to implement it ourselves.

Some of Deepmind's recent papers are tricky to reproduce. The Paper also omitted specific details about the implementation, and we had to fill the gaps in our own way.

Here are a few important notes.

First, while the Paper used the TIMIT dataset for the speech recognition experiment, we used the free VTCK dataset.

Second, the Paper added a mean-pooling layer after the dilated convolution layer for down-sampling. We extracted MFCC from wav files and removed the final mean-pooling layer because the original setting was impossible to run on our TitanX GPU.

Third, since the TIMIT dataset has phoneme labels, the Paper trained the model with two loss terms, phoneme classification and next phoneme prediction. We, instead, used a single CTC loss because VCTK provides sentence-level labels. As a result, we used only dilated conv1d layers without any dilated conv1d layers.

Finally, we didn't do quantitative analyses such as BLEU score and post-processing by combining a language model due to the time constraints.

The final architecture is shown in the following figure.

(Some images are cropped from WaveNet: A Generative Model for Raw Audio and Neural Machine Translation in Linear Time)

Version

Current Version : 0.0.0.2

Dependencies ( VERSION MUST BE MATCHED EXACTLY! )

  1. tensorflow == 1.0.0
  2. sugartensor == 1.0.0.2
  3. pandas >= 0.19.2
  4. librosa == 0.5.0
  5. scikits.audiolab==0.11.0

If you have problems with the librosa library, try to install ffmpeg by the following command. ( Ubuntu 14.04 )

sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get dist-upgrade -y sudo apt-get -y install ffmpeg

Dataset

We used VCTK, LibriSpeech and TEDLIUM release 2 corpus. Total number of sentences in the training set composed of the above three corpus is 240,612. Valid and test set is built using only LibriSpeech and TEDLIUM corpuse, because VCTK corpus does not have valid and test set. After downloading the each corpus, extract them in the 'asset/data/VCTK-Corpus', 'asset/data/LibriSpeech' and 'asset/data/TEDLIUM_release2' directories.

Audio was augmented by the scheme in the Tom Ko et al's paper. (Thanks @migvel for your kind information)

Pre-processing dataset

The TEDLIUM release 2 dataset provides audio data in the SPH format, so we should convert them to some format librosa library can handle. Run the following command in the 'asset/data' directory convert SPH to wave format.

find -type f -name '*.sph' | awk '{printf "sox -t sph %s -b 16 -t wav %s\n", $0, $0".wav" }' | bash

If you don't have installed sox, please installed it first.

sudo apt-get install sox

We found the main bottle neck is disk read time when training, so we decide to pre-process the whole audio data into the MFCC feature files which is much smaller. And we highly recommend using SSD instead of hard drive.
Run the following command in the console to pre-process whole dataset.

python preprocess.py

Training the network

Execute

python train.py ( <== Use all available GPUs ) or CUDA_VISIBLE_DEVICES=0,1 python train.py ( <== Use only GPU 0, 1 )

to train the network. You can see the result ckpt files and log files in the 'asset/train' directory. Launch tensorboard --logdir asset/train/log to monitor training process.

We've trained this model on a 3 Nvidia 1080 Pascal GPUs during 40 hours until 50 epochs and we picked the epoch when the validatation loss is minimum. In our case, it is epoch 40. If you face the out of memory error, reduce batch_size in the train.py file from 16 to 4.

The CTC losses at each epoch are as following table:

epoch train set valid set test set
20 79.541500 73.645237 83.607269
30 72.884180 69.738348 80.145867
40 69.948266 66.834316 77.316114
50 69.127240 67.639895 77.866674

Testing the network

After training finished, you can check valid or test set CTC loss by the following command.

python test.py --set train|valid|test --frac 1.0(0.01~1.0)

The frac option will be useful if you want to test only the fraction of dataset for fast evaluation.

Transforming speech wave file to English text

Execute

python recognize.py --file

to transform a speech wave file to the English sentence. The result will be printed on the console.

For example, try the following command.

python recognize.py --file asset/data/LibriSpeech/test-clean/1089/134686/1089-134686-0000.flac python recognize.py --file asset/data/LibriSpeech/test-clean/1089/134686/1089-134686-0001.flac python recognize.py --file asset/data/LibriSpeech/test-clean/1089/134686/1089-134686-0002.flac python recognize.py --file asset/data/LibriSpeech/test-clean/1089/134686/1089-134686-0003.flac python recognize.py --file asset/data/LibriSpeech/test-clean/1089/134686/1089-134686-0004.flac

The result will be as follows:

he hoped there would be stoo for dinner turnips and charrats and bruzed patatos and fat mutton pieces to be ladled out in th thick peppered flower fatan sauce stuffid into you his belly counsiled him after early night fall the yetl lampse woich light hop here and there on the squalled quarter of the browfles o berty and he god in your mind numbrt tan fresh nalli is waiting on nou cold nit husband

The ground truth is as follows:

HE HOPED THERE WOULD BE STEW FOR DINNER TURNIPS AND CARROTS AND BRUISED POTATOES AND FAT MUTTON PIECES TO BE LADLED OUT IN THICK PEPPERED FLOUR FATTENED SAUCE STUFF IT INTO YOU HIS BELLY COUNSELLED HIM AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS HELLO BERTIE ANY GOOD IN YOUR MIND NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND

As mentioned earlier, there is no language model, so there are some cases where capital letters, punctuations, and words are misspelled.

pre-trained models

You can transform a speech wave file to English text with the pre-trained model on the VCTK corpus. Extract the following zip file to the 'asset/train/' directory.

Docker support

See docker README.md.

Future works

  1. Language Model
  2. Polyglot(Multi-lingual) Model

We think that we should replace CTC beam decoder with a practical language model
and the polyglot speech recognition model will be a good candidate to future works.

Other resources

  1. ibab's WaveNet(speech synthesis) tensorflow implementation
  2. tomlepaine's Fast WaveNet(speech synthesis) tensorflow implementation

Namju's other repositories

  1. SugarTensor
  2. EBGAN tensorflow implementation
  3. Timeseries gan tensorflow implementation
  4. Supervised InfoGAN tensorflow implementation
  5. AC-GAN tensorflow implementation
  6. SRGAN tensorflow implementation
  7. ByteNet-Fast Neural Machine Translation

Citation

If you find this code useful please cite us in your work:

Kim and Park. Speech-to-Text-WaveNet. 2016. GitHub repository. https://github.com/buriburisuri/.

Authors

Namju Kim (namju.kim@kakaocorp.com) at KakaoBrain Corp.

Kyubyong Park (kbpark@jamonglab.com) at KakaoBrain Corp.

Nearby in the ranking
Similar items