Skip to content

Instantly share code, notes, and snippets.

@kastnerkyle
kastnerkyle / install_tts.py
Last active December 1, 2021 17:27
Install speech toolkit and create features
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
@kastnerkyle
kastnerkyle / merlin_install_notes.txt
Last active July 10, 2017 10:01
merlin install notes
% 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
@nikitakit
nikitakit / tf_beam_decoder.py
Last active January 6, 2024 08:48
Tensorflow Beam Search
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
@twiecki
twiecki / bayesian_neural_network.ipynb
Last active February 22, 2022 01:28
Bayesian Neural Network in PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nikitakit
nikitakit / _NOTICE.md
Last active December 15, 2018 21:13
Restoring TensorFlow Models
@kastnerkyle
kastnerkyle / audio_tools.py
Last active October 24, 2023 14:41
Audio tools for numpy/python. Constant work in progress.
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
@kastnerkyle
kastnerkyle / tf_multi_rnn.py
Last active March 21, 2018 08:09
Stack LSTMs in TensorFlow
# 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
@kastnerkyle
kastnerkyle / optimizers.py
Last active January 12, 2021 13:46
Theano optimizers
# 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
@lrytz
lrytz / z-automator.png
Last active February 4, 2023 21:20
Shortcut for Syntax Highlighting in Keynote
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):