├── .gitmodules ├── Dockerfile ├── LICENSE ├── README.md ├── audio_processing.py ├── data_utils.py ├── demo.wav ├── distributed.py ├── filelists ├── ljs_audio_text_test_filelist.txt ├── ljs_audio_text_train_filelist.txt └── ljs_audio_text_val_filelist.txt ├── hparams.py ├── inference.ipynb ├── layers.py ├── logger.py ├── loss_function.py ├── loss_scaler.py ├── model.py ├── multiproc.py ├── plotting_utils.py ├── requirements.txt ├── stft.py ├── tensorboard.png ├── text ├── LICENSE ├── __init__.py ├── cleaners.py ├── cmudict.py ├── numbers.py └── symbols.py ├── train.py └── utils.py /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "waveglow"] 2 | path = waveglow 3 | url = https://github.com/NVIDIA/waveglow 4 | branch = master 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM pytorch/pytorch:nightly-devel-cuda10.0-cudnn7 2 | ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} 3 | 4 | RUN apt-get update -y 5 | 6 | RUN pip install numpy scipy matplotlib librosa==0.6.0 tensorflow tensorboardX inflect==0.2.5 Unidecode==1.0.22 pillow jupyter 7 | 8 | ADD apex /apex/ 9 | WORKDIR /apex/ 10 | RUN pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, NVIDIA Corporation 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tacotron 2 (without wavenet) 2 | 3 | PyTorch implementation of [Natural TTS Synthesis By Conditioning 4 | Wavenet On Mel Spectrogram Predictions](https://arxiv.org/pdf/1712.05884.pdf). 5 | 6 | This implementation includes **distributed** and **automatic mixed precision** support 7 | and uses the [LJSpeech dataset](https://keithito.com/LJ-Speech-Dataset/). 8 | 9 | Distributed and Automatic Mixed Precision support relies on NVIDIA's [Apex] and [AMP]. 10 | 11 | Visit our [website] for audio samples using our published [Tacotron 2] and 12 | [WaveGlow] models. 13 | 14 | ![Alignment, Predicted Mel Spectrogram, Target Mel Spectrogram](tensorboard.png) 15 | 16 | 17 | ## Pre-requisites 18 | 1. NVIDIA GPU + CUDA cuDNN 19 | 20 | ## Setup 21 | 1. Download and extract the [LJ Speech dataset](https://keithito.com/LJ-Speech-Dataset/) 22 | 2. Clone this repo: `git clone https://github.com/NVIDIA/tacotron2.git` 23 | 3. CD into this repo: `cd tacotron2` 24 | 4. Initialize submodule: `git submodule init; git submodule update` 25 | 5. Update .wav paths: `sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/*.txt` 26 | - Alternatively, set `load_mel_from_disk=True` in `hparams.py` and update mel-spectrogram paths 27 | 6. Install [PyTorch 1.0] 28 | 7. Install [Apex] 29 | 8. Install python requirements or build docker image 30 | - Install python requirements: `pip install -r requirements.txt` 31 | 32 | ## Training 33 | 1. `python train.py --output_directory=outdir --log_directory=logdir` 34 | 2. (OPTIONAL) `tensorboard --logdir=outdir/logdir` 35 | 36 | ## Training using a pre-trained model 37 | Training using a pre-trained model can lead to faster convergence 38 | By default, the dataset dependent text embedding layers are [ignored] 39 | 40 | 1. Download our published [Tacotron 2] model 41 | 2. `python train.py --output_directory=outdir --log_directory=logdir -c tacotron2_statedict.pt --warm_start` 42 | 43 | ## Multi-GPU (distributed) and Automatic Mixed Precision Training 44 | 1. `python -m multiproc train.py --output_directory=outdir --log_directory=logdir --hparams=distributed_run=True,fp16_run=True` 45 | 46 | ## Inference demo 47 | 1. Download our published [Tacotron 2] model 48 | 2. Download our published [WaveGlow] model 49 | 3. `jupyter notebook --ip=127.0.0.1 --port=31337` 50 | 4. Load inference.ipynb 51 | 52 | N.b. When performing Mel-Spectrogram to Audio synthesis, make sure Tacotron 2 53 | and the Mel decoder were trained on the same mel-spectrogram representation. 54 | 55 | 56 | ## Related repos 57 | [WaveGlow](https://github.com/NVIDIA/WaveGlow) Faster than real time Flow-based 58 | Generative Network for Speech Synthesis 59 | 60 | [nv-wavenet](https://github.com/NVIDIA/nv-wavenet/) Faster than real time 61 | WaveNet. 62 | 63 | ## Acknowledgements 64 | This implementation uses code from the following repos: [Keith 65 | Ito](https://github.com/keithito/tacotron/), [Prem 66 | Seetharaman](https://github.com/pseeth/pytorch-stft) as described in our code. 67 | 68 | We are inspired by [Ryuchi Yamamoto's](https://github.com/r9y9/tacotron_pytorch) 69 | Tacotron PyTorch implementation. 70 | 71 | We are thankful to the Tacotron 2 paper authors, specially Jonathan Shen, Yuxuan 72 | Wang and Zongheng Yang. 73 | 74 | 75 | [WaveGlow]: https://drive.google.com/open?id=1rpK8CzAAirq9sWZhe9nlfvxMF1dRgFbF 76 | [Tacotron 2]: https://drive.google.com/file/d/1c5ZTuT7J08wLUoVZ2KkUs_VdZuJ86ZqA/view?usp=sharing 77 | [pytorch 1.0]: https://github.com/pytorch/pytorch#installation 78 | [website]: https://nv-adlr.github.io/WaveGlow 79 | [ignored]: https://github.com/NVIDIA/tacotron2/blob/master/hparams.py#L22 80 | [Apex]: https://github.com/nvidia/apex 81 | [AMP]: https://github.com/NVIDIA/apex/tree/master/apex/amp -------------------------------------------------------------------------------- /audio_processing.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import numpy as np 3 | from scipy.signal import get_window 4 | import librosa.util as librosa_util 5 | 6 | 7 | def window_sumsquare(window, n_frames, hop_length=200, win_length=800, 8 | n_fft=800, dtype=np.float32, norm=None): 9 | """ 10 | # from librosa 0.6 11 | Compute the sum-square envelope of a window function at a given hop length. 12 | 13 | This is used to estimate modulation effects induced by windowing 14 | observations in short-time fourier transforms. 15 | 16 | Parameters 17 | ---------- 18 | window : string, tuple, number, callable, or list-like 19 | Window specification, as in `get_window` 20 | 21 | n_frames : int > 0 22 | The number of analysis frames 23 | 24 | hop_length : int > 0 25 | The number of samples to advance between frames 26 | 27 | win_length : [optional] 28 | The length of the window function. By default, this matches `n_fft`. 29 | 30 | n_fft : int > 0 31 | The length of each analysis frame. 32 | 33 | dtype : np.dtype 34 | The data type of the output 35 | 36 | Returns 37 | ------- 38 | wss : np.ndarray, shape=`(n_fft + hop_length * (n_frames - 1))` 39 | The sum-squared envelope of the window function 40 | """ 41 | if win_length is None: 42 | win_length = n_fft 43 | 44 | n = n_fft + hop_length * (n_frames - 1) 45 | x = np.zeros(n, dtype=dtype) 46 | 47 | # Compute the squared window at the desired length 48 | win_sq = get_window(window, win_length, fftbins=True) 49 | win_sq = librosa_util.normalize(win_sq, norm=norm)**2 50 | win_sq = librosa_util.pad_center(win_sq, n_fft) 51 | 52 | # Fill the envelope 53 | for i in range(n_frames): 54 | sample = i * hop_length 55 | x[sample:min(n, sample + n_fft)] += win_sq[:max(0, min(n_fft, n - sample))] 56 | return x 57 | 58 | 59 | def griffin_lim(magnitudes, stft_fn, n_iters=30): 60 | """ 61 | PARAMS 62 | ------ 63 | magnitudes: spectrogram magnitudes 64 | stft_fn: STFT class with transform (STFT) and inverse (ISTFT) methods 65 | """ 66 | 67 | angles = np.angle(np.exp(2j * np.pi * np.random.rand(*magnitudes.size()))) 68 | angles = angles.astype(np.float32) 69 | angles = torch.autograd.Variable(torch.from_numpy(angles)) 70 | signal = stft_fn.inverse(magnitudes, angles).squeeze(1) 71 | 72 | for i in range(n_iters): 73 | _, angles = stft_fn.transform(signal) 74 | signal = stft_fn.inverse(magnitudes, angles).squeeze(1) 75 | return signal 76 | 77 | 78 | def dynamic_range_compression(x, C=1, clip_val=1e-5): 79 | """ 80 | PARAMS 81 | ------ 82 | C: compression factor 83 | """ 84 | return torch.log(torch.clamp(x, min=clip_val) * C) 85 | 86 | 87 | def dynamic_range_decompression(x, C=1): 88 | """ 89 | PARAMS 90 | ------ 91 | C: compression factor used to compress 92 | """ 93 | return torch.exp(x) / C 94 | -------------------------------------------------------------------------------- /data_utils.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | import torch 4 | import torch.utils.data 5 | 6 | import layers 7 | from utils import load_wav_to_torch, load_filepaths_and_text 8 | from text import text_to_sequence 9 | 10 | 11 | class TextMelLoader(torch.utils.data.Dataset): 12 | """ 13 | 1) loads audio,text pairs 14 | 2) normalizes text and converts them to sequences of one-hot vectors 15 | 3) computes mel-spectrograms from audio files. 16 | """ 17 | def __init__(self, audiopaths_and_text, hparams): 18 | self.audiopaths_and_text = load_filepaths_and_text(audiopaths_and_text) 19 | self.text_cleaners = hparams.text_cleaners 20 | self.max_wav_value = hparams.max_wav_value 21 | self.sampling_rate = hparams.sampling_rate 22 | self.load_mel_from_disk = hparams.load_mel_from_disk 23 | self.stft = layers.TacotronSTFT( 24 | hparams.filter_length, hparams.hop_length, hparams.win_length, 25 | hparams.n_mel_channels, hparams.sampling_rate, hparams.mel_fmin, 26 | hparams.mel_fmax) 27 | random.seed(hparams.seed) 28 | random.shuffle(self.audiopaths_and_text) 29 | 30 | def get_mel_text_pair(self, audiopath_and_text): 31 | # separate filename and text 32 | audiopath, text = audiopath_and_text[0], audiopath_and_text[1] 33 | text = self.get_text(text) 34 | mel = self.get_mel(audiopath) 35 | return (text, mel) 36 | 37 | def get_mel(self, filename): 38 | if not self.load_mel_from_disk: 39 | audio, sampling_rate = load_wav_to_torch(filename) 40 | if sampling_rate != self.stft.sampling_rate: 41 | raise ValueError("{} {} SR doesn't match target {} SR".format( 42 | sampling_rate, self.stft.sampling_rate)) 43 | audio_norm = audio / self.max_wav_value 44 | audio_norm = audio_norm.unsqueeze(0) 45 | audio_norm = torch.autograd.Variable(audio_norm, requires_grad=False) 46 | melspec = self.stft.mel_spectrogram(audio_norm) 47 | melspec = torch.squeeze(melspec, 0) 48 | else: 49 | melspec = torch.from_numpy(np.load(filename)) 50 | assert melspec.size(0) == self.stft.n_mel_channels, ( 51 | 'Mel dimension mismatch: given {}, expected {}'.format( 52 | melspec.size(0), self.stft.n_mel_channels)) 53 | 54 | return melspec 55 | 56 | def get_text(self, text): 57 | text_norm = torch.IntTensor(text_to_sequence(text, self.text_cleaners)) 58 | return text_norm 59 | 60 | def __getitem__(self, index): 61 | return self.get_mel_text_pair(self.audiopaths_and_text[index]) 62 | 63 | def __len__(self): 64 | return len(self.audiopaths_and_text) 65 | 66 | 67 | class TextMelCollate(): 68 | """ Zero-pads model inputs and targets based on number of frames per setep 69 | """ 70 | def __init__(self, n_frames_per_step): 71 | self.n_frames_per_step = n_frames_per_step 72 | 73 | def __call__(self, batch): 74 | """Collate's training batch from normalized text and mel-spectrogram 75 | PARAMS 76 | ------ 77 | batch: [text_normalized, mel_normalized] 78 | """ 79 | # Right zero-pad all one-hot text sequences to max input length 80 | input_lengths, ids_sorted_decreasing = torch.sort( 81 | torch.LongTensor([len(x[0]) for x in batch]), 82 | dim=0, descending=True) 83 | max_input_len = input_lengths[0] 84 | 85 | text_padded = torch.LongTensor(len(batch), max_input_len) 86 | text_padded.zero_() 87 | for i in range(len(ids_sorted_decreasing)): 88 | text = batch[ids_sorted_decreasing[i]][0] 89 | text_padded[i, :text.size(0)] = text 90 | 91 | # Right zero-pad mel-spec 92 | num_mels = batch[0][1].size(0) 93 | max_target_len = max([x[1].size(1) for x in batch]) 94 | if max_target_len % self.n_frames_per_step != 0: 95 | max_target_len += self.n_frames_per_step - max_target_len % self.n_frames_per_step 96 | assert max_target_len % self.n_frames_per_step == 0 97 | 98 | # include mel padded and gate padded 99 | mel_padded = torch.FloatTensor(len(batch), num_mels, max_target_len) 100 | mel_padded.zero_() 101 | gate_padded = torch.FloatTensor(len(batch), max_target_len) 102 | gate_padded.zero_() 103 | output_lengths = torch.LongTensor(len(batch)) 104 | for i in range(len(ids_sorted_decreasing)): 105 | mel = batch[ids_sorted_decreasing[i]][1] 106 | mel_padded[i, :, :mel.size(1)] = mel 107 | gate_padded[i, mel.size(1)-1:] = 1 108 | output_lengths[i] = mel.size(1) 109 | 110 | return text_padded, input_lengths, mel_padded, gate_padded, \ 111 | output_lengths 112 | -------------------------------------------------------------------------------- /demo.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/tacotron2/185cd24e046cc1304b4f8e564734d2498c6e2e6f/demo.wav -------------------------------------------------------------------------------- /distributed.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.distributed as dist 3 | from torch.nn.modules import Module 4 | from torch.autograd import Variable 5 | 6 | def _flatten_dense_tensors(tensors): 7 | """Flatten dense tensors into a contiguous 1D buffer. Assume tensors are of 8 | same dense type. 9 | Since inputs are dense, the resulting tensor will be a concatenated 1D 10 | buffer. Element-wise operation on this buffer will be equivalent to 11 | operating individually. 12 | Arguments: 13 | tensors (Iterable[Tensor]): dense tensors to flatten. 14 | Returns: 15 | A contiguous 1D buffer containing input tensors. 16 | """ 17 | if len(tensors) == 1: 18 | return tensors[0].contiguous().view(-1) 19 | flat = torch.cat([t.contiguous().view(-1) for t in tensors], dim=0) 20 | return flat 21 | 22 | def _unflatten_dense_tensors(flat, tensors): 23 | """View a flat buffer using the sizes of tensors. Assume that tensors are of 24 | same dense type, and that flat is given by _flatten_dense_tensors. 25 | Arguments: 26 | flat (Tensor): flattened dense tensors to unflatten. 27 | tensors (Iterable[Tensor]): dense tensors whose sizes will be used to 28 | unflatten flat. 29 | Returns: 30 | Unflattened dense tensors with sizes same as tensors and values from 31 | flat. 32 | """ 33 | outputs = [] 34 | offset = 0 35 | for tensor in tensors: 36 | numel = tensor.numel() 37 | outputs.append(flat.narrow(0, offset, numel).view_as(tensor)) 38 | offset += numel 39 | return tuple(outputs) 40 | 41 | 42 | ''' 43 | This version of DistributedDataParallel is designed to be used in conjunction with the multiproc.py 44 | launcher included with this example. It assumes that your run is using multiprocess with 1 45 | GPU/process, that the model is on the correct device, and that torch.set_device has been 46 | used to set the device. 47 | 48 | Parameters are broadcasted to the other processes on initialization of DistributedDataParallel, 49 | and will be allreduced at the finish of the backward pass. 50 | ''' 51 | class DistributedDataParallel(Module): 52 | 53 | def __init__(self, module): 54 | super(DistributedDataParallel, self).__init__() 55 | #fallback for PyTorch 0.3 56 | if not hasattr(dist, '_backend'): 57 | self.warn_on_half = True 58 | else: 59 | self.warn_on_half = True if dist._backend == dist.dist_backend.GLOO else False 60 | 61 | self.module = module 62 | 63 | for p in self.module.state_dict().values(): 64 | if not torch.is_tensor(p): 65 | continue 66 | dist.broadcast(p, 0) 67 | 68 | def allreduce_params(): 69 | if(self.needs_reduction): 70 | self.needs_reduction = False 71 | buckets = {} 72 | for param in self.module.parameters(): 73 | if param.requires_grad and param.grad is not None: 74 | tp = type(param.data) 75 | if tp not in buckets: 76 | buckets[tp] = [] 77 | buckets[tp].append(param) 78 | if self.warn_on_half: 79 | if torch.cuda.HalfTensor in buckets: 80 | print("WARNING: gloo dist backend for half parameters may be extremely slow." + 81 | " It is recommended to use the NCCL backend in this case. This currently requires" + 82 | "PyTorch built from top of tree master.") 83 | self.warn_on_half = False 84 | 85 | for tp in buckets: 86 | bucket = buckets[tp] 87 | grads = [param.grad.data for param in bucket] 88 | coalesced = _flatten_dense_tensors(grads) 89 | dist.all_reduce(coalesced) 90 | coalesced /= dist.get_world_size() 91 | for buf, synced in zip(grads, _unflatten_dense_tensors(coalesced, grads)): 92 | buf.copy_(synced) 93 | 94 | for param in list(self.module.parameters()): 95 | def allreduce_hook(*unused): 96 | param._execution_engine.queue_callback(allreduce_params) 97 | if param.requires_grad: 98 | param.register_hook(allreduce_hook) 99 | 100 | def forward(self, *inputs, **kwargs): 101 | self.needs_reduction = True 102 | return self.module(*inputs, **kwargs) 103 | 104 | ''' 105 | def _sync_buffers(self): 106 | buffers = list(self.module._all_buffers()) 107 | if len(buffers) > 0: 108 | # cross-node buffer sync 109 | flat_buffers = _flatten_dense_tensors(buffers) 110 | dist.broadcast(flat_buffers, 0) 111 | for buf, synced in zip(buffers, _unflatten_dense_tensors(flat_buffers, buffers)): 112 | buf.copy_(synced) 113 | def train(self, mode=True): 114 | # Clear NCCL communicator and CUDA event cache of the default group ID, 115 | # These cache will be recreated at the later call. This is currently a 116 | # work-around for a potential NCCL deadlock. 117 | if dist._backend == dist.dist_backend.NCCL: 118 | dist._clear_group_cache() 119 | super(DistributedDataParallel, self).train(mode) 120 | self.module.train(mode) 121 | ''' 122 | ''' 123 | Modifies existing model to do gradient allreduce, but doesn't change class 124 | so you don't need "module" 125 | ''' 126 | def apply_gradient_allreduce(module): 127 | if not hasattr(dist, '_backend'): 128 | module.warn_on_half = True 129 | else: 130 | module.warn_on_half = True if dist._backend == dist.dist_backend.GLOO else False 131 | 132 | for p in module.state_dict().values(): 133 | if not torch.is_tensor(p): 134 | continue 135 | dist.broadcast(p, 0) 136 | 137 | def allreduce_params(): 138 | if(module.needs_reduction): 139 | module.needs_reduction = False 140 | buckets = {} 141 | for param in module.parameters(): 142 | if param.requires_grad and param.grad is not None: 143 | tp = param.data.dtype 144 | if tp not in buckets: 145 | buckets[tp] = [] 146 | buckets[tp].append(param) 147 | if module.warn_on_half: 148 | if torch.cuda.HalfTensor in buckets: 149 | print("WARNING: gloo dist backend for half parameters may be extremely slow." + 150 | " It is recommended to use the NCCL backend in this case. This currently requires" + 151 | "PyTorch built from top of tree master.") 152 | module.warn_on_half = False 153 | 154 | for tp in buckets: 155 | bucket = buckets[tp] 156 | grads = [param.grad.data for param in bucket] 157 | coalesced = _flatten_dense_tensors(grads) 158 | dist.all_reduce(coalesced) 159 | coalesced /= dist.get_world_size() 160 | for buf, synced in zip(grads, _unflatten_dense_tensors(coalesced, grads)): 161 | buf.copy_(synced) 162 | 163 | for param in list(module.parameters()): 164 | def allreduce_hook(*unused): 165 | Variable._execution_engine.queue_callback(allreduce_params) 166 | if param.requires_grad: 167 | param.register_hook(allreduce_hook) 168 | 169 | def set_needs_reduction(self, input, output): 170 | self.needs_reduction = True 171 | 172 | module.register_forward_hook(set_needs_reduction) 173 | return module 174 | -------------------------------------------------------------------------------- /filelists/ljs_audio_text_test_filelist.txt: -------------------------------------------------------------------------------- 1 | DUMMY/LJ045-0096.wav|Mrs. De Mohrenschildt thought that Oswald, 2 | DUMMY/LJ049-0022.wav|The Secret Service believed that it was very doubtful that any President would ride regularly in a vehicle with a fixed top, even though transparent. 3 | DUMMY/LJ033-0042.wav|Between the hours of eight and nine p.m. they were occupied with the children in the bedrooms located at the extreme east end of the house. 4 | DUMMY/LJ016-0117.wav|The prisoner had nothing to deal with but wooden panels, and by dint of cutting and chopping he got both the lower panels out. 5 | DUMMY/LJ025-0157.wav|Under these circumstances, unnatural as they are, with proper management, the bean will thrust forth its radicle and its plumule; 6 | DUMMY/LJ042-0219.wav|Oswald demonstrated his thinking in connection with his return to the United States by preparing two sets of identical questions of the type which he might have thought 7 | DUMMY/LJ032-0164.wav|it is not possible to state with scientific certainty that a particular small group of fibers come from a certain piece of clothing 8 | DUMMY/LJ046-0092.wav|has confidence in the dedicated Secret Service men who are ready to lay down their lives for him 9 | DUMMY/LJ050-0118.wav|Since these agencies are already obliged constantly to evaluate the activities of such groups, 10 | DUMMY/LJ043-0016.wav|Jeanne De Mohrenschildt said, quote, 11 | DUMMY/LJ021-0078.wav|no economic panacea, which could simply revive over-night the heavy industries and the trades dependent upon them. 12 | DUMMY/LJ039-0148.wav|Examination of the cartridge cases found on the sixth floor of the Depository Building 13 | DUMMY/LJ047-0202.wav|testified that the information available to the Federal Government about Oswald before the assassination would, if known to PRS, 14 | DUMMY/LJ023-0056.wav|It is an easy document to understand when you remember that it was called into being 15 | DUMMY/LJ021-0025.wav|And in many directions, the intervention of that organized control which we call government 16 | DUMMY/LJ030-0105.wav|Communications in the motorcade. 17 | DUMMY/LJ021-0012.wav|with respect to industry and business, but nearly all are agreed that private enterprise in times such as these 18 | DUMMY/LJ019-0169.wav|and one or two men were allowed to mend clothes and make shoes. The rules made by the Secretary of State were hung up in conspicuous parts of the prison; 19 | DUMMY/LJ039-0088.wav|It just is an aid in seeing in the fact that you only have the one element, the crosshair, 20 | DUMMY/LJ016-0192.wav|"I think I could do that sort of job," said Calcraft, on the spur of the moment. 21 | DUMMY/LJ014-0142.wav|was strewn in front of the dock, and sprinkled it towards the bench with a contemptuous gesture. 22 | DUMMY/LJ012-0015.wav|Weedon and Lecasser to twelve and six months respectively in Coldbath Fields. 23 | DUMMY/LJ048-0033.wav|Prior to November twenty-two, nineteen sixty-three 24 | DUMMY/LJ028-0349.wav|who were each required to send so large a number to Babylon, that in all there were collected no fewer than fifty thousand. 25 | DUMMY/LJ030-0197.wav|At first Mrs. Connally thought that her husband had been killed, 26 | DUMMY/LJ017-0133.wav|Palmer speedily found imitators. 27 | DUMMY/LJ034-0123.wav|Although Brennan testified that the man in the window was standing when he fired the shots, most probably he was either sitting or kneeling. 28 | DUMMY/LJ003-0282.wav|Many years were to elapse before these objections should be fairly met and universally overcome. 29 | DUMMY/LJ032-0204.wav|Special Agent Lyndal L. Shaneyfelt, a photography expert with the FBI, 30 | DUMMY/LJ016-0241.wav|Calcraft served the city of London till eighteen seventy-four, when he was pensioned at the rate of twenty-five shillings per week. 31 | DUMMY/LJ023-0033.wav|we will not allow ourselves to run around in new circles of futile discussion and debate, always postponing the day of decision. 32 | DUMMY/LJ009-0286.wav|There has never been much science in the system of carrying out the extreme penalty in this country; the "finisher of the law" 33 | DUMMY/LJ008-0181.wav|he had his pockets filled with bread and cheese, and it was generally supposed that he had come a long distance to see the fatal show. 34 | DUMMY/LJ015-0052.wav|to the value of twenty thousand pounds. 35 | DUMMY/LJ016-0314.wav|Sir George Grey thought there was a growing feeling in favor of executions within the prison precincts. 36 | DUMMY/LJ047-0056.wav|From August nineteen sixty-two 37 | DUMMY/LJ010-0027.wav|Nor did the methods by which they were perpetrated greatly vary from those in times past. 38 | DUMMY/LJ010-0065.wav|At the former the "Provisional Government" was to be established, 39 | DUMMY/LJ046-0113.wav|The Commission has concluded that at the time of the assassination 40 | DUMMY/LJ028-0410.wav|There among the ruins they still live in the same kind of houses, 41 | DUMMY/LJ044-0137.wav|More seriously, the facts of his defection had become known, leaving him open to almost unanswerable attack by those who opposed his views. 42 | DUMMY/LJ008-0215.wav|One by one the huge uprights of black timber were fitted together, 43 | DUMMY/LJ030-0084.wav|or when the press of the crowd made it impossible for the escort motorcycles to stay in position on the car's rear flanks. 44 | DUMMY/LJ020-0092.wav|Have yourself called on biscuit mornings an hour earlier than usual. 45 | DUMMY/LJ029-0096.wav|On November fourteen, Lawson and Sorrels attended a meeting at Love Field 46 | DUMMY/LJ015-0308.wav|and others who swore to the meetings of the conspirators and their movements. Saward was found guilty, 47 | DUMMY/LJ012-0067.wav|But Mrs. Solomons could not resist the temptation to dabble in stolen goods, and she was found shipping watches of the wrong category to New York. 48 | DUMMY/LJ018-0231.wav|namely, to suppress it and substitute another. 49 | DUMMY/LJ014-0265.wav|and later he became manager of the newly rebuilt Olympic at Wych Street. 50 | DUMMY/LJ024-0102.wav|would be the first to exclaim as soon as an amendment was proposed 51 | DUMMY/LJ007-0233.wav|it consists of several circular perforations, about two inches in diameter, 52 | DUMMY/LJ013-0213.wav|This seems to have decided Courvoisier, 53 | DUMMY/LJ032-0045.wav|This price included nineteen dollars, ninety-five cents for the rifle and the scope, and one dollar, fifty cents for postage and handling. 54 | DUMMY/LJ011-0048.wav|Wherefore let him that thinketh he standeth take heed lest he fall," and was full of the most pointed allusions to the culprit. 55 | DUMMY/LJ005-0294.wav|It was frequently stated in evidence that the jail of the borough was in so unfit a state for the reception of prisoners, 56 | DUMMY/LJ016-0007.wav|There were others less successful. 57 | DUMMY/LJ028-0138.wav|perhaps the tales that travelers told him were exaggerated as travelers' tales are likely to be, 58 | DUMMY/LJ050-0029.wav|that is reflected in definite and comprehensive operating procedures. 59 | DUMMY/LJ014-0121.wav|The prisoners were in due course transferred to Newgate, to be put upon their trial at the Central Criminal Court. 60 | DUMMY/LJ014-0146.wav|They had to handcuff her by force against the most violent resistance, and still she raged and stormed, 61 | DUMMY/LJ046-0111.wav|The Secret Service has attempted to perform this function through the activities of its Protective Research Section 62 | DUMMY/LJ012-0257.wav|But the affair still remained a profound mystery. No light was thrown upon it till, towards the end of March, 63 | DUMMY/LJ002-0260.wav|Yet the public opinion of the whole body seems to have checked dissipation. 64 | DUMMY/LJ031-0014.wav|the Presidential limousine arrived at the emergency entrance of the Parkland Hospital at about twelve:thirty-five p.m. 65 | DUMMY/LJ047-0093.wav|Oswald was arrested and jailed by the New Orleans Police Department for disturbing the peace, in connection with a street fight which broke out when he was accosted 66 | DUMMY/LJ003-0324.wav|gaming of all sorts should be peremptorily forbidden under heavy pains and penalties. 67 | DUMMY/LJ021-0115.wav|we have reached into the heart of the problem which is to provide such annual earnings for the lowest paid worker as will meet his minimum needs. 68 | DUMMY/LJ046-0191.wav|it had established periodic regular review of the status of four hundred individuals; 69 | DUMMY/LJ034-0197.wav|who was one of the first witnesses to alert the police to the Depository as the source of the shots, as has been discussed in chapter three. 70 | DUMMY/LJ002-0253.wav|were governed by rules which they themselves had framed, and under which subscriptions were levied 71 | DUMMY/LJ048-0288.wav|might have been more alert in the Dallas motorcade if they had retired promptly in Fort Worth. 72 | DUMMY/LJ007-0112.wav|Many of the old customs once prevalent in the State Side, so properly condemned and abolished, 73 | DUMMY/LJ017-0189.wav|who was presently attacked in the same way as the others, but, but, thanks to the prompt administration of remedies, he recovered. 74 | DUMMY/LJ042-0230.wav|basically, although I hate the USSR and socialist system I still think marxism can work under different circumstances, end quote. 75 | DUMMY/LJ050-0161.wav|The Secret Service should not and does not plan to develop its own intelligence gathering facilities to duplicate the existing facilities of other Federal agencies. 76 | DUMMY/LJ003-0011.wav|that not more than one bottle of wine or one quart of beer could be issued at one time. No account was taken of the amount of liquors admitted in one day, 77 | DUMMY/LJ008-0206.wav|and caused a number of stout additional barriers to be erected in front of the scaffold, 78 | DUMMY/LJ002-0261.wav|The poorer prisoners were not in abject want, as in other prisons, 79 | DUMMY/LJ012-0189.wav|Hunt, in consideration of the information he had given, escaped death, and was sentenced to transportation for life. 80 | DUMMY/LJ019-0317.wav|The former, which consisted principally of the tread-wheel, cranks, capstans, shot-drill, 81 | DUMMY/LJ011-0041.wav|Visited Mr. Fauntleroy. My application for books for him not having been attended, I had no prayer-book to give him. 82 | DUMMY/LJ023-0089.wav|That is not only my accusation. 83 | DUMMY/LJ044-0224.wav|would not agree with that particular wording, end quote. 84 | DUMMY/LJ013-0104.wav|He found them at length residing at the latter place, one as a landed proprietor, the other as a publican. 85 | DUMMY/LJ013-0055.wav|The jury did not believe him, and the verdict was for the defendants. 86 | DUMMY/LJ014-0306.wav|These had been attributed to political action; some thought that the large purchases in foreign grains, effected at losing prices, 87 | DUMMY/LJ029-0052.wav|To supplement the PRS files, the Secret Service depends largely on local police departments and local offices of other Federal agencies 88 | DUMMY/LJ028-0459.wav|Its bricks, measuring about thirteen inches square and three inches in thickness, were burned and stamped with the usual short inscription: 89 | DUMMY/LJ017-0183.wav|Soon afterwards Dixon died, showing all the symptoms already described. 90 | DUMMY/LJ009-0084.wav|At length the ordinary pauses, and then, in a deep tone, which, though hardly above a whisper, is audible to all, says, 91 | DUMMY/LJ007-0170.wav|That in this vast metropolis, the center of wealth, civilization, and information; 92 | DUMMY/LJ016-0277.wav|This is proved by contemporary accounts, especially one graphic and realistic article which appeared in the 'Times,' 93 | DUMMY/LJ009-0061.wav|He staggers towards the pew, reels into it, stumbles forward, flings himself on the ground, and, by a curious twist of the spine, 94 | DUMMY/LJ019-0201.wav|to select a sufficiently spacious piece of ground, and erect a prison which from foundations to roofs should be in conformity with the newest ideas. 95 | DUMMY/LJ030-0063.wav|He had repeated this wish only a few days before, during his visit to Tampa, Florida. 96 | DUMMY/LJ010-0257.wav|a third miscreant made a similar but far less serious attempt in the month of July following. 97 | DUMMY/LJ009-0106.wav|The keeper tries to appear unmoved, but his eye wanders anxiously over the combustible assembly. 98 | DUMMY/LJ008-0121.wav|After the construction and action of the machine had been explained, the doctor asked the governor what kind of men he had commanded at Goree, 99 | DUMMY/LJ050-0069.wav|the Secret Service had received from the FBI some nine thousand reports on members of the Communist Party. 100 | DUMMY/LJ006-0202.wav|The news-vendor was also a tobacconist, 101 | DUMMY/LJ012-0230.wav|Shortly before the day fixed for execution, Bishop made a full confession, the bulk of which bore the impress of truth, 102 | DUMMY/LJ005-0248.wav|and stated that in his opinion Newgate, as the common jail of Middlesex, was wholly inadequate to the proper confinement of its prisoners. 103 | DUMMY/LJ037-0053.wav|who had been greatly upset by her experience, was able to view a lineup of four men handcuffed together at the police station. 104 | DUMMY/LJ045-0177.wav|For the first time 105 | DUMMY/LJ004-0036.wav|it was hoped that their rulers would hire accommodation in the county prisons, and that the inferior establishments would in course of time disappear. 106 | DUMMY/LJ026-0054.wav|carbohydrates (starch, cellulose) and fats. 107 | DUMMY/LJ020-0085.wav|Break apart from one another and pile on a plate, throwing a clean doily or a small napkin over them. Break open at table. 108 | DUMMY/LJ046-0226.wav|The several military intelligence agencies reported crank mail and similar threats involving the President. 109 | DUMMY/LJ014-0233.wav|he shot an old soldier who had attempted to detain him. He was convicted and executed. 110 | DUMMY/LJ033-0152.wav|The portion of the palm which was identified was the heel of the right palm, i.e., the area near the wrist, on the little finger side. 111 | DUMMY/LJ004-0009.wav|as indefatigable and self-sacrificing, found by personal visitation that the condition of jails throughout the kingdom was, 112 | DUMMY/LJ017-0134.wav|Within a few weeks occurred the Leeds poisoning case, in which the murderer undoubtedly was inspired by the facts made public at Palmer's trial. 113 | DUMMY/LJ019-0318.wav|was to be the rule for all convicted prisoners throughout the early stages of their detention; 114 | DUMMY/LJ020-0093.wav|Rise, wash face and hands, rinse the mouth out and brush back the hair. 115 | DUMMY/LJ012-0188.wav|Probert was then admitted as a witness, and the case was fully proved against Thurtell, who was hanged in front of Hertford Jail. 116 | DUMMY/LJ019-0202.wav|The preference given to the Pentonville system destroyed all hopes of a complete reformation of Newgate. 117 | DUMMY/LJ039-0027.wav|Oswald's revolver 118 | DUMMY/LJ040-0176.wav|He admitted to fantasies about being powerful and sometimes hurting and killing people, but refused to elaborate on them. 119 | DUMMY/LJ018-0354.wav|Doubts were long entertained whether Thomas Wainwright, 120 | DUMMY/LJ031-0185.wav|From the Presidential airplane, the Vice President telephoned Attorney General Robert F. Kennedy, 121 | DUMMY/LJ006-0137.wav|They were not obliged to attend chapel, and seldom if ever went; "prisoners," said one of them under examination, "did not like the trouble of going to chapel." 122 | DUMMY/LJ032-0085.wav|The Hidell signature on the notice of classification was in the handwriting of Oswald. 123 | DUMMY/LJ009-0037.wav|the schoolmaster and the juvenile prisoners being seated round the communion-table, opposite the pulpit. 124 | DUMMY/LJ006-0021.wav|Later on he had devoted himself to the personal investigation of the prisons of the United States. 125 | DUMMY/LJ006-0082.wav|and this particular official took excellent care to select as residents for his own ward those most suitable from his own point of view. 126 | DUMMY/LJ016-0380.wav|with hope to the last. There is always the chance of a flaw in the indictment, of a missing witness, or extenuating circumstances. 127 | DUMMY/LJ019-0344.wav|monitor, or schoolmaster, nor to be engaged in the service of any officer of the prison. 128 | DUMMY/LJ019-0161.wav|These disciplinary improvements were, however, only slowly and gradually introduced. 129 | DUMMY/LJ028-0145.wav|And here I may not omit to tell the use to which the mould dug out of the great moat was turned, nor the manner wherein the wall was wrought. 130 | DUMMY/LJ018-0349.wav|His disclaimer, distinct and detailed on every point, was intended simply for effect. 131 | DUMMY/LJ043-0010.wav|Some of the members of that group saw a good deal of the Oswalds through the fall of nineteen sixty-three, 132 | DUMMY/LJ027-0178.wav|These were undoubtedly perennibranchs. In the Permian and Triassic higher forms appeared, which were certainly caducibranch. 133 | DUMMY/LJ041-0070.wav|He did not rise above the rank of private first class, even though he had passed a qualifying examination for the rank of corporal. 134 | DUMMY/LJ008-0266.wav|Thus in the years between May first, eighteen twenty-seven, and thirtieth April, eighteen thirty-one, 135 | DUMMY/LJ021-0091.wav|In this recent reorganization we have recognized three distinct functions: 136 | DUMMY/LJ019-0129.wav|which marked the growth of public interest in prison affairs, and which was the germ of the new system 137 | DUMMY/LJ018-0215.wav|William Roupell was the eldest but illegitimate son of a wealthy man who subsequently married Roupell's mother, and had further legitimate issue. 138 | DUMMY/LJ015-0194.wav|and behaved so as to justify a belief that he had been a jail-bird all his life. 139 | DUMMY/LJ016-0137.wav|that numbers of men, "lifers," and others with ten, fourteen, or twenty years to do, can be trusted to work out of doors without bolts and bars 140 | DUMMY/LJ002-0289.wav|the latter raised eighteen pence among them to pay for a truss of straw for the poor woman to lie on. 141 | DUMMY/LJ023-0016.wav|In nineteen thirty-three you and I knew that we must never let our economic system get completely out of joint again 142 | DUMMY/LJ011-0141.wav|There were at the moment in Newgate six convicts sentenced to death for forging wills. 143 | DUMMY/LJ016-0283.wav|to do them mere justice, there was at least till then a half-drunken ribald gaiety among the crowd that made them all akin." 144 | DUMMY/LJ035-0082.wav|The only interval was the time necessary to ride in the elevator from the second to the sixth floor and walk back to the southeast corner. 145 | DUMMY/LJ045-0194.wav|Anyone who was familiar with that area of Dallas would have known that the motorcade would probably pass the Texas School Book Depository to get from Main Street 146 | DUMMY/LJ009-0124.wav|occupied when they saw it last, but a few hours ago, by their comrades who are now dead; 147 | DUMMY/LJ030-0162.wav|In the Presidential Limousine 148 | DUMMY/LJ050-0223.wav|The plan provides for an additional two hundred five agents for the Secret Service. Seventeen of this number are proposed for the Protective Research Section; 149 | DUMMY/LJ008-0228.wav|their harsh and half-cracked voices full of maudlin, besotted sympathy for those about to die. 150 | DUMMY/LJ002-0096.wav|The eight courts above enumerated were well supplied with water; 151 | DUMMY/LJ018-0288.wav|After this the other conspirators traveled to obtain genuine bills and master the system of the leading houses at home and abroad. 152 | DUMMY/LJ002-0106.wav|in which latterly a copper had been fixed for the cooking of provisions sent in by charitable persons. 153 | DUMMY/LJ025-0129.wav|On each lobe of the bi-lobed leaf of Venus flytrap are three delicate filaments which stand out at right angles from the surface of the leaf. 154 | DUMMY/LJ044-0013.wav|Hands Off Cuba, end quote, an application form for, and a membership card in, 155 | DUMMY/LJ049-0115.wav|of the person who is actually in the exercise of the executive power, or 156 | DUMMY/LJ019-0145.wav|But reformation was only skin deep. Below the surface many of the old evils still rankled. 157 | DUMMY/LJ019-0355.wav|came up in all respects to modern requirements. 158 | DUMMY/LJ019-0289.wav|There was unrestrained association of untried and convicted, juvenile with adult prisoners, vagrants, misdemeanants, felons. 159 | DUMMY/LJ048-0222.wav|in Fort Worth, there occurred a breach of discipline by some members of the Secret Service who were officially traveling with the President. 160 | DUMMY/LJ016-0367.wav|Under the new system the whole of the arrangements from first to last fell upon the officers. 161 | DUMMY/LJ047-0097.wav|Agent Quigley did not know of Oswald's prior FBI record when he interviewed him, 162 | DUMMY/LJ007-0075.wav|as effectually to rebuke and abash the profane spirit of the more insolent and daring of the criminals. 163 | DUMMY/LJ047-0022.wav|provided by other agencies. 164 | DUMMY/LJ007-0085.wav|at Newgate and York Castle as long as five years; "at Ilchester and Morpeth for seven years; at Warwick for eight years, 165 | DUMMY/LJ047-0075.wav|Hosty had inquired earlier and found no evidence that it was functioning in the Dallas area. 166 | DUMMY/LJ008-0098.wav|One was the "yeoman of the halter," a Newgate official, the executioner's assistant, whom Mr. J. T. Smith, who was present at the execution, 167 | DUMMY/LJ017-0102.wav|The second attack was fatal, and ended in Cook's death from tetanus. 168 | DUMMY/LJ046-0105.wav|Second, the adequacy of other advance preparations for the security of the President, during his visit to Dallas, 169 | DUMMY/LJ018-0206.wav|He was a tall, slender man, with a long face and iron-gray hair. 170 | DUMMY/LJ012-0271.wav|Whether it was greed or a quarrel that drove Greenacre to the desperate deed remains obscure. 171 | DUMMY/LJ005-0086.wav|with such further separation as the justices should deem conducive to good order and discipline. 172 | DUMMY/LJ042-0097.wav|and considerably better living quarters than those accorded to Soviet citizens of equal age and station. 173 | DUMMY/LJ047-0126.wav|we would handle it in due course, in accord with the whole context of the investigation. End quote. 174 | DUMMY/LJ041-0022.wav|Oswald first wrote, quote, Edward Vogel, end quote, an obvious misspelling of Voebel's name, 175 | DUMMY/LJ015-0025.wav|The bank enjoyed an excellent reputation, it had a good connection, and was supposed to be perfectly sound. 176 | DUMMY/LJ012-0194.wav|But Burke and Hare had their imitators further south, 177 | DUMMY/LJ028-0416.wav|(if man may speak so confidently of His great impenetrable counsels), for an eternal Testimony of His great work in the confusion of Man's pride, 178 | DUMMY/LJ007-0130.wav|are all huddled together without discrimination, oversight, or control." 179 | DUMMY/LJ015-0005.wav|About this time Davidson and Gordon, the people above-mentioned, 180 | DUMMY/LJ016-0125.wav|with this, placed against the wall near the chevaux-de-frise, he made an escalade. 181 | DUMMY/LJ014-0224.wav|As Dwyer survived, Cannon escaped the death sentence, which was commuted to penal servitude for life. 182 | DUMMY/LJ005-0019.wav|refuted by abundant evidence, and having no foundation whatever in truth. 183 | DUMMY/LJ042-0221.wav|With either great ambivalence, or cold calculation he prepared completely different answers to the same questions. 184 | DUMMY/LJ001-0063.wav|which was generally more formally Gothic than the printing of the German workmen, 185 | DUMMY/LJ030-0006.wav|They took off in the Presidential plane, Air Force One, at eleven a.m., arriving at San Antonio at one:thirty p.m., Eastern Standard Time. 186 | DUMMY/LJ024-0054.wav|democracy will have failed far beyond the importance to it of any king of precedent concerning the judiciary. 187 | DUMMY/LJ006-0044.wav|the same callous indifference to the moral well-being of the prisoners, the same want of employment and of all disciplinary control. 188 | DUMMY/LJ039-0154.wav|four point eight to five point six seconds if the second shot missed, 189 | DUMMY/LJ050-0090.wav|they seem unduly restrictive in continuing to require some manifestation of animus against a Government official. 190 | DUMMY/LJ028-0421.wav|it was the beginning of the great collections of Babylonian antiquities in the museums of the Western world. 191 | DUMMY/LJ033-0205.wav|then I would say the possibility exists, these fibers could have come from this blanket, end quote. 192 | DUMMY/LJ019-0335.wav|The books and journals he was to keep were minutely specified, and his constant presence in or near the jail was insisted upon. 193 | DUMMY/LJ013-0045.wav|Wallace's relations warned him against his Liverpool friend, 194 | DUMMY/LJ037-0002.wav|Chapter four. The Assassin: Part six. 195 | DUMMY/LJ018-0159.wav|This was all the police wanted to know. 196 | DUMMY/LJ026-0140.wav|In the plant as in the animal metabolism must consist of anabolic and catabolic processes. 197 | DUMMY/LJ014-0171.wav|I will briefly describe one or two of the more remarkable murders in the years immediately following, then pass on to another branch of crime. 198 | DUMMY/LJ037-0007.wav|Three others subsequently identified Oswald from a photograph. 199 | DUMMY/LJ033-0174.wav|microscopic and UV (ultra violet) characteristics, end quote. 200 | DUMMY/LJ040-0110.wav|he apparently adjusted well enough there to have had an average, although gradually deteriorating, school record 201 | DUMMY/LJ039-0192.wav|he had a total of between four point eight and five point six seconds between the two shots which hit 202 | DUMMY/LJ032-0261.wav|When he appeared before the Commission, Michael Paine lifted the blanket 203 | DUMMY/LJ040-0097.wav|Lee was brought up in this atmosphere of constant money problems, and I am sure it had quite an effect on him, and also Robert, end quote. 204 | DUMMY/LJ037-0249.wav|Mrs. Earlene Roberts, the housekeeper at Oswald's roominghouse and the last person known to have seen him before he reached tenth Street and Patton Avenue, 205 | DUMMY/LJ016-0248.wav|Marwood was proud of his calling, and when questioned as to whether his process was satisfactory, replied that he heard "no complaints." 206 | DUMMY/LJ004-0083.wav|As Mr. Buxton pointed out, many old acts of parliament designed to protect the prisoner were still in full force. 207 | DUMMY/LJ014-0029.wav|This was Delarue's watch, fully identified as such, which Hocker told his brother Delarue had given him the morning of the murder. 208 | DUMMY/LJ021-0110.wav|have been best calculated to promote industrial recovery and a permanent improvement of business and labor conditions. 209 | DUMMY/LJ003-0107.wav|he slept in the same bed with a highwayman on one side, and a man charged with murder on the other. 210 | DUMMY/LJ039-0076.wav|Ronald Simmons, chief of the U.S. Army Infantry Weapons Evaluation Branch of the Ballistics Research Laboratory, said, quote, 211 | DUMMY/LJ016-0347.wav|had undoubtedly a solemn, impressive effect upon those outside. 212 | DUMMY/LJ001-0072.wav|After the end of the fifteenth century the degradation of printing, especially in Germany and Italy, 213 | DUMMY/LJ024-0018.wav|Consequently, although there never can be more than fifteen, there may be only fourteen, or thirteen, or twelve. 214 | DUMMY/LJ032-0180.wav|that the fibers were caught in the crevice of the rifle's butt plate, quote, in the recent past, end quote, 215 | DUMMY/LJ010-0083.wav|and measures taken to arrest them when their plans were so far developed that no doubt could remain as to their guilt. 216 | DUMMY/LJ002-0299.wav|and gave the garnish for the common side at that sum, which is five shillings more than Mr. Neild says was extorted on the common side. 217 | DUMMY/LJ048-0143.wav|the Secret Service did not at the time of the assassination have any established procedure governing its relationships with them. 218 | DUMMY/LJ012-0054.wav|Solomons, while waiting to appear in court, persuaded the turnkeys to take him to a public-house, where all might "refresh." 219 | DUMMY/LJ019-0270.wav|Vegetables, especially the potato, that most valuable anti-scorbutic, was too often omitted. 220 | DUMMY/LJ035-0164.wav|three minutes after the shooting. 221 | DUMMY/LJ014-0326.wav|Maltby and Co. would issue warrants on them deliverable to the importer, and the goods were then passed to be stored in neighboring warehouses. 222 | DUMMY/LJ001-0173.wav|The essential point to be remembered is that the ornament, whatever it is, whether picture or pattern-work, should form part of the page, 223 | DUMMY/LJ050-0056.wav|On December twenty-six, nineteen sixty-three, the FBI circulated additional instructions to all its agents, 224 | DUMMY/LJ003-0319.wav|provided only that their security was not jeopardized, and dependent upon the enforcement of another new rule, 225 | DUMMY/LJ006-0040.wav|The fact was that the years as they passed, nearly twenty in all, had worked but little permanent improvement in this detestable prison. 226 | DUMMY/LJ017-0231.wav|His body was found lying in a pool of blood in a night-dress, stabbed over and over again in the left side. 227 | DUMMY/LJ017-0226.wav|One half of the mutineers fell upon him unawares with handspikes and capstan-bars. 228 | DUMMY/LJ004-0239.wav|He had been committed for an offense for which he was acquitted. 229 | DUMMY/LJ048-0112.wav|The Commission also regards the security arrangements worked out by Lawson and Sorrels at Love Field as entirely adequate. 230 | DUMMY/LJ039-0125.wav|that Oswald was a good shot, somewhat better than or equal to -- better than the average let us say. 231 | DUMMY/LJ030-0196.wav|He cried out, quote, Oh, no, no, no. My God, they are going to kill us all, end quote, 232 | DUMMY/LJ010-0228.wav|He was released from Broadmoor in eighteen seventy-eight, and went abroad. 233 | DUMMY/LJ045-0228.wav|On the other hand, he could have traveled some distance with the money he did have and he did return to his room where he obtained his revolver. 234 | DUMMY/LJ028-0168.wav|in the other was the sacred precinct of Jupiter Belus, 235 | DUMMY/LJ021-0140.wav|and in such an effort we should be able to secure for employers and employees and consumers 236 | DUMMY/LJ009-0280.wav|Again the wretched creature succeeded in obtaining foothold, but this time on the left side of the drop. 237 | DUMMY/LJ003-0159.wav|To constitute this the aristocratic quarter, unwarrantable demands were made upon the space properly allotted to the female felons, 238 | DUMMY/LJ016-0274.wav|and the windows of the opposite houses, which commanded a good view, as usual fetched high prices. 239 | DUMMY/LJ035-0014.wav|it sounded high and I immediately kind of looked up, 240 | DUMMY/LJ033-0120.wav|which he believed was where the bag reached when it was laid on the seat with one edge against the door. 241 | DUMMY/LJ045-0015.wav|which Johnson said he did not receive until after the assassination. The letter said in part, quote, 242 | DUMMY/LJ003-0299.wav|the latter end of the nineteenth century, several of which still fall far short of our English ideal, 243 | DUMMY/LJ032-0206.wav|After comparing the rifle in the simulated photograph with the rifle in Exhibit Number one thirty-three A, Shaneyfelt testified, quote, 244 | DUMMY/LJ028-0494.wav|Between the several sections were wide spaces where foot soldiers and charioteers might fight. 245 | DUMMY/LJ005-0099.wav|and report at length upon the condition of the prisons of the country. 246 | DUMMY/LJ015-0144.wav|developed to a colossal extent the frauds he had already practiced as a subordinate. 247 | DUMMY/LJ019-0221.wav|It was intended as far as possible that, except awaiting trial, no prisoner should find himself relegated to Newgate. 248 | DUMMY/LJ003-0088.wav|in one, for seven years -- that of a man sentenced to death, for whom great interest had been made, but whom it was not thought right to pardon. 249 | DUMMY/LJ045-0216.wav|nineteen sixty-three, merely to disarm her and to provide a justification of sorts, 250 | DUMMY/LJ042-0135.wav|that he was not yet twenty years old when he went to the Soviet Union with such high hopes and not quite twenty-three when he returned bitterly disappointed. 251 | DUMMY/LJ049-0196.wav|On the other hand, it is urged that all features of the protection of the President and his family should be committed to an elite and independent corps. 252 | DUMMY/LJ018-0278.wav|This was the well and astutely devised plot of the brothers Bidwell, 253 | DUMMY/LJ030-0238.wav|and then looked around again and saw more of this movement, and so I proceeded to go to the back seat and get on top of him. 254 | DUMMY/LJ018-0309.wav|where probably the money still remains. 255 | DUMMY/LJ041-0199.wav|is shown most clearly by his employment relations after his return from the Soviet Union. Of course, he made his real problems worse to the extent 256 | DUMMY/LJ007-0076.wav|The lax discipline maintained in Newgate was still further deteriorated by the presence of two other classes of prisoners who ought never to have been inmates of such a jail. 257 | DUMMY/LJ039-0118.wav|He had high motivation. He had presumably a good to excellent rifle and good ammunition. 258 | DUMMY/LJ024-0019.wav|And there may be only nine. 259 | DUMMY/LJ008-0085.wav|The fire had not quite burnt out at twelve, in nearly four hours, that is to say. 260 | DUMMY/LJ018-0031.wav|This fixed the crime pretty certainly upon Müller, who had already left the country, thus increasing suspicion under which he lay. 261 | DUMMY/LJ030-0032.wav|Dallas police stood at intervals along the fence and Dallas plain clothes men mixed in the crowd. 262 | DUMMY/LJ050-0004.wav|General Supervision of the Secret Service 263 | DUMMY/LJ039-0096.wav|This is a definite advantage to the shooter, the vehicle moving directly away from him and the downgrade of the street, and he being in an elevated position 264 | DUMMY/LJ041-0195.wav|Oswald's interest in Marxism led some people to avoid him, 265 | DUMMY/LJ047-0158.wav|After a moment's hesitation, she told me that he worked at the Texas School Book Depository near the downtown area of Dallas. 266 | DUMMY/LJ050-0162.wav|In planning its data processing techniques, 267 | DUMMY/LJ001-0051.wav|and paying great attention to the "press work" or actual process of printing, 268 | DUMMY/LJ028-0136.wav|Of all the ancient descriptions of the famous walls and the city they protected, that of Herodotus is the fullest. 269 | DUMMY/LJ034-0134.wav|Shortly after the assassination Brennan noticed 270 | DUMMY/LJ019-0348.wav|Every facility was promised. The sanction of the Secretary of State would not be withheld if plans and estimates were duly submitted, 271 | DUMMY/LJ010-0219.wav|While one stood over the fire with the papers, another stood with lighted torch to fire the house. 272 | DUMMY/LJ011-0245.wav|Mr. Mullay called again, taking with him five hundred pounds in cash. Howard discovered this, and his manner was very suspicious; 273 | DUMMY/LJ030-0035.wav|Organization of the Motorcade 274 | DUMMY/LJ044-0135.wav|While he had drawn some attention to himself and had actually appeared on two radio programs, he had been attacked by Cuban exiles and arrested, 275 | DUMMY/LJ045-0090.wav|He was very much interested in autobiographical works of outstanding statesmen of the United States, to whom his wife thought he compared himself. 276 | DUMMY/LJ026-0034.wav|When any given "protist" has to be classified the case must be decided on its individual merits; 277 | DUMMY/LJ045-0092.wav|as to the fact that he was an outstanding man, end quote. 278 | DUMMY/LJ017-0050.wav|Palmer, who was only thirty-one at the time of his trial, was in appearance short and stout, with a round head 279 | DUMMY/LJ036-0104.wav|Whaley picked Oswald. 280 | DUMMY/LJ019-0055.wav|High authorities were in favor of continuous separation. 281 | DUMMY/LJ010-0030.wav|The brutal ferocity of the wild beast once aroused, the same means, the same weapons were employed to do the dreadful deed, 282 | DUMMY/LJ038-0047.wav|Some of the officers saw Oswald strike McDonald with his fist. Most of them heard a click which they assumed to be a click of the hammer of the revolver. 283 | DUMMY/LJ009-0074.wav|Let us pass on. 284 | DUMMY/LJ048-0069.wav|Efforts made by the Bureau since the assassination, on the other hand, 285 | DUMMY/LJ003-0211.wav|They were never left quite alone for fear of suicide, and for the same reason they were searched for weapons or poisons. 286 | DUMMY/LJ048-0053.wav|It is the conclusion of the Commission that, even in the absence of Secret Service criteria 287 | DUMMY/LJ033-0093.wav|Frazier estimated that the bag was two feet long, quote, give and take a few inches, end quote, and about five or six inches wide. 288 | DUMMY/LJ006-0149.wav|The turnkeys left the prisoners very much to themselves, never entering the wards after locking-up time, at dusk, till unlocking next morning, 289 | DUMMY/LJ018-0211.wav|The false coin was bought by an agent from an agent, and dealings were carried on secretly at the "Clock House" in Seven Dials. 290 | DUMMY/LJ008-0054.wav|This contrivance appears to have been copied with improvements from that which had been used in Dublin at a still earlier date, 291 | DUMMY/LJ040-0052.wav|that his commitment to Marxism was an important factor influencing his conduct during his adult years. 292 | DUMMY/LJ028-0023.wav|Two weeks pass, and at last you stand on the eastern edge of the plateau 293 | DUMMY/LJ009-0184.wav|Lord Ferrers' body was brought to Surgeons' Hall after execution in his own carriage and six; 294 | DUMMY/LJ005-0252.wav|A committee was appointed, under the presidency of the Duke of Richmond 295 | DUMMY/LJ015-0266.wav|has probably no parallel in the annals of crime. Saward himself is a striking and in some respects an unique figure in criminal history. 296 | DUMMY/LJ017-0059.wav|even after sentence, and until within a few hours of execution, he was buoyed up with the hope of reprieve. 297 | DUMMY/LJ024-0034.wav|What do they mean by the words "packing the Court"? 298 | DUMMY/LJ016-0089.wav|He was engaged in whitewashing and cleaning; the officer who had him in charge left him on the stairs leading to the gallery. 299 | DUMMY/LJ039-0227.wav|with two hits, within four point eight and five point six seconds. 300 | DUMMY/LJ001-0096.wav|have now come into general use and are obviously a great improvement on the ordinary "modern style" in use in England, which is in fact the Bodoni type 301 | DUMMY/LJ018-0129.wav|who threatened to betray the theft. But Brewer, either before or after this, succumbed to temptation, 302 | DUMMY/LJ010-0157.wav|and that, as he was starving, he had resolved on this desperate deed, 303 | DUMMY/LJ038-0264.wav|He concluded that, quote, the general rifling characteristics of the rifle are of the same type as those found on the bullet 304 | DUMMY/LJ031-0165.wav|When security arrangements at the airport were complete, the Secret Service made the necessary arrangements for the Vice President to leave the hospital. 305 | DUMMY/LJ018-0244.wav|The effect of establishing the forgeries would be to restore to the Roupell family lands for which a price had already been paid 306 | DUMMY/LJ007-0071.wav|in the face of impediments confessedly discouraging 307 | DUMMY/LJ028-0340.wav|Such of the Babylonians as witnessed the treachery took refuge in the temple of Jupiter Belus; 308 | DUMMY/LJ017-0164.wav|with the idea of subjecting her to the irritant poison slowly but surely until the desired effect, death, was achieved. 309 | DUMMY/LJ048-0197.wav|I then told the officers that their primary duty was traffic and crowd control and that they should be alert for any persons who might attempt to throw anything 310 | DUMMY/LJ013-0098.wav|Mr. Oxenford having denied that he had made any transfer of stock, the matter was at once put into the hands of the police. 311 | DUMMY/LJ012-0049.wav|led him to think seriously of trying his fortunes in another land. 312 | DUMMY/LJ030-0014.wav|quote, that the crowd was about the same as the one which came to see him before but there were one hundred thousand extra people on hand who came to see Mrs. Kennedy. 313 | DUMMY/LJ014-0186.wav|A milliner's porter, 314 | DUMMY/LJ015-0027.wav|Yet even so early as the death of the first Sir John Paul, 315 | DUMMY/LJ047-0049.wav|Marina Oswald, however, recalled that her husband was upset by this interview. 316 | DUMMY/LJ012-0021.wav|at fourteen he was a pickpocket and a "duffer," or a seller of sham goods. 317 | DUMMY/LJ003-0140.wav|otherwise he would have been stripped of his clothes. End quote. 318 | DUMMY/LJ042-0130.wav|Shortly thereafter, less than eighteen months after his defection, about six weeks before he met Marina Prusakova, 319 | DUMMY/LJ019-0180.wav|His letter to the Corporation, under date fourth June, 320 | DUMMY/LJ017-0108.wav|He was struck with the appearance of the corpse, which was not emaciated, as after a long disease ending in death; 321 | DUMMY/LJ006-0268.wav|Women saw men if they merely pretended to be wives; even boys were visited by their sweethearts. 322 | DUMMY/LJ044-0125.wav|of residence in the U.S.S.R. against any cause which I join, by association, 323 | DUMMY/LJ015-0231.wav|It was Tester's business, who had access to the railway company's books, to watch for this. 324 | DUMMY/LJ002-0225.wav|The rentals of rooms and fees went to the warden, whose income was two thousand three hundred seventy-two pounds. 325 | DUMMY/LJ034-0072.wav|The employees raced the elevators to the first floor. Givens saw Oswald standing at the gate on the fifth floor as the elevator went by. 326 | DUMMY/LJ045-0033.wav|He began to treat me better. He helped me more -- although he always did help. But he was more attentive, end quote. 327 | DUMMY/LJ031-0058.wav|to infuse blood and fluids into the circulatory system. 328 | DUMMY/LJ029-0197.wav|During November the Dallas papers reported frequently on the plans for protecting the President, stressing the thoroughness of the preparations. 329 | DUMMY/LJ043-0047.wav|Oswald and his family lived for a brief period with his mother at her urging, but Oswald soon decided to move out. 330 | DUMMY/LJ021-0026.wav|seems necessary to produce the same result of justice and right conduct 331 | DUMMY/LJ003-0230.wav|The prison allowances were eked out by the broken victuals generously given by several eating-house keepers in the city, 332 | DUMMY/LJ037-0252.wav|Ted Callaway, who saw the gunman moments after the shooting, testified that Commission Exhibit Number one sixty-two 333 | DUMMY/LJ031-0008.wav|Meanwhile, Chief Curry ordered the police base station to notify Parkland Hospital that the wounded President was en route. 334 | DUMMY/LJ030-0021.wav|all one had to do was get a high building someday with a telescopic rifle, and there was nothing anybody could do to defend against such an attempt. 335 | DUMMY/LJ046-0179.wav|being reviewed regularly. 336 | DUMMY/LJ025-0118.wav|and that, however diverse may be the fabrics or tissues of which their bodies are composed, all these varied structures result 337 | DUMMY/LJ028-0278.wav|Zopyrus, when they told him, not thinking that it could be true, went and saw the colt with his own eyes; 338 | DUMMY/LJ007-0090.wav|Not only did their presence tend greatly to interfere with the discipline of the prison, but their condition was deplorable in the extreme. 339 | DUMMY/LJ045-0045.wav|that she would be able to leave the Soviet Union. Marina Oswald has denied this. 340 | DUMMY/LJ028-0289.wav|For he cut off his own nose and ears, and then, clipping his hair close and flogging himself with a scourge, 341 | DUMMY/LJ009-0276.wav|Calcraft, the moment he had adjusted the cap and rope, ran down the steps, drew the bolt, and disappeared. 342 | DUMMY/LJ031-0122.wav|treated the gunshot wound in the left thigh. 343 | DUMMY/LJ016-0205.wav|he received a retaining fee of five pounds, five shillings, with the usual guinea for each job; 344 | DUMMY/LJ019-0248.wav|leading to an inequality, uncertainty, and inefficiency of punishment productive of the most prejudicial results. 345 | DUMMY/LJ033-0183.wav|it was not surprising that the replica sack made on December one, nineteen sixty-three, 346 | DUMMY/LJ037-0001.wav|Report of the President's Commission on the Assassination of President Kennedy. The Warren Commission Report. By The President's Commission on the Assassination of President Kennedy. 347 | DUMMY/LJ018-0218.wav|In eighteen fifty-five 348 | DUMMY/LJ001-0102.wav|Here and there a book is printed in France or Germany with some pretension to good taste, 349 | DUMMY/LJ007-0125.wav|It was diverted from its proper uses, and, as the "place of the greatest comfort," was allotted to persons who should not have been sent to Newgate at all. 350 | DUMMY/LJ050-0022.wav|A formal and thorough description of the responsibilities of the advance agent is now in preparation by the Service. 351 | DUMMY/LJ028-0212.wav|On the night of the eleventh day Gobrias killed the son of the King. 352 | DUMMY/LJ028-0357.wav|yet we may be sure that Babylon was taken by Darius only by use of stratagem. Its walls were impregnable. 353 | DUMMY/LJ014-0199.wav|there was no case to make out; why waste money on lawyers for the defense? His demeanor was cool and collected throughout; 354 | DUMMY/LJ016-0077.wav|A man named Lears, under sentence of transportation for an attempt at murder on board ship, got up part of the way, 355 | DUMMY/LJ009-0194.wav|and that executors or persons having lawful possession of the bodies 356 | DUMMY/LJ014-0094.wav|Discovery of the murder came in this wise. O'Connor, a punctual and well-conducted official, was at once missed at the London Docks. 357 | DUMMY/LJ001-0079.wav|Caslon's type is clear and neat, and fairly well designed; 358 | DUMMY/LJ026-0052.wav|In the nutrition of the animal the most essential and characteristic part of the food supply is derived from vegetable 359 | DUMMY/LJ013-0005.wav|One of the earliest of the big operators in fraudulent finance was Edward Beaumont Smith, 360 | DUMMY/LJ033-0072.wav|I then stepped off of it and the officer picked it up in the middle and it bent so. 361 | DUMMY/LJ036-0067.wav|According to McWatters, the Beckley bus was behind the Marsalis bus, but he did not actually see it. 362 | DUMMY/LJ025-0098.wav|and it is probable that amyloid substances are universally present in the animal organism, though not in the precise form of starch. 363 | DUMMY/LJ005-0257.wav|during which time a host of witnesses were examined, and the committee presented three separate reports, 364 | DUMMY/LJ004-0024.wav|Thus in eighteen thirteen the exaction of jail fees had been forbidden by law, 365 | DUMMY/LJ049-0154.wav|In eighteen ninety-four, 366 | DUMMY/LJ039-0059.wav|(three) his experience and practice after leaving the Marine Corps, and (four) the accuracy of the weapon and the quality of the ammunition. 367 | DUMMY/LJ007-0150.wav|He is allowed intercourse with prostitutes who, in nine cases out of ten, have originally conduced to his ruin; 368 | DUMMY/LJ015-0001.wav|Chronicles of Newgate, Volume two. By Arthur Griffiths. Section eighteen: Newgate notorieties continued, part three. 369 | DUMMY/LJ010-0158.wav|feeling, as he said, that he might as well be shot or hanged as remain in such a state. 370 | DUMMY/LJ010-0281.wav|who had borne the Queen's commission, first as cornet, and then lieutenant, in the tenth Hussars. 371 | DUMMY/LJ033-0055.wav|and he could disassemble it more rapidly. 372 | DUMMY/LJ015-0218.wav|A new accomplice was now needed within the company's establishment, and Pierce looked about long before he found the right person. 373 | DUMMY/LJ027-0006.wav|In all these lines the facts are drawn together by a strong thread of unity. 374 | DUMMY/LJ016-0049.wav|He had here completed his ascent. 375 | DUMMY/LJ006-0088.wav|It was not likely that a system which left innocent men -- for the great bulk of new arrivals were still untried 376 | DUMMY/LJ042-0133.wav|a great change must have occurred in Oswald's thinking to induce him to return to the United States. 377 | DUMMY/LJ045-0234.wav|While he did become enraged at at least one point in his interrogation, 378 | DUMMY/LJ046-0033.wav|The adequacy of existing procedures can fairly be assessed only after full consideration of the difficulty of the protective assignment, 379 | DUMMY/LJ037-0061.wav|and having, quote, somewhat bushy, end quote, hair. 380 | DUMMY/LJ032-0025.wav|the officers of Klein's discovered that a rifle bearing serial number C two seven six six had been shipped to one A. Hidell, 381 | DUMMY/LJ047-0197.wav|in view of all the information concerning Oswald in its files, should have alerted the Secret Service to Oswald's presence in Dallas 382 | DUMMY/LJ018-0130.wav|and stole paper on a much larger scale than Brown. 383 | DUMMY/LJ005-0265.wav|It was recommended that the dietaries should be submitted and approved like the rules; that convicted prisoners should not receive any food but the jail allowance; 384 | DUMMY/LJ044-0105.wav|He presented Arnold Johnson, Gus Hall, 385 | DUMMY/LJ015-0043.wav|This went on for some time, and might never have been discovered had some good stroke of luck provided any of the partners 386 | DUMMY/LJ030-0125.wav|On several occasions when the Vice President's car was slowed down by the throng, Special Agent Youngblood stepped out to hold the crowd back. 387 | DUMMY/LJ043-0140.wav|He also studied Dallas bus schedules to prepare for his later use of buses to travel to and from General Walker's house. 388 | DUMMY/LJ002-0220.wav|In consequence of these disclosures, both Bambridge and Huggin, his predecessor in the office, were committed to Newgate, 389 | DUMMY/LJ034-0117.wav|At one:twenty-nine p.m. the police radio reported 390 | DUMMY/LJ018-0276.wav|The first plot was against Mr. Harry Emmanuel, but he escaped, and the attempt was made upon Loudon and Ryder. 391 | DUMMY/LJ004-0077.wav|nor has he a right to poison or starve his fellow-creatures." 392 | DUMMY/LJ042-0194.wav|they should not be confused with slowness, indecision or fear. Only the intellectually fearless could even be remotely attracted to our doctrine, 393 | DUMMY/LJ029-0114.wav|The route chosen from the airport to Main Street was the normal one, except where Harwood Street was selected as the means of access to Main Street 394 | DUMMY/LJ014-0194.wav|The policemen were now in possession; 395 | DUMMY/LJ032-0027.wav|According to its microfilm records, Klein's received an order for a rifle on March thirteen, nineteen sixty-three, 396 | DUMMY/LJ048-0289.wav|However, there is no evidence that these men failed to take any action in Dallas within their power that would have averted the tragedy. 397 | DUMMY/LJ043-0188.wav|that he was the leader of a fascist organization, and when I said that even though all of that might be true, just the same he had no right to take his life, 398 | DUMMY/LJ011-0118.wav|In eighteen twenty-nine the gallows claimed two more victims for this offense. 399 | DUMMY/LJ040-0201.wav|After her interview with Mrs. Oswald, 400 | DUMMY/LJ033-0056.wav|While the rifle may have already been disassembled when Oswald arrived home on Thursday, he had ample time that evening to disassemble the rifle 401 | DUMMY/LJ047-0073.wav|Hosty considered the information to be, quote, stale, unquote, by that time, and did not attempt to verify Oswald's reported statement. 402 | DUMMY/LJ001-0153.wav|only nominally so, however, in many cases, since when he uses a headline he counts that in, 403 | DUMMY/LJ007-0158.wav|or any kind of moral improvement was impossible; the prisoner's career was inevitably downward, till he struck the lowest depths. 404 | DUMMY/LJ028-0502.wav|The Ishtar gateway leading to the palace was encased with beautiful blue glazed bricks, 405 | DUMMY/LJ028-0226.wav|Though Herodotus wrote nearly a hundred years after Babylon fell, his story seems to bear the stamp of truth. 406 | DUMMY/LJ010-0038.wav|as there had been before; as in the year eighteen forty-nine, a year memorable for the Rush murders at Norwich, 407 | DUMMY/LJ019-0241.wav|But in the interval very comprehensive and, I think it must be admitted, salutary changes were successively introduced into the management of prisons. 408 | DUMMY/LJ001-0094.wav|were induced to cut punches for a series of "old style" letters. 409 | DUMMY/LJ001-0015.wav|the forms of printed letters should be beautiful, and that their arrangement on the page should be reasonable and a help to the shapeliness of the letters themselves. 410 | DUMMY/LJ047-0015.wav|From defection to return to Fort Worth. 411 | DUMMY/LJ044-0139.wav|since there was no background to the New Orleans FPCC, quote, organization, end quote, which consisted solely of Oswald. 412 | DUMMY/LJ050-0031.wav|that the Secret Service consciously set about the task of inculcating and maintaining the highest standard of excellence and esprit, for all of its personnel. 413 | DUMMY/LJ050-0235.wav|It has also used other Federal law enforcement agents during Presidential visits to cities in which such agents are stationed. 414 | DUMMY/LJ050-0137.wav|FBI, and the Secret Service. 415 | DUMMY/LJ031-0109.wav|At one:thirty-five p.m., after Governor Connally had been moved to the operating room, Dr. Shaw started the first operation 416 | DUMMY/LJ031-0041.wav|He noted that the President was blue-white or ashen in color; had slow, spasmodic, agonal respiration without any coordination; 417 | DUMMY/LJ021-0139.wav|There should be at least a full and fair trial given to these means of ending industrial warfare; 418 | DUMMY/LJ029-0004.wav|The narrative of these events is based largely on the recollections of the participants, 419 | DUMMY/LJ023-0122.wav|It was said in last year's Democratic platform, 420 | DUMMY/LJ005-0264.wav|inspectors of prisons should be appointed, who should visit all the prisons from time to time and report to the Secretary of State. 421 | DUMMY/LJ002-0105.wav|and beyond it was a room called the "wine room," because formerly used for the sale of wine, but 422 | DUMMY/LJ017-0035.wav|in the interests and for the due protection of the public, that the fullest and fairest inquiry should be made, 423 | DUMMY/LJ048-0252.wav|Three of these agents occupied positions on the running boards of the car, and the fourth was seated in the car. 424 | DUMMY/LJ013-0109.wav|The proceeds of the robbery were lodged in a Boston bank, 425 | DUMMY/LJ039-0139.wav|Oswald obtained a hunting license, joined a hunting club and went hunting about six times, as discussed more fully in chapter six. 426 | DUMMY/LJ044-0047.wav|that anyone ever attacked any street demonstration in which Oswald was involved, except for the Bringuier incident mentioned above, 427 | DUMMY/LJ016-0417.wav|Catherine Wilson, the poisoner, was reserved and reticent to the last, expressing no contrition, but also no fear -- 428 | DUMMY/LJ045-0178.wav|he left his wedding ring in a cup on the dresser in his room. He also left one hundred seventy dollars in a wallet in one of the dresser drawers. 429 | DUMMY/LJ009-0172.wav|While in London, for instance, in eighteen twenty-nine, twenty-four persons had been executed for crimes other than murder, 430 | DUMMY/LJ049-0202.wav|incident to its responsibilities. 431 | DUMMY/LJ032-0103.wav|The name "Hidell" was stamped on some of the "Chapter's" printed literature and on the membership application blanks. 432 | DUMMY/LJ013-0091.wav|and Elder had to be assisted by two bank porters, who carried it for him to a carriage waiting near the Mansion House. 433 | DUMMY/LJ037-0208.wav|nineteen dollars, ninety-five cents, plus one dollar, twenty-seven cents shipping charge, had been collected from the consignee, Hidell. 434 | DUMMY/LJ014-0128.wav|her hair was dressed in long crepe bands. She had lace ruffles at her wrist, and wore primrose-colored kid gloves. 435 | DUMMY/LJ015-0007.wav|This affected Cole's credit, and ugly reports were in circulation charging him with the issue of simulated warrants. 436 | DUMMY/LJ036-0169.wav|he would have reached his destination at approximately twelve:fifty-four p.m. 437 | DUMMY/LJ021-0040.wav|The second step we have taken in the restoration of normal business enterprise 438 | DUMMY/LJ015-0036.wav|The bank was already insolvent, 439 | DUMMY/LJ034-0041.wav|Although Bureau experiments had shown that twenty-four hours was a likely maximum time, Latona stated 440 | DUMMY/LJ009-0192.wav|The dissection of executed criminals was abolished soon after the discovery of the crime of burking, 441 | DUMMY/LJ037-0248.wav|The eyewitnesses vary in their identification of the jacket. 442 | DUMMY/LJ015-0289.wav|As each transaction was carried out from a different address, and a different messenger always employed, 443 | DUMMY/LJ005-0072.wav|After a few years of active exertion the Society was rewarded by fresh legislation. 444 | DUMMY/LJ023-0047.wav|The three horses are, of course, the three branches of government -- the Congress, the Executive and the courts. 445 | DUMMY/LJ009-0126.wav|Hardly any one. 446 | DUMMY/LJ034-0097.wav|The window was approximately one hundred twenty feet away. 447 | DUMMY/LJ028-0462.wav|They were laid in bitumen. 448 | DUMMY/LJ046-0055.wav|It is now possible for Presidents to travel the length and breadth of a land far larger than the United States 449 | DUMMY/LJ019-0371.wav|Yet the law was seldom if ever enforced. 450 | DUMMY/LJ039-0207.wav|Although all of the shots were a few inches high and to the right of the target, 451 | DUMMY/LJ002-0174.wav|Mr. Buxton's friends at once paid the forty shillings, and the boy was released. 452 | DUMMY/LJ016-0233.wav|In his own profession 453 | DUMMY/LJ026-0108.wav|It is clear that there are upward and downward currents of water containing food (comparable to blood of an animal), 454 | DUMMY/LJ038-0035.wav|Oswald rose from his seat, bringing up both hands. 455 | DUMMY/LJ026-0148.wav|water which is lost by evaporation, especially from the leaf surface through the stomata; 456 | DUMMY/LJ001-0186.wav|the position of our Society that a work of utility might be also a work of art, if we cared to make it so. 457 | DUMMY/LJ016-0264.wav|The upturned faces of the eager spectators resembled those of the 'gods' at Drury Lane on Boxing Night; 458 | DUMMY/LJ009-0041.wav|The occupants of this terrible black pew were the last always to enter the chapel. 459 | DUMMY/LJ010-0297.wav|But there were other notorious cases of forgery. 460 | DUMMY/LJ040-0018.wav|the Commission is not able to reach any definite conclusions as to whether or not he was, quote, sane, unquote, under prevailing legal standards. 461 | DUMMY/LJ005-0253.wav|"to inquire into and report upon the several jails and houses of correction in the counties, cities, and corporate towns within England and Wales 462 | DUMMY/LJ027-0176.wav|Fishes first appeared in the Devonian and Upper Silurian in very reptilian or rather amphibian forms. 463 | DUMMY/LJ034-0035.wav|The position of this palmprint on the carton was parallel with the long axis of the box, and at right angles with the short axis; 464 | DUMMY/LJ016-0054.wav|But he did not like the risk of entering a room by the fireplace, and the chances of detection it offered. 465 | DUMMY/LJ018-0262.wav|Roupell received the announcement with a cheerful countenance, 466 | DUMMY/LJ044-0237.wav|with thirteen dollars, eighty-seven cents when considerably greater resources were available to him. 467 | DUMMY/LJ034-0166.wav|Two other witnesses were able to offer partial descriptions of a man they saw in the southeast corner window 468 | DUMMY/LJ016-0238.wav|"just to steady their legs a little;" in other words, to add his weight to that of the hanging bodies. 469 | DUMMY/LJ042-0198.wav|The discussion above has already set forth examples of his expression of hatred for the United States. 470 | DUMMY/LJ031-0189.wav|At two:thirty-eight p.m., Eastern Standard Time, Lyndon Baines Johnson took the oath of office as the thirty-sixth President of the United States. 471 | DUMMY/LJ050-0084.wav|or, quote, other high government officials in the nature of a complaint coupled with an expressed or implied determination to use a means, 472 | DUMMY/LJ044-0158.wav|As for my return entrance visa please consider it separately. End quote. 473 | DUMMY/LJ045-0082.wav|it appears that Marina Oswald also complained that her husband was not able to provide more material things for her. 474 | DUMMY/LJ045-0190.wav|appeared in The Dallas Times Herald on November fifteen, nineteen sixty-three. 475 | DUMMY/LJ035-0155.wav|The only exit from the office in the direction Oswald was moving was through the door to the front stairway. 476 | DUMMY/LJ044-0004.wav|Political Activities 477 | DUMMY/LJ046-0016.wav|The Commission has not undertaken a comprehensive examination of all facets of this subject; 478 | DUMMY/LJ019-0368.wav|The latter too was to be laid before the House of Commons. 479 | DUMMY/LJ010-0062.wav|But they proceeded in all seriousness, and would have shrunk from no outrage or atrocity in furtherance of their foolhardy enterprise. 480 | DUMMY/LJ033-0159.wav|It was from Oswald's right hand, in which he carried the long package as he walked from Frazier's car to the building. 481 | DUMMY/LJ002-0171.wav|The boy declared he saw no one, and accordingly passed through without paying the toll of a penny. 482 | DUMMY/LJ002-0298.wav|in his evidence in eighteen fourteen, said it was more, 483 | DUMMY/LJ012-0219.wav|and in one corner, at some depth, a bundle of clothes were unearthed, which, with a hairy cap, 484 | DUMMY/LJ017-0190.wav|After this came the charge of administering oil of vitriol, which failed, as has been described. 485 | DUMMY/LJ019-0179.wav|This, with a scheme for limiting the jail to untried prisoners, had been urgently recommended by Lord John Russell in eighteen thirty. 486 | DUMMY/LJ050-0188.wav|each patrolman might be given a prepared booklet of instructions explaining what is expected of him. The Secret Service has expressed concern 487 | DUMMY/LJ006-0043.wav|The disgraceful overcrowding had been partially ended, but the same evils of indiscriminate association were still present; there was the old neglect of decency, 488 | DUMMY/LJ029-0060.wav|A number of people who resembled some of those in the photographs were placed under surveillance at the Trade Mart. 489 | DUMMY/LJ019-0052.wav|Both systems came to us from the United States. The difference was really more in degree than in principle, 490 | DUMMY/LJ037-0081.wav|Later in the day each woman found an empty shell on the ground near the house. These two shells were delivered to the police. 491 | DUMMY/LJ048-0200.wav|paying particular attention to the crowd for any unusual activity. 492 | DUMMY/LJ016-0426.wav|come along, gallows. 493 | DUMMY/LJ008-0182.wav|A tremendous crowd assembled when Bellingham was executed in eighteen twelve for the murder of Spencer Percival, at that time prime minister; 494 | DUMMY/LJ043-0107.wav|Upon moving to New Orleans on April twenty-four, nineteen sixty-three, 495 | DUMMY/LJ006-0084.wav|and so numerous were his opportunities of showing favoritism, that all the prisoners may be said to be in his power. 496 | DUMMY/LJ025-0081.wav|has no permanent digestive cavity or mouth, but takes in its food anywhere and digests, so to speak, all over its body. 497 | DUMMY/LJ019-0042.wav|These were either satisfied with a makeshift, and modified existing buildings, without close regard to their suitability, or for a long time did nothing at all. 498 | DUMMY/LJ047-0240.wav|They agree that Hosty told Revill 499 | DUMMY/LJ032-0012.wav|the resistance to arrest and the attempted shooting of another police officer by the man (Lee Harvey Oswald) subsequently accused of assassinating President Kennedy 500 | DUMMY/LJ050-0209.wav|The assistant to the Director of the FBI testified that 501 | -------------------------------------------------------------------------------- /filelists/ljs_audio_text_val_filelist.txt: -------------------------------------------------------------------------------- 1 | DUMMY/LJ022-0023.wav|The overwhelming majority of people in this country know how to sift the wheat from the chaff in what they hear and what they read. 2 | DUMMY/LJ043-0030.wav|If somebody did that to me, a lousy trick like that, to take my wife away, and all the furniture, I would be mad as hell, too. 3 | DUMMY/LJ005-0201.wav|as is shown by the report of the Commissioners to inquire into the state of the municipal corporations in eighteen thirty-five. 4 | DUMMY/LJ001-0110.wav|Even the Caslon type when enlarged shows great shortcomings in this respect: 5 | DUMMY/LJ003-0345.wav|All the committee could do in this respect was to throw the responsibility on others. 6 | DUMMY/LJ007-0154.wav|These pungent and well-grounded strictures applied with still greater force to the unconvicted prisoner, the man who came to the prison innocent, and still uncontaminated, 7 | DUMMY/LJ018-0098.wav|and recognized as one of the frequenters of the bogus law-stationers. His arrest led to that of others. 8 | DUMMY/LJ047-0044.wav|Oswald was, however, willing to discuss his contacts with Soviet authorities. He denied having any involvement with Soviet intelligence agencies 9 | DUMMY/LJ031-0038.wav|The first physician to see the President at Parkland Hospital was Dr. Charles J. Carrico, a resident in general surgery. 10 | DUMMY/LJ048-0194.wav|during the morning of November twenty-two prior to the motorcade. 11 | DUMMY/LJ049-0026.wav|On occasion the Secret Service has been permitted to have an agent riding in the passenger compartment with the President. 12 | DUMMY/LJ004-0152.wav|although at Mr. Buxton's visit a new jail was in process of erection, the first step towards reform since Howard's visitation in seventeen seventy-four. 13 | DUMMY/LJ008-0278.wav|or theirs might be one of many, and it might be considered necessary to "make an example." 14 | DUMMY/LJ043-0002.wav|The Warren Commission Report. By The President's Commission on the Assassination of President Kennedy. Chapter seven. Lee Harvey Oswald: 15 | DUMMY/LJ009-0114.wav|Mr. Wakefield winds up his graphic but somewhat sensational account by describing another religious service, which may appropriately be inserted here. 16 | DUMMY/LJ028-0506.wav|A modern artist would have difficulty in doing such accurate work. 17 | DUMMY/LJ050-0168.wav|with the particular purposes of the agency involved. The Commission recognizes that this is a controversial area 18 | DUMMY/LJ039-0223.wav|Oswald's Marine training in marksmanship, his other rifle experience and his established familiarity with this particular weapon 19 | DUMMY/LJ029-0032.wav|According to O'Donnell, quote, we had a motorcade wherever we went, end quote. 20 | DUMMY/LJ031-0070.wav|Dr. Clark, who most closely observed the head wound, 21 | DUMMY/LJ034-0198.wav|Euins, who was on the southwest corner of Elm and Houston Streets testified that he could not describe the man he saw in the window. 22 | DUMMY/LJ026-0068.wav|Energy enters the plant, to a small extent, 23 | DUMMY/LJ039-0075.wav|once you know that you must put the crosshairs on the target and that is all that is necessary. 24 | DUMMY/LJ004-0096.wav|the fatal consequences whereof might be prevented if the justices of the peace were duly authorized 25 | DUMMY/LJ005-0014.wav|Speaking on a debate on prison matters, he declared that 26 | DUMMY/LJ012-0161.wav|he was reported to have fallen away to a shadow. 27 | DUMMY/LJ018-0239.wav|His disappearance gave color and substance to evil reports already in circulation that the will and conveyance above referred to 28 | DUMMY/LJ019-0257.wav|Here the tread-wheel was in use, there cellular cranks, or hard-labor machines. 29 | DUMMY/LJ028-0008.wav|you tap gently with your heel upon the shoulder of the dromedary to urge her on. 30 | DUMMY/LJ024-0083.wav|This plan of mine is no attack on the Court; 31 | DUMMY/LJ042-0129.wav|No night clubs or bowling alleys, no places of recreation except the trade union dances. I have had enough. 32 | DUMMY/LJ036-0103.wav|The police asked him whether he could pick out his passenger from the lineup. 33 | DUMMY/LJ046-0058.wav|During his Presidency, Franklin D. Roosevelt made almost four hundred journeys and traveled more than three hundred fifty thousand miles. 34 | DUMMY/LJ014-0076.wav|He was seen afterwards smoking and talking with his hosts in their back parlor, and never seen again alive. 35 | DUMMY/LJ002-0043.wav|long narrow rooms -- one thirty-six feet, six twenty-three feet, and the eighth eighteen, 36 | DUMMY/LJ009-0076.wav|We come to the sermon. 37 | DUMMY/LJ017-0131.wav|even when the high sheriff had told him there was no possibility of a reprieve, and within a few hours of execution. 38 | DUMMY/LJ046-0184.wav|but there is a system for the immediate notification of the Secret Service by the confining institution when a subject is released or escapes. 39 | DUMMY/LJ014-0263.wav|When other pleasures palled he took a theatre, and posed as a munificent patron of the dramatic art. 40 | DUMMY/LJ042-0096.wav|(old exchange rate) in addition to his factory salary of approximately equal amount 41 | DUMMY/LJ049-0050.wav|Hill had both feet on the car and was climbing aboard to assist President and Mrs. Kennedy. 42 | DUMMY/LJ019-0186.wav|seeing that since the establishment of the Central Criminal Court, Newgate received prisoners for trial from several counties, 43 | DUMMY/LJ028-0307.wav|then let twenty days pass, and at the end of that time station near the Chaldasan gates a body of four thousand. 44 | DUMMY/LJ012-0235.wav|While they were in a state of insensibility the murder was committed. 45 | DUMMY/LJ034-0053.wav|reached the same conclusion as Latona that the prints found on the cartons were those of Lee Harvey Oswald. 46 | DUMMY/LJ014-0030.wav|These were damnatory facts which well supported the prosecution. 47 | DUMMY/LJ015-0203.wav|but were the precautions too minute, the vigilance too close to be eluded or overcome? 48 | DUMMY/LJ028-0093.wav|but his scribe wrote it in the manner customary for the scribes of those days to write of their royal masters. 49 | DUMMY/LJ002-0018.wav|The inadequacy of the jail was noticed and reported upon again and again by the grand juries of the city of London, 50 | DUMMY/LJ028-0275.wav|At last, in the twentieth month, 51 | DUMMY/LJ012-0042.wav|which he kept concealed in a hiding-place with a trap-door just under his bed. 52 | DUMMY/LJ011-0096.wav|He married a lady also belonging to the Society of Friends, who brought him a large fortune, which, and his own money, he put into a city firm, 53 | DUMMY/LJ036-0077.wav|Roger D. Craig, a deputy sheriff of Dallas County, 54 | DUMMY/LJ016-0318.wav|Other officials, great lawyers, governors of prisons, and chaplains supported this view. 55 | DUMMY/LJ013-0164.wav|who came from his room ready dressed, a suspicious circumstance, as he was always late in the morning. 56 | DUMMY/LJ027-0141.wav|is closely reproduced in the life-history of existing deer. Or, in other words, 57 | DUMMY/LJ028-0335.wav|accordingly they committed to him the command of their whole army, and put the keys of their city into his hands. 58 | DUMMY/LJ031-0202.wav|Mrs. Kennedy chose the hospital in Bethesda for the autopsy because the President had served in the Navy. 59 | DUMMY/LJ021-0145.wav|From those willing to join in establishing this hoped-for period of peace, 60 | DUMMY/LJ016-0288.wav|"Müller, Müller, He's the man," till a diversion was created by the appearance of the gallows, which was received with continuous yells. 61 | DUMMY/LJ028-0081.wav|Years later, when the archaeologists could readily distinguish the false from the true, 62 | DUMMY/LJ018-0081.wav|his defense being that he had intended to commit suicide, but that, on the appearance of this officer who had wronged him, 63 | DUMMY/LJ021-0066.wav|together with a great increase in the payrolls, there has come a substantial rise in the total of industrial profits 64 | DUMMY/LJ009-0238.wav|After this the sheriffs sent for another rope, but the spectators interfered, and the man was carried back to jail. 65 | DUMMY/LJ005-0079.wav|and improve the morals of the prisoners, and shall insure the proper measure of punishment to convicted offenders. 66 | DUMMY/LJ035-0019.wav|drove to the northwest corner of Elm and Houston, and parked approximately ten feet from the traffic signal. 67 | DUMMY/LJ036-0174.wav|This is the approximate time he entered the roominghouse, according to Earlene Roberts, the housekeeper there. 68 | DUMMY/LJ046-0146.wav|The criteria in effect prior to November twenty-two, nineteen sixty-three, for determining whether to accept material for the PRS general files 69 | DUMMY/LJ017-0044.wav|and the deepest anxiety was felt that the crime, if crime there had been, should be brought home to its perpetrator. 70 | DUMMY/LJ017-0070.wav|but his sporting operations did not prosper, and he became a needy man, always driven to desperate straits for cash. 71 | DUMMY/LJ014-0020.wav|He was soon afterwards arrested on suspicion, and a search of his lodgings brought to light several garments saturated with blood; 72 | DUMMY/LJ016-0020.wav|He never reached the cistern, but fell back into the yard, injuring his legs severely. 73 | DUMMY/LJ045-0230.wav|when he was finally apprehended in the Texas Theatre. Although it is not fully corroborated by others who were present, 74 | DUMMY/LJ035-0129.wav|and she must have run down the stairs ahead of Oswald and would probably have seen or heard him. 75 | DUMMY/LJ008-0307.wav|afterwards express a wish to murder the Recorder for having kept them so long in suspense. 76 | DUMMY/LJ008-0294.wav|nearly indefinitely deferred. 77 | DUMMY/LJ047-0148.wav|On October twenty-five, 78 | DUMMY/LJ008-0111.wav|They entered a "stone cold room," and were presently joined by the prisoner. 79 | DUMMY/LJ034-0042.wav|that he could only testify with certainty that the print was less than three days old. 80 | DUMMY/LJ037-0234.wav|Mrs. Mary Brock, the wife of a mechanic who worked at the station, was there at the time and she saw a white male, 81 | DUMMY/LJ040-0002.wav|Chapter seven. Lee Harvey Oswald: Background and Possible Motives, Part one. 82 | DUMMY/LJ045-0140.wav|The arguments he used to justify his use of the alias suggest that Oswald may have come to think that the whole world was becoming involved 83 | DUMMY/LJ012-0035.wav|the number and names on watches, were carefully removed or obliterated after the goods passed out of his hands. 84 | DUMMY/LJ012-0250.wav|On the seventh July, eighteen thirty-seven, 85 | DUMMY/LJ016-0179.wav|contracted with sheriffs and conveners to work by the job. 86 | DUMMY/LJ016-0138.wav|at a distance from the prison. 87 | DUMMY/LJ027-0052.wav|These principles of homology are essential to a correct interpretation of the facts of morphology. 88 | DUMMY/LJ031-0134.wav|On one occasion Mrs. Johnson, accompanied by two Secret Service agents, left the room to see Mrs. Kennedy and Mrs. Connally. 89 | DUMMY/LJ019-0273.wav|which Sir Joshua Jebb told the committee he considered the proper elements of penal discipline. 90 | DUMMY/LJ014-0110.wav|At the first the boxes were impounded, opened, and found to contain many of O'Connor's effects. 91 | DUMMY/LJ034-0160.wav|on Brennan's subsequent certain identification of Lee Harvey Oswald as the man he saw fire the rifle. 92 | DUMMY/LJ038-0199.wav|eleven. If I am alive and taken prisoner, 93 | DUMMY/LJ014-0010.wav|yet he could not overcome the strange fascination it had for him, and remained by the side of the corpse till the stretcher came. 94 | DUMMY/LJ033-0047.wav|I noticed when I went out that the light was on, end quote, 95 | DUMMY/LJ040-0027.wav|He was never satisfied with anything. 96 | DUMMY/LJ048-0228.wav|and others who were present say that no agent was inebriated or acted improperly. 97 | DUMMY/LJ003-0111.wav|He was in consequence put out of the protection of their internal law, end quote. Their code was a subject of some curiosity. 98 | DUMMY/LJ008-0258.wav|Let me retrace my steps, and speak more in detail of the treatment of the condemned in those bloodthirsty and brutally indifferent days, 99 | DUMMY/LJ029-0022.wav|The original plan called for the President to spend only one day in the State, making whirlwind visits to Dallas, Fort Worth, San Antonio, and Houston. 100 | DUMMY/LJ004-0045.wav|Mr. Sturges Bourne, Sir James Mackintosh, Sir James Scarlett, and William Wilberforce. 101 | -------------------------------------------------------------------------------- /hparams.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | from text import symbols 3 | 4 | 5 | def create_hparams(hparams_string=None, verbose=False): 6 | """Create model hyperparameters. Parse nondefault from given string.""" 7 | 8 | hparams = tf.contrib.training.HParams( 9 | ################################ 10 | # Experiment Parameters # 11 | ################################ 12 | epochs=500, 13 | iters_per_checkpoint=1000, 14 | seed=1234, 15 | dynamic_loss_scaling=True, 16 | fp16_run=False, 17 | distributed_run=False, 18 | dist_backend="nccl", 19 | dist_url="tcp://localhost:54321", 20 | cudnn_enabled=True, 21 | cudnn_benchmark=False, 22 | ignore_layers=['embedding.weight'], 23 | 24 | ################################ 25 | # Data Parameters # 26 | ################################ 27 | load_mel_from_disk=False, 28 | training_files='filelists/ljs_audio_text_train_filelist.txt', 29 | validation_files='filelists/ljs_audio_text_val_filelist.txt', 30 | text_cleaners=['english_cleaners'], 31 | 32 | ################################ 33 | # Audio Parameters # 34 | ################################ 35 | max_wav_value=32768.0, 36 | sampling_rate=22050, 37 | filter_length=1024, 38 | hop_length=256, 39 | win_length=1024, 40 | n_mel_channels=80, 41 | mel_fmin=0.0, 42 | mel_fmax=8000.0, 43 | 44 | ################################ 45 | # Model Parameters # 46 | ################################ 47 | n_symbols=len(symbols), 48 | symbols_embedding_dim=512, 49 | 50 | # Encoder parameters 51 | encoder_kernel_size=5, 52 | encoder_n_convolutions=3, 53 | encoder_embedding_dim=512, 54 | 55 | # Decoder parameters 56 | n_frames_per_step=1, # currently only 1 is supported 57 | decoder_rnn_dim=1024, 58 | prenet_dim=256, 59 | max_decoder_steps=1000, 60 | gate_threshold=0.5, 61 | p_attention_dropout=0.1, 62 | p_decoder_dropout=0.1, 63 | 64 | # Attention parameters 65 | attention_rnn_dim=1024, 66 | attention_dim=128, 67 | 68 | # Location Layer parameters 69 | attention_location_n_filters=32, 70 | attention_location_kernel_size=31, 71 | 72 | # Mel-post processing network parameters 73 | postnet_embedding_dim=512, 74 | postnet_kernel_size=5, 75 | postnet_n_convolutions=5, 76 | 77 | ################################ 78 | # Optimization Hyperparameters # 79 | ################################ 80 | use_saved_learning_rate=False, 81 | learning_rate=1e-3, 82 | weight_decay=1e-6, 83 | grad_clip_thresh=1.0, 84 | batch_size=64, 85 | mask_padding=True # set model's padded outputs to padded values 86 | ) 87 | 88 | if hparams_string: 89 | tf.logging.info('Parsing command line hparams: %s', hparams_string) 90 | hparams.parse(hparams_string) 91 | 92 | if verbose: 93 | tf.logging.info('Final parsed hparams: %s', hparams.values()) 94 | 95 | return hparams 96 | -------------------------------------------------------------------------------- /layers.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from librosa.filters import mel as librosa_mel_fn 3 | from audio_processing import dynamic_range_compression 4 | from audio_processing import dynamic_range_decompression 5 | from stft import STFT 6 | 7 | 8 | class LinearNorm(torch.nn.Module): 9 | def __init__(self, in_dim, out_dim, bias=True, w_init_gain='linear'): 10 | super(LinearNorm, self).__init__() 11 | self.linear_layer = torch.nn.Linear(in_dim, out_dim, bias=bias) 12 | 13 | torch.nn.init.xavier_uniform_( 14 | self.linear_layer.weight, 15 | gain=torch.nn.init.calculate_gain(w_init_gain)) 16 | 17 | def forward(self, x): 18 | return self.linear_layer(x) 19 | 20 | 21 | class ConvNorm(torch.nn.Module): 22 | def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, 23 | padding=None, dilation=1, bias=True, w_init_gain='linear'): 24 | super(ConvNorm, self).__init__() 25 | if padding is None: 26 | assert(kernel_size % 2 == 1) 27 | padding = int(dilation * (kernel_size - 1) / 2) 28 | 29 | self.conv = torch.nn.Conv1d(in_channels, out_channels, 30 | kernel_size=kernel_size, stride=stride, 31 | padding=padding, dilation=dilation, 32 | bias=bias) 33 | 34 | torch.nn.init.xavier_uniform_( 35 | self.conv.weight, gain=torch.nn.init.calculate_gain(w_init_gain)) 36 | 37 | def forward(self, signal): 38 | conv_signal = self.conv(signal) 39 | return conv_signal 40 | 41 | 42 | class TacotronSTFT(torch.nn.Module): 43 | def __init__(self, filter_length=1024, hop_length=256, win_length=1024, 44 | n_mel_channels=80, sampling_rate=22050, mel_fmin=0.0, 45 | mel_fmax=8000.0): 46 | super(TacotronSTFT, self).__init__() 47 | self.n_mel_channels = n_mel_channels 48 | self.sampling_rate = sampling_rate 49 | self.stft_fn = STFT(filter_length, hop_length, win_length) 50 | mel_basis = librosa_mel_fn( 51 | sampling_rate, filter_length, n_mel_channels, mel_fmin, mel_fmax) 52 | mel_basis = torch.from_numpy(mel_basis).float() 53 | self.register_buffer('mel_basis', mel_basis) 54 | 55 | def spectral_normalize(self, magnitudes): 56 | output = dynamic_range_compression(magnitudes) 57 | return output 58 | 59 | def spectral_de_normalize(self, magnitudes): 60 | output = dynamic_range_decompression(magnitudes) 61 | return output 62 | 63 | def mel_spectrogram(self, y): 64 | """Computes mel-spectrograms from a batch of waves 65 | PARAMS 66 | ------ 67 | y: Variable(torch.FloatTensor) with shape (B, T) in range [-1, 1] 68 | 69 | RETURNS 70 | ------- 71 | mel_output: torch.FloatTensor of shape (B, n_mel_channels, T) 72 | """ 73 | assert(torch.min(y.data) >= -1) 74 | assert(torch.max(y.data) <= 1) 75 | 76 | magnitudes, phases = self.stft_fn.transform(y) 77 | magnitudes = magnitudes.data 78 | mel_output = torch.matmul(self.mel_basis, magnitudes) 79 | mel_output = self.spectral_normalize(mel_output) 80 | return mel_output 81 | -------------------------------------------------------------------------------- /logger.py: -------------------------------------------------------------------------------- 1 | import random 2 | import torch 3 | from torch.utils.tensorboard import SummaryWriter 4 | from plotting_utils import plot_alignment_to_numpy, plot_spectrogram_to_numpy 5 | from plotting_utils import plot_gate_outputs_to_numpy 6 | 7 | 8 | class Tacotron2Logger(SummaryWriter): 9 | def __init__(self, logdir): 10 | super(Tacotron2Logger, self).__init__(logdir) 11 | 12 | def log_training(self, reduced_loss, grad_norm, learning_rate, duration, 13 | iteration): 14 | self.add_scalar("training.loss", reduced_loss, iteration) 15 | self.add_scalar("grad.norm", grad_norm, iteration) 16 | self.add_scalar("learning.rate", learning_rate, iteration) 17 | self.add_scalar("duration", duration, iteration) 18 | 19 | def log_validation(self, reduced_loss, model, y, y_pred, iteration): 20 | self.add_scalar("validation.loss", reduced_loss, iteration) 21 | _, mel_outputs, gate_outputs, alignments = y_pred 22 | mel_targets, gate_targets = y 23 | 24 | # plot distribution of parameters 25 | for tag, value in model.named_parameters(): 26 | tag = tag.replace('.', '/') 27 | self.add_histogram(tag, value.data.cpu().numpy(), iteration) 28 | 29 | # plot alignment, mel target and predicted, gate target and predicted 30 | idx = random.randint(0, alignments.size(0) - 1) 31 | self.add_image( 32 | "alignment", 33 | plot_alignment_to_numpy(alignments[idx].data.cpu().numpy().T), 34 | iteration, dataformats='HWC') 35 | self.add_image( 36 | "mel_target", 37 | plot_spectrogram_to_numpy(mel_targets[idx].data.cpu().numpy()), 38 | iteration, dataformats='HWC') 39 | self.add_image( 40 | "mel_predicted", 41 | plot_spectrogram_to_numpy(mel_outputs[idx].data.cpu().numpy()), 42 | iteration, dataformats='HWC') 43 | self.add_image( 44 | "gate", 45 | plot_gate_outputs_to_numpy( 46 | gate_targets[idx].data.cpu().numpy(), 47 | torch.sigmoid(gate_outputs[idx]).data.cpu().numpy()), 48 | iteration, dataformats='HWC') 49 | -------------------------------------------------------------------------------- /loss_function.py: -------------------------------------------------------------------------------- 1 | from torch import nn 2 | 3 | 4 | class Tacotron2Loss(nn.Module): 5 | def __init__(self): 6 | super(Tacotron2Loss, self).__init__() 7 | 8 | def forward(self, model_output, targets): 9 | mel_target, gate_target = targets[0], targets[1] 10 | mel_target.requires_grad = False 11 | gate_target.requires_grad = False 12 | gate_target = gate_target.view(-1, 1) 13 | 14 | mel_out, mel_out_postnet, gate_out, _ = model_output 15 | gate_out = gate_out.view(-1, 1) 16 | mel_loss = nn.MSELoss()(mel_out, mel_target) + \ 17 | nn.MSELoss()(mel_out_postnet, mel_target) 18 | gate_loss = nn.BCEWithLogitsLoss()(gate_out, gate_target) 19 | return mel_loss + gate_loss 20 | -------------------------------------------------------------------------------- /loss_scaler.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | class LossScaler: 4 | 5 | def __init__(self, scale=1): 6 | self.cur_scale = scale 7 | 8 | # `params` is a list / generator of torch.Variable 9 | def has_overflow(self, params): 10 | return False 11 | 12 | # `x` is a torch.Tensor 13 | def _has_inf_or_nan(x): 14 | return False 15 | 16 | # `overflow` is boolean indicating whether we overflowed in gradient 17 | def update_scale(self, overflow): 18 | pass 19 | 20 | @property 21 | def loss_scale(self): 22 | return self.cur_scale 23 | 24 | def scale_gradient(self, module, grad_in, grad_out): 25 | return tuple(self.loss_scale * g for g in grad_in) 26 | 27 | def backward(self, loss): 28 | scaled_loss = loss*self.loss_scale 29 | scaled_loss.backward() 30 | 31 | class DynamicLossScaler: 32 | 33 | def __init__(self, 34 | init_scale=2**32, 35 | scale_factor=2., 36 | scale_window=1000): 37 | self.cur_scale = init_scale 38 | self.cur_iter = 0 39 | self.last_overflow_iter = -1 40 | self.scale_factor = scale_factor 41 | self.scale_window = scale_window 42 | 43 | # `params` is a list / generator of torch.Variable 44 | def has_overflow(self, params): 45 | # return False 46 | for p in params: 47 | if p.grad is not None and DynamicLossScaler._has_inf_or_nan(p.grad.data): 48 | return True 49 | 50 | return False 51 | 52 | # `x` is a torch.Tensor 53 | def _has_inf_or_nan(x): 54 | cpu_sum = float(x.float().sum()) 55 | if cpu_sum == float('inf') or cpu_sum == -float('inf') or cpu_sum != cpu_sum: 56 | return True 57 | return False 58 | 59 | # `overflow` is boolean indicating whether we overflowed in gradient 60 | def update_scale(self, overflow): 61 | if overflow: 62 | #self.cur_scale /= self.scale_factor 63 | self.cur_scale = max(self.cur_scale/self.scale_factor, 1) 64 | self.last_overflow_iter = self.cur_iter 65 | else: 66 | if (self.cur_iter - self.last_overflow_iter) % self.scale_window == 0: 67 | self.cur_scale *= self.scale_factor 68 | # self.cur_scale = 1 69 | self.cur_iter += 1 70 | 71 | @property 72 | def loss_scale(self): 73 | return self.cur_scale 74 | 75 | def scale_gradient(self, module, grad_in, grad_out): 76 | return tuple(self.loss_scale * g for g in grad_in) 77 | 78 | def backward(self, loss): 79 | scaled_loss = loss*self.loss_scale 80 | scaled_loss.backward() 81 | 82 | ############################################################## 83 | # Example usage below here -- assuming it's in a separate file 84 | ############################################################## 85 | if __name__ == "__main__": 86 | import torch 87 | from torch.autograd import Variable 88 | from dynamic_loss_scaler import DynamicLossScaler 89 | 90 | # N is batch size; D_in is input dimension; 91 | # H is hidden dimension; D_out is output dimension. 92 | N, D_in, H, D_out = 64, 1000, 100, 10 93 | 94 | # Create random Tensors to hold inputs and outputs, and wrap them in Variables. 95 | x = Variable(torch.randn(N, D_in), requires_grad=False) 96 | y = Variable(torch.randn(N, D_out), requires_grad=False) 97 | 98 | w1 = Variable(torch.randn(D_in, H), requires_grad=True) 99 | w2 = Variable(torch.randn(H, D_out), requires_grad=True) 100 | parameters = [w1, w2] 101 | 102 | learning_rate = 1e-6 103 | optimizer = torch.optim.SGD(parameters, lr=learning_rate) 104 | loss_scaler = DynamicLossScaler() 105 | 106 | for t in range(500): 107 | y_pred = x.mm(w1).clamp(min=0).mm(w2) 108 | loss = (y_pred - y).pow(2).sum() * loss_scaler.loss_scale 109 | print('Iter {} loss scale: {}'.format(t, loss_scaler.loss_scale)) 110 | print('Iter {} scaled loss: {}'.format(t, loss.data[0])) 111 | print('Iter {} unscaled loss: {}'.format(t, loss.data[0] / loss_scaler.loss_scale)) 112 | 113 | # Run backprop 114 | optimizer.zero_grad() 115 | loss.backward() 116 | 117 | # Check for overflow 118 | has_overflow = DynamicLossScaler.has_overflow(parameters) 119 | 120 | # If no overflow, unscale grad and update as usual 121 | if not has_overflow: 122 | for param in parameters: 123 | param.grad.data.mul_(1. / loss_scaler.loss_scale) 124 | optimizer.step() 125 | # Otherwise, don't do anything -- ie, skip iteration 126 | else: 127 | print('OVERFLOW!') 128 | 129 | # Update loss scale for next iteration 130 | loss_scaler.update_scale(has_overflow) 131 | 132 | -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- 1 | from math import sqrt 2 | import torch 3 | from torch.autograd import Variable 4 | from torch import nn 5 | from torch.nn import functional as F 6 | from layers import ConvNorm, LinearNorm 7 | from utils import to_gpu, get_mask_from_lengths 8 | 9 | 10 | class LocationLayer(nn.Module): 11 | def __init__(self, attention_n_filters, attention_kernel_size, 12 | attention_dim): 13 | super(LocationLayer, self).__init__() 14 | padding = int((attention_kernel_size - 1) / 2) 15 | self.location_conv = ConvNorm(2, attention_n_filters, 16 | kernel_size=attention_kernel_size, 17 | padding=padding, bias=False, stride=1, 18 | dilation=1) 19 | self.location_dense = LinearNorm(attention_n_filters, attention_dim, 20 | bias=False, w_init_gain='tanh') 21 | 22 | def forward(self, attention_weights_cat): 23 | processed_attention = self.location_conv(attention_weights_cat) 24 | processed_attention = processed_attention.transpose(1, 2) 25 | processed_attention = self.location_dense(processed_attention) 26 | return processed_attention 27 | 28 | 29 | class Attention(nn.Module): 30 | def __init__(self, attention_rnn_dim, embedding_dim, attention_dim, 31 | attention_location_n_filters, attention_location_kernel_size): 32 | super(Attention, self).__init__() 33 | self.query_layer = LinearNorm(attention_rnn_dim, attention_dim, 34 | bias=False, w_init_gain='tanh') 35 | self.memory_layer = LinearNorm(embedding_dim, attention_dim, bias=False, 36 | w_init_gain='tanh') 37 | self.v = LinearNorm(attention_dim, 1, bias=False) 38 | self.location_layer = LocationLayer(attention_location_n_filters, 39 | attention_location_kernel_size, 40 | attention_dim) 41 | self.score_mask_value = -float("inf") 42 | 43 | def get_alignment_energies(self, query, processed_memory, 44 | attention_weights_cat): 45 | """ 46 | PARAMS 47 | ------ 48 | query: decoder output (batch, n_mel_channels * n_frames_per_step) 49 | processed_memory: processed encoder outputs (B, T_in, attention_dim) 50 | attention_weights_cat: cumulative and prev. att weights (B, 2, max_time) 51 | 52 | RETURNS 53 | ------- 54 | alignment (batch, max_time) 55 | """ 56 | 57 | processed_query = self.query_layer(query.unsqueeze(1)) 58 | processed_attention_weights = self.location_layer(attention_weights_cat) 59 | energies = self.v(torch.tanh( 60 | processed_query + processed_attention_weights + processed_memory)) 61 | 62 | energies = energies.squeeze(-1) 63 | return energies 64 | 65 | def forward(self, attention_hidden_state, memory, processed_memory, 66 | attention_weights_cat, mask): 67 | """ 68 | PARAMS 69 | ------ 70 | attention_hidden_state: attention rnn last output 71 | memory: encoder outputs 72 | processed_memory: processed encoder outputs 73 | attention_weights_cat: previous and cummulative attention weights 74 | mask: binary mask for padded data 75 | """ 76 | alignment = self.get_alignment_energies( 77 | attention_hidden_state, processed_memory, attention_weights_cat) 78 | 79 | if mask is not None: 80 | alignment.data.masked_fill_(mask, self.score_mask_value) 81 | 82 | attention_weights = F.softmax(alignment, dim=1) 83 | attention_context = torch.bmm(attention_weights.unsqueeze(1), memory) 84 | attention_context = attention_context.squeeze(1) 85 | 86 | return attention_context, attention_weights 87 | 88 | 89 | class Prenet(nn.Module): 90 | def __init__(self, in_dim, sizes): 91 | super(Prenet, self).__init__() 92 | in_sizes = [in_dim] + sizes[:-1] 93 | self.layers = nn.ModuleList( 94 | [LinearNorm(in_size, out_size, bias=False) 95 | for (in_size, out_size) in zip(in_sizes, sizes)]) 96 | 97 | def forward(self, x): 98 | for linear in self.layers: 99 | x = F.dropout(F.relu(linear(x)), p=0.5, training=True) 100 | return x 101 | 102 | 103 | class Postnet(nn.Module): 104 | """Postnet 105 | - Five 1-d convolution with 512 channels and kernel size 5 106 | """ 107 | 108 | def __init__(self, hparams): 109 | super(Postnet, self).__init__() 110 | self.convolutions = nn.ModuleList() 111 | 112 | self.convolutions.append( 113 | nn.Sequential( 114 | ConvNorm(hparams.n_mel_channels, hparams.postnet_embedding_dim, 115 | kernel_size=hparams.postnet_kernel_size, stride=1, 116 | padding=int((hparams.postnet_kernel_size - 1) / 2), 117 | dilation=1, w_init_gain='tanh'), 118 | nn.BatchNorm1d(hparams.postnet_embedding_dim)) 119 | ) 120 | 121 | for i in range(1, hparams.postnet_n_convolutions - 1): 122 | self.convolutions.append( 123 | nn.Sequential( 124 | ConvNorm(hparams.postnet_embedding_dim, 125 | hparams.postnet_embedding_dim, 126 | kernel_size=hparams.postnet_kernel_size, stride=1, 127 | padding=int((hparams.postnet_kernel_size - 1) / 2), 128 | dilation=1, w_init_gain='tanh'), 129 | nn.BatchNorm1d(hparams.postnet_embedding_dim)) 130 | ) 131 | 132 | self.convolutions.append( 133 | nn.Sequential( 134 | ConvNorm(hparams.postnet_embedding_dim, hparams.n_mel_channels, 135 | kernel_size=hparams.postnet_kernel_size, stride=1, 136 | padding=int((hparams.postnet_kernel_size - 1) / 2), 137 | dilation=1, w_init_gain='linear'), 138 | nn.BatchNorm1d(hparams.n_mel_channels)) 139 | ) 140 | 141 | def forward(self, x): 142 | for i in range(len(self.convolutions) - 1): 143 | x = F.dropout(torch.tanh(self.convolutions[i](x)), 0.5, self.training) 144 | x = F.dropout(self.convolutions[-1](x), 0.5, self.training) 145 | 146 | return x 147 | 148 | 149 | class Encoder(nn.Module): 150 | """Encoder module: 151 | - Three 1-d convolution banks 152 | - Bidirectional LSTM 153 | """ 154 | def __init__(self, hparams): 155 | super(Encoder, self).__init__() 156 | 157 | convolutions = [] 158 | for _ in range(hparams.encoder_n_convolutions): 159 | conv_layer = nn.Sequential( 160 | ConvNorm(hparams.encoder_embedding_dim, 161 | hparams.encoder_embedding_dim, 162 | kernel_size=hparams.encoder_kernel_size, stride=1, 163 | padding=int((hparams.encoder_kernel_size - 1) / 2), 164 | dilation=1, w_init_gain='relu'), 165 | nn.BatchNorm1d(hparams.encoder_embedding_dim)) 166 | convolutions.append(conv_layer) 167 | self.convolutions = nn.ModuleList(convolutions) 168 | 169 | self.lstm = nn.LSTM(hparams.encoder_embedding_dim, 170 | int(hparams.encoder_embedding_dim / 2), 1, 171 | batch_first=True, bidirectional=True) 172 | 173 | def forward(self, x, input_lengths): 174 | for conv in self.convolutions: 175 | x = F.dropout(F.relu(conv(x)), 0.5, self.training) 176 | 177 | x = x.transpose(1, 2) 178 | 179 | # pytorch tensor are not reversible, hence the conversion 180 | input_lengths = input_lengths.cpu().numpy() 181 | x = nn.utils.rnn.pack_padded_sequence( 182 | x, input_lengths, batch_first=True) 183 | 184 | self.lstm.flatten_parameters() 185 | outputs, _ = self.lstm(x) 186 | 187 | outputs, _ = nn.utils.rnn.pad_packed_sequence( 188 | outputs, batch_first=True) 189 | 190 | return outputs 191 | 192 | def inference(self, x): 193 | for conv in self.convolutions: 194 | x = F.dropout(F.relu(conv(x)), 0.5, self.training) 195 | 196 | x = x.transpose(1, 2) 197 | 198 | self.lstm.flatten_parameters() 199 | outputs, _ = self.lstm(x) 200 | 201 | return outputs 202 | 203 | 204 | class Decoder(nn.Module): 205 | def __init__(self, hparams): 206 | super(Decoder, self).__init__() 207 | self.n_mel_channels = hparams.n_mel_channels 208 | self.n_frames_per_step = hparams.n_frames_per_step 209 | self.encoder_embedding_dim = hparams.encoder_embedding_dim 210 | self.attention_rnn_dim = hparams.attention_rnn_dim 211 | self.decoder_rnn_dim = hparams.decoder_rnn_dim 212 | self.prenet_dim = hparams.prenet_dim 213 | self.max_decoder_steps = hparams.max_decoder_steps 214 | self.gate_threshold = hparams.gate_threshold 215 | self.p_attention_dropout = hparams.p_attention_dropout 216 | self.p_decoder_dropout = hparams.p_decoder_dropout 217 | 218 | self.prenet = Prenet( 219 | hparams.n_mel_channels * hparams.n_frames_per_step, 220 | [hparams.prenet_dim, hparams.prenet_dim]) 221 | 222 | self.attention_rnn = nn.LSTMCell( 223 | hparams.prenet_dim + hparams.encoder_embedding_dim, 224 | hparams.attention_rnn_dim) 225 | 226 | self.attention_layer = Attention( 227 | hparams.attention_rnn_dim, hparams.encoder_embedding_dim, 228 | hparams.attention_dim, hparams.attention_location_n_filters, 229 | hparams.attention_location_kernel_size) 230 | 231 | self.decoder_rnn = nn.LSTMCell( 232 | hparams.attention_rnn_dim + hparams.encoder_embedding_dim, 233 | hparams.decoder_rnn_dim, 1) 234 | 235 | self.linear_projection = LinearNorm( 236 | hparams.decoder_rnn_dim + hparams.encoder_embedding_dim, 237 | hparams.n_mel_channels * hparams.n_frames_per_step) 238 | 239 | self.gate_layer = LinearNorm( 240 | hparams.decoder_rnn_dim + hparams.encoder_embedding_dim, 1, 241 | bias=True, w_init_gain='sigmoid') 242 | 243 | def get_go_frame(self, memory): 244 | """ Gets all zeros frames to use as first decoder input 245 | PARAMS 246 | ------ 247 | memory: decoder outputs 248 | 249 | RETURNS 250 | ------- 251 | decoder_input: all zeros frames 252 | """ 253 | B = memory.size(0) 254 | decoder_input = Variable(memory.data.new( 255 | B, self.n_mel_channels * self.n_frames_per_step).zero_()) 256 | return decoder_input 257 | 258 | def initialize_decoder_states(self, memory, mask): 259 | """ Initializes attention rnn states, decoder rnn states, attention 260 | weights, attention cumulative weights, attention context, stores memory 261 | and stores processed memory 262 | PARAMS 263 | ------ 264 | memory: Encoder outputs 265 | mask: Mask for padded data if training, expects None for inference 266 | """ 267 | B = memory.size(0) 268 | MAX_TIME = memory.size(1) 269 | 270 | self.attention_hidden = Variable(memory.data.new( 271 | B, self.attention_rnn_dim).zero_()) 272 | self.attention_cell = Variable(memory.data.new( 273 | B, self.attention_rnn_dim).zero_()) 274 | 275 | self.decoder_hidden = Variable(memory.data.new( 276 | B, self.decoder_rnn_dim).zero_()) 277 | self.decoder_cell = Variable(memory.data.new( 278 | B, self.decoder_rnn_dim).zero_()) 279 | 280 | self.attention_weights = Variable(memory.data.new( 281 | B, MAX_TIME).zero_()) 282 | self.attention_weights_cum = Variable(memory.data.new( 283 | B, MAX_TIME).zero_()) 284 | self.attention_context = Variable(memory.data.new( 285 | B, self.encoder_embedding_dim).zero_()) 286 | 287 | self.memory = memory 288 | self.processed_memory = self.attention_layer.memory_layer(memory) 289 | self.mask = mask 290 | 291 | def parse_decoder_inputs(self, decoder_inputs): 292 | """ Prepares decoder inputs, i.e. mel outputs 293 | PARAMS 294 | ------ 295 | decoder_inputs: inputs used for teacher-forced training, i.e. mel-specs 296 | 297 | RETURNS 298 | ------- 299 | inputs: processed decoder inputs 300 | 301 | """ 302 | # (B, n_mel_channels, T_out) -> (B, T_out, n_mel_channels) 303 | decoder_inputs = decoder_inputs.transpose(1, 2) 304 | decoder_inputs = decoder_inputs.view( 305 | decoder_inputs.size(0), 306 | int(decoder_inputs.size(1)/self.n_frames_per_step), -1) 307 | # (B, T_out, n_mel_channels) -> (T_out, B, n_mel_channels) 308 | decoder_inputs = decoder_inputs.transpose(0, 1) 309 | return decoder_inputs 310 | 311 | def parse_decoder_outputs(self, mel_outputs, gate_outputs, alignments): 312 | """ Prepares decoder outputs for output 313 | PARAMS 314 | ------ 315 | mel_outputs: 316 | gate_outputs: gate output energies 317 | alignments: 318 | 319 | RETURNS 320 | ------- 321 | mel_outputs: 322 | gate_outpust: gate output energies 323 | alignments: 324 | """ 325 | # (T_out, B) -> (B, T_out) 326 | alignments = torch.stack(alignments).transpose(0, 1) 327 | # (T_out, B) -> (B, T_out) 328 | gate_outputs = torch.stack(gate_outputs).transpose(0, 1) 329 | gate_outputs = gate_outputs.contiguous() 330 | # (T_out, B, n_mel_channels) -> (B, T_out, n_mel_channels) 331 | mel_outputs = torch.stack(mel_outputs).transpose(0, 1).contiguous() 332 | # decouple frames per step 333 | mel_outputs = mel_outputs.view( 334 | mel_outputs.size(0), -1, self.n_mel_channels) 335 | # (B, T_out, n_mel_channels) -> (B, n_mel_channels, T_out) 336 | mel_outputs = mel_outputs.transpose(1, 2) 337 | 338 | return mel_outputs, gate_outputs, alignments 339 | 340 | def decode(self, decoder_input): 341 | """ Decoder step using stored states, attention and memory 342 | PARAMS 343 | ------ 344 | decoder_input: previous mel output 345 | 346 | RETURNS 347 | ------- 348 | mel_output: 349 | gate_output: gate output energies 350 | attention_weights: 351 | """ 352 | cell_input = torch.cat((decoder_input, self.attention_context), -1) 353 | self.attention_hidden, self.attention_cell = self.attention_rnn( 354 | cell_input, (self.attention_hidden, self.attention_cell)) 355 | self.attention_hidden = F.dropout( 356 | self.attention_hidden, self.p_attention_dropout, self.training) 357 | 358 | attention_weights_cat = torch.cat( 359 | (self.attention_weights.unsqueeze(1), 360 | self.attention_weights_cum.unsqueeze(1)), dim=1) 361 | self.attention_context, self.attention_weights = self.attention_layer( 362 | self.attention_hidden, self.memory, self.processed_memory, 363 | attention_weights_cat, self.mask) 364 | 365 | self.attention_weights_cum += self.attention_weights 366 | decoder_input = torch.cat( 367 | (self.attention_hidden, self.attention_context), -1) 368 | self.decoder_hidden, self.decoder_cell = self.decoder_rnn( 369 | decoder_input, (self.decoder_hidden, self.decoder_cell)) 370 | self.decoder_hidden = F.dropout( 371 | self.decoder_hidden, self.p_decoder_dropout, self.training) 372 | 373 | decoder_hidden_attention_context = torch.cat( 374 | (self.decoder_hidden, self.attention_context), dim=1) 375 | decoder_output = self.linear_projection( 376 | decoder_hidden_attention_context) 377 | 378 | gate_prediction = self.gate_layer(decoder_hidden_attention_context) 379 | return decoder_output, gate_prediction, self.attention_weights 380 | 381 | def forward(self, memory, decoder_inputs, memory_lengths): 382 | """ Decoder forward pass for training 383 | PARAMS 384 | ------ 385 | memory: Encoder outputs 386 | decoder_inputs: Decoder inputs for teacher forcing. i.e. mel-specs 387 | memory_lengths: Encoder output lengths for attention masking. 388 | 389 | RETURNS 390 | ------- 391 | mel_outputs: mel outputs from the decoder 392 | gate_outputs: gate outputs from the decoder 393 | alignments: sequence of attention weights from the decoder 394 | """ 395 | 396 | decoder_input = self.get_go_frame(memory).unsqueeze(0) 397 | decoder_inputs = self.parse_decoder_inputs(decoder_inputs) 398 | decoder_inputs = torch.cat((decoder_input, decoder_inputs), dim=0) 399 | decoder_inputs = self.prenet(decoder_inputs) 400 | 401 | self.initialize_decoder_states( 402 | memory, mask=~get_mask_from_lengths(memory_lengths)) 403 | 404 | mel_outputs, gate_outputs, alignments = [], [], [] 405 | while len(mel_outputs) < decoder_inputs.size(0) - 1: 406 | decoder_input = decoder_inputs[len(mel_outputs)] 407 | mel_output, gate_output, attention_weights = self.decode( 408 | decoder_input) 409 | mel_outputs += [mel_output.squeeze(1)] 410 | gate_outputs += [gate_output.squeeze(1)] 411 | alignments += [attention_weights] 412 | 413 | mel_outputs, gate_outputs, alignments = self.parse_decoder_outputs( 414 | mel_outputs, gate_outputs, alignments) 415 | 416 | return mel_outputs, gate_outputs, alignments 417 | 418 | def inference(self, memory): 419 | """ Decoder inference 420 | PARAMS 421 | ------ 422 | memory: Encoder outputs 423 | 424 | RETURNS 425 | ------- 426 | mel_outputs: mel outputs from the decoder 427 | gate_outputs: gate outputs from the decoder 428 | alignments: sequence of attention weights from the decoder 429 | """ 430 | decoder_input = self.get_go_frame(memory) 431 | 432 | self.initialize_decoder_states(memory, mask=None) 433 | 434 | mel_outputs, gate_outputs, alignments = [], [], [] 435 | while True: 436 | decoder_input = self.prenet(decoder_input) 437 | mel_output, gate_output, alignment = self.decode(decoder_input) 438 | 439 | mel_outputs += [mel_output.squeeze(1)] 440 | gate_outputs += [gate_output] 441 | alignments += [alignment] 442 | 443 | if torch.sigmoid(gate_output.data) > self.gate_threshold: 444 | break 445 | elif len(mel_outputs) == self.max_decoder_steps: 446 | print("Warning! Reached max decoder steps") 447 | break 448 | 449 | decoder_input = mel_output 450 | 451 | mel_outputs, gate_outputs, alignments = self.parse_decoder_outputs( 452 | mel_outputs, gate_outputs, alignments) 453 | 454 | return mel_outputs, gate_outputs, alignments 455 | 456 | 457 | class Tacotron2(nn.Module): 458 | def __init__(self, hparams): 459 | super(Tacotron2, self).__init__() 460 | self.mask_padding = hparams.mask_padding 461 | self.fp16_run = hparams.fp16_run 462 | self.n_mel_channels = hparams.n_mel_channels 463 | self.n_frames_per_step = hparams.n_frames_per_step 464 | self.embedding = nn.Embedding( 465 | hparams.n_symbols, hparams.symbols_embedding_dim) 466 | std = sqrt(2.0 / (hparams.n_symbols + hparams.symbols_embedding_dim)) 467 | val = sqrt(3.0) * std # uniform bounds for std 468 | self.embedding.weight.data.uniform_(-val, val) 469 | self.encoder = Encoder(hparams) 470 | self.decoder = Decoder(hparams) 471 | self.postnet = Postnet(hparams) 472 | 473 | def parse_batch(self, batch): 474 | text_padded, input_lengths, mel_padded, gate_padded, \ 475 | output_lengths = batch 476 | text_padded = to_gpu(text_padded).long() 477 | input_lengths = to_gpu(input_lengths).long() 478 | max_len = torch.max(input_lengths.data).item() 479 | mel_padded = to_gpu(mel_padded).float() 480 | gate_padded = to_gpu(gate_padded).float() 481 | output_lengths = to_gpu(output_lengths).long() 482 | 483 | return ( 484 | (text_padded, input_lengths, mel_padded, max_len, output_lengths), 485 | (mel_padded, gate_padded)) 486 | 487 | def parse_output(self, outputs, output_lengths=None): 488 | if self.mask_padding and output_lengths is not None: 489 | mask = ~get_mask_from_lengths(output_lengths) 490 | mask = mask.expand(self.n_mel_channels, mask.size(0), mask.size(1)) 491 | mask = mask.permute(1, 0, 2) 492 | 493 | outputs[0].data.masked_fill_(mask, 0.0) 494 | outputs[1].data.masked_fill_(mask, 0.0) 495 | outputs[2].data.masked_fill_(mask[:, 0, :], 1e3) # gate energies 496 | 497 | return outputs 498 | 499 | def forward(self, inputs): 500 | text_inputs, text_lengths, mels, max_len, output_lengths = inputs 501 | text_lengths, output_lengths = text_lengths.data, output_lengths.data 502 | 503 | embedded_inputs = self.embedding(text_inputs).transpose(1, 2) 504 | 505 | encoder_outputs = self.encoder(embedded_inputs, text_lengths) 506 | 507 | mel_outputs, gate_outputs, alignments = self.decoder( 508 | encoder_outputs, mels, memory_lengths=text_lengths) 509 | 510 | mel_outputs_postnet = self.postnet(mel_outputs) 511 | mel_outputs_postnet = mel_outputs + mel_outputs_postnet 512 | 513 | return self.parse_output( 514 | [mel_outputs, mel_outputs_postnet, gate_outputs, alignments], 515 | output_lengths) 516 | 517 | def inference(self, inputs): 518 | embedded_inputs = self.embedding(inputs).transpose(1, 2) 519 | encoder_outputs = self.encoder.inference(embedded_inputs) 520 | mel_outputs, gate_outputs, alignments = self.decoder.inference( 521 | encoder_outputs) 522 | 523 | mel_outputs_postnet = self.postnet(mel_outputs) 524 | mel_outputs_postnet = mel_outputs + mel_outputs_postnet 525 | 526 | outputs = self.parse_output( 527 | [mel_outputs, mel_outputs_postnet, gate_outputs, alignments]) 528 | 529 | return outputs 530 | -------------------------------------------------------------------------------- /multiproc.py: -------------------------------------------------------------------------------- 1 | import time 2 | import torch 3 | import sys 4 | import subprocess 5 | 6 | argslist = list(sys.argv)[1:] 7 | num_gpus = torch.cuda.device_count() 8 | argslist.append('--n_gpus={}'.format(num_gpus)) 9 | workers = [] 10 | job_id = time.strftime("%Y_%m_%d-%H%M%S") 11 | argslist.append("--group_name=group_{}".format(job_id)) 12 | 13 | for i in range(num_gpus): 14 | argslist.append('--rank={}'.format(i)) 15 | stdout = None if i == 0 else open("logs/{}_GPU_{}.log".format(job_id, i), 16 | "w") 17 | print(argslist) 18 | p = subprocess.Popen([str(sys.executable)]+argslist, stdout=stdout) 19 | workers.append(p) 20 | argslist = argslist[:-1] 21 | 22 | for p in workers: 23 | p.wait() 24 | -------------------------------------------------------------------------------- /plotting_utils.py: -------------------------------------------------------------------------------- 1 | import matplotlib 2 | matplotlib.use("Agg") 3 | import matplotlib.pylab as plt 4 | import numpy as np 5 | 6 | 7 | def save_figure_to_numpy(fig): 8 | # save it to a numpy array. 9 | data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='') 10 | data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,)) 11 | return data 12 | 13 | 14 | def plot_alignment_to_numpy(alignment, info=None): 15 | fig, ax = plt.subplots(figsize=(6, 4)) 16 | im = ax.imshow(alignment, aspect='auto', origin='lower', 17 | interpolation='none') 18 | fig.colorbar(im, ax=ax) 19 | xlabel = 'Decoder timestep' 20 | if info is not None: 21 | xlabel += '\n\n' + info 22 | plt.xlabel(xlabel) 23 | plt.ylabel('Encoder timestep') 24 | plt.tight_layout() 25 | 26 | fig.canvas.draw() 27 | data = save_figure_to_numpy(fig) 28 | plt.close() 29 | return data 30 | 31 | 32 | def plot_spectrogram_to_numpy(spectrogram): 33 | fig, ax = plt.subplots(figsize=(12, 3)) 34 | im = ax.imshow(spectrogram, aspect="auto", origin="lower", 35 | interpolation='none') 36 | plt.colorbar(im, ax=ax) 37 | plt.xlabel("Frames") 38 | plt.ylabel("Channels") 39 | plt.tight_layout() 40 | 41 | fig.canvas.draw() 42 | data = save_figure_to_numpy(fig) 43 | plt.close() 44 | return data 45 | 46 | 47 | def plot_gate_outputs_to_numpy(gate_targets, gate_outputs): 48 | fig, ax = plt.subplots(figsize=(12, 3)) 49 | ax.scatter(range(len(gate_targets)), gate_targets, alpha=0.5, 50 | color='green', marker='+', s=1, label='target') 51 | ax.scatter(range(len(gate_outputs)), gate_outputs, alpha=0.5, 52 | color='red', marker='.', s=1, label='predicted') 53 | 54 | plt.xlabel("Frames (Green target, Red predicted)") 55 | plt.ylabel("Gate State") 56 | plt.tight_layout() 57 | 58 | fig.canvas.draw() 59 | data = save_figure_to_numpy(fig) 60 | plt.close() 61 | return data 62 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib==2.1.0 2 | tensorflow==1.15.2 3 | numpy==1.13.3 4 | inflect==0.2.5 5 | librosa==0.6.0 6 | scipy==1.0.0 7 | Unidecode==1.0.22 8 | pillow 9 | -------------------------------------------------------------------------------- /stft.py: -------------------------------------------------------------------------------- 1 | """ 2 | BSD 3-Clause License 3 | 4 | Copyright (c) 2017, Prem Seetharaman 5 | All rights reserved. 6 | 7 | * Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | * Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | """ 32 | 33 | import torch 34 | import numpy as np 35 | import torch.nn.functional as F 36 | from torch.autograd import Variable 37 | from scipy.signal import get_window 38 | from librosa.util import pad_center, tiny 39 | from audio_processing import window_sumsquare 40 | 41 | 42 | class STFT(torch.nn.Module): 43 | """adapted from Prem Seetharaman's https://github.com/pseeth/pytorch-stft""" 44 | def __init__(self, filter_length=800, hop_length=200, win_length=800, 45 | window='hann'): 46 | super(STFT, self).__init__() 47 | self.filter_length = filter_length 48 | self.hop_length = hop_length 49 | self.win_length = win_length 50 | self.window = window 51 | self.forward_transform = None 52 | scale = self.filter_length / self.hop_length 53 | fourier_basis = np.fft.fft(np.eye(self.filter_length)) 54 | 55 | cutoff = int((self.filter_length / 2 + 1)) 56 | fourier_basis = np.vstack([np.real(fourier_basis[:cutoff, :]), 57 | np.imag(fourier_basis[:cutoff, :])]) 58 | 59 | forward_basis = torch.FloatTensor(fourier_basis[:, None, :]) 60 | inverse_basis = torch.FloatTensor( 61 | np.linalg.pinv(scale * fourier_basis).T[:, None, :]) 62 | 63 | if window is not None: 64 | assert(filter_length >= win_length) 65 | # get window and zero center pad it to filter_length 66 | fft_window = get_window(window, win_length, fftbins=True) 67 | fft_window = pad_center(fft_window, filter_length) 68 | fft_window = torch.from_numpy(fft_window).float() 69 | 70 | # window the bases 71 | forward_basis *= fft_window 72 | inverse_basis *= fft_window 73 | 74 | self.register_buffer('forward_basis', forward_basis.float()) 75 | self.register_buffer('inverse_basis', inverse_basis.float()) 76 | 77 | def transform(self, input_data): 78 | num_batches = input_data.size(0) 79 | num_samples = input_data.size(1) 80 | 81 | self.num_samples = num_samples 82 | 83 | # similar to librosa, reflect-pad the input 84 | input_data = input_data.view(num_batches, 1, num_samples) 85 | input_data = F.pad( 86 | input_data.unsqueeze(1), 87 | (int(self.filter_length / 2), int(self.filter_length / 2), 0, 0), 88 | mode='reflect') 89 | input_data = input_data.squeeze(1) 90 | 91 | forward_transform = F.conv1d( 92 | input_data, 93 | Variable(self.forward_basis, requires_grad=False), 94 | stride=self.hop_length, 95 | padding=0) 96 | 97 | cutoff = int((self.filter_length / 2) + 1) 98 | real_part = forward_transform[:, :cutoff, :] 99 | imag_part = forward_transform[:, cutoff:, :] 100 | 101 | magnitude = torch.sqrt(real_part**2 + imag_part**2) 102 | phase = torch.autograd.Variable( 103 | torch.atan2(imag_part.data, real_part.data)) 104 | 105 | return magnitude, phase 106 | 107 | def inverse(self, magnitude, phase): 108 | recombine_magnitude_phase = torch.cat( 109 | [magnitude*torch.cos(phase), magnitude*torch.sin(phase)], dim=1) 110 | 111 | inverse_transform = F.conv_transpose1d( 112 | recombine_magnitude_phase, 113 | Variable(self.inverse_basis, requires_grad=False), 114 | stride=self.hop_length, 115 | padding=0) 116 | 117 | if self.window is not None: 118 | window_sum = window_sumsquare( 119 | self.window, magnitude.size(-1), hop_length=self.hop_length, 120 | win_length=self.win_length, n_fft=self.filter_length, 121 | dtype=np.float32) 122 | # remove modulation effects 123 | approx_nonzero_indices = torch.from_numpy( 124 | np.where(window_sum > tiny(window_sum))[0]) 125 | window_sum = torch.autograd.Variable( 126 | torch.from_numpy(window_sum), requires_grad=False) 127 | window_sum = window_sum.cuda() if magnitude.is_cuda else window_sum 128 | inverse_transform[:, :, approx_nonzero_indices] /= window_sum[approx_nonzero_indices] 129 | 130 | # scale by hop ratio 131 | inverse_transform *= float(self.filter_length) / self.hop_length 132 | 133 | inverse_transform = inverse_transform[:, :, int(self.filter_length/2):] 134 | inverse_transform = inverse_transform[:, :, :-int(self.filter_length/2):] 135 | 136 | return inverse_transform 137 | 138 | def forward(self, input_data): 139 | self.magnitude, self.phase = self.transform(input_data) 140 | reconstruction = self.inverse(self.magnitude, self.phase) 141 | return reconstruction 142 | -------------------------------------------------------------------------------- /tensorboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/tacotron2/185cd24e046cc1304b4f8e564734d2498c6e2e6f/tensorboard.png -------------------------------------------------------------------------------- /text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Keith Ito 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /text/__init__.py: -------------------------------------------------------------------------------- 1 | """ from https://github.com/keithito/tacotron """ 2 | import re 3 | from text import cleaners 4 | from text.symbols import symbols 5 | 6 | 7 | # Mappings from symbol to numeric ID and vice versa: 8 | _symbol_to_id = {s: i for i, s in enumerate(symbols)} 9 | _id_to_symbol = {i: s for i, s in enumerate(symbols)} 10 | 11 | # Regular expression matching text enclosed in curly braces: 12 | _curly_re = re.compile(r'(.*?)\{(.+?)\}(.*)') 13 | 14 | 15 | def text_to_sequence(text, cleaner_names): 16 | '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text. 17 | 18 | The text can optionally have ARPAbet sequences enclosed in curly braces embedded 19 | in it. For example, "Turn left on {HH AW1 S S T AH0 N} Street." 20 | 21 | Args: 22 | text: string to convert to a sequence 23 | cleaner_names: names of the cleaner functions to run the text through 24 | 25 | Returns: 26 | List of integers corresponding to the symbols in the text 27 | ''' 28 | sequence = [] 29 | 30 | # Check for curly braces and treat their contents as ARPAbet: 31 | while len(text): 32 | m = _curly_re.match(text) 33 | if not m: 34 | sequence += _symbols_to_sequence(_clean_text(text, cleaner_names)) 35 | break 36 | sequence += _symbols_to_sequence(_clean_text(m.group(1), cleaner_names)) 37 | sequence += _arpabet_to_sequence(m.group(2)) 38 | text = m.group(3) 39 | 40 | return sequence 41 | 42 | 43 | def sequence_to_text(sequence): 44 | '''Converts a sequence of IDs back to a string''' 45 | result = '' 46 | for symbol_id in sequence: 47 | if symbol_id in _id_to_symbol: 48 | s = _id_to_symbol[symbol_id] 49 | # Enclose ARPAbet back in curly braces: 50 | if len(s) > 1 and s[0] == '@': 51 | s = '{%s}' % s[1:] 52 | result += s 53 | return result.replace('}{', ' ') 54 | 55 | 56 | def _clean_text(text, cleaner_names): 57 | for name in cleaner_names: 58 | cleaner = getattr(cleaners, name) 59 | if not cleaner: 60 | raise Exception('Unknown cleaner: %s' % name) 61 | text = cleaner(text) 62 | return text 63 | 64 | 65 | def _symbols_to_sequence(symbols): 66 | return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)] 67 | 68 | 69 | def _arpabet_to_sequence(text): 70 | return _symbols_to_sequence(['@' + s for s in text.split()]) 71 | 72 | 73 | def _should_keep_symbol(s): 74 | return s in _symbol_to_id and s is not '_' and s is not '~' 75 | -------------------------------------------------------------------------------- /text/cleaners.py: -------------------------------------------------------------------------------- 1 | """ from https://github.com/keithito/tacotron """ 2 | 3 | ''' 4 | Cleaners are transformations that run over the input text at both training and eval time. 5 | 6 | Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners" 7 | hyperparameter. Some cleaners are English-specific. You'll typically want to use: 8 | 1. "english_cleaners" for English text 9 | 2. "transliteration_cleaners" for non-English text that can be transliterated to ASCII using 10 | the Unidecode library (https://pypi.python.org/pypi/Unidecode) 11 | 3. "basic_cleaners" if you do not want to transliterate (in this case, you should also update 12 | the symbols in symbols.py to match your data). 13 | ''' 14 | 15 | import re 16 | from unidecode import unidecode 17 | from .numbers import normalize_numbers 18 | 19 | 20 | # Regular expression matching whitespace: 21 | _whitespace_re = re.compile(r'\s+') 22 | 23 | # List of (regular expression, replacement) pairs for abbreviations: 24 | _abbreviations = [(re.compile('\\b%s\\.' % x[0], re.IGNORECASE), x[1]) for x in [ 25 | ('mrs', 'misess'), 26 | ('mr', 'mister'), 27 | ('dr', 'doctor'), 28 | ('st', 'saint'), 29 | ('co', 'company'), 30 | ('jr', 'junior'), 31 | ('maj', 'major'), 32 | ('gen', 'general'), 33 | ('drs', 'doctors'), 34 | ('rev', 'reverend'), 35 | ('lt', 'lieutenant'), 36 | ('hon', 'honorable'), 37 | ('sgt', 'sergeant'), 38 | ('capt', 'captain'), 39 | ('esq', 'esquire'), 40 | ('ltd', 'limited'), 41 | ('col', 'colonel'), 42 | ('ft', 'fort'), 43 | ]] 44 | 45 | 46 | def expand_abbreviations(text): 47 | for regex, replacement in _abbreviations: 48 | text = re.sub(regex, replacement, text) 49 | return text 50 | 51 | 52 | def expand_numbers(text): 53 | return normalize_numbers(text) 54 | 55 | 56 | def lowercase(text): 57 | return text.lower() 58 | 59 | 60 | def collapse_whitespace(text): 61 | return re.sub(_whitespace_re, ' ', text) 62 | 63 | 64 | def convert_to_ascii(text): 65 | return unidecode(text) 66 | 67 | 68 | def basic_cleaners(text): 69 | '''Basic pipeline that lowercases and collapses whitespace without transliteration.''' 70 | text = lowercase(text) 71 | text = collapse_whitespace(text) 72 | return text 73 | 74 | 75 | def transliteration_cleaners(text): 76 | '''Pipeline for non-English text that transliterates to ASCII.''' 77 | text = convert_to_ascii(text) 78 | text = lowercase(text) 79 | text = collapse_whitespace(text) 80 | return text 81 | 82 | 83 | def english_cleaners(text): 84 | '''Pipeline for English text, including number and abbreviation expansion.''' 85 | text = convert_to_ascii(text) 86 | text = lowercase(text) 87 | text = expand_numbers(text) 88 | text = expand_abbreviations(text) 89 | text = collapse_whitespace(text) 90 | return text 91 | -------------------------------------------------------------------------------- /text/cmudict.py: -------------------------------------------------------------------------------- 1 | """ from https://github.com/keithito/tacotron """ 2 | 3 | import re 4 | 5 | 6 | valid_symbols = [ 7 | 'AA', 'AA0', 'AA1', 'AA2', 'AE', 'AE0', 'AE1', 'AE2', 'AH', 'AH0', 'AH1', 'AH2', 8 | 'AO', 'AO0', 'AO1', 'AO2', 'AW', 'AW0', 'AW1', 'AW2', 'AY', 'AY0', 'AY1', 'AY2', 9 | 'B', 'CH', 'D', 'DH', 'EH', 'EH0', 'EH1', 'EH2', 'ER', 'ER0', 'ER1', 'ER2', 'EY', 10 | 'EY0', 'EY1', 'EY2', 'F', 'G', 'HH', 'IH', 'IH0', 'IH1', 'IH2', 'IY', 'IY0', 'IY1', 11 | 'IY2', 'JH', 'K', 'L', 'M', 'N', 'NG', 'OW', 'OW0', 'OW1', 'OW2', 'OY', 'OY0', 12 | 'OY1', 'OY2', 'P', 'R', 'S', 'SH', 'T', 'TH', 'UH', 'UH0', 'UH1', 'UH2', 'UW', 13 | 'UW0', 'UW1', 'UW2', 'V', 'W', 'Y', 'Z', 'ZH' 14 | ] 15 | 16 | _valid_symbol_set = set(valid_symbols) 17 | 18 | 19 | class CMUDict: 20 | '''Thin wrapper around CMUDict data. http://www.speech.cs.cmu.edu/cgi-bin/cmudict''' 21 | def __init__(self, file_or_path, keep_ambiguous=True): 22 | if isinstance(file_or_path, str): 23 | with open(file_or_path, encoding='latin-1') as f: 24 | entries = _parse_cmudict(f) 25 | else: 26 | entries = _parse_cmudict(file_or_path) 27 | if not keep_ambiguous: 28 | entries = {word: pron for word, pron in entries.items() if len(pron) == 1} 29 | self._entries = entries 30 | 31 | 32 | def __len__(self): 33 | return len(self._entries) 34 | 35 | 36 | def lookup(self, word): 37 | '''Returns list of ARPAbet pronunciations of the given word.''' 38 | return self._entries.get(word.upper()) 39 | 40 | 41 | 42 | _alt_re = re.compile(r'\([0-9]+\)') 43 | 44 | 45 | def _parse_cmudict(file): 46 | cmudict = {} 47 | for line in file: 48 | if len(line) and (line[0] >= 'A' and line[0] <= 'Z' or line[0] == "'"): 49 | parts = line.split(' ') 50 | word = re.sub(_alt_re, '', parts[0]) 51 | pronunciation = _get_pronunciation(parts[1]) 52 | if pronunciation: 53 | if word in cmudict: 54 | cmudict[word].append(pronunciation) 55 | else: 56 | cmudict[word] = [pronunciation] 57 | return cmudict 58 | 59 | 60 | def _get_pronunciation(s): 61 | parts = s.strip().split(' ') 62 | for part in parts: 63 | if part not in _valid_symbol_set: 64 | return None 65 | return ' '.join(parts) 66 | -------------------------------------------------------------------------------- /text/numbers.py: -------------------------------------------------------------------------------- 1 | """ from https://github.com/keithito/tacotron """ 2 | 3 | import inflect 4 | import re 5 | 6 | 7 | _inflect = inflect.engine() 8 | _comma_number_re = re.compile(r'([0-9][0-9\,]+[0-9])') 9 | _decimal_number_re = re.compile(r'([0-9]+\.[0-9]+)') 10 | _pounds_re = re.compile(r'£([0-9\,]*[0-9]+)') 11 | _dollars_re = re.compile(r'\$([0-9\.\,]*[0-9]+)') 12 | _ordinal_re = re.compile(r'[0-9]+(st|nd|rd|th)') 13 | _number_re = re.compile(r'[0-9]+') 14 | 15 | 16 | def _remove_commas(m): 17 | return m.group(1).replace(',', '') 18 | 19 | 20 | def _expand_decimal_point(m): 21 | return m.group(1).replace('.', ' point ') 22 | 23 | 24 | def _expand_dollars(m): 25 | match = m.group(1) 26 | parts = match.split('.') 27 | if len(parts) > 2: 28 | return match + ' dollars' # Unexpected format 29 | dollars = int(parts[0]) if parts[0] else 0 30 | cents = int(parts[1]) if len(parts) > 1 and parts[1] else 0 31 | if dollars and cents: 32 | dollar_unit = 'dollar' if dollars == 1 else 'dollars' 33 | cent_unit = 'cent' if cents == 1 else 'cents' 34 | return '%s %s, %s %s' % (dollars, dollar_unit, cents, cent_unit) 35 | elif dollars: 36 | dollar_unit = 'dollar' if dollars == 1 else 'dollars' 37 | return '%s %s' % (dollars, dollar_unit) 38 | elif cents: 39 | cent_unit = 'cent' if cents == 1 else 'cents' 40 | return '%s %s' % (cents, cent_unit) 41 | else: 42 | return 'zero dollars' 43 | 44 | 45 | def _expand_ordinal(m): 46 | return _inflect.number_to_words(m.group(0)) 47 | 48 | 49 | def _expand_number(m): 50 | num = int(m.group(0)) 51 | if num > 1000 and num < 3000: 52 | if num == 2000: 53 | return 'two thousand' 54 | elif num > 2000 and num < 2010: 55 | return 'two thousand ' + _inflect.number_to_words(num % 100) 56 | elif num % 100 == 0: 57 | return _inflect.number_to_words(num // 100) + ' hundred' 58 | else: 59 | return _inflect.number_to_words(num, andword='', zero='oh', group=2).replace(', ', ' ') 60 | else: 61 | return _inflect.number_to_words(num, andword='') 62 | 63 | 64 | def normalize_numbers(text): 65 | text = re.sub(_comma_number_re, _remove_commas, text) 66 | text = re.sub(_pounds_re, r'\1 pounds', text) 67 | text = re.sub(_dollars_re, _expand_dollars, text) 68 | text = re.sub(_decimal_number_re, _expand_decimal_point, text) 69 | text = re.sub(_ordinal_re, _expand_ordinal, text) 70 | text = re.sub(_number_re, _expand_number, text) 71 | return text 72 | -------------------------------------------------------------------------------- /text/symbols.py: -------------------------------------------------------------------------------- 1 | """ from https://github.com/keithito/tacotron """ 2 | 3 | ''' 4 | Defines the set of symbols used in text input to the model. 5 | 6 | The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. ''' 7 | from text import cmudict 8 | 9 | _pad = '_' 10 | _punctuation = '!\'(),.:;? ' 11 | _special = '-' 12 | _letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 13 | 14 | # Prepend "@" to ARPAbet symbols to ensure uniqueness (some are the same as uppercase letters): 15 | _arpabet = ['@' + s for s in cmudict.valid_symbols] 16 | 17 | # Export all symbols: 18 | symbols = [_pad] + list(_special) + list(_punctuation) + list(_letters) + _arpabet 19 | -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import argparse 4 | import math 5 | from numpy import finfo 6 | 7 | import torch 8 | from distributed import apply_gradient_allreduce 9 | import torch.distributed as dist 10 | from torch.utils.data.distributed import DistributedSampler 11 | from torch.utils.data import DataLoader 12 | 13 | from model import Tacotron2 14 | from data_utils import TextMelLoader, TextMelCollate 15 | from loss_function import Tacotron2Loss 16 | from logger import Tacotron2Logger 17 | from hparams import create_hparams 18 | 19 | 20 | def reduce_tensor(tensor, n_gpus): 21 | rt = tensor.clone() 22 | dist.all_reduce(rt, op=dist.reduce_op.SUM) 23 | rt /= n_gpus 24 | return rt 25 | 26 | 27 | def init_distributed(hparams, n_gpus, rank, group_name): 28 | assert torch.cuda.is_available(), "Distributed mode requires CUDA." 29 | print("Initializing Distributed") 30 | 31 | # Set cuda device so everything is done on the right GPU. 32 | torch.cuda.set_device(rank % torch.cuda.device_count()) 33 | 34 | # Initialize distributed communication 35 | dist.init_process_group( 36 | backend=hparams.dist_backend, init_method=hparams.dist_url, 37 | world_size=n_gpus, rank=rank, group_name=group_name) 38 | 39 | print("Done initializing distributed") 40 | 41 | 42 | def prepare_dataloaders(hparams): 43 | # Get data, data loaders and collate function ready 44 | trainset = TextMelLoader(hparams.training_files, hparams) 45 | valset = TextMelLoader(hparams.validation_files, hparams) 46 | collate_fn = TextMelCollate(hparams.n_frames_per_step) 47 | 48 | if hparams.distributed_run: 49 | train_sampler = DistributedSampler(trainset) 50 | shuffle = False 51 | else: 52 | train_sampler = None 53 | shuffle = True 54 | 55 | train_loader = DataLoader(trainset, num_workers=1, shuffle=shuffle, 56 | sampler=train_sampler, 57 | batch_size=hparams.batch_size, pin_memory=False, 58 | drop_last=True, collate_fn=collate_fn) 59 | return train_loader, valset, collate_fn 60 | 61 | 62 | def prepare_directories_and_logger(output_directory, log_directory, rank): 63 | if rank == 0: 64 | if not os.path.isdir(output_directory): 65 | os.makedirs(output_directory) 66 | os.chmod(output_directory, 0o775) 67 | logger = Tacotron2Logger(os.path.join(output_directory, log_directory)) 68 | else: 69 | logger = None 70 | return logger 71 | 72 | 73 | def load_model(hparams): 74 | model = Tacotron2(hparams).cuda() 75 | if hparams.fp16_run: 76 | model.decoder.attention_layer.score_mask_value = finfo('float16').min 77 | 78 | if hparams.distributed_run: 79 | model = apply_gradient_allreduce(model) 80 | 81 | return model 82 | 83 | 84 | def warm_start_model(checkpoint_path, model, ignore_layers): 85 | assert os.path.isfile(checkpoint_path) 86 | print("Warm starting model from checkpoint '{}'".format(checkpoint_path)) 87 | checkpoint_dict = torch.load(checkpoint_path, map_location='cpu') 88 | model_dict = checkpoint_dict['state_dict'] 89 | if len(ignore_layers) > 0: 90 | model_dict = {k: v for k, v in model_dict.items() 91 | if k not in ignore_layers} 92 | dummy_dict = model.state_dict() 93 | dummy_dict.update(model_dict) 94 | model_dict = dummy_dict 95 | model.load_state_dict(model_dict) 96 | return model 97 | 98 | 99 | def load_checkpoint(checkpoint_path, model, optimizer): 100 | assert os.path.isfile(checkpoint_path) 101 | print("Loading checkpoint '{}'".format(checkpoint_path)) 102 | checkpoint_dict = torch.load(checkpoint_path, map_location='cpu') 103 | model.load_state_dict(checkpoint_dict['state_dict']) 104 | optimizer.load_state_dict(checkpoint_dict['optimizer']) 105 | learning_rate = checkpoint_dict['learning_rate'] 106 | iteration = checkpoint_dict['iteration'] 107 | print("Loaded checkpoint '{}' from iteration {}" .format( 108 | checkpoint_path, iteration)) 109 | return model, optimizer, learning_rate, iteration 110 | 111 | 112 | def save_checkpoint(model, optimizer, learning_rate, iteration, filepath): 113 | print("Saving model and optimizer state at iteration {} to {}".format( 114 | iteration, filepath)) 115 | torch.save({'iteration': iteration, 116 | 'state_dict': model.state_dict(), 117 | 'optimizer': optimizer.state_dict(), 118 | 'learning_rate': learning_rate}, filepath) 119 | 120 | 121 | def validate(model, criterion, valset, iteration, batch_size, n_gpus, 122 | collate_fn, logger, distributed_run, rank): 123 | """Handles all the validation scoring and printing""" 124 | model.eval() 125 | with torch.no_grad(): 126 | val_sampler = DistributedSampler(valset) if distributed_run else None 127 | val_loader = DataLoader(valset, sampler=val_sampler, num_workers=1, 128 | shuffle=False, batch_size=batch_size, 129 | pin_memory=False, collate_fn=collate_fn) 130 | 131 | val_loss = 0.0 132 | for i, batch in enumerate(val_loader): 133 | x, y = model.parse_batch(batch) 134 | y_pred = model(x) 135 | loss = criterion(y_pred, y) 136 | if distributed_run: 137 | reduced_val_loss = reduce_tensor(loss.data, n_gpus).item() 138 | else: 139 | reduced_val_loss = loss.item() 140 | val_loss += reduced_val_loss 141 | val_loss = val_loss / (i + 1) 142 | 143 | model.train() 144 | if rank == 0: 145 | print("Validation loss {}: {:9f} ".format(iteration, val_loss)) 146 | logger.log_validation(val_loss, model, y, y_pred, iteration) 147 | 148 | 149 | def train(output_directory, log_directory, checkpoint_path, warm_start, n_gpus, 150 | rank, group_name, hparams): 151 | """Training and validation logging results to tensorboard and stdout 152 | 153 | Params 154 | ------ 155 | output_directory (string): directory to save checkpoints 156 | log_directory (string) directory to save tensorboard logs 157 | checkpoint_path(string): checkpoint path 158 | n_gpus (int): number of gpus 159 | rank (int): rank of current gpu 160 | hparams (object): comma separated list of "name=value" pairs. 161 | """ 162 | if hparams.distributed_run: 163 | init_distributed(hparams, n_gpus, rank, group_name) 164 | 165 | torch.manual_seed(hparams.seed) 166 | torch.cuda.manual_seed(hparams.seed) 167 | 168 | model = load_model(hparams) 169 | learning_rate = hparams.learning_rate 170 | optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate, 171 | weight_decay=hparams.weight_decay) 172 | 173 | if hparams.fp16_run: 174 | from apex import amp 175 | model, optimizer = amp.initialize( 176 | model, optimizer, opt_level='O2') 177 | 178 | if hparams.distributed_run: 179 | model = apply_gradient_allreduce(model) 180 | 181 | criterion = Tacotron2Loss() 182 | 183 | logger = prepare_directories_and_logger( 184 | output_directory, log_directory, rank) 185 | 186 | train_loader, valset, collate_fn = prepare_dataloaders(hparams) 187 | 188 | # Load checkpoint if one exists 189 | iteration = 0 190 | epoch_offset = 0 191 | if checkpoint_path is not None: 192 | if warm_start: 193 | model = warm_start_model( 194 | checkpoint_path, model, hparams.ignore_layers) 195 | else: 196 | model, optimizer, _learning_rate, iteration = load_checkpoint( 197 | checkpoint_path, model, optimizer) 198 | if hparams.use_saved_learning_rate: 199 | learning_rate = _learning_rate 200 | iteration += 1 # next iteration is iteration + 1 201 | epoch_offset = max(0, int(iteration / len(train_loader))) 202 | 203 | model.train() 204 | is_overflow = False 205 | # ================ MAIN TRAINNIG LOOP! =================== 206 | for epoch in range(epoch_offset, hparams.epochs): 207 | print("Epoch: {}".format(epoch)) 208 | for i, batch in enumerate(train_loader): 209 | start = time.perf_counter() 210 | for param_group in optimizer.param_groups: 211 | param_group['lr'] = learning_rate 212 | 213 | model.zero_grad() 214 | x, y = model.parse_batch(batch) 215 | y_pred = model(x) 216 | 217 | loss = criterion(y_pred, y) 218 | if hparams.distributed_run: 219 | reduced_loss = reduce_tensor(loss.data, n_gpus).item() 220 | else: 221 | reduced_loss = loss.item() 222 | if hparams.fp16_run: 223 | with amp.scale_loss(loss, optimizer) as scaled_loss: 224 | scaled_loss.backward() 225 | else: 226 | loss.backward() 227 | 228 | if hparams.fp16_run: 229 | grad_norm = torch.nn.utils.clip_grad_norm_( 230 | amp.master_params(optimizer), hparams.grad_clip_thresh) 231 | is_overflow = math.isnan(grad_norm) 232 | else: 233 | grad_norm = torch.nn.utils.clip_grad_norm_( 234 | model.parameters(), hparams.grad_clip_thresh) 235 | 236 | optimizer.step() 237 | 238 | if not is_overflow and rank == 0: 239 | duration = time.perf_counter() - start 240 | print("Train loss {} {:.6f} Grad Norm {:.6f} {:.2f}s/it".format( 241 | iteration, reduced_loss, grad_norm, duration)) 242 | logger.log_training( 243 | reduced_loss, grad_norm, learning_rate, duration, iteration) 244 | 245 | if not is_overflow and (iteration % hparams.iters_per_checkpoint == 0): 246 | validate(model, criterion, valset, iteration, 247 | hparams.batch_size, n_gpus, collate_fn, logger, 248 | hparams.distributed_run, rank) 249 | if rank == 0: 250 | checkpoint_path = os.path.join( 251 | output_directory, "checkpoint_{}".format(iteration)) 252 | save_checkpoint(model, optimizer, learning_rate, iteration, 253 | checkpoint_path) 254 | 255 | iteration += 1 256 | 257 | 258 | if __name__ == '__main__': 259 | parser = argparse.ArgumentParser() 260 | parser.add_argument('-o', '--output_directory', type=str, 261 | help='directory to save checkpoints') 262 | parser.add_argument('-l', '--log_directory', type=str, 263 | help='directory to save tensorboard logs') 264 | parser.add_argument('-c', '--checkpoint_path', type=str, default=None, 265 | required=False, help='checkpoint path') 266 | parser.add_argument('--warm_start', action='store_true', 267 | help='load model weights only, ignore specified layers') 268 | parser.add_argument('--n_gpus', type=int, default=1, 269 | required=False, help='number of gpus') 270 | parser.add_argument('--rank', type=int, default=0, 271 | required=False, help='rank of current gpu') 272 | parser.add_argument('--group_name', type=str, default='group_name', 273 | required=False, help='Distributed group name') 274 | parser.add_argument('--hparams', type=str, 275 | required=False, help='comma separated name=value pairs') 276 | 277 | args = parser.parse_args() 278 | hparams = create_hparams(args.hparams) 279 | 280 | torch.backends.cudnn.enabled = hparams.cudnn_enabled 281 | torch.backends.cudnn.benchmark = hparams.cudnn_benchmark 282 | 283 | print("FP16 Run:", hparams.fp16_run) 284 | print("Dynamic Loss Scaling:", hparams.dynamic_loss_scaling) 285 | print("Distributed Run:", hparams.distributed_run) 286 | print("cuDNN Enabled:", hparams.cudnn_enabled) 287 | print("cuDNN Benchmark:", hparams.cudnn_benchmark) 288 | 289 | train(args.output_directory, args.log_directory, args.checkpoint_path, 290 | args.warm_start, args.n_gpus, args.rank, args.group_name, hparams) 291 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from scipy.io.wavfile import read 3 | import torch 4 | 5 | 6 | def get_mask_from_lengths(lengths): 7 | max_len = torch.max(lengths).item() 8 | ids = torch.arange(0, max_len, out=torch.cuda.LongTensor(max_len)) 9 | mask = (ids < lengths.unsqueeze(1)).bool() 10 | return mask 11 | 12 | 13 | def load_wav_to_torch(full_path): 14 | sampling_rate, data = read(full_path) 15 | return torch.FloatTensor(data.astype(np.float32)), sampling_rate 16 | 17 | 18 | def load_filepaths_and_text(filename, split="|"): 19 | with open(filename, encoding='utf-8') as f: 20 | filepaths_and_text = [line.strip().split(split) for line in f] 21 | return filepaths_and_text 22 | 23 | 24 | def to_gpu(x): 25 | x = x.contiguous() 26 | 27 | if torch.cuda.is_available(): 28 | x = x.cuda(non_blocking=True) 29 | return torch.autograd.Variable(x) 30 | --------------------------------------------------------------------------------