This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
import numpy as np | |
import h5py | |
from collections import defaultdict | |
from hyperparams import Hyperparams as hp | |
from utils import * | |
h5py_path = sys.argv[1] | |
dataset_path = sys.argv[2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for var in $@ | |
do | |
# for auditok to process a file | |
# -e : energy threshlod | |
# -d : discard silence period | |
# -s : min-length of a continuos silence | |
# -n : min-length of a segment | |
# -m : max-length of a segment | |
# -M : only process the first M seconds of the file | |
echo "processing file : $var" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
class LocAwareAttnLayer(nn.Module): | |
''' | |
implementation of: https://arxiv.org/pdf/1506.07503.pdf | |
''' | |
def __init__(self, dec_hidden_dim, enc_feat_dim, conv_dim, attn_dim, smoothing=False): | |
super(LocAwareAttnLayer, self).__init__() | |
self.attn_dim = attn_dim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
DIR='./txt_parts' | |
for filename in $DIR/* | |
do | |
echo ${filename} | |
curl -X POST -F "wordfile=@${filename}" \ | |
-H "ContentType=multipart/form-data" http://www.speech.cs.cmu.edu/cgi-bin/tools/logios/lextool.pl \ | |
-o ${filename}_res.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For downloading The English audiobook data for the Blizzard Challenge 2013 | |
# Step1. Read and Accept License at http://www.cstr.ed.ac.uk/projects/blizzard/2013/lessac_blizzard2013/license.html | |
# Step2. Get Username and Password through email. | |
# Step3. Insert Username and Password below and run this script. | |
name='' | |
pass='' | |
dl="wget --user ${name} --password ${pass}" | |
baseurl='http://data.cstr.ed.ac.uk/blizzard2013/lessac' | |
parts='BlackBeauty.zip | |
Lessac_Blizzard2013_CatherineByers_train.tar.bz2 |