This gist has been superceded by Meta Graph functionality that has since been added to tensorflow core.
The code remains posted for archival purposes only.
from __future__ import print_function | |
import subprocess | |
import shutil | |
import os | |
import stat | |
import time | |
# This script looks extremely defensive, but *should* let you rerun at | |
# any stage along the way. Also a lot of code repetition due to eventual support | |
# for "non-blob" install from something besides the magic kk_all_deps.tar.gz |
% Assumptions: vctk is in ~/vctk/VCTK-Corpus.tar.gz | |
% htk is in ~/htk/HTK-3.4.1.tar.gz | |
% festival is in ~/festival/festival-2.4-release.tar.gz | |
% speech_tools is in ~/speech_tools/speech_tools-2.4-release.tar.gz | |
% sptk is in ~/sptk | |
% extrafiles from http://festvox.org/packed/festival/2.4/ | |
% festlex_CMU.tar.gz | |
% festlex_POSTLEX.tar.gz | |
% festlex_OALD.tar.gz | |
% festvox_cmu_us_slt_cg.tar.gz |
""" | |
Beam decoder for tensorflow | |
Sample usage: | |
``` | |
from tf_beam_decoder import beam_decoder | |
decoded_sparse, decoded_logprobs = beam_decoder( | |
cell=cell, |
This gist has been superceded by Meta Graph functionality that has since been added to tensorflow core.
The code remains posted for archival purposes only.
raise ValueError("DEPRECATED/FROZEN - see https://github.com/kastnerkyle/tools for the latest") | |
# License: BSD 3-clause | |
# Authors: Kyle Kastner | |
# Harvest, Cheaptrick, D4C, WORLD routines based on MATLAB code from M. Morise | |
# http://ml.cs.yamanashi.ac.jp/world/english/ | |
# MGC code based on r9y9 (Ryuichi Yamamoto) MelGeneralizedCepstrums.jl | |
# Pieces also adapted from SPTK | |
from __future__ import division | |
import numpy as np |
# Stacked LSTMs | |
# Author: Kyle Kastner | |
# Based on script from /u/siblbombs | |
# License: BSD 3-Clause | |
import tensorflow as tf | |
from tensorflow.models.rnn import rnn | |
from tensorflow.models.rnn.rnn_cell import LSTMCell | |
import numpy as np | |
import time |
# Authors: Kyle Kastner | |
# License: BSD 3-clause | |
import theano.tensor as T | |
import numpy as np | |
import theano | |
class rmsprop(object): | |
""" | |
RMSProp with nesterov momentum and gradient rescaling |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
import theano | |
import theano.tensor as T | |
import numpy as np | |
import cPickle | |
import random | |
import matplotlib.pyplot as plt | |
class RNN(object): | |
def __init__(self, nin, n_hidden, nout): |