diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000000000000000000000000000000000..0cf2c61a7006fd59159a95756b0c8a10abe51eaf
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,70 @@
+# VCS and local tooling
+.git
+.gitignore
+.github
+.claude
+.codex
+.vscode
+.idea
+.history
+
+# Python caches and virtual environments
+__pycache__/
+*.py[cod]
+.pytest_cache/
+.mypy_cache/
+.ruff_cache/
+.ipynb_checkpoints/
+.venv/
+venv/
+env/
+
+# Build and packaging artifacts
+build/
+dist/
+.eggs/
+*.egg-info/
+wheels/
+
+# Local datasets and generated outputs
+/data/
+/exp/
+/results/
+/output/
+/generated_output/
+/log/
+/logs/
+/runs/
+/wandb/
+/tensorboard/
+/assets/
+
+# Model checkpoints and generated media
+*.ckpt
+*.pt
+*.pth
+*.onnx
+*.bin
+*.safetensors
+*.data
+*.index
+*.wav
+*.mp3
+*.flac
+
+# Keep packaged inference examples
+!src/wavtts/infer/examples/*.wav
+!src/wavtts/infer/examples/vocab.txt
+
+# Archives and temporary files
+*.zip
+*.tar
+*.tar.gz
+*.tgz
+*.rar
+*.7z
+*.log
+*.tmp
+*.swp
+*.swo
+.DS_Store
diff --git a/.gitattributes b/.gitattributes
index a6344aac8c09253b3b630fb776ae94478aa0275b..c6dc28bf46bfedbbd0057b74082646c68182f8ab 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
+docs/static/images/wavtts_pipeline.png filter=lfs diff=lfs merge=lfs -text
+src/wavtts/infer/examples/basic_ref_en.wav filter=lfs diff=lfs merge=lfs -text
+src/wavtts/infer/examples/basic_ref_zh.wav filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..dfbb8f854a0cda36c52af8e0e2d68f48ae5fe5d3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,163 @@
+# Visual Studio Code files
+.vs
+/.vscode/*
+!/.vscode/extensions.json
+!/.vscode/settings_recommended.json
+
+# Editor temporaries
+*.swn
+*.swo
+*.swp
+*.swm
+*~
+
+# Dolphin runtime info
+reorder.dict
+tmp/
+total.code
+total_bpe.dict
+fbank_80dim_cmvn.kaldi
+datum_pb2.py
+lmdb_shard*/
+char_bpe.dict
+rank*cer*txt*
+cer_*txt*
+*.workspace.xml
+
+# Dolphin runtime template dirs
+demo/
+voxceleb2_train/
+stress_prediction/
+nnlm_ez/
+kws_rnnt_train/
+kws_ce_train/
+endpoints/
+dfsmnln_online/
+dfsmnln_online_pretrain/
+exp/
+runs/
+stress_eval/
+tensorboard/
+falconclaw-data/
+dist_init_file*
+
+# Distribution / packaging
+build/
+eggs/
+.eggs/
+*.egg-info/
+lib/
+lib64/
+wheels/
+
+# Compiled Object files
+*.so
+*.o
+
+# Compiled python
+*.pyc
+*.pyd
+__pycache__
+
+# macOS dir files
+.DS_Store
+
+# Idea settings
+.idea
+
+# Binary files
+*.pth
+*.pt
+*.data
+*.index
+*.onnx
+*.wav
+*.jsonl
+*.zip
+*.bin
+*.txt
+!requirements.txt
+!packages.txt
+!doc/*.txt
+!src/wavtts/infer/examples/*.wav
+!src/wavtts/infer/examples/vocab.txt
+
+# logs
+/**/cruise_logs
+/**/wandb
+/**/lightning_logs
+
+# ipynb ckpts
+.ipynb_checkpoints
+
+# ignore the weekly_test reports
+scripts/weekly_test/report/
+scripts/weekly_test/report_json/
+scripts/weekly_test/Dolphin*.md
+
+# module cache
+.module_cache/
+
+# data directory
+assets/
+# data/
+video/
+seedtts_testset/
+test-clean/
+
+# log directory
+log/
+logs/
+cruise_logs/
+lyrics2song_test/
+
+.history/
+
+span.log
+
+
+durator
+durator2
+recipes/voicebox/testset
+events.*
+
+recipes/text2semantic/custom_scripts/run.sh
+*.log
+resource/
+*.ckpt
+*.csv
+libs/
+generated_output/
+pypetrel.1.0.0.129/
+bm_inference.pstats
+recipes/bigmusic/tests/data/
+recipes/leadsheet
+.attach_*
+*.ipynb
+scripts_usr
+.deploy_cache
+output
+# src/wavtts/train/runs_emilia/
+.venv/
+.codex
+.claude
+
+stats_*
+
+Emilia_ZH_EN_pinyin/
+LibriSpeech-test-clean/
+data/LibriTTS_100_360_500_char/duration.json
+data/LibriTTS_100_360_500_char/raw.arrow
+
+# local dataset symlinks
+/data/Emilia_ZH_EN_pinyin
+/data/LibriSpeech
+/data/LibriTTS_100_360_500_char
+/data/seedtts_testset
+
+# local dataset symlinks
+/data/Emilia_ZH_EN_pinyin
+/data/Emilia_ZH_EN_hdfs_pinyin
+/data/LibriSpeech
+/data/LibriTTS_100_360_500_char
+/data/seedtts_testset
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..e93225a3f1638ed3ebb18b18eac69b82649855bd
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,14 @@
+repos:
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ # Ruff version.
+ rev: v0.11.2
+ hooks:
+ - id: ruff
+ name: ruff linter
+ args: [--fix]
+ - id: ruff-format
+ name: ruff formatter
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v5.0.0
+ hooks:
+ - id: check-yaml
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..06184e50516f0d22de74ba54864665be8cb18d35
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel
+
+USER root
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+LABEL github_repo="https://github.com/cwx-worst-one/WavTTS"
+
+RUN set -x \
+ && apt-get update \
+ && apt-get -y install wget curl man git less openssl libssl-dev unzip unar build-essential aria2 tmux vim \
+ && apt-get install -y openssh-server sox libsox-fmt-all libsox-fmt-mp3 libsndfile1-dev ffmpeg \
+ && apt-get install -y librdmacm1 libibumad3 librdmacm-dev libibverbs1 libibverbs-dev ibverbs-utils ibverbs-providers \
+ && rm -rf /var/lib/apt/lists/* \
+ && apt-get clean
+
+WORKDIR /workspace/WavTTS
+
+COPY . /workspace/WavTTS
+
+RUN pip install -e . --no-cache-dir
+
+ENV SHELL=/bin/bash
+
+VOLUME /root/.cache/huggingface/hub/
+
+EXPOSE 7860
+
+WORKDIR /workspace/WavTTS
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..ad7e15220c9c83192196cb379a1fc444ad21e1d8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Wenxi Chen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 93ef8dc56d0bb5a00e265196a270eda3c923bf88..e98a598b98c2e4e8d9c1ed4bc366f7e5390793bc 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,178 @@
---
title: WavTTS
-emoji: 🏃
-colorFrom: purple
-colorTo: pink
+emoji: 🗣️
+colorFrom: blue
+colorTo: purple
sdk: gradio
-sdk_version: 6.16.0
-python_version: '3.13'
+sdk_version: 5.39.0
app_file: app.py
-pinned: false
-license: cc-by-nc-4.0
-short_description: WavTTS Online Demo
+pinned: true
+short_description: Zero-shot TTS with raw waveform generation
+preload_from_hub:
+ - worstchan/WavTTS
+ - openai/whisper-large-v3-turbo
---
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
+
+
+ WavTTS: Towards High-Quality Zero-Shot TTS via Direct Raw Waveform Modeling
+
+
+
+
+
+
+
+
+
+
+ End-to-end zero-shot TTS directly in the raw waveform space.
+
+
+
+
+## 📖 Introduction
+
+WavTTS is an end-to-end zero-shot TTS framework that generates speech directly in the raw waveform space, without relying on intermediate acoustic representations such as mel-spectrograms, VAE latents, or codec tokens. Built on flow matching with DiT, WavTTS combines waveform patchification, multi-scale mel-spectrogram supervision, and optimized noise scheduling to achieve high-quality waveform generation. For more details, please refer to our paper: [WavTTS: Towards High-Quality Zero-Shot TTS via Direct Raw Waveform Modeling](https://arxiv.org/abs/2606.03455).
+
+
+

+
+
+**Note:** This repository is based on [F5-TTS](https://github.com/SWivid/F5-TTS). For general usage, troubleshooting, and basic guidance, please refer to the original F5-TTS repository. The sections below outline workflows specific to WavTTS.
+
+## 🚀 News
+
+- **[2026-06-03]**: We have released the WavTTS codebase along with the official 16 kHz checkpoint. Please note that this project is still under active development, and we will continue to roll out updates and improvements.
+
+
+
+## ⚙️ Installation
+
+We recommend using Conda to manage the environment and dependencies.
+
+```bash
+# 1. Clone the repository
+git clone https://github.com/cwx-worst-one/WavTTS
+cd WavTTS
+
+# 2. Create and activate a virtual environment
+conda create -n wavtts python=3.10
+conda activate wavtts
+
+# 3. Install PyTorch (>=2.2.0) with CUDA support, e.g.,
+pip install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
+
+# 4. Install WavTTS in editable mode
+pip install -e .
+```
+
+## 📦 Model Checkpoints
+
+The official WavTTS checkpoint is available on Hugging Face: [WavTTS 🤗](https://huggingface.co/worstchan/WavTTS). The default checkpoint supports 16 kHz zero-shot TTS inference and will be downloaded automatically the first time you run the inference script.
+
+## 🚀 Inference
+
+WavTTS supports both command-line inference and a minimal Hugging Face Space demo. For the Space demo, upload a short reference clip, provide the reference transcript, and enter the text to synthesize. Providing `ref_text` is recommended because leaving it blank triggers automatic ASR and can make the first run slower.
+
+For more details about command-line and script-based inference, please refer to the [Inference Guide](src/wavtts/infer/README.md).
+
+### CLI Inference
+
+Generate speech using a short reference audio prompt. CLI arguments will automatically override values defined in the TOML config.
+
+```bash
+wavtts_infer-cli \
+ --model WavTTS \
+ --ref_audio "provide_prompt_wav_path_here.wav" \
+ --ref_text "The content, subtitle, or transcription of the reference audio." \
+ --gen_text "The text you want WavTTS to synthesize."
+```
+
+Alternatively, manage your parameters cleanly using a TOML configuration file:
+
+```bash
+# Use the provided default config
+wavtts_infer-cli -c src/wavtts/infer/examples/basic.toml
+
+# Use a custom config (with an inline text override)
+wavtts_infer-cli -c custom.toml --gen_text "Override text here."
+```
+
+### Script-based Inference
+
+For customized pipelines, you can directly modify the paths and texts in `src/wavtts/infer/infer.sh` and execute:
+
+```bash
+bash src/wavtts/infer/infer.sh
+```
+
+
+## 🏋️ Training
+
+Training WavTTS requires preprocessed dataset metadata. For a complete walkthrough of data preparation, training, and fine-tuning, please refer to the [Training Guide](src/wavtts/train/README.md).
+
+### Data Preparation
+
+We use [Emilia](https://huggingface.co/datasets/amphion/Emilia-Dataset) as the training dataset in our main experiments. After downloading Emilia, update the paths in the preparation script and run:
+
+```bash
+# Prepare training metadata for the Emilia dataset
+python src/wavtts/train/datasets/prepare_emilia.py
+```
+
+Preparation scripts for other datasets like LibriTTS are available under `src/wavtts/train/datasets/`. To use a custom dataset, please adapt the loading logic in `src/wavtts/model/dataset.py`.
+
+### Launching Training
+
+WavTTS can be trained directly with `accelerate`:
+
+```bash
+# Step 1: Configure Accelerate (e.g., multi-GPU DDP, mixed precision)
+accelerate config
+
+# Step 2: Launch training using a Hydra config
+# YAML configuration files are located under the src/wavtts/configs/ directory.
+accelerate launch src/wavtts/train/train.py --config-name WavTTS.yaml
+
+# Example with inline overrides:
+accelerate launch --mixed_precision=bf16 src/wavtts/train/train.py --config-name WavTTS.yaml ++datasets.batch_size_per_gpu=19200
+```
+
+For our main experiments, we provide a unified launcher script. Remember to edit the default environment variables at the top of the script before running:
+
+```bash
+bash src/wavtts/train/run_main_train.sh
+```
+
+
+## 📊 Evaluation
+
+For evaluation setup, dataset preparation, and objective metric scripts, please refer to the [Evaluation Guide](src/wavtts/eval/README.md).
+
+
+## 🙏 Acknowledgements
+
+WavTTS is built upon the awesome [F5-TTS](https://github.com/SWivid/F5-TTS) codebase, with references to the implementations of [DAC](https://github.com/descriptinc/descript-audio-codec) and [JiT](https://github.com/LTH14/JiT). We sincerely thank the authors for their invaluable open-source contributions.
+
+If you encounter general pipeline or environment issues, we recommend first checking the [F5-TTS issue tracker](https://github.com/SWivid/F5-TTS/issues), where many common questions may have already been discussed or resolved.
+
+## 📝 Citation
+
+If you find this work useful in your research, please consider citing our paper:
+
+```bibtex
+@misc{chen2026wavttshighqualityzeroshottts,
+ title={WavTTS: Towards High-Quality Zero-Shot TTS via Direct Raw Waveform Modeling},
+ author={Wenxi Chen and Dongya Jia and Yushen Chen and Zhikang Niu and Yuzhe Liang and Xiquan Li and Ruiqi Yan and Ziyang Ma and Guanrou Yang and Sanyuan Chen and Yue Wang and Zhuo Chen and Kai Yu and Xie Chen},
+ year={2026},
+ eprint={2606.03455},
+ archivePrefix={arXiv},
+ primaryClass={eess.AS},
+ url={https://arxiv.org/abs/2606.03455},
+}
+```
+
+## 📜 License
+
+The codebase of this repository is released under the MIT License. Due to the license restrictions of the Emilia training dataset, the released pre-trained model weights are licensed under CC BY-NC 4.0.
diff --git a/app.py b/app.py
index 04cc31aa8d0e06aeaac3b59bb361ed71d831e43f..0c202f1aa7fe48053ad1f1b348d9b28d00daafcc 100644
--- a/app.py
+++ b/app.py
@@ -1,7 +1,124 @@
+import tempfile
+from importlib.resources import files
+
import gradio as gr
+import soundfile as sf
+import spaces
+from cached_path import cached_path
+from hydra.utils import get_class
+from omegaconf import OmegaConf
+
+from wavtts.infer.utils_infer import (
+ cfg_strength,
+ cross_fade_duration,
+ device,
+ fix_duration,
+ infer_process,
+ load_model,
+ nfe_step,
+ preprocess_ref_audio_text,
+ remove_silence_for_generated_wav,
+ shift,
+ speed,
+ sway_sampling_coef,
+ target_rms,
+ timestep_mapping,
+ timestep_power,
+)
+
+DEFAULT_MODEL = "WavTTS"
+DEFAULT_CKPT_FILE = "hf://worstchan/WavTTS/model_1200000.pt"
+
+
+def load_wavtts_model():
+ model_cfg = OmegaConf.load(str(files("wavtts").joinpath(f"configs/{DEFAULT_MODEL}.yaml")))
+ model_cls = get_class(f"wavtts.model.{model_cfg.model.backbone}")
+ ckpt_file = str(cached_path(DEFAULT_CKPT_FILE))
+
+ print(f"Using config {model_cfg.model.name} with checkpoint {ckpt_file}...")
+ return load_model(
+ model_cls,
+ model_cfg.model.arch,
+ ckpt_file,
+ device=device,
+ cfm_kwargs=getattr(model_cfg.model, "cfm", {}) or {},
+ waveform_kwargs=model_cfg.model.waveform,
+ )
+
+
+ema_model = load_wavtts_model()
+
+
+@spaces.GPU
+def run_tts(ref_audio, ref_text, gen_text, remove_silence=False):
+ if not ref_audio:
+ raise gr.Error("Please upload a reference audio file.")
+ if not gen_text or not gen_text.strip():
+ raise gr.Error("Please enter the text to synthesize.")
+
+ ref_audio, ref_text = preprocess_ref_audio_text(ref_audio, ref_text or "")
+ audio_segment, final_sample_rate, _ = infer_process(
+ ref_audio,
+ ref_text,
+ gen_text.strip(),
+ ema_model,
+ target_rms=target_rms,
+ cross_fade_duration=cross_fade_duration,
+ nfe_step=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ speed=speed,
+ fix_duration=fix_duration,
+ device=device,
+ )
+
+ if audio_segment is None:
+ raise gr.Error("No audio was generated. Please try a shorter text or a different reference audio.")
+
+ output_wav_path = tempfile.mktemp(suffix=".wav")
+ sf.write(output_wav_path, audio_segment, final_sample_rate)
+
+ if remove_silence:
+ remove_silence_for_generated_wav(output_wav_path)
+
+ return output_wav_path
+
+
+demo = gr.Interface(
+ fn=run_tts,
+ inputs=[
+ gr.Audio(label="Reference Audio", type="filepath"),
+ gr.Textbox(
+ label="Reference Text",
+ placeholder="Some call me nature, others call me mother nature.",
+ lines=2,
+ ),
+ gr.Textbox(
+ label="Generation Text",
+ placeholder="The text you want WavTTS to synthesize.",
+ lines=4,
+ ),
+ gr.Checkbox(label="Remove Silence from Output?", value=False),
+ ],
+ outputs=gr.Audio(label="Generated Speech", type="filepath"),
+ title="🗣️ WavTTS Demo",
+ description=(
+ "Upload a short reference voice clip, provide its transcript, and generate speech in the same voice. "
+ "Reference text is recommended; leaving it blank triggers automatic ASR and may be slower on first use."
+ ),
+ examples=[
+ [
+ str(files("wavtts").joinpath("infer/examples/basic_ref_en.wav")),
+ "Some call me nature, others call me mother nature.",
+ "WavTTS generates speech directly in raw waveform space.",
+ False,
+ ],
+ ],
+)
-def greet(name):
- return "Hello " + name + "!!"
-demo = gr.Interface(fn=greet, inputs="text", outputs="text")
-demo.launch()
+if __name__ == "__main__":
+ demo.launch()
diff --git a/data/librispeech_pc_test_clean_cross_sentence.lst b/data/librispeech_pc_test_clean_cross_sentence.lst
new file mode 100644
index 0000000000000000000000000000000000000000..441adb2d89b4d943cb6ac959000822151dd0ea5a
--- /dev/null
+++ b/data/librispeech_pc_test_clean_cross_sentence.lst
@@ -0,0 +1,1127 @@
+4992-41806-0009 4.355 exclaimed Bill Harmon to his wife as they went through the lighted hall. 4992-23283-0000 6.645 But the more forgetfulness had then prevailed, the more powerful was the force of remembrance when she awoke.
+4992-23283-0001 2.71 Miss Milner's health is not good"! 4992-23283-0003 4.645 So there is to me"! added Sandford, with a sarcastic sneer.
+4992-23283-0015 3.675 Is she not afraid that I will thwart her inclinations"? 4992-23283-0004 8.06 And yet you must own her behaviour has warranted them has it not been in this particular incoherent and unaccountable"?
+4992-23283-0015 3.675 Is she not afraid that I will thwart her inclinations"? 4992-23283-0007 4.045 To ask any more questions of you, I believe, would be unfair.
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-23283-0008 4.91 He seemed to wait for her reply; but as she made none, he proceeded-
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-23283-0009 8.395 Oh! my Lord," cried Miss Woodley, with a most forcible accent, " You are the last person on earth she would pardon me for entrusting".
+4992-41797-0005 3.845 Done? He ain't done a thing he'd oughter sence he was born. 4992-23283-0010 5 But in such a case, Miss Milner's election of a husband shall not direct mine.
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-23283-0011 4.225 If she does not know how to estimate her own value, I do.
+4992-41806-0004 3.7 Burn, fire, burn! Flicker, flicker, flame! 4992-23283-0013 6.63 My Lord, Miss Milner's taste is not a depraved one; it is but too refined".
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-23283-0014 4.535 What can you mean by that, Miss Woodley? You talk mysteriously.
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-23283-0016 4.495 Again he searched his own thoughts; nor ineffectually as before.
+4992-23283-0007 4.045 To ask any more questions of you, I believe, would be unfair. 4992-23283-0018 6.575 To relieve her from both, he laid his hand with force upon his heart, and said, "Do you believe me"?
+4992-23283-0016 4.495 Again he searched his own thoughts; nor ineffectually as before. 4992-23283-0019 6.585 I will make no unjust use of what I know," he replied with firmness. "I believe you, my Lord".
+672-122797-0005 3.26 Oh, that made him so angry! 672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree.
+672-122797-0029 3.05 How it will shine this evening"! 672-122797-0003 4.76 But this was what the Tree could not bear to hear.
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0007 6.42 In autumn the wood cutters always came and felled some of the largest trees.
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0012 7.765 I would fain know if I am destined for so glorious a career," cried the Tree, rejoicing.
+672-122797-0029 3.05 How it will shine this evening"! 672-122797-0013 8.705 I am now tall, and my branches spread like the others that were carried off last year! Oh!
+672-122797-0032 4 cried the young ladies, and they quickly put out the fire. 672-122797-0015 4.455 Were I in the warm room with all the splendor and magnificence!
+672-122797-0044 3.74 And he leaned against the wall lost in reverie. 672-122797-0016 9.215 Yes; then something better, something still grander, will surely follow, or wherefore should they thus ornament me?
+672-122797-0041 3.88 In the morning the servant and the housemaid came in. 672-122797-0017 4.82 Something better, something still grander must follow - but what?
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0018 4.93 Rejoice in our presence"! said the Air and the Sunlight.
+672-122797-0047 3.325 How kind man is, after all! 672-122797-0019 4.11 Rejoice in thy own fresh youth"!
+672-122797-0053 2.955 They were so extremely curious. 672-122797-0020 8.825 But the Tree did not rejoice at all; he grew and grew, and was green both winter and summer.
+672-122797-0032 4 cried the young ladies, and they quickly put out the fire. 672-122797-0021 4.15 and towards Christmas he was one of the first that was cut down.
+672-122797-0032 4 cried the young ladies, and they quickly put out the fire. 672-122797-0023 9.695063 He well knew that he should never see his dear old comrades, the little bushes and flowers around him, anymore; perhaps not even the birds!
+672-122797-0059 3.52 Only that one," answered the Tree. 672-122797-0024 4.13 The departure was not at all agreeable.
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0027 4.79 The servants, as well as the young ladies, decorated it.
+672-122797-0015 4.455 Were I in the warm room with all the splendor and magnificence! 672-122797-0030 4.575 Perhaps the other trees from the forest will come to look at me!
+672-122797-0015 4.455 Were I in the warm room with all the splendor and magnificence! 672-122797-0032 4 cried the young ladies, and they quickly put out the fire.
+672-122797-0015 4.455 Were I in the warm room with all the splendor and magnificence! 672-122797-0034 5.11 A story"! cried the children, drawing a little fat man towards the Tree.
+672-122797-0011 2.54 And then? What happens then"? 672-122797-0036 5.365 Humpy Dumpy fell downstairs, and yet he married the princess!
+672-122797-0044 3.74 And he leaned against the wall lost in reverie. 672-122797-0038 8.8 thought the Fir Tree, and believed it all, because the man who told the story was so good looking. "Well, well!
+672-122797-0043 3.78 What's the meaning of this"? thought the Tree. 672-122797-0039 4.025 I won't tremble tomorrow"! thought the Fir Tree.
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0040 5.125 And the whole night the Tree stood still and in deep thought.
+672-122797-0059 3.52 Only that one," answered the Tree. 672-122797-0046 4.715 Tis now winter out of doors"! thought the Tree.
+672-122797-0054 4.25 I know no such place," said the Tree. 672-122797-0048 6.555 If it only were not so dark here, and so terribly lonely!
+672-122797-0041 3.88 In the morning the servant and the housemaid came in. 672-122797-0050 4.855 They snuffed about the Fir Tree, and rustled among the branches.
+672-122797-0054 4.25 I know no such place," said the Tree. 672-122797-0051 4.665 I am by no means old," said the Fir Tree.
+672-122797-0011 2.54 And then? What happens then"? 672-122797-0052 4.285 There's many a one considerably older than I am".
+672-122797-0031 3.98 It blazed up famously. "Help! Help"! 672-122797-0054 4.25 I know no such place," said the Tree.
+672-122797-0032 4 cried the young ladies, and they quickly put out the fire. 672-122797-0055 8.23 And then he told all about his youth; and the little Mice had never heard the like before; and they listened and said,
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0056 5.225 said the Fir Tree, thinking over what he had himself related.
+672-122797-0065 3.03 Now that too is over. 672-122797-0057 6.56 Yes, in reality those were happy times".
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0058 4.47 Who is Humpy Dumpy"? asked the Mice.
+672-122797-0005 3.26 Oh, that made him so angry! 672-122797-0061 7.59 Don't you know one about bacon and tallow candles? Can't you tell any larder stories"?
+672-122797-0021 4.15 and towards Christmas he was one of the first that was cut down. 672-122797-0066 4.815 Why, one morning there came a quantity of people and set to work in the loft.
+672-122797-0010 3.815 Rejoice in thy growth"! said the Sunbeams. 672-122797-0068 4.02 but it was not the Fir Tree that they meant.
+672-122797-0028 2.61 This evening"! they all said. 672-122797-0069 5.01 It was in a corner that he lay, among weeds and nettles.
+672-122797-0032 4 cried the young ladies, and they quickly put out the fire. 672-122797-0070 6.27 The golden star of tinsel was still on the top of the Tree, and glittered in the sunshine.
+672-122797-0021 4.15 and towards Christmas he was one of the first that was cut down. 672-122797-0071 8.875 In the court yard some of the merry children were playing who had danced at Christmas round the Fir Tree, and were so glad at the sight of him.
+672-122797-0000 4.07 Out in the woods stood a nice little Fir Tree. 672-122797-0072 7.94 And the gardener's boy chopped the Tree into small pieces; there was a whole heap lying there.
+672-122797-0053 2.955 They were so extremely curious. 672-122797-0073 8.205 The wood flamed up splendidly under the large brewing copper, and it sighed so deeply!
+672-122797-0062 2.675 No," said the Tree. 672-122797-0074 8.73 However, that was over now - the Tree gone, the story at an end.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0001 8.250063 The influence with the Timaeus has exercised upon posterity is due partly to a misunderstanding.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0004 8.22 There is no danger of the modern commentators on the Timaeus falling into the absurdities of the Neo Platonists.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0007 7.64 But they have nothing to do with the interpretation of Plato, and in spirit they are opposed to him.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0012 6.89 Many, if not all the elements of the Pre Socratic philosophy are included in the Timaeus.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0014 8.775 The ideas also remain, but they have become types in nature, forms of men, animals, birds, fishes.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0015 7.83 The style and plan of the Timaeus differ greatly from that of any other of the Platonic dialogues.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0016 7.76 But Plato has not the same mastery over his instrument which he exhibits in the Phaedrus or Symposium.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0017 7.87 Nothing can exceed the beauty or art of the introduction, in which he is using words after his accustomed manner.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0018 8.38 But in the rest of the work the power of language seems to fail him, and the dramatic form is wholly given up.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0020 9.88 And hence we find the same sort of clumsiness in the Timaeus of Plato which characterizes the philosophical poem of Lucretius.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-960-0022 7.425 Plato had not the command of his materials which would have enabled him to produce a perfect work of art.
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274381-0011 6.48 His conduct and presence of mind in this emergence appeared conspicuous.
+1221-135766-0013 3.645 Pearl was a born outcast of the infantile world. 1221-135767-0005 5.865 It was the scarlet letter in another form: the scarlet letter endowed with life!
+1221-135766-0015 2.63 If spoken to, she would not speak again. 1221-135767-0010 8.2 She screamed and shouted, too, with a terrific volume of sound, which, doubtless, caused the hearts of the fugitives to quake within them.
+1221-135767-0008 3.095 Come, therefore, and let us fling mud at them"! 1221-135767-0014 7.07 Yea, his honourable worship is within. But he hath a godly minister or two with him, and likewise a leech.
+1221-135767-0020 3.345 In truth, she seemed absolutely hidden behind it. 1221-135767-0024 5.85 Pearl, seeing the rose bushes, began to cry for a red rose, and would not be pacified.
+7176-88083-0008 3.28 In despair he hurled himself downward too soon. 7176-92135-0001 7.56 In short he becomes a "prominent figure in London Society" - and, if he is not careful, somebody will say so.
+7176-92135-0007 3.275 Anyhow it's jolly exciting, and I can do the dialogue all right. 7176-92135-0005 5.47 But suppose you said, "I'm fond of writing; my people always say my letters home are good enough for Punch.
+7176-92135-0027 2.835 Lady Larkspur starts suddenly and turns towards him. 7176-92135-0006 7.795 I've got a little idea for a play about a man and a woman and another woman, and - but perhaps I'd better keep the plot a secret for the moment.
+7176-88083-0009 4.045 The great hawk followed hurriedly, to retrieve his prey from the ground. 7176-92135-0008 4.43 Lend me your ear for ten minutes, and you shall learn just what stagecraft is".
+7176-92135-0004 2.425 Frankly I cannot always say. 7176-92135-0009 4.38 And I should begin with a short homily on Soliloquy.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-92135-0015 6.755 And so on, till you get to the end, when Ophelia might say, "Ah, yes," or something non committal of that sort.
+7176-88083-0006 4.295 It might have seemed that a trout of this size was a fairly substantial meal. 7176-92135-0016 7.545 This would be an easy way of doing it, but it would not be the best way, for the reason that it is too easy to call attention to itself.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-92135-0017 7.17 In the old badly made play it was frequently necessary for one of the characters to take the audience into his confidence.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-92135-0018 8.94 In the modern well constructed play he simply rings up an imaginary confederate and tells him what he is going to do. Could anything be more natural?
+7176-88083-0008 3.28 In despair he hurled himself downward too soon. 7176-92135-0020 7.165 Double nine two three, Elsinore.... Double- nine, yes.... Hallo, is that you, Horatio? Hamlet speaking.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-92135-0022 8.23 To be or not to be, that is the question; whether 'tis nobler in the mind to suffer the slings and arrows - What? No, Hamlet speaking.
+7176-92135-0002 3.415 But even the unsuccessful dramatist has his moments. 7176-92135-0023 6.215 You gave me double- five, I want double- nine.... Hallo, is that you, Horatio? Hamlet speaking.
+7176-92135-0026 2.95 Enter Hamlet with his favourite boar hound. 7176-92135-0024 4.1 To be or not to be, that is the question; whether 'tis nobler
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-92135-0042 7.27 In novels the hero has often "pushed his meals away untasted," but no stage hero would do anything so unnatural as this.
+7176-92135-0007 3.275 Anyhow it's jolly exciting, and I can do the dialogue all right. 7176-92135-0044 5.175 But it is the cigarette which chiefly has brought the modern drama to its present state of perfection.
+4077-13754-0001 3.77 But a word further concerning the expedition in general. 4077-13751-0001 8.745 Its origin was small - a germ, an insignificant seed, hardly to be thought of as likely to arouse opposition.
+4077-13754-0001 3.77 But a word further concerning the expedition in general. 4077-13751-0002 9.75 Instead of but six regularly affiliated members, and at most two score of adherents, the organization numbers today many hundred thousand souls.
+4077-13751-0013 4.315 Their sufferings have never yet been fitly chronicled by human scribe. 4077-13751-0010 6.72 To the fervent Latter day Saint, a temple is not simply a church building, a house for religious assembly.
+4077-13751-0019 2.92 Who began the quarrel? Was it the "Mormons"? 4077-13751-0013 4.315 Their sufferings have never yet been fitly chronicled by human scribe.
+4077-13754-0001 3.77 But a word further concerning the expedition in general. 4077-13751-0017 5.095 Oh, what a record to read; what a picture to gaze upon; how awful the fact!
+6930-81414-0019 3.38 Voltaire picked up something from the ground and looked at it. 6930-76324-0002 5.56 The poor little things"! cried Cynthia. "Think of them having been turned to the wall all these years!
+6930-76324-0009 3.405 Do you suppose the miniature was a copy of the same thing"? 6930-76324-0004 6.15 But Joyce had not been listening. All at once she put down her candle on the table and faced her companion.
+6930-76324-0009 3.405 Do you suppose the miniature was a copy of the same thing"? 6930-76324-0005 5.035 The twin brother did something she didn't like, and she turned his picture to the wall.
+6930-76324-0001 3.2 They were certainly no nearer the solution of their problem. 6930-76324-0006 4.455 Hers happened to be in the same frame too, but she evidently didn't care about that.
+6930-76324-0006 4.455 Hers happened to be in the same frame too, but she evidently didn't care about that. 6930-76324-0008 5.185 I thought we were 'stumped' again when I first saw that picture, but it's been of some use, after all.
+6930-76324-0026 3.085 Isn't he the greatest for getting into odd corners"! 6930-76324-0011 9.24 They worry me terribly. And, besides, I'd like to see what this lovely furniture looks like without such quantities of dust all over it". "Good scheme, CYN"!
+6930-76324-0006 4.455 Hers happened to be in the same frame too, but she evidently didn't care about that. 6930-76324-0012 4.655 We'll come in here this afternoon with old clothes on, and have a regular house cleaning!
+6930-76324-0010 2.69 What in the world is that"? queried Joyce. 6930-76324-0013 4.305 It can't hurt anything, I'm sure, for we won't disturb things at all.
+6930-76324-0007 2.82 Now what have you to say, Cynthia Sprague"? 6930-76324-0014 4.72 This thought, however, did not enter the heads of the enthusiastic pair.
+6930-76324-0019 2.575 Now let's dust the furniture and pictures". 6930-76324-0016 9.205 The lure proved too much for him, and he came sporting after it, as friskily as a young kitten, much to Cynthia's delight when she caught sight of him.
+6930-81414-0018 2.93 I remember saying. "Have we been together"? 6930-76324-0017 5.41 Oh, let him come along"! she urged. "I do love to see him about that old house.
+6930-76324-0025 4.12 Why, it's Goliath as usual"! they both cried, peering in. 6930-76324-0020 6.315 Yet, little as it was, it had already made a vast difference in the aspect of the room.
+6930-76324-0007 2.82 Now what have you to say, Cynthia Sprague"? 6930-76324-0021 7.355 Surface dust at least had been removed, and the fine old furniture gave a hint of its real elegance and polish.
+6930-76324-0013 4.305 It can't hurt anything, I'm sure, for we won't disturb things at all. 6930-76324-0023 4.85 And my pocket money is getting low again, and you haven't any left, as usual.
+6930-76324-0026 3.085 Isn't he the greatest for getting into odd corners"! 6930-76324-0024 4.05 They say illumination by candle light is the prettiest in the world.
+6930-81414-0012 4.43 said another voice, which I recognized as Voltaire's. "Kaffar? 6930-76324-0025 4.12 Why, it's Goliath as usual"! they both cried, peering in.
+6930-81414-0019 3.38 Voltaire picked up something from the ground and looked at it. 6930-76324-0027 8.27 Forgetting all their weariness, they seized their candles and scurried through the house, finding an occasional paper tucked away in some odd corner.
+6930-81414-0018 2.93 I remember saying. "Have we been together"? 6930-76324-0028 9.875 Well, I'm convinced that the Boarded up House mystery happened not earlier than april sixteenth, eighteen sixty one, and probably not much later.
+6930-76324-0007 2.82 Now what have you to say, Cynthia Sprague"? 6930-81414-0004 9.56 The story of its evil influence came back to me, and in my bewildered condition I wondered whether there was not some truth in what had been said.
+6930-75918-0000 3.505 Concord returned to its place amidst the tents. 6930-81414-0006 6.8 What then? A human hand, large and shapely, appeared distinctly on the surface of the pond.
+6930-75918-0011 3.195 I am convinced of what I say," said the count. 6930-81414-0007 4.365 Nothing more, not even the wrist to which it might be attached.
+6930-75918-0013 2.94 In those very terms; I even added more. 6930-81414-0008 6.055 It did not beckon, or indeed move at all; it was as still as the hand of death.
+6930-81414-0010 3.835 A sound of voices. A flash of light. 6930-81414-0011 4.7 A feeling of freedom, and I was awake! Where?
+6930-76324-0025 4.12 Why, it's Goliath as usual"! they both cried, peering in. 6930-81414-0012 4.43 said another voice, which I recognized as Voltaire's. "Kaffar?
+6930-81414-0007 4.365 Nothing more, not even the wrist to which it might be attached. 6930-81414-0013 7.325 I had scarcely known what I had been saying or doing up to this time, but as he spoke I looked at my hand.
+6930-75918-0007 3.315 You will be frank with me"? "I always am". 6930-81414-0014 7.41 In the light of the moon I saw a knife red with blood, and my hand, too, was also discoloured.
+6930-81414-0025 2.53 My position was too terrible. 6930-81414-0020 5 I say you do know what this means, and you must tell us".
+6930-81414-0027 3.85 For some time after that I remembered nothing distinctly. 6930-81414-0022 4.34 I had again been acting under the influence of this man's power.
+6930-81414-0021 3.225 A terrible thought flashed into my mind. 6930-81414-0023 4.885 Perchance, too, Kaffar's death might serve him in good stead.
+6930-75918-0010 3.035 I can perceive love clearly enough". 6930-81414-0024 5.05 My tongue refused to articulate; my power of speech left me.
+1221-135766-0015 2.63 If spoken to, she would not speak again. 1221-135766-0002 4.825 Yet these thoughts affected Hester Prynne less with hope than apprehension.
+1221-135766-0015 2.63 If spoken to, she would not speak again. 1221-135766-0004 7.44 This outward mutability indicated, and did not more than fairly express, the various properties of her inner life.
+1221-135766-0013 3.645 Pearl was a born outcast of the infantile world. 1221-135766-0007 8.795 Hester Prynne, nevertheless, the loving mother of this one child, ran little risk of erring on the side of undue severity.
+1221-135767-0020 3.345 In truth, she seemed absolutely hidden behind it. 1221-135766-0014 4.75 Pearl saw, and gazed intently, but never sought to make acquaintance.
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-79730-0005 8.01 So you will be a good girl, I know, and not make any trouble, but will stay at home contentedly - won't you?
+8463-294828-0021 2.735 A route slightly less direct, that's all. 8463-294825-0001 7.805 This reality begins to explain the dark power and otherworldly fascination of Twenty Thousand Leagues Under the Seas.
+8463-287645-0014 3.02 of starting. I didn't know the way to come. 8463-294825-0003 9.935 Nemo builds a fabulous futuristic submarine, the Nautilus, then conducts an underwater campaign of vengeance against his imperialist oppressor.
+8463-287645-0001 3.545 It is hardly necessary to say more of them here. 8463-294825-0005 7.7 Other subtleties occur inside each episode, the textures sparkling with wit, information, and insight.
+8463-287645-0001 3.545 It is hardly necessary to say more of them here. 8463-294825-0010 4.580063 And in this last action he falls into the classic sin of Pride.
+8463-287645-0009 3.71 I never knew of but one man who could ever please him. 8463-294825-0012 5.965063 The Nautilus nearly perishes in the Antarctic and Nemo sinks into a growing depression.
+1580-141083-0021 3.715 There is no opening except the one pane," said our learned guide. 1580-141083-0000 8.94 I will endeavour, in my statement, to avoid such terms as would serve to limit the events to any particular place, or give a clue as to the people concerned.
+1580-141084-0034 4.49 Well, well, don't trouble to answer. Listen, and see that I do you no injustice. 1580-141083-0002 6.135 My friend's temper had not improved since he had been deprived of the congenial surroundings of Baker Street.
+1580-141083-0023 3.33 One could hardly hope for any upon so dry a day. 1580-141083-0003 6.55 Without his scrapbooks, his chemicals, and his homely untidiness, he was an uncomfortable man.
+1580-141084-0003 4.1 No names, please"! said Holmes, as we knocked at Gilchrist's door. 1580-141083-0004 4.515 I had to read it over carefully, as the text must be absolutely correct.
+1580-141084-0045 3.625 Suddenly he heard him at the very door. There was no possible escape. 1580-141083-0007 4.565 The moment I looked at my table, I was aware that someone had rummaged among my papers.
+1580-141083-0011 2.825 A broken tip of lead was lying there also. 1580-141083-0008 4.305 The proof was in three long slips. I had left them all together.
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141083-0009 7.04 The alternative was that someone passing had observed the key in the door, had known that I was out, and had entered to look at the papers.
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141083-0010 5.32 I gave him a little brandy and left him collapsed in a chair, while I made a most careful examination of the room.
+1580-141083-0050 3.085 I really don't think he knew much about it, mister Holmes. 1580-141083-0012 7.065 Not only this, but on the table I found a small ball of black dough or clay, with specks of something which looks like sawdust in it.
+1580-141083-0019 2.705 Above were three students, one on each story. 1580-141083-0013 4.32 Above all things, I desire to settle the matter quietly and discreetly".
+1580-141083-0048 2.785 How came you to leave the key in the door"? 1580-141083-0015 4.985 Did anyone know that these proofs would be there"? "No one save the printer".
+1580-141084-0021 4.01 On the palm were three little pyramids of black, doughy clay. 1580-141083-0016 4.255 I was in such a hurry to come to you". "You left your door open"?
+1580-141083-0036 3.98 Holmes held it out on his open palm in the glare of the electric light. 1580-141083-0020 5.135 Then he approached it, and, standing on tiptoe with his neck craned, he looked into the room.
+1580-141084-0050 2.78 If mister Soames saw them, the game was up. 1580-141083-0024 4.48 You left him in a chair, you say. Which chair"? "By the window there".
+1580-141084-0037 2.965 When I approached your room, I examined the window. 1580-141083-0026 4.775 As a matter of fact, he could not," said Soames, "for I entered by the side door".
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141083-0027 5.225 How long would it take him to do that, using every possible contraction? A quarter of an hour, not less.
+1580-141084-0050 2.78 If mister Soames saw them, the game was up. 1580-141083-0031 6.25 Holmes held out a small chip with the letters NN and a space of clear wood after them. "You see"?
+1580-141084-0036 2.475 The Indian I also thought nothing of. 1580-141083-0032 4.135 Watson, I have always done you an injustice. There are others.
+1580-141084-0045 3.625 Suddenly he heard him at the very door. There was no possible escape. 1580-141083-0033 7.45 I was hoping that if the paper on which he wrote was thin, some trace of it might come through upon this polished surface. No, I see nothing.
+1580-141083-0025 3.905 The man entered and took the papers, sheet by sheet, from the central table. 1580-141083-0034 6.99 As Holmes drew the curtain I was aware, from some little rigidity and alertness of his attitude, that he was prepared for an emergency.
+1580-141084-0050 2.78 If mister Soames saw them, the game was up. 1580-141083-0035 4.98 Holmes turned away, and stooped suddenly to the floor. "Hello! What's this"?
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141083-0037 5.73 What could he do? He caught up everything which would betray him, and he rushed into your bedroom to conceal himself".
+1580-141083-0036 3.98 Holmes held it out on his open palm in the glare of the electric light. 1580-141083-0038 7.535 I understand you to say that there are three students who use this stair, and are in the habit of passing your door"? "Yes, there are".
+1580-141083-0024 4.48 You left him in a chair, you say. Which chair"? "By the window there". 1580-141083-0042 5.865 My scholar has been left very poor, but he is hard working and industrious. He will do well.
+1580-141084-0014 3.97 Why, Bannister, the servant. What's his game in the matter"? 1580-141083-0044 5.505 I dare not go so far as that. But, of the three, he is perhaps the least unlikely".
+1580-141083-0025 3.905 The man entered and took the papers, sheet by sheet, from the central table. 1580-141083-0045 4.36 He was still suffering from this sudden disturbance of the quiet routine of his life.
+1580-141083-0052 3.45 Oh, I would not venture to say, sir. 1580-141083-0053 4.015 You haven't seen any of them"? "No, sir".
+4992-41797-0003 2.835 mister Popham laid down his brush. 4992-41797-0000 5.485 Yes, dead these four years, an' a good job for her, too.
+4992-41797-0003 2.835 mister Popham laid down his brush. 4992-41797-0002 5.625 Grandfather was Alexander Carey, L L. D., - Doctor of Laws, that is".
+4992-23283-0016 4.495 Again he searched his own thoughts; nor ineffectually as before. 4992-41797-0004 7.315 I swan to man"! he ejaculated. "If you don't work hard you can't keep up with the times! Doctor of Laws!
+4992-23283-0015 3.675 Is she not afraid that I will thwart her inclinations"? 4992-41797-0006 4.55 He keeps the thou shalt not commandments first rate, Hen Lord does!
+4992-23283-0015 3.675 Is she not afraid that I will thwart her inclinations"? 4992-41797-0007 6.905 He give up his position and shut the family up in that tomb of a house so 't he could study his books.
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-41797-0008 8.965 mister Popham exaggerated nothing, but on the contrary left much unsaid in his narrative of the family at the House of Lords.
+4992-41797-0003 2.835 mister Popham laid down his brush. 4992-41797-0010 6.82 Always irritable, cold, indifferent, he had grown rapidly more so as years went on.
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-41797-0011 5.445 Whatever appealed to her sense of beauty was straightway transferred to paper or canvas.
+4992-41806-0009 4.355 exclaimed Bill Harmon to his wife as they went through the lighted hall. 4992-41797-0013 9.8 She makes effort after effort, trembling with eagerness, and when she fails to reproduce what she sees, she works herself into a frenzy of grief and disappointment".
+4992-41806-0009 4.355 exclaimed Bill Harmon to his wife as they went through the lighted hall. 4992-41797-0014 7.215 When she could not make a rabbit or a bird look "real" on paper, she searched in her father's books for pictures of its bones.
+4992-41806-0009 4.355 exclaimed Bill Harmon to his wife as they went through the lighted hall. 4992-41797-0015 8.65 Cyril, there must be some better way of doing; I just draw the outline of an animal and then I put hairs or feathers on it. They have no bodies.
+4992-23283-0011 4.225 If she does not know how to estimate her own value, I do. 4992-41797-0017 8.69 He wouldn't search, so don't worry," replied Cyril quietly, and the two looked at each other and knew that it was so.
+4992-23283-0016 4.495 Again he searched his own thoughts; nor ineffectually as before. 4992-41797-0018 9.155 There, in the cedar hollow, then, lived Olive Lord, an angry, resentful, little creature weighed down by a fierce sense of injury.
+4992-23283-0001 2.71 Miss Milner's health is not good"! 4992-41797-0019 4.755 Olive's mournful black eyes met Nancy's sparkling brown ones.
+4992-41797-0012 2.705 She is wild to know how to do things. 4992-41797-0020 7.49 Nancy's curly chestnut crop shone in the sun, and Olive's thick black plaits looked blacker by contrast.
+4992-23283-0007 4.045 To ask any more questions of you, I believe, would be unfair. 4992-41797-0021 8.23 She's wonderful! More wonderful than anybody we've ever seen anywhere, and she draws better than the teacher in Charlestown!
+4992-23283-0001 2.71 Miss Milner's health is not good"! 4992-41797-0022 6.45 She's older than I am, but so tiny and sad and shy that she seems like a child.
+2830-3980-0001 3.945 They said to the Galatians: "You have no right to think highly of Paul. 2830-3979-0000 6.12 We want you to help us publish some leading work of Luther's for the general American market. Will you do it"?
+2830-3980-0020 3.46 This is no sinful pride. It is holy pride. 2830-3979-0002 4.315 Let us begin with that: his Commentary on Galatians..".
+2830-3980-0046 2.84 Was it not enough to say, "from God the Father"? 2830-3979-0003 8.085 The undertaking, which seemed so attractive when viewed as a literary task, proved a most difficult one, and at times became oppressive.
+2830-3980-0012 3.42 The most they could claim is that they were sent by others. 2830-3979-0006 4.55 A word should now be said about the origin of Luther's Commentary on Galatians.
+2830-3980-0013 4.145 He mentions the apostles first because they were appointed directly by God. 2830-3979-0008 9.44 In other words, these three men took down the lectures which Luther addressed to his students in the course of Galatians, and Roerer prepared the manuscript for the printer.
+2830-3980-0013 4.145 He mentions the apostles first because they were appointed directly by God. 2830-3979-0009 8.35 It presents like no other of Luther's writings the central thought of Christianity, the justification of the sinner for the sake of Christ's merits alone.
+2830-3980-0020 3.46 This is no sinful pride. It is holy pride. 2830-3979-0011 9.45 The Lord who has given us power to teach and to hear, let Him also give us the power to serve and to do". LUKE two
+2094-142345-0025 3.595 Cold, is it, my darling? Bless your sweet face"! 2094-142345-0001 8.03 But the windows are patched with wooden panes, and the door, I think, is like the gate it is never opened.
+2094-142345-0025 3.595 Cold, is it, my darling? Bless your sweet face"! 2094-142345-0005 9.09 Several clothes horses, a pillion, a spinning wheel, and an old box wide open and stuffed full of coloured rags.
+2094-142345-0060 2.71 Oh, I've no doubt it's in capital order. 2094-142345-0021 5.335 That's the way with you that's the road you'd all like to go, headlongs to ruin.
+2094-142345-0018 3.155 Who taught you to scrub a floor, I should like to know? 2094-142345-0034 7.99 And there's linen in the house as I could well spare you, for I've got lots o' sheeting and table clothing, and towelling, as isn't made up.
+2094-142345-0026 2.825 She's going to put the ironing things away". 2094-142345-0036 6.915 Nay, dear aunt, you never heard me say that all people are called to forsake their work and their families.
+2094-142345-0020 2.435 That's what you'd like to be doing, is it? 2094-142345-0039 6.28 I've strong assurance that no evil will happen to you and my uncle and the children from anything I've done.
+2094-142345-0020 2.435 That's what you'd like to be doing, is it? 2094-142345-0043 7.35 By this time the two gentlemen had reached the palings and had got down from their horses: it was plain they meant to come in.
+2094-142345-0032 3.24 I often heard her talk of you in the same sort of way. 2094-142345-0048 6.39 said Captain Donnithorne, seating himself where he could see along the short passage to the open dairy door.
+2094-142345-0004 2.64 And what through the left hand window? 2094-142345-0049 6.125 No, sir, he isn't; he's gone to Rosseter to see mister West, the factor, about the wool.
+2094-142345-0018 3.155 Who taught you to scrub a floor, I should like to know? 2094-142345-0051 5.31 No, thank you; I'll just look at the whelps and leave a message about them with your shepherd.
+2094-142345-0060 2.71 Oh, I've no doubt it's in capital order. 2094-142345-0052 6.53 I must come another day and see your husband; I want to have a consultation with him about horses.
+1995-1837-0009 3.76 The lagoon had been level with the dykes a week ago; and now? 1995-1836-0001 6 At last the Cotton Combine was to all appearances an assured fact and he was slated for the Senate.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1836-0003 7.965 She was not herself a notably intelligent woman; she greatly admired intelligence or whatever looked to her like intelligence in others.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1836-0006 7.715 She was therefore most agreeably surprised to hear mister Cresswell express himself so cordially as approving of Negro education.
+1995-1837-0005 2.635 She was so strange and human a creature. 1995-1836-0008 6.985 I believe in the training of people to their highest capacity". The Englishman here heartily seconded him.
+1995-1837-0000 3.865 He knew the Silver Fleece - his and Zora's - must be ruined. 1995-1836-0009 6.71 But," Cresswell added significantly, "capacity differs enormously between races".
+1995-1826-0004 3.035 Might learn something useful down there". 1995-1836-0011 4.705 Positively heroic," added Cresswell, avoiding his sister's eyes.
+1995-1837-0022 3.415 Up in the sick room Zora lay on the little white bed. 1995-1836-0014 9.045 Fortunately," said mister Vanderpool, "Northerners and Southerners are arriving at a better mutual understanding on most of these matters".
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0003 6.56 Somehow, of all the days when the home feeling was the strongest, this day it seemed as if she could bear it no longer.
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0005 6.51 Oh, she's always at the piano," said Van. "She must be there now, somewhere," and then somebody laughed.
+237-126133-0016 4.25 Oh no, Jasper; I must go by my very own self". 237-126133-0006 6.15 At this, the bundle opened suddenly, and - out popped Phronsie!
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0007 8.68 But Polly couldn't speak; and if Jasper hadn't caught her just in time, she would have tumbled over backward from the stool, Phronsie and all!
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0010 6.24 Oh, you are the dearest and best mister King I ever saw! but how did you make mammy let her come"?
+237-126133-0009 3.97 Now you'll stay," cried Van; "say, Polly, won't you". 237-126133-0011 6.71 Isn't he splendid"! cried Jasper in intense pride, swelling up. "Father knew how to do it".
+237-126133-0018 4.095 Don't mind it, Polly," whispered Jasper; "twasn't her fault". 237-126133-0012 4.45 There, there," he said soothingly, patting her brown, fuzzy head.
+237-126133-0016 4.25 Oh no, Jasper; I must go by my very own self". 237-126133-0013 6.815 I know," gasped Polly, controlling her sobs; "I won't - only - I can't thank you"!
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0014 6.79 asked Phronsie in intense interest slipping down out of Polly's arms, and crowding up close to Jasper's side.
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0015 9.34 Yes, all alone by himself," asserted Jasper, vehemently, and winking furiously to the others to stop their laughing; "he did now, truly, Phronsie".
+237-126133-0009 3.97 Now you'll stay," cried Van; "say, Polly, won't you". 237-126133-0016 4.25 Oh no, Jasper; I must go by my very own self".
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0017 6.21 There Jap, you've caught it," laughed Percy; while the others screamed at the sight of Jasper's face.
+237-126133-0008 3.865 asked Phronsie, with her little face close to Polly's own. 237-126133-0018 4.095 Don't mind it, Polly," whispered Jasper; "twasn't her fault".
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0019 7.12 Dear me"! ejaculated the old gentleman, in the utmost amazement; "and such a time as I've had to get her here too"!
+237-126133-0025 3.755 At last he came out of them, and wiped his face vigorously. 237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father".
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0022 5.04 I didn't have any fears, if I worked it rightly," said the old gentleman complacently.
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0023 6.675 he cried in high dudgeon; just as if he owned the whole of the Peppers, and could dispose of them all to suit his fancy!
+237-126133-0021 4.365 she asked impulsively, "I didn't believe you could persuade her, father". 237-126133-0024 9.665 And the old gentleman was so delighted with his success, that he had to burst out into a series of short, happy bits of laughter, that occupied quite a space of time.
+4507-16021-0040 3.925 One thinks one hears hydras talking. 4507-16021-0003 4.895 She has a son, theft, and a daughter, hunger.
+4507-16021-0012 2.735 Why should one halt on the way? 4507-16021-0005 4.21 We have never understood this sort of objections.
+4507-16021-0015 3.86 Since when has malady banished medicine? 4507-16021-0011 5.615 Why should one not explore everything, and study everything?
+4507-16021-0000 2.59 Chapter one Origin. 4507-16021-0014 6.115 Now, when has horror ever excluded study?
+4507-16021-0007 2.63 Slang makes one shudder"! 4507-16021-0024 5.14 Algebra, medicine, botany, have each their slang.
+4507-16021-0041 2.975 It is unintelligible in the dark. 4507-16021-0025 9.215 To meet the needs of this conflict, wretchedness has invented a language of combat, which is slang.
+4507-16021-0050 3.895 And you belong to that small class who are happy! 4507-16021-0033 5.545 Do we really know the mountain well when we are not acquainted with the cavern?
+4507-16021-0058 3.11 The flame is the enemy of the wing. 4507-16021-0035 7.535 True history being a mixture of all things, the true historian mingles in everything.
+4507-16021-0028 3.265 Even dialect, let that pass! 4507-16021-0036 5.435 Facts form one of these, and ideas the other.
+4507-16021-0015 3.86 Since when has malady banished medicine? 4507-16021-0037 5.35 There it clothes itself in word masks, in metaphor rags.
+4507-16021-0050 3.895 And you belong to that small class who are happy! 4507-16021-0045 4.89 It is so made, that everywhere we feel the sense of punishment.
+4507-16021-0012 2.735 Why should one halt on the way? 4507-16021-0046 4.59 Each day has its own great grief or its little care.
+4507-16021-0050 3.895 And you belong to that small class who are happy! 4507-16021-0048 5.215 This without reckoning in the pains of the heart. And so it goes on.
+4507-16021-0050 3.895 And you belong to that small class who are happy! 4507-16021-0049 5.91 There is hardly one day out of a hundred which is wholly joyous and sunny.
+4507-16021-0019 2.93 It is the language of wretchedness. 4507-16021-0051 6.17 In this world, evidently the vestibule of another, there are no fortunate.
+4507-16021-0007 2.63 Slang makes one shudder"! 4507-16021-0052 6.275 The real human division is this: the luminous and the shady.
+4507-16021-0005 4.21 We have never understood this sort of objections. 4507-16021-0053 8.095 To diminish the number of the shady, to augment the number of the luminous,-that is the object.
+4507-16021-0029 3.87 To this we reply in one word, only. 4507-16021-0054 4.315 That is why we cry: Education! science!
+4507-16021-0041 2.975 It is unintelligible in the dark. 4507-16021-0055 7.225 To teach reading, means to light the fire; every syllable spelled out sparkles.
+4507-16021-0040 3.925 One thinks one hears hydras talking. 4507-16021-0056 6.345 However, he who says light does not, necessarily, say joy.
+4507-16021-0038 3.885 In this guise it becomes horrible. 4507-16021-0057 4.61 People suffer in the light; excess burns.
+4507-16021-0015 3.86 Since when has malady banished medicine? 4507-16021-0059 6.205 To burn without ceasing to fly, therein lies the marvel of genius.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0000 9.605 Then he rushed down stairs into the courtyard, shouting loudly for his soldiers and threatening to patch everybody in his dominions if the sailorman was not recaptured.
+8555-284447-0003 4.415 But Captain Bill made no such attempt, knowing it would be useless. 8555-284447-0001 8.61 Hold him fast, my men, and as soon as I've had my coffee and oatmeal I'll take him to the Room of the Great Knife and patch him".
+8555-284447-0022 3.56 I had a notion it was you, mate, as saved me from the knife. 8555-284447-0002 8.025 I wouldn't mind a cup of coffee myself," said Captain Bill. "I've had considerable exercise this morning and I'm all ready for breakfast".
+8555-284447-0009 3.275 Mornin', girls; hope ye feel as well as ye look". 8555-284447-0003 4.415 But Captain Bill made no such attempt, knowing it would be useless.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0004 5.485 As soon as they entered the Room of the Great Knife the Boolooroo gave a yell of disappointment.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0005 6.83 The Room of the Great Knife was high and big, and around it ran rows of benches for the spectators to sit upon.
+8555-284449-0005 2.555 When he finished she said cheerfully: 8555-284447-0007 6.365 Therefore her Majesty paid no attention to anyone and no one paid any attention to her.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0008 8.39 Rich jewels of blue stones glittered upon their persons and the royal ladies were fully as gorgeous as they were haughty and overbearing.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0013 9.04 Why, you said to fetch the first living creature we met, and that was this billygoat," replied the Captain, panting hard as he held fast to one of the goat's horns.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0014 8.47 The idea of patching Captain Bill to a goat was vastly amusing to him, and the more he thought of it the more he roared with laughter.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284447-0018 5.46 At once the goat gave a leap, escaped from the soldiers and with bowed head rushed upon the Boolooroo.
+8555-284447-0003 4.415 But Captain Bill made no such attempt, knowing it would be useless. 8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack.
+8555-284447-0022 3.56 I had a notion it was you, mate, as saved me from the knife. 8555-284447-0023 7.155 I couldn't shiver much, bein' bound so tight, but when I'm loose I mean to have jus' one good shiver to relieve my feelin's".
+8555-292519-0013 4.185 That was but rustling of dripping plants in the dark. 8555-284447-0024 4.635 Come and get the Boolooroo," she said, going toward the benches.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0000 8.805 The analysis of knowledge will occupy us until the end of the thirteenth lecture, and is the most difficult part of our whole enterprise.
+8230-279154-0032 3.88 It is this that is of interest to theory of knowledge. 8230-279154-0005 7.72 All that I am doing is to use its logical tenability as a help in the analysis of what occurs when we remember.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0006 7.51 The behaviourist, who attempts to make psychology a record of behaviour, has to trust his memory in making the record.
+8230-279154-0008 3.62 But I do not think such an inference is warranted. 8230-279154-0011 6.25 Some images, like some sensations, feel very familiar, while others feel strange.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0014 7.94 I come now to the other characteristic which memory images must have in order to account for our knowledge of the past.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0015 8.05 They must have some characteristic which makes us regard them as referring to more or less remote portions of the past.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0017 7.93 There may be a specific feeling which could be called the feeling of "pastness," especially where immediate memory is concerned.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0020 7.835 If we had retained the "subject" or "act" in knowledge, the whole problem of memory would have been comparatively simple.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0021 6.56 Remembering has to be a present occurrence in some way resembling, or related to, what is remembered.
+8230-279154-0012 3.64 Familiarity is a feeling capable of degrees. 8230-279154-0022 6.44 Some points may be taken as fixed, and such as any theory of memory must arrive at.
+8230-279154-0032 3.88 It is this that is of interest to theory of knowledge. 8230-279154-0023 6.265 In this case, as in most others, what may be taken as certain in advance is rather vague.
+8230-279154-0008 3.62 But I do not think such an inference is warranted. 8230-279154-0024 6.34 The first of our vague but indubitable data is that there is knowledge of the past.
+8230-279154-0032 3.88 It is this that is of interest to theory of knowledge. 8230-279154-0026 9.3 This distinction is vital to the understanding of memory. But it is not so easy to carry out in practice as it is to draw in theory.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0029 8.54 The fact that a man can recite a poem does not show that he remembers any previous occasion on which he has recited or read it.
+8230-279154-0008 3.62 But I do not think such an inference is warranted. 8230-279154-0030 7.28 Semon's two books, mentioned in an earlier lecture, do not touch knowledge memory at all closely.
+8230-279154-0012 3.64 Familiarity is a feeling capable of degrees. 8230-279154-0035 7.555 Thus no knowledge as to the past is to be derived from the feeling of familiarity alone.
+8230-279154-0003 3.195 And what sort of evidence is logically possible? 8230-279154-0039 4.59 This knowledge is memory in one sense, though in another it is not.
+7021-85628-0000 3.02 But Anders cared nothing about that. 7021-79740-0001 5.995 Della had a young sister named Maria, and a cousin whose name was Jane.
+7021-85628-0019 3.255 With one jump Anders got out of his chair. 7021-79740-0002 9.225 Now Delia contrived to obtain a great influence and ascendency over the minds of the children by means of these dolls.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-79740-0003 4.985 To give an idea of these conversations I will report one of them in full.
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-79740-0004 6.465 You have come, Andella (Andella was the name of Jane's doll), to make Rosalie a visit.
+7021-85628-0019 3.255 With one jump Anders got out of his chair. 7021-79740-0006 5.965 I expect you have been a very good girl, Andella, since you were here last".
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-79740-0007 6.99 Then, turning to Jane, she asked, in a somewhat altered tone, "Has she been a good girl, Jane"?
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-79740-0013 7.365 Put these playthings all away quick, and carefully, and we will not let them know any thing about your leaving them out".
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70968-0000 4.905 He began a confused complaint against the wizard, who had vanished behind the curtain on the left.
+61-70968-0012 2.61 Cries of: "A Nottingham! A Nottingham"! 61-70968-0003 4.315 He was like unto my father, in a way, and yet was not my father.
+61-70970-0009 3.405 Tis late; and I go myself within a short space. 61-70968-0005 5.07 This was so sweet a lady, sir, and in some manner I do think she died.
+61-70968-0018 2.405 So I did push this fellow". 61-70968-0009 4.51 Like as not, young master, though I am an old man".
+61-70970-0033 3.42 Truly such a horse should be worth much in Nottingham Fair! 61-70968-0010 8.295 Forthwith all ran to the opening of the tent to see what might be amiss; but Master Will, who peeped out first, needed no more than one glance.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70968-0011 6.375 He gave way to the others very readily and retreated unperceived by the Squire and Mistress Fitzooth to the rear of the tent.
+61-70970-0019 3.78 At last all was quiet and black in the courtyard of Gamewell. 61-70968-0013 4.45 Before them fled the stroller and his three sons, capless and terrified.
+61-70968-0006 2.935 But then the picture was gone as quickly as it came". 61-70968-0014 7.485 What is the tumult and rioting"? cried out the Squire, authoritatively, and he blew twice on a silver whistle which hung at his belt.
+61-70968-0036 2.934938 George Montfichet will never forget this day. 61-70968-0015 5.375 Nay, we refused their request most politely, most noble," said the little stroller.
+61-70970-0007 4.485 He was in deep converse with the clerk, and entered the hall holding him by the arm. 61-70968-0017 5.11 I could not see my boy injured, excellence, for but doing his duty as one of Cumberland's sons.
+61-70970-0023 3.705 Be not so foolish, friend," said Fitzooth, crossly. 61-70968-0019 5.475 It is enough," said George Gamewell, sharply, and he turned upon the crowd.
+61-70968-0025 4.41 Come to me, men, here, here"! He raised his voice still louder. 61-70968-0020 5.105 Shame on you, citizens," cried he; "I blush for my fellows of Nottingham.
+61-70968-0048 3.02 And Henry might return to England at any moment. 61-70968-0022 4.67 Tis fine for you to talk, old man," answered the lean, sullen apprentice.
+61-70970-0033 3.42 Truly such a horse should be worth much in Nottingham Fair! 61-70968-0023 5.025 But I wrestled with this fellow and do know that he played unfairly in the second bout.
+61-70970-0032 3.135 enquired Robin, with his suspicions still upon him. 61-70968-0024 6.025 spoke the Squire, losing all patience; "and it was to you that I gave another purse in consolation!
+61-70970-0003 3.835 If, for a whim, you beggar yourself, I cannot stay you. 61-70968-0025 4.41 Come to me, men, here, here"! He raised his voice still louder.
+61-70970-0040 4.165 They regained their apartment, apparently without disturbing the household of Gamewell. 61-70968-0026 4.92 The strollers took their part in it with hearty zest now that they had some chance of beating off their foes.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70968-0027 6.87 Robin and the little tumbler between them tried to force the Squire to stand back, and very valiantly did these two comport themselves.
+61-70968-0046 3.55 Nottingham Castle was reached, and admittance was demanded. 61-70968-0030 5.685 Now, be silent, on your lives," he began; but the captured apprentice set up an instant shout.
+61-70968-0029 3.495 The Squire helped to thrust them all in and entered swiftly himself. 61-70968-0032 4.28 He felt for and found the wizard's black cloth. The Squire was quite out of breath.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70968-0033 5.685 Thrusting open the proper entrance of the tent, Robin suddenly rushed forth with his burden, with a great shout.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70968-0035 7.95 Taking advantage of this, the Squire's few men redoubled their efforts, and, encouraged by Robin's and the little stroller's cries, fought their way to him.
+61-70968-0036 2.934938 George Montfichet will never forget this day. 61-70968-0037 4.315 What is your name, lording"? asked the little stroller, presently.
+61-70970-0022 3.97 Robin entered the hut, dragging the unwilling esquire after him. 61-70968-0041 6.825 I like you, Will; you are the second Will that I have met and liked within two days; is there a sign in that"?
+61-70968-0003 4.315 He was like unto my father, in a way, and yet was not my father. 61-70968-0043 6.735 Friends," said Montfichet, faintly, to the wrestlers, "bear us escort so far as the Sheriff's house.
+61-70970-0013 4.35 There was no chance to alter his sleeping room to one nearer to Gamewell's chamber. 61-70968-0047 4.775 Master Monceux, the Sheriff of Nottingham, was mightily put about when told of the rioting.
+61-70968-0048 3.02 And Henry might return to England at any moment. 61-70968-0049 8.25 Have your will, child, if the boy also wills it," Montfichet answered, feeling too ill to oppose anything very strongly just then.
+61-70968-0042 2.785 Montfichet called out for Robin to give him an arm. 61-70968-0050 5.58 He made an effort to hide his condition from them all, and Robin felt his fingers tighten upon his arm.
+61-70970-0030 3.24 Save me, masters, but you startled me rarely"! 61-70968-0053 4.22 He is my esquire, excellency," returned Robin, with dignity.
+61-70970-0040 4.165 They regained their apartment, apparently without disturbing the household of Gamewell. 61-70968-0054 7.86 Mistress Fitzooth had been carried off by the Sheriff's daughter and her maids as soon as they had entered the house, so that Robin alone had the care of Montfichet.
+61-70968-0012 2.61 Cries of: "A Nottingham! A Nottingham"! 61-70968-0057 5.065 These escapades are not for old Gamewell, lad; his day has come to twilight.
+61-70968-0048 3.02 And Henry might return to England at any moment. 61-70968-0061 5.53 You are a worthy leech, Will," presently whispered Robin. "The wine has worked a marvel.
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0002 9.815 They informed the English parliament of this unexpected incident, and assured them that they had entered into no private treaty with the king.
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0005 8.745 Another preacher, after reproaching him to his face with his misgovernment, ordered this psalm to be sung:
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0006 6.81 The king stood up, and called for that psalm which begins with these words,
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0007 6.23 Have mercy, Lord, on me, I pray; For men would me devour".
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0009 4.805 The parliament and the Scots laid their proposals before the king.
+8224-274384-0003 3.87 or hath he given us any gift? 8224-274384-0013 5.44 His death, in this conjuncture, was a public misfortune.
+6829-68771-0035 4.39 Will you leave me alone in my own room, or must I go away to escape you"? 6829-68769-0001 9.315 It was a serious crime indeed, mister Watson told them, and Tom Gates bade fair to serve a lengthy term in state's prison as a consequence of his rash act.
+6829-68769-0046 2.57 You're foolish. Why should you do all this"? 6829-68769-0003 4.215 It was a deliberate theft from his employers to protect a girl he loved.
+6829-68769-0007 3.865 But under the circumstances I doubt if such an arrangement could be made". 6829-68769-0004 7.145 But they could not have proven a case against Lucy, if she was innocent, and all their threats of arresting her were probably mere bluff.
+6829-68769-0044 3.225 It has cost me twice sixty dollars in annoyance". 6829-68769-0005 6.72 He was soft hearted and impetuous," said Beth; "and, being in love, he didn't stop to count the cost".
+6829-68769-0022 4.115 We have heard something of your story," said Kenneth, "and are interested in it. 6829-68769-0006 7.195 If the prosecution were withdrawn and the case settled with the victim of the forged check, then the young man would be allowed his freedom.
+6829-68769-0022 4.115 We have heard something of your story," said Kenneth, "and are interested in it. 6829-68769-0009 4.22 They were received in the little office by a man named Markham, who was the jailer.
+6829-68769-0003 4.215 It was a deliberate theft from his employers to protect a girl he loved. 6829-68769-0011 4.685 I'm running for Representative on the Republican ticket," said Kenneth, quietly.
+6829-68769-0039 4.045 He looked up rather ungraciously, but motioned them to be seated. 6829-68769-0012 4.295 Oh, say! that's different," observed Markham, altering his demeanor.
+6829-68769-0003 4.215 It was a deliberate theft from his employers to protect a girl he loved. 6829-68769-0015 6.525 Sometimes I'm that yearning for a smoke I'm nearly crazy, an' I don't know which is worst, dying one way or another.
+6829-68769-0037 2.53 I've seen lots of that kind in my day. 6829-68769-0016 4.12 He unlocked the door, and called: "Here's visitors, Tom".
+6829-68771-0028 3.555 She even seemed mildly amused at the attention she attracted. 6829-68769-0020 5.125 Sit down, please," said Gates, in a cheerful and pleasant voice. "There's a bench here".
+6829-68769-0002 3.075 I can't see it in that light," said the old lawyer. 6829-68769-0021 7.895 A fresh, wholesome looking boy, was Tom Gates, with steady gray eyes, an intelligent forehead, but a sensitive, rather weak mouth.
+6829-68769-0009 4.22 They were received in the little office by a man named Markham, who was the jailer. 6829-68769-0022 4.115 We have heard something of your story," said Kenneth, "and are interested in it.
+6829-68771-0028 3.555 She even seemed mildly amused at the attention she attracted. 6829-68769-0023 4.89 I didn't stop to think whether it was foolish or not. I did it; and I'm glad I did".
+6829-68769-0007 3.865 But under the circumstances I doubt if such an arrangement could be made". 6829-68769-0025 5.735 Then Rogers wouldn't do anything but lead her around, and wait upon her, and the place went to rack and ruin".
+6829-68769-0051 3.545 There was a grim smile of amusement on his shrewd face. 6829-68769-0026 4.64 He spoke simply, but paced up and down the narrow cell in front of them.
+6829-68769-0012 4.295 Oh, say! that's different," observed Markham, altering his demeanor. 6829-68769-0030 4.91 I was bookkeeper, so it was easy to get a blank check and forge the signature.
+6829-68769-0037 2.53 I've seen lots of that kind in my day. 6829-68769-0031 5.555 As regards my robbing the company, I'll say that I saved them a heavy loss one day.
+6829-68769-0007 3.865 But under the circumstances I doubt if such an arrangement could be made". 6829-68769-0032 5.72 I discovered and put out a fire that would have destroyed the whole plant. But Marshall never even thanked me.
+6829-68769-0019 2.665 Sorry we haven't any reception room in the jail. 6829-68769-0033 4.02 It was better for him to think the girl unfeeling than to know the truth.
+6829-68769-0019 2.665 Sorry we haven't any reception room in the jail. 6829-68769-0034 6.055 I'm going to see mister Marshall," said Kenneth, "and discover what I can do to assist you". "Thank you, sir.
+6829-68771-0035 4.39 Will you leave me alone in my own room, or must I go away to escape you"? 6829-68769-0036 5.555 They left him then, for the jailer arrived to unlock the door, and escort them to the office.
+6829-68769-0017 3.545 Worse, Tom; worse 'n ever," replied the jailer, gloomily. 6829-68769-0039 4.045 He looked up rather ungraciously, but motioned them to be seated.
+6829-68771-0028 3.555 She even seemed mildly amused at the attention she attracted. 6829-68769-0040 4.77 Some girl has been here twice to interview my men and I have refused to admit her.
+6829-68769-0012 4.295 Oh, say! that's different," observed Markham, altering his demeanor. 6829-68769-0049 7.4 He detested the grasping disposition that would endeavor to take advantage of his evident desire to help young Gates.
+6829-68769-0010 3.14 We wish to talk with him," answered Kenneth. "Talk! 6829-68769-0052 4.6 He might have had that forged check for the face of it, if he'd been sharp.
+6829-68769-0051 3.545 There was a grim smile of amusement on his shrewd face. 6829-68769-0053 6.36 And to think we can save all that misery and despair by the payment of a hundred and fifty dollars!
+5142-33396-0015 4.31 As our boat flashed down the rollers into the water I made this song and sang it: 5142-36586-0003 5.055 But this subject will be more properly discussed when we treat of the different races of mankind.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5696-0002 7.51 Other circumstances permitting, that instinct disposes men to look with favor upon productive efficiency and on whatever is of human use.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5696-0004 4.7 The salient features of this development of domestic service have already been indicated.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5696-0006 4.16 As used in the speech of everyday life the word carries an undertone of deprecation.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5696-0007 9.5 The use of the word "waste" as a technical term, therefore, implies no deprecation of the motives or of the ends sought by the consumer under this canon of conspicuous waste.
+3570-5696-0006 4.16 As used in the speech of everyday life the word carries an undertone of deprecation. 3570-5696-0008 7.26 But it is, on other grounds, worth noting that the term "waste" in the language of everyday life implies deprecation of what is characterized as wasteful.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5696-0009 8.86 In strict accuracy nothing should be included under the head of conspicuous waste but such expenditure as is incurred on the ground of an invidious pecuniary comparison.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5696-0010 7.57 An article may be useful and wasteful both, and its utility to the consumer may be made up of use and waste in the most varying proportions.
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0005 6.45 Do you suppose that God for the sake of a few Lutheran heretics would disown His entire Church?
+2830-3980-0071 3.96 We think that by some little work or merit we can dismiss sin. 2830-3980-0006 6.41 Against these boasting, false apostles, Paul boldly defends his apostolic authority and ministry.
+2830-3980-0046 2.84 Was it not enough to say, "from God the Father"? 2830-3980-0008 4.84 Paul takes pride in his ministry, not to his own praise but to the praise of God.
+2830-3980-0028 3.54 This should go far in shutting the mouths of the false apostles. 2830-3980-0010 6.525 Either He calls ministers through the agency of men, or He calls them directly as He called the prophets and apostles.
+2830-3980-0071 3.96 We think that by some little work or merit we can dismiss sin. 2830-3980-0011 5.525 Paul declares that the false apostles were called or sent neither by men, nor by man.
+2830-3980-0028 3.54 This should go far in shutting the mouths of the false apostles. 2830-3980-0013 4.145 He mentions the apostles first because they were appointed directly by God.
+2830-3980-0017 3.665 When I was a young man I thought Paul was making too much of his call. 2830-3980-0019 7.015 I knew nothing of the doctrine of faith because we were taught sophistry instead of certainty, and nobody understood spiritual boasting.
+2830-3980-0021 2.91 and God the Father, who raised him from the dead. 2830-3980-0023 6.16 These perverters of the righteousness of Christ resist the Father and the Son, and the works of them both.
+2830-3980-0020 3.46 This is no sinful pride. It is holy pride. 2830-3980-0025 8.795 By His resurrection Christ won the victory over law, sin, flesh, world, devil, death, hell, and every evil.
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0029 9.075 Although the brethren with me are not apostles like myself, yet they are all of one mind with me, think, write, and teach as I do".
+2830-3980-0000 3.73 In every way they sought to undermine the authority of Saint Paul. 2830-3980-0030 5.25 They do not go where the enemies of the Gospel predominate. They go where the Christians are.
+2830-3980-0000 3.73 In every way they sought to undermine the authority of Saint Paul. 2830-3980-0031 8.485 Why do they not invade the Catholic provinces and preach their doctrine to godless princes, bishops, and doctors, as we have done by the help of God?
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0032 7.22 We look for that reward which "eye hath not seen, nor ear heard, neither hath entered into the heart of man".
+2830-3980-0000 3.73 In every way they sought to undermine the authority of Saint Paul. 2830-3980-0036 5.765 Wherever the means of grace are found, there is the Holy Church, even though Antichrist reigns there.
+2830-3980-0058 2.69 Mohammed also speaks highly of Christ. 2830-3980-0037 6.42 So much for the title of the epistle. Now follows the greeting of the apostle. VERSE three.
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0038 5.54 Grace be to you, and peace, from God the Father, and from our Lord Jesus Christ.
+2830-3980-0000 3.73 In every way they sought to undermine the authority of Saint Paul. 2830-3980-0039 5.195 The terms of grace and peace are common terms with Paul and are now pretty well understood.
+2830-3980-0064 2.88 How may we obtain remission of our sins? 2830-3980-0041 4.89 Grace involves the remission of sins, peace, and a happy conscience.
+2830-3980-0024 3.935 In this whole epistle Paul treats of the resurrection of Christ. 2830-3980-0047 7.865 To do so is to lose God altogether because God becomes intolerable when we seek to measure and to comprehend His infinite majesty.
+2830-3980-0071 3.96 We think that by some little work or merit we can dismiss sin. 2830-3980-0050 7.475 Did not Christ Himself say: "I am the way, and the truth, and the life: no man cometh unto the Father, but by me"?
+2830-3980-0001 3.945 They said to the Galatians: "You have no right to think highly of Paul. 2830-3980-0051 6.44 When you argue about the nature of God apart from the question of justification, you may be as profound as you like.
+2830-3980-0046 2.84 Was it not enough to say, "from God the Father"? 2830-3980-0052 4.88 We are to hear Christ, who has been appointed by the Father as our divine Teacher.
+2830-3980-0003 2.48 Paul came later and is beneath us. 2830-3980-0053 5.015 At the same time, Paul confirms our creed, "that Christ is very God".
+2830-3980-0071 3.96 We think that by some little work or merit we can dismiss sin. 2830-3980-0055 7.335 To bestow peace and grace lies in the province of God, who alone can create these blessings. The angels cannot.
+2830-3980-0060 2.675 He never loses sight of the purpose of his epistle. 2830-3980-0056 5.35 Otherwise Paul should have written: "Grace from God the Father, and peace from our Lord Jesus Christ".
+2830-3980-0040 2.62 The greeting of the Apostle is refreshing. 2830-3980-0057 8.07 The Arians took Christ for a noble and perfect creature, superior even to the angels, because by Him God created heaven and earth.
+2830-3979-0012 3.625 The Word of our God shall stand forever. 2830-3980-0061 7.12 Not gold, or silver, or paschal lambs, or an angel, but Himself. What for?
+2830-3980-0034 2.97 These means cannot be contaminated. 2830-3980-0062 5.44 Not for a crown, or a kingdom, or our goodness, but for our sins.
+2830-3980-0045 3.51 Men Should Not Speculate About the Nature of God 2830-3980-0063 5.415 Underscore these words, for they are full of comfort for sore consciences.
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0065 6.515 Paul answers: "The man who is named Jesus Christ and the Son of God gave himself for our sins".
+2830-3980-0021 2.91 and God the Father, who raised him from the dead. 2830-3980-0066 6.085 Since Christ was given for our sins it stands to reason that they cannot be put away by our own efforts.
+2830-3980-0071 3.96 We think that by some little work or merit we can dismiss sin. 2830-3980-0067 8.13 This sentence also defines our sins as great, so great, in fact, that the whole world could not make amends for a single sin.
+2830-3980-0045 3.51 Men Should Not Speculate About the Nature of God 2830-3980-0068 5 The greatness of the ransom, Christ, the Son of God, indicates this.
+2830-3980-0040 2.62 The greeting of the Apostle is refreshing. 2830-3980-0069 5.555063 The vicious character of sin is brought out by the words "who gave himself for our sins".
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0072 4.855 This passage, then, bears out the fact that all men are sold under sin.
+2830-3980-0060 2.675 He never loses sight of the purpose of his epistle. 2830-3980-0074 5.7 This attitude is universal and particularly developed in those who consider themselves better than others.
+2830-3980-0042 3.02 The world brands this a pernicious doctrine. 2830-3980-0075 5.79 But the real significance and comfort of the words "for our sins" is lost upon them.
+2830-3980-0046 2.84 Was it not enough to say, "from God the Father"? 2830-3980-0076 4.81 On the other hand, we are not to regard them as so terrible that we must despair.
+5105-28241-0014 2.995 Another circumstance was most remarkable. 5105-28233-0000 4.51 Length of service: Fourteen years, three months, and five days.
+5105-28240-0018 2.885 You will take me on board, count, will you not"? 5105-28233-0001 4.49 He seemed born to please without being conscious of the power he possessed.
+5105-28240-0018 2.885 You will take me on board, count, will you not"? 5105-28233-0002 8.285 It must be owned, and no one was more ready to confess it than himself, that his literary attainments were by no means of a high order.
+5105-28233-0001 4.49 He seemed born to please without being conscious of the power he possessed. 5105-28233-0004 4.735 Once, in action, he was leading a detachment of infantry through an intrenchment.
+5105-28241-0003 3.98 Steam up and canvas spread, the schooner started eastwards. 5105-28233-0006 5.505 No cathedral - not even Burgos itself - could vie with the church at Montmartre.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0000 4.665 Socrates begins the Timaeus with a summary of the Republic.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0001 9.185 And now he desires to see the ideal State set in motion; he would like to know how she behaved in some great struggle.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0003 4.73 I will, if Timaeus approves'. 'I approve.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0006 4.6 And what was the subject of the poem'? said the person who made the remark.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0007 8.505 The subject was a very noble one; he described the most famous action in which the Athenian people were ever engaged.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0008 7.155 But the memory of their exploits has passed away owing to the lapse of time and the extinction of the actors.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0009 5.705 Tell us,' said the other, 'the whole story, and where Solon heard the story.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0010 7.83 But in Egypt the traditions of our own and other lands are by us registered for ever in our temples.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0011 7.815 The genealogies which you have recited to us out of your own annals, Solon, are a mere children's story.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0013 5.12 Solon marvelled, and desired to be informed of the particulars.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0014 9.565 Nine thousand years have elapsed since she founded yours, and eight thousand since she founded ours, as our annals record.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0015 6.815 Many laws exist among us which are the counterpart of yours as they were in the olden time.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0016 7.815 I will briefly describe them to you, and you shall read the account of them at your leisure in the sacred registers.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0017 9.73 Observe again, what care the law took in the pursuit of wisdom, searching out the deep things of the world, and applying them to the use of man.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0018 5.29 The most famous of them all was the overthrow of the island of Atlantis.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0020 6.125 This is the explanation of the shallows which are found in that part of the Atlantic ocean.
+2961-961-0005 3.775 Some poems of Solon were recited by the boys. 2961-961-0021 4.94 But I would not speak at the time, because I wanted to refresh my memory.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1837-0001 8.73 It was the first great sorrow of his life; it was not so much the loss of the cotton itself - but the fantasy, the hopes, the dreams built around it.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1837-0003 7.36 The revelation of his love lighted and brightened slowly till it flamed like a sunrise over him and left him in burning wonder.
+1995-1826-0008 2.895 Some others, too; big cotton county". 1995-1837-0004 6.36 He panted to know if she, too, knew, or knew and cared not, or cared and knew not.
+1995-1837-0005 2.635 She was so strange and human a creature. 1995-1837-0007 8.8 Then of a sudden, at midday, the sun shot out, hot and still; no breath of air stirred; the sky was like blue steel; the earth steamed.
+1995-1837-0009 3.76 The lagoon had been level with the dykes a week ago; and now? 1995-1837-0012 8.245 He splashed and stamped along, farther and farther onward until he neared the rampart of the clearing, and put foot upon the tree bridge.
+1995-1826-0003 3.09 Better go," he had counselled, sententiously. 1995-1837-0016 7.19 For one long moment he paused, stupid, agape with utter amazement, then leaned dizzily against a tree.
+1995-1837-0013 3.195 Then he looked down. The lagoon was dry. 1995-1837-0019 5.38 He sat down weak, bewildered, and one thought was uppermost - Zora!
+1995-1836-0007 3.435 But you believe in some education"? asked Mary Taylor. 1995-1837-0024 5.385 For a while she lay in her chair, in happy, dreamy pleasure at sun and bird and tree.
+1995-1836-0007 3.435 But you believe in some education"? asked Mary Taylor. 1995-1837-0025 9.505062 She rose with a fleeting glance, gathered the shawl round her, then gliding forward, wavering, tremulous, slipped across the road and into the swamp.
+1995-1837-0021 3.09 The hope and dream of harvest was upon the land. 1995-1837-0026 8.095 She had been born within its borders; within its borders she had lived and grown, and within its borders she had met her love.
+1995-1826-0003 3.09 Better go," he had counselled, sententiously. 1995-1837-0027 6.705 On she hurried until, sweeping down to the lagoon and the island, lo! the cotton lay before her!
+1995-1826-0025 3.295 Some time you'll tell me, please, won't you"? 1995-1837-0029 5.58 He darted through the trees and paused, a tall man strongly but slimly made.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0002 8.91 Rodolfo and his companions, with their faces muffled in their cloaks, stared rudely and insolently at the mother, the daughter, and the servant maid.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0005 5.645 Finally, the one party went off exulting, and the other was left in desolation and woe.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0006 8.045 Rodolfo arrived at his own house without any impediment, and Leocadia's parents reached theirs heart broken and despairing.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0007 5.825 Meanwhile Rodolfo had Leocadia safe in his custody, and in his own apartment.
+5639-40744-0011 2.665 She found the door, but it was locked outside. 5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me".
+5639-40744-0011 2.665 She found the door, but it was locked outside. 5639-40744-0012 8.595 She succeeded in opening the window; and the moonlight shone in so brightly, that she could distinguish the colour of some damask hangings in the room.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0013 6.865 She saw that the bed was gilded, and so rich, that it seemed that of a prince rather than of a private gentleman.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0014 7.72 Among other things on which she cast her eyes was a small crucifix of solid silver, standing on a cabinet near the window.
+5639-40744-0011 2.665 She found the door, but it was locked outside. 5639-40744-0016 9.49 On the contrary, he resolved to tell them, that repenting of his violence, and moved by her tears, he had only carried her half way towards his house, and then let her go.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0017 5.88 Choking with emotion, Leocadi made a sign to her parents that she wished to be alone with them.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0020 9.82 Thus did this humane and right minded father comfort his unhappy daughter; and her mother embracing her again did all she could to soothe her feelings.
+5639-40744-0011 2.665 She found the door, but it was locked outside. 5639-40744-0024 8.845 One day, when the boy was sent by his grandfather with a message to a relation, he passed along a street in which there was a great concourse of horsemen.
+5639-40744-0011 2.665 She found the door, but it was locked outside. 5639-40744-0025 8.785 The bed she too well remembered was there; and, above all, the cabinet, on which had stood the image she had taken away, was still on the same spot.
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0029 7.305 This truth which I have learned from her lips is confirmed by his face, in which we have both beheld that of our son".
+5639-40744-0010 4.12 It is the only amends I ask of you for the wrong you have done me". 5639-40744-0033 9.15 Her bearing was graceful and animated; she led her son by the hand, and before her walked two maids with wax lights and silver candlesticks.
+260-123440-0003 3.585 Oh! won't she be savage if I've kept her waiting"! 260-123440-0010 8.315 How cheerfully he seems to grin, How neatly spread his claws, And welcome little fishes in With gently smiling jaws"!
+260-123440-0003 3.585 Oh! won't she be savage if I've kept her waiting"! 260-123440-0011 4.87 No, I've made up my mind about it; if I'm Mabel, I'll stay down here!
+260-123288-0019 2.955 At noon the violence of the storm redoubles. 260-123440-0012 5.245 It'll be no use their putting their heads down and saying 'Come up again, dear!
+260-123286-0022 3.235 Two hours afterwards a terrible shock awoke me. 260-123440-0015 6.2 I wish I hadn't cried so much"! said Alice, as she swam about, trying to find her way out.
+260-123286-0024 3.04 There's a whale, a whale"! cried the Professor. 260-123440-0016 4.895 I shall be punished for it now, I suppose, by being drowned in my own tears!
+260-123288-0009 3.435 Those clouds seem as if they were going to crush the sea". 260-123440-0019 6.63 cried Alice again, for this time the Mouse was bristling all over, and she felt certain it must be really offended.
+260-123440-0018 3.64 I am very tired of swimming about here, O Mouse"! 260-123440-0020 4.995 We won't talk about her any more if you'd rather not". "We indeed"!
+2300-131720-0006 4.12 There seems no good reason for believing that it will change. 2300-131720-0000 5.08 The Paris plant, like that at the Crystal Palace, was a temporary exhibit.
+2300-131720-0014 3.75 mister Edison was a leader far ahead of the time. 2300-131720-0005 6.9 Why, if we erect a station at the falls, it is a great economy to get it up to the city.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0006 4.12 There seems no good reason for believing that it will change.
+2300-131720-0014 3.75 mister Edison was a leader far ahead of the time. 2300-131720-0008 9.125 Everything he has done has been aimed at the conservation of energy, the contraction of space, the intensification of culture.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0009 9.605 For some years it was not found feasible to operate motors on alternating current circuits, and that reason was often urged against it seriously.
+2300-131720-0006 4.12 There seems no good reason for believing that it will change. 2300-131720-0015 8.875 He obtained the desired speed and load with a friction brake; also regulator of speed; but waited for an indicator to verify it.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0024 4.77 But the plant ran, and it was the first three wire station in this country".
+2300-131720-0014 3.75 mister Edison was a leader far ahead of the time. 2300-131720-0027 8.62 Edison held that the electricity sold must be measured just like gas or water, and he proceeded to develop a meter.
+2300-131720-0014 3.75 mister Edison was a leader far ahead of the time. 2300-131720-0029 6.425 Hence the Edison electrolytic meter is no longer used, despite its excellent qualities.
+2300-131720-0006 4.12 There seems no good reason for believing that it will change. 2300-131720-0030 9.98 The principle employed in the Edison electrolytic meter is that which exemplifies the power of electricity to decompose a chemical substance.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0034 8.605 the others having been in operation too short a time to show definite results, although they also went quickly to a dividend basis.
+2300-131720-0014 3.75 mister Edison was a leader far ahead of the time. 2300-131720-0037 7.965 He weighed and reweighed the meter plates, and pursued every line of investigation imaginable, but all in vain.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0038 5.61 He felt he was up against it, and that perhaps another kind of a job would suit him better.
+2300-131720-0041 3.75 We had meters in which there were two bottles of liquid. 2300-131720-0040 5.455 We were more interested in the technical condition of the station than in the commercial part.
+908-157963-0002 2.755 why fades the lotus of the water? 908-31957-0002 4.79 I did not wrong myself so, but I placed A wrong on thee.
+908-157963-0018 4.255 And fearest thou because I vanish and am seen no more. 908-31957-0003 6.565 When called before, I told how hastily I dropped my flowers or brake off from a game.
+908-157963-0001 2.885 O life of this our spring! 908-31957-0005 4.49 Alas, I have grieved so I am hard to love.
+908-31957-0018 3.915 But thou art not such A lover, my Beloved! 908-31957-0006 5.89 Open thy heart wide, And fold within, the wet wings of thy dove.
+908-157963-0002 2.755 why fades the lotus of the water? 908-31957-0007 5.8 Could it mean To last, a love set pendulous between Sorrow and sorrow?
+908-157963-0029 3.63 Why a Tongue impressed with honey from every wind? 908-31957-0009 7.705 And, though I have grown serene And strong since then, I think that God has willed A still renewable fear...
+908-31957-0005 4.49 Alas, I have grieved so I am hard to love. 908-31957-0012 7.615 if he, to keep one oath, Must lose one joy, by his life's star foretold.
+908-157963-0002 2.755 why fades the lotus of the water? 908-31957-0013 6.18 Slow to world greetings, quick with its "O, list," When the angels speak.
+908-157963-0024 3.44 image of weakness, art thou but a Worm? 908-31957-0014 7.56 A ring of amethyst I could not wear here, plainer to my sight, Than that first kiss.
+908-31957-0005 4.49 Alas, I have grieved so I am hard to love. 908-31957-0016 6.48 Dearest, teach me so To pour out gratitude, as thou dost, good!
+908-31957-0018 3.915 But thou art not such A lover, my Beloved! 908-31957-0017 7.795 Mussulmans and Giaours Throw kerchiefs at a smile, and have no ruth For any weeping.
+908-157963-0002 2.755 why fades the lotus of the water? 908-31957-0019 9.54 thou canst wait Through sorrow and sickness, to bring souls to touch, And think it soon when others cry "Too late".
+908-157963-0013 4.315 And why it scatters its bright beauty thro the humid air. 908-31957-0020 5.895 I thank all who have loved me in their hearts, With thanks and love from mine.
+908-31957-0018 3.915 But thou art not such A lover, my Beloved! 908-31957-0023 8.515 I love thee freely, as men strive for Right; I love thee purely, as they turn from Praise.
+908-157963-0002 2.755 why fades the lotus of the water? 908-31957-0024 7.54 I love thee with the passion put to use In my old griefs, and with my childhood's faith.
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-41806-0001 8.31 To night there was no need of extra heat, and there were great ceremonies to be observed in lighting the fires on the hearthstones.
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-41806-0003 9.24 Kathleen waved the torch to and fro as she recited some beautiful lines written for some such purpose as that which called them together to night.
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-41806-0009 4.355 exclaimed Bill Harmon to his wife as they went through the lighted hall.
+4992-23283-0007 4.045 To ask any more questions of you, I believe, would be unfair. 4992-41806-0011 7.84 Mother Carey poured coffee, Nancy chocolate, and the others helped serve the sandwiches and cake, doughnuts and tarts.
+4992-23283-0016 4.495 Again he searched his own thoughts; nor ineffectually as before. 4992-41806-0012 6.73 At that moment the gentleman entered, bearing a huge object concealed by a piece of green felt.
+4992-41797-0016 3.3 They couldn't run nor move; they're just pasteboard". 4992-41806-0013 6.02 Approaching the dining table, he carefully placed the article in the centre and removed the cloth.
+7021-85628-0004 2.805 Yes, why not"? thought Anders. 7021-85628-0002 6.455 He was such a big boy that he wore high boots and carried a jack knife.
+7021-85628-0006 3.58 I am going to the court ball," answered Anders. 7021-85628-0005 5.015 Seeing that I am so fine, I may as well go and visit the King".
+7021-85628-0025 2.775 But his mother hugged him close. 7021-85628-0008 7.125 For, like as not, they must have thought him a prince when they saw his fine cap.
+7021-79759-0001 2.48 That is comparatively nothing. 7021-85628-0009 8.54 At the farther end of the largest hall a table was set with golden cups and golden plates in long rows.
+7021-85628-0019 3.255 With one jump Anders got out of his chair. 7021-85628-0010 8.015 On huge silver platters were pyramids of tarts and cakes, and red wine sparkled in glittering decanters.
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-85628-0011 8.995 The Princess sat down under a blue canopy with bouquets of roses; and she let Anders sit in a golden chair by her side.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-85628-0012 5.33 But you must not eat with your cap on your head," she said, and was going to take it off.
+7021-85628-0026 2.74 No, my little son," she said. 7021-85628-0016 4.28 That is a very fine cap you have," he said.
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-85628-0018 8.22 And it is made of mother's best yarn, and she knitted it herself, and everybody wants to get it away from me".
+7021-79740-0012 3.26 said she, pointing to the playthings; "see! 7021-85628-0020 6.45 He darted like an arrow through all the halls, down all the stairs, and across the yard.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-85628-0021 5.365 He still held on to it with both hands as he rushed into his mother's cottage.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-85628-0022 5.145 And all his brothers and sisters stood round and listened with their mouths open.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-85628-0023 9.03 But when his big brother heard that he had refused to give his cap for a King's golden crown, he said that Anders was a stupid.
+7021-85628-0019 3.255 With one jump Anders got out of his chair. 7021-85628-0027 8.5 If you dressed in silk and gold from top to toe, you could not look any nicer than in your little red cap".
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-134647-0000 8.53 The grateful applause of the clergy has consecrated the memory of a prince who indulged their passions and promoted their interest.
+4970-29095-0011 3.355 Does thee think thee could stand it six months? 4970-29095-0002 5.48 Well, mother," said the young student, looking up, with a shade of impatience.
+4970-29095-0006 4.47 Is thy father willing thee should go away to a school of the world's people"? 4970-29095-0004 9.61 I heard father tell cousin Abner that he was whipped so often for whistling when he was a boy that he was determined to have what compensation he could get now".
+4970-29095-0014 3.26 Where thee and thy family are known"? 4970-29095-0005 4.65 Thy ways greatly try me, Ruth, and all thy relations.
+4970-29093-0015 3.325 You can begin by carrying a rod, and putting down the figures. 4970-29095-0006 4.47 Is thy father willing thee should go away to a school of the world's people"?
+4970-29095-0014 3.26 Where thee and thy family are known"? 4970-29095-0009 5.6 Margaret Bolton almost lost for a moment her habitual placidity.
+4970-29095-0000 2.865 She was tired of other things. 4970-29095-0012 4.68 And, besides, suppose thee does learn medicine"?
+4970-29095-0014 3.26 Where thee and thy family are known"? 4970-29095-0016 6.945 Ruth sat quite still for a time, with face intent and flushed. It was out now.
+4970-29095-0011 3.355 Does thee think thee could stand it six months? 4970-29095-0022 4.765 Is thee going to the Yearly Meeting, Ruth"? asked one of the girls.
+4970-29093-0000 3.03 You'll never dig it out of the Astor Library". 4970-29095-0024 6.04 It has occupied mother a long time, to find at the shops the exact shade for her new bonnet.
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29095-0027 9.795 It's such a crush at the Yearly Meeting at Arch Street, and then there's the row of sleek looking young men who line the curbstone and stare at us as we come out.
+4970-29093-0008 3.58 He wanted to begin at the top of the ladder. 4970-29095-0030 4.67 Father, thee's unjust to Philip. He's going into business".
+4970-29095-0017 3.93 The sight seers returned in high spirits from the city. 4970-29095-0032 6.61 But Philip is honest, and he has talent enough, if he will stop scribbling, to make his way.
+4970-29093-0008 3.58 He wanted to begin at the top of the ladder. 4970-29095-0034 5.81 Why should I rust, and be stupid, and sit in inaction because I am a girl?
+4970-29095-0011 3.355 Does thee think thee could stand it six months? 4970-29095-0035 4.75 And if I had a fortune, would thee want me to lead a useless life"?
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29095-0036 5.25 Has thee consulted thy mother about a career, I suppose it is a career thee wants"?
+4970-29093-0000 3.03 You'll never dig it out of the Astor Library". 4970-29095-0037 6.885 But that wise and placid woman understood the sweet rebel a great deal better than Ruth understood herself.
+4970-29093-0000 3.03 You'll never dig it out of the Astor Library". 4970-29095-0038 8.74 Ruth was glad to hear that Philip had made a push into the world, and she was sure that his talent and courage would make a way for him.
+121-127105-0032 3.17 Yes, but that's just the beauty of her passion". 121-127105-0000 9.875 It was this observation that drew from Douglas not immediately, but later in the evening a reply that had the interesting consequence to which I call attention.
+121-127105-0018 2.77 cried the ladies whose departure had been fixed. 121-127105-0001 5.025 Someone else told a story not particularly effective, which I saw he was not following.
+121-127105-0032 3.17 Yes, but that's just the beauty of her passion". 121-127105-0002 7.495 cried one of the women. He took no notice of her; he looked at me, but as if, instead of me, he saw what he spoke of.
+121-127105-0036 4.15 But was that all her reward"? one of the ladies asked. 121-127105-0003 7.725 There was a unanimous groan at this, and much reproach; after which, in his preoccupied way, he explained.
+121-127105-0032 3.17 Yes, but that's just the beauty of her passion". 121-127105-0005 5.82 I could write to my man and enclose the key; he could send down the packet as he finds it".
+121-127105-0018 2.77 cried the ladies whose departure had been fixed. 121-127105-0006 4.725 The others resented postponement, but it was just his scruples that charmed me.
+121-127105-0036 4.15 But was that all her reward"? one of the ladies asked. 121-127105-0007 5.79 To this his answer was prompt. "Oh, thank God, no"! "And is the record yours?
+121-127105-0010 2.85 She sent me the pages in question before she died". 121-127105-0011 5.78 She was the most agreeable woman I've ever known in her position; she would have been worthy of any whatever.
+121-127105-0010 2.85 She sent me the pages in question before she died". 121-127105-0012 4.83 It wasn't simply that she said so, but that I knew she hadn't. I was sure; I could see.
+121-127105-0010 2.85 She sent me the pages in question before she died". 121-127105-0013 5.895 You'll easily judge why when you hear". "Because the thing had been such a scare"? He continued to fix me.
+121-127105-0036 4.15 But was that all her reward"? one of the ladies asked. 121-127105-0022 5.075 Well, if I don't know who she was in love with, I know who he was".
+121-127105-0018 2.77 cried the ladies whose departure had been fixed. 121-127105-0026 7.53 The first of these touches conveyed that the written statement took up the tale at a point after it had, in a manner, begun.
+121-127105-0018 2.77 cried the ladies whose departure had been fixed. 121-127105-0028 6.75 The awkward thing was that they had practically no other relations and that his own affairs took up all his time.
+121-127105-0015 2.96 He quitted the fire and dropped back into his chair. 121-127105-0029 7.31 There were plenty of people to help, but of course the young lady who should go down as governess would be in supreme authority.
+121-127105-0036 4.15 But was that all her reward"? one of the ladies asked. 121-127105-0034 7.41 It sounded dull it sounded strange; and all the more so because of his main condition". "Which was-"?
+121-127105-0008 2.76 He hung fire again. "A woman's. 121-127105-0036 4.15 But was that all her reward"? one of the ladies asked.
+260-123288-0012 3.545 That will be safest". "No, no! Never"! 260-123286-0000 7.04 Saturday, august fifteenth. - The sea unbroken all round. No land in sight.
+260-123286-0012 2.43 But there seemed no reason to fear. 260-123286-0002 9.985 All my danger and sufferings were needed to strike a spark of human feeling out of him; but now that I am well his nature has resumed its sway.
+260-123440-0005 3.105 And yesterday things went on just as usual. 260-123286-0003 7.37 You seem anxious, my uncle," I said, seeing him continually with his glass to his eye. "Anxious!
+260-123286-0024 3.04 There's a whale, a whale"! cried the Professor. 260-123286-0005 4.81 I am not complaining that the rate is slow, but that the sea is so wide".
+260-123288-0019 2.955 At noon the violence of the storm redoubles. 260-123286-0006 7.405 We are losing time, and the fact is, I have not come all this way to take a little sail upon a pond on a raft".
+260-123288-0019 2.955 At noon the violence of the storm redoubles. 260-123286-0007 4.55 He called this sea a pond, and our long voyage, taking a little sail!
+260-123286-0022 3.235 Two hours afterwards a terrible shock awoke me. 260-123286-0009 5.795 I take this as my answer, and I leave the Professor to bite his lips with impatience.
+260-123286-0001 3.07 The horizon seems extremely distant. 260-123286-0011 4.255 Nothing new. Weather unchanged. The wind freshens.
+260-123286-0024 3.04 There's a whale, a whale"! cried the Professor. 260-123286-0013 4.73 The shadow of the raft was clearly outlined upon the surface of the waves.
+260-123440-0018 3.64 I am very tired of swimming about here, O Mouse"! 260-123286-0015 5.21 It must be as wide as the Mediterranean or the Atlantic - and why not?
+260-123288-0019 2.955 At noon the violence of the storm redoubles. 260-123286-0016 7 These thoughts agitated me all day, and my imagination scarcely calmed down after several hours' sleep.
+260-123440-0006 2.715 I wonder if I've been changed in the night? 260-123286-0018 5.67 I saw at the Hamburg museum the skeleton of one of these creatures thirty feet in length.
+260-123288-0009 3.435 Those clouds seem as if they were going to crush the sea". 260-123286-0023 5.875 The raft was heaved up on a watery mountain and pitched down again, at a distance of twenty fathoms.
+260-123286-0024 3.04 There's a whale, a whale"! cried the Professor. 260-123286-0025 9.205 Flight was out of the question now. The reptiles rose; they wheeled around our little raft with a rapidity greater than that of express trains.
+260-123288-0020 2.9 Each of us is lashed to some part of the raft. 260-123286-0026 6.94 Two monsters only were creating all this commotion; and before my eyes are two reptiles of the primitive world.
+260-123286-0022 3.235 Two hours afterwards a terrible shock awoke me. 260-123286-0027 7.17 I can distinguish the eye of the ichthyosaurus glowing like a red hot coal, and as large as a man's head.
+260-123286-0024 3.04 There's a whale, a whale"! cried the Professor. 260-123286-0029 4.545 Those huge creatures attacked each other with the greatest animosity.
+260-123440-0005 3.105 And yesterday things went on just as usual. 260-123286-0030 7.53 Suddenly the ichthyosaurus and the plesiosaurus disappear below, leaving a whirlpool eddying in the water.
+260-123288-0022 3.705 They seem to be 'We are lost'; but I am not sure. 260-123286-0031 5.06 As for the ichthyosaurus - has he returned to his submarine cavern?
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0000 8.23 And often has my mother said, While on her lap I laid my head, She feared for time I was not made, But for Eternity.
+3575-170457-0032 3.03 Come, come. I am getting really tired of your absence. 3575-170457-0003 7.595 Surely, it must be because we are in danger of loving each other too well - of losing sight of the Creator in idolatry of the creature.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0005 7.34 She, a Tory and clergyman's daughter, was always in a minority of one in our house of violent Dissent and Radicalism.
+3575-170457-0052 3 She had another weight on her mind this Christmas. 3575-170457-0006 8.3 Her feeble health gave her her yielding manner, for she could never oppose any one without gathering up all her strength for the struggle.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0007 7.775 He spoke French perfectly, I have been told, when need was; but delighted usually in talking the broadest Yorkshire.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0010 4.79 I am not depreciating it when I say that in these times it is not rare.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0011 7.015 But it is not with a view to distinction that you should cultivate this talent, if you consult your own happiness.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0012 5.850062 You will say that a woman has no need of such a caution; there can be no peril in it for her.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0013 9.175 The more she is engaged in her proper duties, the less leisure will she have for it, even as an accomplishment and a recreation.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0014 6.68 To those duties you have not yet been called, and when you are you will be less eager for celebrity.
+3575-170457-0004 3.105 We used to dispute about politics and religion. 3575-170457-0019 6.155 I had not ventured to hope for such a reply; so considerate in its tone, so noble in its spirit.
+3575-170457-0056 3.370062 I doubt whether Branwell was maintaining himself at this time. 3575-170457-0020 8.645 I know the first letter I wrote to you was all senseless trash from beginning to end; but I am not altogether the idle dreaming being it would seem to denote.
+3575-170457-0032 3.03 Come, come. I am getting really tired of your absence. 3575-170457-0021 4.18 I thought it therefore my duty, when I left school, to become a governess.
+3575-170457-0004 3.105 We used to dispute about politics and religion. 3575-170457-0022 5.825 In the evenings, I confess, I do think, but I never trouble any one else with my thoughts.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0023 9.095 I carefully avoid any appearance of preoccupation and eccentricity, which might lead those I live amongst to suspect the nature of my pursuits.
+3575-170457-0034 3.495 in this monotonous life of mine, that was a pleasant event. 3575-170457-0025 9.205 Again I thank you. This incident, I suppose, will be renewed no more; if I live to be an old woman, I shall remember it thirty years hence as a bright dream.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0027 4.58 I cannot deny myself the gratification of inserting Southey's reply:
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0029 6.055 Your letter has given me great pleasure, and I should not forgive myself if I did not tell you so.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0030 8.945063 Of this second letter, also, she spoke, and told me that it contained an invitation for her to go and see the poet if ever she visited the Lakes.
+3575-170457-0021 4.18 I thought it therefore my duty, when I left school, to become a governess. 3575-170457-0033 8.5 Saturday after Saturday comes round, and I can have no hope of hearing your knock at the door, and then being told that 'Miss E. is come'. Oh, dear!
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0035 9.37 I wish it would recur again; but it will take two or three interviews before the stiffness - the estrangement of this long separation - will wear away".
+3575-170457-0034 3.495 in this monotonous life of mine, that was a pleasant event. 3575-170457-0040 6.905 Indeed, there were only one or two strangers who could be admitted among the sisters without producing the same result.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0044 9.72 After this disappointment, I never dare reckon with certainty on the enjoyment of a pleasure again; it seems as if some fatality stood between you and me.
+3575-170457-0001 2.99 Why are we to be denied each other's society? 3575-170457-0045 6.52 I am not good enough for you, and you must be kept from the contamination of too intimate society.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0047 6.525 Tabby had lived with them for ten or twelve years, and was, as Charlotte expressed it, "one of the family".
+3575-170457-0052 3 She had another weight on her mind this Christmas. 3575-170457-0048 5.555 He refused at first to listen to the careful advice; it was repugnant to his liberal nature.
+3575-170457-0049 2.715 This decision was communicated to the girls. 3575-170457-0050 6.405 Tabby had tended them in their childhood; they, and none other, should tend her in her infirmity and age.
+3575-170457-0056 3.370062 I doubt whether Branwell was maintaining himself at this time. 3575-170457-0051 4.915 At tea time, they were sad and silent, and the meal went away untouched by any of the three.
+3575-170457-0031 4 On august twenty seventh, eighteen thirty seven, she writes: 3575-170457-0054 8.005 Stung by anxiety for this little sister, she upbraided Miss W -- for her fancied indifference to Anne's state of health.
+4970-29093-0008 3.58 He wanted to begin at the top of the ladder. 4970-29093-0007 6.995 It is such a noble ambition, that it is a pity it has usually such a shallow foundation.
+4970-29095-0011 3.355 Does thee think thee could stand it six months? 4970-29093-0009 9.12 Philip therefore read diligently in the Astor library, planned literary works that should compel attention, and nursed his genius.
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29093-0012 8.71 But Philip did afford it, and he wrote, thanking his friends, and declining because he said the political scheme would fail, and ought to fail.
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29093-0013 8.01 And he went back to his books and to his waiting for an opening large enough for his dignified entrance into the literary world.
+4970-29095-0008 3.04 Mother, I'm going to study medicine"? 4970-29093-0014 4.275 Well, I'm going as an engineer. You can go as one".
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29093-0018 9.715 The two young men who were by this time full of the adventure, went down to the Wall street office of Henry's uncle and had a talk with that wily operator.
+4970-29093-0015 3.325 You can begin by carrying a rod, and putting down the figures. 4970-29093-0019 7.47 The night was spent in packing up and writing letters, for Philip would not take such an important step without informing his friends.
+4970-29093-0004 3.75 He was unable to decide exactly what it should be. 4970-29093-0020 5.58 Why, it's in Missouri somewhere, on the frontier I think. We'll get a map".
+4970-29093-0017 2.865 I've been ready to go anywhere for six months. 4970-29093-0022 6.22 He knew his uncle would be glad to hear that he had at last turned his thoughts to a practical matter.
+4970-29095-0011 3.355 Does thee think thee could stand it six months? 4970-29093-0023 8.07 He well knew the perils of the frontier, the savage state of society, the lurking Indians and the dangers of fever.
+1284-1181-0019 3.2 I now use them as ornamental statuary in my garden. 1284-1180-0000 8.12 He wore blue silk stockings, blue knee pants with gold buckles, a blue ruffled waist and a jacket of bright blue braided with gold.
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1180-0001 7.755 His hat had a peaked crown and a flat brim, and around the brim was a row of tiny golden bells that tinkled when he moved.
+1284-1181-0021 2.7 asked the voice, in scornful accents. 1284-1180-0002 7.68 Instead of shoes, the old man wore boots with turnover tops and his blue coat had wide cuffs of gold braid.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0003 4.835 For a long time he had wished to explore the beautiful Land of Oz in which they lived.
+1284-1180-0014 3.665 Ojo had never eaten such a fine meal in all his life. 1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1180-0005 6.55 No one would disturb their little house, even if anyone came so far into the thick forest while they were gone.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0006 6.865 At the foot of the mountain that separated the Country of the Munchkins from the Country of the Gillikins, the path divided.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0007 6.265 He knew it would take them to the house of the Crooked Magician, whom he had never seen but who was their nearest neighbor.
+1284-1180-0014 3.665 Ojo had never eaten such a fine meal in all his life. 1284-1180-0009 6.285 Then they started on again and two hours later came in sight of the house of doctor Pipt.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1180-0010 8.635 Unc knocked at the door of the house and a chubby, pleasant faced woman, dressed all in blue, opened it and greeted the visitors with a smile.
+1284-1180-0014 3.665 Ojo had never eaten such a fine meal in all his life. 1284-1180-0011 4.275 I am, my dear, and all strangers are welcome to my home".
+1284-1180-0011 4.275 I am, my dear, and all strangers are welcome to my home". 1284-1180-0012 4.88 We have come from a far lonelier place than this". "A lonelier place!
+1284-1180-0022 2.885 I'm afraid I don't know much about the Land of Oz. 1284-1180-0015 5.835 We are traveling," replied Ojo, "and we stopped at your house just to rest and refresh ourselves.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0020 5.87 The first lot we tested on our Glass Cat, which not only began to live but has lived ever since.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1180-0021 9.84 I think the next Glass Cat the Magician makes will have neither brains nor heart, for then it will not object to catching mice and may prove of some use to us".
+1284-1180-0022 2.885 I'm afraid I don't know much about the Land of Oz. 1284-1180-0023 5.61 You see, I've lived all my life with Unc Nunkie, the Silent One, and there was no one to tell me anything".
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1180-0024 5.26 That is one reason you are Ojo the Unlucky," said the woman, in a sympathetic tone.
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1180-0025 8.705 I think I must show you my Patchwork Girl," said Margolotte, laughing at the boy's astonishment, "for she is rather difficult to explain.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0026 8.29 But first I will tell you that for many years I have longed for a servant to help me with the housework and to cook the meals and wash the dishes.
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1180-0028 6.045 A bed quilt made of patches of different kinds and colors of cloth, all neatly sewed together.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1180-0029 5.335 Sometimes it is called a 'crazy quilt,' because the patches and colors are so mixed up.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1180-0031 4.825 At the Emerald City, where our Princess Ozma lives, green is the popular color.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1180-0032 5.78 I will show you what a good job I did," and she went to a tall cupboard and threw open the doors.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0001 5.675 The utility of consumption as an evidence of wealth is to be classed as a derivative growth.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0004 5.33 In the nature of things, luxuries and the comforts of life belong to the leisure class.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0005 8.405 Under the tabu, certain victuals, and more particularly certain beverages, are strictly reserved for the use of the superior class.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0008 9.495 The consumption of luxuries, in the true sense, is a consumption directed to the comfort of the consumer himself, and is, therefore, a mark of the master.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5694-0013 5.61 This differentiation is furthered by the inheritance of wealth and the consequent inheritance of gentility.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0015 8.435 So many of them, however, as make up the retainer and hangers on of the patron may be classed as vicarious consumer without qualification.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5694-0017 8.335 The wearing of uniforms or liveries implies a considerable degree of dependence, and may even be said to be a mark of servitude, real or ostensible.
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5694-0018 7.815 The wearers of uniforms and liveries may be roughly divided into two classes the free and the servile, or the noble and the ignoble.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it.
+8463-287645-0010 4.325 He worked me very hard; he wanted to be beating me all the time". 8463-294828-0001 9.19 THREE SECONDS before the arrival of JB Hobson's letter, I no more dreamed of chasing the unicorn than of trying for the Northwest Passage.
+8463-287645-0014 3.02 of starting. I didn't know the way to come. 8463-294828-0002 6.19 Even so, I had just returned from an arduous journey, exhausted and badly needing a rest.
+8463-294828-0021 2.735 A route slightly less direct, that's all. 8463-294828-0003 9.34 I wanted nothing more than to see my country again, my friends, my modest quarters by the Botanical Gardens, my dearly beloved collections!
+8463-294828-0026 2.745 We have a commander who's game for anything"! 8463-294828-0006 7.32 From rubbing shoulders with scientists in our little universe by the Botanical Gardens, the boy had come to know a thing or two.
+8463-294828-0026 2.745 We have a commander who's game for anything"! 8463-294828-0009 4.17 Not once did he comment on the length or the hardships of a journey.
+8463-287645-0009 3.71 I never knew of but one man who could ever please him. 8463-294828-0010 8.34 Never did he object to buckling up his suitcase for any country whatever, China or the Congo, no matter how far off it was.
+8463-294828-0011 3.91 He went here, there, and everywhere in perfect contentment. 8463-294828-0012 4.905 Please forgive me for this underhanded way of admitting I had turned forty.
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-294828-0013 7.2 He was a fanatic on formality, and he only addressed me in the third person to the point where it got tiresome.
+8463-287645-0009 3.71 I never knew of but one man who could ever please him. 8463-294828-0014 5.725 There was good reason to stop and think, even for the world's most emotionless man.
+8463-294828-0005 2.44 Conseil was my manservant. 8463-294828-0015 4.88 Conseil"! I called a third time. Conseil appeared.
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-294828-0017 9.3 Pack as much into my trunk as you can, my traveling kit, my suits, shirts, and socks, don't bother counting, just squeeze it all in and hurry"!
+8463-294825-0008 3.98 But much of the novel's brooding power comes from Captain Nemo. 8463-294828-0019 4.53 Anyhow, we'll leave instructions to ship the whole menagerie to France".
+8463-287645-0001 3.545 It is hardly necessary to say more of them here. 8463-294828-0020 5.915 Yes, we are... certainly...," I replied evasively, "but after we make a detour".
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-294828-0023 4.745 You see, my friend, it's an issue of the monster, the notorious narwhale.
+8463-294828-0026 2.745 We have a commander who's game for anything"! 8463-294828-0027 5.98 I left instructions for shipping my containers of stuffed animals and dried plants to Paris, France.
+8463-294828-0034 3.505 We'll be quite comfortable here," I told Conseil. 8463-294828-0028 7.915 I opened a line of credit sufficient to cover the babirusa and, Conseil at my heels, I jumped into a carriage.
+8463-294828-0011 3.91 He went here, there, and everywhere in perfect contentment. 8463-294828-0029 5.285 Our baggage was immediately carried to the deck of the frigate. I rushed aboard.
+8463-294828-0026 2.745 We have a commander who's game for anything"! 8463-294828-0031 7.765 One of the sailors led me to the afterdeck, where I stood in the presence of a smart looking officer who extended his hand to me.
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-294828-0032 4.395 In person. Welcome aboard, professor. Your cabin is waiting for you".
+8463-294825-0008 3.98 But much of the novel's brooding power comes from Captain Nemo. 8463-294828-0033 6.365 I was well satisfied with my cabin, which was located in the stern and opened into the officers' mess.
+8463-294828-0009 4.17 Not once did he comment on the length or the hardships of a journey. 8463-294828-0036 6.985 The wharves of Brooklyn, and every part of New York bordering the East River, were crowded with curiosity seekers.
+7127-75947-0008 4.155 The arrow pierced his heart and wounded him mortally. 7127-75947-0001 6.64 Upon this Madame deigned to turn her eyes languishingly towards the comte, observing.
+7127-75947-0002 3.235 Do you think so"? she replied with indifference. 7127-75947-0003 5.98 Yes; the character which your royal highness assumed is in perfect harmony with your own".
+7127-75946-0025 3.96 The ballet began; the effect was more than beautiful. 7127-75947-0007 5.46 She then rose, humming the air to which she was presently going to dance.
+7127-75946-0005 2.67 What do you mean"? inquired Louis, 7127-75947-0008 4.155 The arrow pierced his heart and wounded him mortally.
+7127-75947-0002 3.235 Do you think so"? she replied with indifference. 7127-75947-0010 8.865 When she perceived the young man, she rose, like a woman surprised in the midst of ideas she was desirous of concealing from herself.
+7127-75946-0005 2.67 What do you mean"? inquired Louis, 7127-75947-0013 5.045 I remember now, and I congratulate myself. Do you love any one"?
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75947-0015 6.26 There cannot be a doubt he received you kindly, for, in fact, you returned without his permission".
+7127-75946-0010 3.6 Your majesty's plan, then, in this affair, is 7127-75947-0016 7.48 Oh! mademoiselle, why have I not a devoted sister, or a true friend, such as yourself"?
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75947-0024 7.33 Look yonder, do you not see the moon slowly rising, silvering the topmost branches of the chestnuts and the oaks.
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75947-0025 5.57 exquisite soft turf of the woods, the happiness which your friendship confers upon me!
+7127-75946-0025 3.96 The ballet began; the effect was more than beautiful. 7127-75947-0028 7.46 Quick, quick, then, among the high reed grass," said Montalais; "stoop, Athenais, you are so tall".
+7127-75946-0025 3.96 The ballet began; the effect was more than beautiful. 7127-75947-0029 5.285 The young girls had, indeed, made themselves small - indeed invisible.
+7127-75947-0019 3.875 Did not the dancing amuse you"? "No". 7127-75947-0032 4.745 Yes; but perhaps I frightened her". "In what way"?
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75947-0035 4.415 Good gracious! has the king any right to interfere in matters of that kind?
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75947-0037 8.824938 Oh! I am speaking seriously," replied Montalais, "and my opinion in this case is quite as good as the king's, I suppose; is it not, Louise"?
+121-121726-0011 4.035 HUSBAND The next thing to a wife. 121-123859-0004 9.505 So I return rebuked to my content, And gain by ill thrice more than I have spent.
+908-31957-0005 4.49 Alas, I have grieved so I am hard to love. 908-157963-0005 7.035 Like the doves voice, like transient day, like music in the air: Ah!
+908-157963-0009 4.06 Why should the mistress of the vales of Har, utter a sigh. 908-157963-0006 8.11 And gentle sleep the sleep of death, and gently hear the voice Of him that walketh in the garden in the evening time.
+908-157963-0029 3.63 Why a Tongue impressed with honey from every wind? 908-157963-0009 4.06 Why should the mistress of the vales of Har, utter a sigh.
+908-31957-0018 3.915 But thou art not such A lover, my Beloved! 908-157963-0010 6.28 She ceasd and smiled in tears, then sat down in her silver shrine.
+908-157963-0018 4.255 And fearest thou because I vanish and am seen no more. 908-157963-0013 4.315 And why it scatters its bright beauty thro the humid air.
+908-157963-0018 4.255 And fearest thou because I vanish and am seen no more. 908-157963-0014 4.52 Descend O little cloud and hover before the eyes of Thel.
+908-31957-0018 3.915 But thou art not such A lover, my Beloved! 908-157963-0016 5.105 I pass away, yet I complain, and no one hears my voice.
+908-157963-0013 4.315 And why it scatters its bright beauty thro the humid air. 908-157963-0017 4.95 The Cloud then shewd his golden head and his bright form emerged.
+908-157963-0003 3.08 Why fade these children of the spring? 908-157963-0018 4.255 And fearest thou because I vanish and am seen no more.
+908-157963-0024 3.44 image of weakness, art thou but a Worm? 908-157963-0020 9.8 Till we arise linked in a golden band and never part: But walk united bearing food to all our tender flowers.
+908-157963-0013 4.315 And why it scatters its bright beauty thro the humid air. 908-157963-0022 4.61 Come forth worm and the silent valley, to thy pensive queen.
+908-157963-0002 2.755 why fades the lotus of the water? 908-157963-0023 9.625 The helpless worm arose and sat upon the Lillys leaf, And the bright Cloud saild on, to find his partner in the vale.
+908-157963-0024 3.44 image of weakness, art thou but a Worm? 908-157963-0025 9.265 I see they lay helpless and naked: weeping And none to answer, none to cherish thee with mothers smiles.
+908-157963-0029 3.63 Why a Tongue impressed with honey from every wind? 908-157963-0026 8.1 And says; Thou mother of my children, I have loved thee And I have given thee a crown that none can take away.
+908-157963-0024 3.44 image of weakness, art thou but a Worm? 908-157963-0027 5.225 And lay me down in thy cold bed, and leave my shining lot.
+908-157963-0003 3.08 Why fade these children of the spring? 908-157963-0028 4.955 Or an Eye of gifts and graces showring fruits and coined gold!
+908-157963-0024 3.44 image of weakness, art thou but a Worm? 908-157963-0030 4.52 Why an Ear, a whirlpool fierce to draw creations in?
+4446-2271-0003 3.7 It's been on only two weeks, and I've been half a dozen times already. 4446-2271-0001 6.35 He had preconceived ideas about everything, and his idea about Americans was that they should be engineers or mechanics.
+4446-2275-0005 4.445 I felt it in my bones when I woke this morning that something splendid was going to turn up. 4446-2271-0008 5.495 Irene Burgoyne, one of her family, told me in confidence that there was a romance somewhere back in the beginning.
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2271-0009 7.82 Mainhall vouched for her constancy with a loftiness that made Alexander smile, even while a kind of rapid excitement was tingling through him.
+4446-2273-0009 4.015 It's not particularly rare," she said, "but some of it was my mother's. 4446-2271-0013 4.4 Do you know, I thought the dance a bit conscious to night, for the first time.
+4446-2273-0002 3.295 Lamb wouldn't care a great deal about many of them, I fancy". 4446-2271-0014 5.34 Westmere and I were back after the first act, and we thought she seemed quite uncertain of herself.
+4446-2273-0033 3.3 For a long time neither Hilda nor Bartley spoke. 4446-2271-0018 5.715 She considered a moment and then said "No, I think not, though I am glad you ask me.
+4446-2275-0045 2.635 We've tortured each other enough for tonight. 4446-2271-0020 7.55 Of course," he reflected, "she always had that combination of something homely and sensible, and something utterly wild and daft.
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2273-0000 8.995 Hilda was very nice to him, and he sat on the edge of his chair, flushed with his conversational efforts and moving his chin about nervously over his high collar.
+4446-2273-0002 3.295 Lamb wouldn't care a great deal about many of them, I fancy". 4446-2273-0001 4.66 They asked him to come to see them in Chelsea, and they spoke very tenderly of Hilda.
+4446-2273-0002 3.295 Lamb wouldn't care a great deal about many of them, I fancy". 4446-2273-0003 7.835 When Bartley arrived at Bedford Square on Sunday evening, Marie, the pretty little French girl, met him at the door and conducted him upstairs.
+4446-2275-0022 3.28 But why didn't you tell me when you were here in the summer"? 4446-2273-0004 5.435 I should never have asked you if Molly had been here, for I remember you don't like English cookery".
+4446-2273-0034 3.59 He felt a tremor run through the slender yellow figure in front of him. 4446-2273-0005 4.125 I haven't had a chance yet to tell you what a jolly little place I think this is.
+4446-2273-0002 3.295 Lamb wouldn't care a great deal about many of them, I fancy". 4446-2273-0008 7.715 I've managed to save something every year, and that with helping my three sisters now and then, and tiding poor Cousin Mike over bad seasons.
+4446-2271-0013 4.4 Do you know, I thought the dance a bit conscious to night, for the first time. 4446-2273-0009 4.015 It's not particularly rare," she said, "but some of it was my mother's.
+4446-2271-0000 3.495 Mainhall liked Alexander because he was an engineer. 4446-2273-0015 4.505 Don't I, though! I'm so sorry to hear it. How did her son turn out?
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2273-0016 9.645 Her hair is still like flax, and her blue eyes are just like a baby's, and she has the same three freckles on her little nose, and talks about going back to her bains de mer".
+4446-2275-0015 2.98 He pulled up a window as if the air were heavy. 4446-2273-0021 5.255 What she wanted from us was neither our flowers nor our francs, but just our youth.
+4446-2271-0013 4.4 Do you know, I thought the dance a bit conscious to night, for the first time. 4446-2273-0022 5.865 They were both remembering what the woman had said when she took the money: "God give you a happy love"!
+4446-2273-0012 2.98 Thank you. But I don't like it so well as this". 4446-2273-0023 6.1 The strange woman, and her passionate sentence that rang out so sharply, had frightened them both.
+4446-2271-0024 3.16 I shouldn't wonder if she could laugh about it with me now. 4446-2273-0024 4.825 Bartley started when Hilda rang the little bell beside her. "Dear me, why did you do that?
+4446-2271-0011 3.945 Sir Harry Towne, mister Bartley Alexander, the American engineer". 4446-2273-0025 4.83 It was very jolly," he murmured lazily, as Marie came in to take away the coffee.
+4446-2271-0013 4.4 Do you know, I thought the dance a bit conscious to night, for the first time. 4446-2273-0028 5.405 Nonsense. Of course I can't really sing, except the way my mother and grandmother did before me.
+4446-2273-0011 2.79 There is nothing else that looks so jolly". 4446-2273-0032 7.835 He stood a little behind her, and tried to steady himself as he said: "It's soft and misty. See how white the stars are".
+4446-2271-0012 3.78 I say, Sir Harry, the little girl's going famously to night, isn't she"? 4446-2273-0035 6.15 Bartley leaned over her shoulder, without touching her, and whispered in her ear: "You are giving me a chance"? "Yes.
+1188-133604-0013 3.02 It must, remember, be one or the other. 1188-133604-0001 9.04 They unite every quality; and sometimes you will find me referring to them as colorists, sometimes as chiaroscurists.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0005 8.56 It is the head of a parrot with a little flower in his beak from a picture of Carpaccio's, one of his series of the Life of Saint George.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0010 6.095 But in this vignette, copied from Turner, you have the two principles brought out perfectly.
+1188-133604-0040 3.23 The crampness and the poverty are all intended. 1188-133604-0014 4.39 Do not, therefore, think that the Gothic school is an easy one.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0017 4.615 That a style is restrained or severe does not mean that it is also erroneous.
+1188-133604-0014 4.39 Do not, therefore, think that the Gothic school is an easy one. 1188-133604-0022 9.63 You must look at him in the face - fight him - conquer him with what scathe you may: you need not think to keep out of the way of him.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0025 7.45 You know I have just been telling you how this school of materialism and clay involved itself at last in cloud and fire.
+1188-133604-0040 3.23 The crampness and the poverty are all intended. 1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint".
+1188-133604-0006 2.4 Then he comes to the beak of it. 1188-133604-0033 6.625 Every plant in the grass is set formally, grows perfectly, and may be realized completely.
+1188-133604-0014 4.39 Do not, therefore, think that the Gothic school is an easy one. 1188-133604-0036 7.97 In both these high mythical subjects the surrounding nature, though suffering, is still dignified and beautiful.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0038 5.365 But now here is a subject of which you will wonder at first why Turner drew it at all.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0039 6.625 It has no beauty whatsoever, no specialty of picturesqueness; and all its lines are cramped and poor.
+1188-133604-0031 4.25 There's one, and there's another - the "Dudley" and the "Flint". 1188-133604-0043 4.885 See that your lives be in nothing worse than a boy's climbing for his entangled kite.
+7729-102255-0000 3.285 The bogus Legislature numbered thirty six members. 7729-102255-0002 8.3 That summer's emigration, however, being mainly from the free States, greatly changed the relative strength of the two parties.
+7729-102255-0034 2.71 To their sorrow they were soon undeceived. 7729-102255-0005 5.18 This was a formidable array of advantages; slavery was playing with loaded dice.
+7729-102255-0013 2.675 It was, in fact, the best weapon of its day. 7729-102255-0010 8.54 Of the lynchings, the mobs, and the murders, it would be impossible, except in a very extended work, to note the frequent and atrocious details.
+7729-102255-0034 2.71 To their sorrow they were soon undeceived. 7729-102255-0012 4.075 Several hundred free State men promptly responded to the summons.
+7729-102255-0034 2.71 To their sorrow they were soon undeceived. 7729-102255-0014 5.295 The leaders of the conspiracy became distrustful of their power to crush the town.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0021 7.93 But the affair was magnified as a crowning proof that the free State men were insurrectionists and outlaws.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0023 5.5 Their distinctive characters, however, display one broad and unfailing difference.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0025 5.485 Their assumed character changed with their changing opportunities or necessities.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0028 9.6 Private persons who had leased the Free State Hotel vainly besought the various authorities to prevent the destruction of their property.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0029 7.06 Ten days were consumed in these negotiations; but the spirit of vengeance refused to yield.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0030 7.25 He summoned half a dozen citizens to join his posse, who followed, obeyed, and assisted him.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0031 6.75 He continued his pretended search and, to give color to his errand, made two arrests.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0033 6.775 As he had promised to protect the hotel, the reassured citizens began to laugh at their own fears.
+7729-102255-0034 2.71 To their sorrow they were soon undeceived. 7729-102255-0035 5.625 The military force, partly rabble, partly organized, had meanwhile moved into the town.
+7729-102255-0012 4.075 Several hundred free State men promptly responded to the summons. 7729-102255-0036 7.705 He planted a company before the hotel, and demanded a surrender of the arms belonging to the free- State military companies.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0038 7.92 Atchison, who had been haranguing the mob, planted his two guns before the building and trained them upon it.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0039 6.815 The inmates being removed, at the appointed hour a few cannon balls were fired through the stone walls.
+7729-102255-0001 3.45 This was at the March election, eighteen fifty five. 7729-102255-0045 6.805 Captain Martin said: 'I shall give you a pistol to help protect yourself if worse comes to worst!
+3570-5694-0022 4.295 The livery becomes obnoxious to nearly all who are required to wear it. 3570-5695-0000 4.83 In a general way, though not wholly nor consistently, these two groups coincide.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5695-0002 7.805 But as we descend the social scale, the point is presently reached where the duties of vicarious leisure and consumption devolve upon the wife alone.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5695-0003 5.355 In the communities of the Western culture, this point is at present found among the lower middle class.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5695-0006 7.47 Very much of squalor and discomfort will be endured before the last trinket or the last pretense of pecuniary decency is put away.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5695-0007 9.755 There is no class and no country that has yielded so abjectly before the pressure of physical want as to deny themselves all gratification of this higher or spiritual need.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5695-0008 6.845 The question is, which of the two methods will most effectively reach the persons whose convictions it is desired to affect.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5695-0009 5.025 Each will therefore serve about equally well during the earlier stages of social growth.
+3570-5694-0019 3.755 But the general distinction is not on that account to be overlooked. 3570-5695-0010 4.665 The modern organization of industry works in the same direction also by another line.
+3570-5696-0006 4.16 As used in the speech of everyday life the word carries an undertone of deprecation. 3570-5695-0011 8.26 It is evident, therefore, that the present trend of the development is in the direction of heightening the utility of conspicuous consumption as compared with leisure.
+3570-5696-0006 4.16 As used in the speech of everyday life the word carries an undertone of deprecation. 3570-5695-0013 4.64 Consumption becomes a larger element in the standard of living in the city than in the country.
+3570-5694-0012 3.205 There is a more or less elaborate system of rank and grades. 3570-5695-0015 7.95 The result is a great mobility of the labor employed in printing; perhaps greater than in any other equally well defined and considerable body of workmen.
+260-123440-0008 3.745 I'll try if I know all the things I used to know. 260-123288-0001 5.08 The weather - if we may use that term - will change before long.
+260-123288-0020 2.9 Each of us is lashed to some part of the raft. 260-123288-0002 7.25 The atmosphere is charged with vapours, pervaded with the electricity generated by the evaporation of saline waters.
+260-123288-0009 3.435 Those clouds seem as if they were going to crush the sea". 260-123288-0003 8.905 The electric light can scarcely penetrate through the dense curtain which has dropped over the theatre on which the battle of the elements is about to be waged.
+260-123286-0020 3.06 Tuesday, august eighteenth. 260-123288-0004 4.31 The air is heavy; the sea is calm.
+260-123440-0005 3.105 And yesterday things went on just as usual. 260-123288-0006 4.88 The atmosphere is evidently charged and surcharged with electricity.
+260-123440-0008 3.745 I'll try if I know all the things I used to know. 260-123288-0008 5.515 There's a heavy storm coming on," I cried, pointing towards the horizon.
+260-123440-0006 2.715 I wonder if I've been changed in the night? 260-123288-0011 8.98 But if we have now ceased to advance why do we yet leave that sail loose, which at the first shock of the tempest may capsize us in a moment?
+260-123288-0019 2.955 At noon the violence of the storm redoubles. 260-123288-0016 4.865 I refer to the thermometer; it indicates... (the figure is obliterated).
+260-123440-0006 2.715 I wonder if I've been changed in the night? 260-123288-0017 5.225 Is the atmospheric condition, having once reached this density, to become final?
+260-123440-0005 3.105 And yesterday things went on just as usual. 260-123288-0027 6.305 A suffocating smell of nitrogen fills the air, it enters the throat, it fills the lungs.
+8455-210777-0062 3.05 When do you intend that the John Bright shall start"? 8455-210777-0000 8.745 I remained there alone for many hours, but I must acknowledge that before I left the chambers I had gradually brought myself to look at the matter in another light.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0002 6.24 On arriving at home at my own residence, I found that our salon was filled with a brilliant company.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0005 5.685 We have our little struggles here as elsewhere, and all things cannot be done by rose water.
+8455-210777-0047 2.54 You propose to kidnap me," I said. 8455-210777-0006 4.52 We are quite satisfied now, Captain Battleax," said my wife.
+8455-210777-0049 4.11 Lieutenant Crosstrees is a very gallant officer. 8455-210777-0009 4.58 No doubt, in process of time the ladies will follow
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0011 6.63 I did not mean," said Captain Battleax, "to touch upon public subjects at such a moment as this.
+8455-210777-0050 3.945 One of us always remains on board while the other is on shore. 8455-210777-0013 7.41 Jack had been standing in the far corner of the room talking to Eva, and was now reduced to silence by his praises.
+8455-210777-0066 2.76 They, of course, must all be altered". 8455-210777-0014 4.12 Sir Kennington Oval is a very fine player," said my wife.
+8455-210777-0014 4.12 Sir Kennington Oval is a very fine player," said my wife. 8455-210777-0015 8.615 I and my wife and son, and the two Craswellers, and three or four others, agreed to dine on board the ship on the next.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0017 5.330063 My wife, on the spur of the moment, managed to give the gentlemen a very good dinner.
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0018 5.925 This, she said, was true hospitality; and I am not sure that I did not agree with her.
+8455-210777-0062 3.05 When do you intend that the John Bright shall start"? 8455-210777-0019 8.105 Then there were three or four leading men of the community, with their wives, who were for the most part the fathers and mothers of the young ladies.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0023 4.73 We sat with the officers some little time after dinner, and then went ashore.
+8455-210777-0043 3.145 But what is the delicate mission"? I asked. 8455-210777-0024 7.56 How much of evil, - of real accomplished evil, - had there not occurred to me during the last few days!
+8455-210777-0068 2.59 Your power is sufficient," I said. 8455-210777-0028 7.735 Jack would become Eva's happy husband, and would remain amidst the hurried duties of the eager world.
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0031 7.67 You have received us with all that courtesy and hospitality for which your character in England stands so high.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0033 7.51 But your power is so superior to any that I can advance, as to make us here feel that there is no disgrace in yielding to it.
+8455-210777-0050 3.945 One of us always remains on board while the other is on shore. 8455-210777-0034 7.7 Not a doubt but had your force been only double or treble our own, I should have found it my duty to struggle with you.
+8455-210777-0068 2.59 Your power is sufficient," I said. 8455-210777-0037 4.735 You have come to us threatening us with absolute destruction.
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0039 5.59 I can assure you he has not even allowed me to see the trigger since I have been on board.
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0040 6.195 Then," said Sir Ferdinando, "there is nothing for it but that he must take you with him".
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0041 6.37 There came upon me a sudden shock when I heard these words, which exceeded anything which I had yet felt.
+8455-210777-0050 3.945 One of us always remains on board while the other is on shore. 8455-210777-0044 7.17 I was to be taken away and carried to England or elsewhere, - or drowned upon the voyage, it mattered not which.
+8455-210777-0062 3.05 When do you intend that the John Bright shall start"? 8455-210777-0046 9.33 You may be quite sure it's there," said Captain Battleax, "and that I can so use it as to half obliterate your town within two minutes of my return on board".
+8455-210777-0020 3.155 Oh yes," said Jack, "and I'm nowhere. 8455-210777-0049 4.11 Lieutenant Crosstrees is a very gallant officer.
+8455-210777-0048 3.43 What would become of your gun were I to kidnap you"? 8455-210777-0052 4.94 You will allow me to suggest," said he, "that that is a matter of opinion.
+8455-210777-0062 3.05 When do you intend that the John Bright shall start"? 8455-210777-0053 6.955 Were I to comply with your orders without expressing my own opinion, I should seem to have done so willingly hereafter.
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0055 9.555 SIR, - I have it in command to inform your Excellency that you have been appointed Governor of the Crown colony which is called Britannula.
+8455-210777-0025 3.63 What could I do now but just lay myself down and die? 8455-210777-0056 5.545 The peculiar circumstances of the colony are within your Excellency's knowledge.
+8455-210777-0050 3.945 One of us always remains on board while the other is on shore. 8455-210777-0058 7.16 It is founded on the acknowledged weakness of those who survive that period of life at which men cease to work.
+8455-210777-0064 3.835 And I have no one ready to whom I can give up the archives of the Government". 8455-210777-0059 5.535 But it is surmised that you will find difficulties in the way of your entering at once upon your government.
+8455-210777-0062 3.05 When do you intend that the John Bright shall start"? 8455-210777-0060 7.075 The John Bright is armed with a weapon of great power, against which it is impossible that the people of Britannula should prevail.
+8455-210777-0064 3.835 And I have no one ready to whom I can give up the archives of the Government". 8455-210777-0069 8.915 If you will give us your promise to meet Captain Battleaxe here at this time tomorrow, we will stretch a point and delay the departure of the John Bright for twenty four hours".
+8455-210777-0026 3 And the death of which I dreamt could not, alas! 8455-210777-0070 5.945 And this plan was adopted, too, in order to extract from me a promise that I would depart in peace.
+6829-68769-0043 2.59 And he deserves a term in state's prison". 6829-68771-0002 8.94 The "weak kneed" contingency must be strengthened and fortified, and a couple of hundred votes in one way or another secured from the opposition.
+6829-68769-0016 4.12 He unlocked the door, and called: "Here's visitors, Tom". 6829-68771-0003 4.015 The Democratic Committee figured out a way to do this.
+6829-68769-0014 3.655 They followed the jailer along a succession of passages. 6829-68771-0004 8.44 Under ordinary conditions Reynolds was sure to be elected, but the Committee proposed to sacrifice him in order to elect Hopkins.
+6829-68769-0037 2.53 I've seen lots of that kind in my day. 6829-68771-0005 6.165 The only thing necessary was to "fix" Seth Reynolds, and this Hopkins arranged personally.
+6829-68769-0012 4.295 Oh, say! that's different," observed Markham, altering his demeanor. 6829-68771-0006 5.92 And this was why Kenneth and Beth discovered him conversing with the young woman in the buggy.
+6829-68769-0039 4.045 He looked up rather ungraciously, but motioned them to be seated. 6829-68771-0008 7.18 These women were flattered by the attention of the young lady and had promised to assist in electing mister Forbes.
+6829-68769-0051 3.545 There was a grim smile of amusement on his shrewd face. 6829-68771-0010 9.82 The Fairview band was engaged to discourse as much harmony as it could produce, and the resources of the great house were taxed to entertain the guests.
+6829-68769-0037 2.53 I've seen lots of that kind in my day. 6829-68771-0011 5.625 Tables were spread on the lawn and a dainty but substantial repast was to be served.
+6829-68769-0028 3.29 He is supposed to sign all the checks of the concern. 6829-68771-0014 4.77 We ought to have more attendants, Beth," said Louise, approaching her cousin.
+6829-68769-0033 4.02 It was better for him to think the girl unfeeling than to know the truth. 6829-68771-0015 4.525 Won't you run into the house and see if Martha can't spare one or two more maids"?
+6829-68769-0035 2.755 It won't be much, but I'm grateful to find a friend. 6829-68771-0016 6.99 She was very fond of the young ladies, whom she had known when Aunt Jane was the mistress here, and Beth was her especial favorite.
+6829-68771-0021 2.61 But it can't be," protested the girl. 6829-68771-0018 8.445 For a moment Beth stood staring, while the new maid regarded her with composure and a slight smile upon her beautiful face.
+6829-68771-0031 2.515 Her eyes wandered to the maid's hands. 6829-68771-0019 7.42 She was dressed in the regulation costume of the maids at Elmhurst, a plain black gown with white apron and cap.
+6829-68771-0022 3.8 I attend to the household mending, you know, and care for the linen. 6829-68771-0020 4.615 Then she gave a little laugh, and replied: "No, Miss Beth. I'm Elizabeth Parsons".
+6829-68769-0012 4.295 Oh, say! that's different," observed Markham, altering his demeanor. 6829-68771-0023 5.425 You speak like an educated person," said Beth, wonderingly. "Where is your home"?
+6829-68771-0035 4.39 Will you leave me alone in my own room, or must I go away to escape you"? 6829-68771-0024 6.245 For the first time the maid seemed a little confused, and her gaze wandered from the face of her visitor.
+6829-68769-0051 3.545 There was a grim smile of amusement on his shrewd face. 6829-68771-0025 7.83 She sat down in a rocking chair, and clasping her hands in her lap, rocked slowly back and forth. "I'm sorry," said Beth.
+6829-68769-0051 3.545 There was a grim smile of amusement on his shrewd face. 6829-68771-0027 5.32 They - they excite me, in some way, and I - I can't bear them. You must excuse me".
+6829-68771-0035 4.39 Will you leave me alone in my own room, or must I go away to escape you"? 6829-68771-0029 8.945 Beth was a beautiful girl - the handsomest of the three cousins, by far; yet Eliza surpassed her in natural charm, and seemed well aware of the fact.
+6829-68769-0003 4.215 It was a deliberate theft from his employers to protect a girl he loved. 6829-68771-0030 6.225 Her manner was neither independent nor assertive, but rather one of well bred composure and calm reliance.
+6829-68769-0002 3.075 I can't see it in that light," said the old lawyer. 6829-68771-0032 6.555 However her features and form might repress any evidence of nervousness, these hands told a different story.
+6829-68771-0034 2.475 I wish I knew myself," she cried, fiercely. 6829-68771-0033 5.45 She rose quickly to her feet, with an impetuous gesture that made her visitor catch her breath.
+6829-68769-0002 3.075 I can't see it in that light," said the old lawyer. 6829-68771-0035 4.39 Will you leave me alone in my own room, or must I go away to escape you"?
+6829-68769-0028 3.29 He is supposed to sign all the checks of the concern. 6829-68771-0036 5.2 Eliza closed the door behind her with a decided slam, and a key clicked in the lock.
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-287645-0000 4.73 This was what did the mischief so far as the "running away" was concerned.
+8463-294828-0008 2.65 And yet, what a fine, gallant lad! 8463-287645-0003 7.905 Of this party, Edward, a boy of seventeen, called forth much sympathy; he too was claimed by Hollan.
+8463-294828-0026 2.745 We have a commander who's game for anything"! 8463-287645-0006 7.71 The doctor who attended the injured creature in this case was simply told that she slipped and fell down stairs as she was coming down.
+8463-294828-0021 2.735 A route slightly less direct, that's all. 8463-287645-0010 4.325 He worked me very hard; he wanted to be beating me all the time".
+8463-287645-0008 3.325 As usual nothing was done in the way of punishment". 8463-287645-0011 6.38 She was a large, homely woman; they were common white people, with no reputation in the community".
+8463-294828-0011 3.91 He went here, there, and everywhere in perfect contentment. 8463-287645-0012 5.425 Substantially this was Jacob's unvarnished description of his master and mistress.
+8463-294828-0032 4.395 In person. Welcome aboard, professor. Your cabin is waiting for you". 8463-287645-0013 6.665 As to his age, and also the name of his master, Jacob's statement varied somewhat from the advertisement.
+3729-6852-0016 4.195 Madame Quinson, besides, can answer your enquiries. 3729-6852-0011 7.37 I had a name, I believe, in my young days, but I have forgotten it since I have been in service.
+3729-6852-0010 2.755 I never had any family. 3729-6852-0014 5.71 Here, go and get me change for a Louis". "I have it, sir".
+3729-6852-0025 3 Is there not a meridian everywhere"? 3729-6852-0016 4.195 Madame Quinson, besides, can answer your enquiries.
+3729-6852-0016 4.195 Madame Quinson, besides, can answer your enquiries. 3729-6852-0018 6.21 I sit down at a small table: a waiter comes immediately to enquire my wishes.
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0022 8.315 I address him in Italian, and he answers very wittily, but his way of speaking makes me smile, and I tell him why.
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0023 8.185 My remark pleases him, but I soon prove to him that it is not the right way to speak, however perfect may have been the language of that ancient writer.
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0024 5.515 I see a crowd in one corner of the garden, everybody standing still and looking up.
+3729-6852-0016 4.195 Madame Quinson, besides, can answer your enquiries. 3729-6852-0026 4.69 Yes, but the meridian of the Palais Royal is the most exact".
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0028 5.265 All these honest persons are waiting their turn to get their snuff boxes filled".
+3729-6852-0010 2.755 I never had any family. 3729-6852-0029 8.605 It is sold everywhere, but for the last three weeks nobody will use any snuff but that sold at the 'Civet Cat.
+3729-6852-0025 3 Is there not a meridian everywhere"? 3729-6852-0031 4.4 But how did she manage to render it so fashionable"?
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0037 5.89 She introduced me to all her guests, and gave me some particulars respecting every one of them.
+3729-6852-0021 2.96 I thank him and take my leave. 3729-6852-0038 5.77 What, sir"! I said to him, "am I fortunate enough to see you?
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0039 8.825 He himself recited the same passage in French, and politely pointed out the parts in which he thought that I had improved on the original.
+3729-6852-0019 3.305 I tell him to give me some coffee, if it is good. 3729-6852-0044 6.98 I will make you translate them into French, and you need not be afraid of my finding you insatiable".
+7176-92135-0026 2.95 Enter Hamlet with his favourite boar hound. 7176-88083-0000 5.695 All about him was a tumult of bright and broken color, scattered in broad splashes.
+7176-92135-0039 3.125 Tea, please, Matthews. Butler (impassively). 7176-88083-0002 7.51 His feet were red, his long narrow beak, with its saw toothed edges and sharp hooked tip, was bright red.
+7176-92135-0024 4.1 To be or not to be, that is the question; whether 'tis nobler 7176-88083-0003 7.6 But here he was at a terrible disadvantage as compared with the owls, hawks, and eagles. He had no rending claws.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-88083-0004 7.5 But suddenly, straight and swift as a diving cormorant, he shot down into the torrent and disappeared beneath the surface.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-88083-0005 4.7 Once fairly a wing, however, he wheeled and made back hurriedly for his perch.
+7176-92135-0008 4.43 Lend me your ear for ten minutes, and you shall learn just what stagecraft is". 7176-88083-0006 4.295 It might have seemed that a trout of this size was a fairly substantial meal.
+7176-92135-0008 4.43 Lend me your ear for ten minutes, and you shall learn just what stagecraft is". 7176-88083-0009 4.045 The great hawk followed hurriedly, to retrieve his prey from the ground.
+7176-88083-0008 3.28 In despair he hurled himself downward too soon. 7176-88083-0010 6.74 The cat growled softly, picked up the prize in her jaws and trotted into the bushes to devour it.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-88083-0012 5.045 The hawk alighted on the dead branch, and sat upright, motionless, as if surprised.
+7176-88083-0009 4.045 The great hawk followed hurriedly, to retrieve his prey from the ground. 7176-88083-0014 4.67 The hawk sat upon the branch and watched his quarry swimming beneath the surface.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-88083-0019 5.81 As he flew, his down reaching, clutching talons were not half a yard above the fugitive's head.
+7176-88083-0009 4.045 The great hawk followed hurriedly, to retrieve his prey from the ground. 7176-88083-0020 5.415 Where the waves for an instant sank, they came closer, - but not quite within grasping reach.
+7176-92135-0024 4.1 To be or not to be, that is the question; whether 'tis nobler 7176-88083-0022 9.485 The hawk, embittered by the loss of his first quarry, had become as dogged in pursuit as a weasel, not to be shaken off or evaded or deceived.
+7176-88083-0016 3.92 Straightway the hawk glided from his perch and darted after him. 7176-88083-0023 9.645 He had a lot of line out, and the place was none too free for a long cast; but he was impatient to drop his flies again on the spot where the big fish was feeding.
+7176-92135-0024 4.1 To be or not to be, that is the question; whether 'tis nobler 7176-88083-0024 8.195 The last drop fly, as luck would have it, caught just in the corner of the hawk's angrily open beak, hooking itself firmly.
+7176-88083-0006 4.295 It might have seemed that a trout of this size was a fairly substantial meal. 7176-88083-0025 7.38 At the sudden sharp sting of it, the great bird turned his head and noticed, for the first time, the fisherman standing on the bank.
+7176-88083-0009 4.045 The great hawk followed hurriedly, to retrieve his prey from the ground. 7176-88083-0026 5.53 The drag upon his beak and the light check upon his wings were inexplicable to him, and appalling.
+7127-75947-0008 4.155 The arrow pierced his heart and wounded him mortally. 7127-75946-0004 4.49 Certainly, sire; but I must have money to do that". "What!
+7127-75947-0035 4.415 Good gracious! has the king any right to interfere in matters of that kind? 7127-75946-0006 7.98 He has given them with too much grace not to have others still to give, if they are required, which is the case at the present moment.
+7127-75947-0017 2.665 What, already here"! they said to her. 7127-75946-0007 4.755 It is necessary, therefore, that he should comply". The king frowned.
+7127-75947-0030 2.76 She was here just now," said the count. 7127-75946-0008 4.46 Does your majesty then no longer believe the disloyal attempt"?
+7127-75946-0005 2.67 What do you mean"? inquired Louis, 7127-75946-0009 4.72 Not at all; you are, on the contrary, most agreeable to me".
+7127-75947-0011 3.62 Remain, I implore you: the evening is most lovely. 7127-75946-0012 9.87 The news circulated with the rapidity of lightning; during its progress it kindled every variety of coquetry, desire, and wild ambition.
+7127-75947-0002 3.235 Do you think so"? she replied with indifference. 7127-75946-0013 8.58 The king had completed his toilette by nine o'clock; he appeared in an open carriage decorated with branches of trees and flowers.
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75946-0015 7.515 Suddenly, for the purpose of restoring peace and order, Spring, accompanied by his whole court, made his appearance.
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75946-0018 9.14 There was something in his carriage which resembled the buoyant movements of an immortal, and he did not dance so much as seem to soar along.
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75946-0020 6.52 Far from it, sire; your majesty having given no directions about it, the musicians have retained it".
+7127-75947-0002 3.235 Do you think so"? she replied with indifference. 7127-75946-0024 5.09 Monsieur was the only one who did not understand anything about the matter.
+7127-75947-0018 4.04 I have been here this quarter of an hour," replied La Valliere. 7127-75946-0027 9.675 Disdainful of a success of which Madame showed no acknowledgement, he thought of nothing but boldly regaining the marked preference of the princess.
+7127-75946-0023 3.745 The king seemed only pleased with every one present. 7127-75946-0029 9.285 The king, who had from this moment become in reality the principal dancer in the quadrille, cast a look upon his vanquished rival.
+5105-28240-0018 2.885 You will take me on board, count, will you not"? 5105-28241-0000 6.455 Her sea going qualities were excellent, and would have amply sufficed for a circumnavigation of the globe.
+5105-28240-0016 4.17 To all these inquiries, the count responded in the affirmative. 5105-28241-0005 8.415 For a few miles she followed the line hitherto presumably occupied by the coast of Algeria; but no land appeared to the south.
+5105-28233-0001 4.49 He seemed born to please without being conscious of the power he possessed. 5105-28241-0006 7.55 The log and the compass, therefore, were able to be called upon to do the work of the sextant, which had become utterly useless.
+5105-28240-0002 4.01 exclaimed Servadac, keeping his eye unmoved at his telescope. 5105-28241-0008 8.54 The earth has undoubtedly entered upon a new orbit, but she is not incurring any probable risk of being precipitated onto the sun".
+5105-28240-0013 2.96 Nothing more than you know yourself". 5105-28241-0009 7.01 And what demonstration do you offer," asked Servadac eagerly, "that it will not happen"?
+5105-28240-0010 2.935 Captain Servadac hastened towards him. 5105-28241-0012 6.775 Is it not impossible," he murmured aloud, "that any city should disappear so completely?
+5105-28241-0014 2.995 Another circumstance was most remarkable. 5105-28241-0013 4.82 Would not the loftiest eminences of the city at least be visible?
+5105-28240-0018 2.885 You will take me on board, count, will you not"? 5105-28241-0016 6.285 You must see, lieutenant, I should think, that we are not so near the coast of Algeria as you imagined".
+5105-28240-0018 2.885 You will take me on board, count, will you not"? 5105-28241-0019 5.29 Nothing was to be done but to put about, and return in disappointment towards the north.
+7021-85628-0004 2.805 Yes, why not"? thought Anders. 7021-79759-0000 4.775 Nature of the Effect produced by Early Impressions.
+7021-79740-0009 3.635 They were now playing with their dolls in the parlor. 7021-79759-0002 5.25 They are chiefly formed from combinations of the impressions made in childhood.
+7021-79759-0001 2.48 That is comparatively nothing. 7021-79759-0003 4.62 Vast Importance and Influence of this mental Furnishing,
+1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions. 1320-122612-0001 9.52 The dews were suffered to exhale, and the sun had dispersed the mists, and was shedding a strong and clear light in the forest, when the travelers resumed their journey.
+1320-122612-0014 3.515 The examination, however, resulted in no discovery. 1320-122612-0002 7.46 After proceeding a few miles, the progress of Hawkeye, who led the advance, became more deliberate and watchful.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122612-0003 9.865 He often stopped to examine the trees; nor did he cross a rivulet without attentively considering the quantity, the velocity, and the color of its waters.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122612-0004 6.425 Distrusting his own judgment, his appeals to the opinion of Chingachgook were frequent and earnest.
+1320-122612-0009 3.88 It would have been more wonderful had he spoken without a bidding. 1320-122612-0005 5.915 Yet here are we, within a short range of the Scaroons, and not a sign of a trail have we crossed!
+1320-122617-0030 3.98 So choose for yourself to make a rush or tarry here". 1320-122612-0006 4.845 Let us retrace our steps, and examine as we go, with keener eyes.
+1320-122612-0014 3.515 The examination, however, resulted in no discovery. 1320-122612-0007 5.54 Chingachgook had caught the look, and motioning with his hand, he bade him speak.
+1320-122612-0009 3.88 It would have been more wonderful had he spoken without a bidding. 1320-122612-0008 7.875 The eyes of the whole party followed the unexpected movement, and read their success in the air of triumph that the youth assumed.
+1320-122612-0009 3.88 It would have been more wonderful had he spoken without a bidding. 1320-122612-0013 6.55 A circle of a few hundred feet in circumference was drawn, and each of the party took a segment for his portion.
+1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions. 1320-122612-0015 6.385 The whole party crowded to the spot where Uncas pointed out the impression of a moccasin in the moist alluvion.
+5142-33396-0028 3.755 On a bench in a far corner were a dozen people huddled together. 5142-33396-0001 5.02 What is your country, Olaf? Have you always been a thrall"? The thrall's eyes flashed.
+5142-33396-0010 3.455 In the stern I curved the tail up almost as high as the head. 5142-33396-0006 6.23 I made her for only twenty oars because I thought few men would follow me; for I was young, fifteen years old.
+5142-33396-0003 3.47 The rest of you, off a viking'! "He had three ships. 5142-33396-0007 4.975 At the prow I carved the head with open mouth and forked tongue thrust out.
+5142-33396-0050 2.885 May you drink heart's ease from it for many years. 5142-33396-0012 4.59 Then I will get me a farm and will winter in that land. Now who will follow me?
+5142-33396-0021 3.505 Up and down the water we went to get much wealth and much frolic. 5142-33396-0015 4.31 As our boat flashed down the rollers into the water I made this song and sang it:
+5142-33396-0014 3.245 Thirty men, one after another, raised their horns and said: 5142-33396-0019 4.985 Oh! it is better to live on the sea and let other men raise your crops and cook your meals.
+5142-33396-0036 4.26 So I will give out this law: that my men shall never leave you alone. 5142-33396-0022 4.77 What of the farm, Olaf'? "'Not yet,' I answered. 'Viking is better for summer.
+5142-33396-0047 2.535 My men pounded the table with their fists. 5142-33396-0024 5.345 I stood with my back to the wall; for I wanted no sword reaching out of the dark for me.
+5142-33396-0037 3.575 Hakon there shall be your constant companion, friend farmer. 5142-33396-0031 7.845 They set up a crane over the fire and hung the pot upon it, and we sat and watched it boil while we joked. At last the supper began.
+5142-33396-0010 3.455 In the stern I curved the tail up almost as high as the head. 5142-33396-0032 9.785 The farmer sat gloomily on the bench and would not eat, and you cannot wonder; for he saw us putting potfuls of his good beef and basket loads of bread into our big mouths.
+5142-33396-0050 2.885 May you drink heart's ease from it for many years. 5142-33396-0033 5.28 You would not eat with us. You cannot say no to half of my ale. I drink this to your health.
+5142-33396-0009 3.37 There, stand so'! I said, 'and glare and hiss at my foes. 5142-33396-0034 6.615 Then I drank half of the hornful and sent the rest across the fire to the farmer. He took it and smiled, saying:
+5142-36586-0000 3.65 It is manifest that man is now subject to much variability. 5142-33396-0036 4.26 So I will give out this law: that my men shall never leave you alone.
+5142-33396-0060 2.615 Take him out, Thorkel, and let him taste your sword. 5142-33396-0038 4.18 He shall not leave you day or night, whether you are working or playing or sleeping.
+5142-33396-0030 2.765 The thralls were bringing in a great pot of meat. 5142-33396-0042 6.095 So no tales got out to the neighbors. Besides, it was a lonely place, and by good luck no one came that way.
+5142-33396-0030 2.765 The thralls were bringing in a great pot of meat. 5142-33396-0044 4.855 I am stiff with long sitting,' he said. 'I itch for a fight'. "I turned to the farmer.
+5142-33396-0014 3.245 Thirty men, one after another, raised their horns and said: 5142-33396-0051 5.57 And with it I leave you a name, Sif the Friendly. I shall hope to drink with you sometime in Valhalla.
+5142-33396-0060 2.615 Take him out, Thorkel, and let him taste your sword. 5142-33396-0052 5.88 Here is a ring for Sif the Friendly'. "'And here is a bracelet'. "'A sword would not be ashamed to hang at your side.
+5142-33396-0049 3.305 Here, friend, take it,' and he thrust it into the farmer's hand. 5142-33396-0054 5.745 That is the best way to decide, for the spear will always point somewhere, and one thing is as good as another.
+5142-33396-0050 2.885 May you drink heart's ease from it for many years. 5142-33396-0059 5.47 Yes. And with all your fingers it took you a year to catch me'. "The king frowned more angrily.
+5142-33396-0025 3.32 Come, come'! I called, when no one obeyed. 'A fire! 5142-33396-0065 5.195 Soft heart'! he said gently to her; then to Thorkel, 'Well, let him go, Thorkel!
+5142-33396-0049 3.305 Here, friend, take it,' and he thrust it into the farmer's hand. 5142-33396-0067 5.565 But, young sharp tongue, now that we have caught you we will put you into a trap that you cannot get out of.
+5683-32866-0000 2.645 Miss Lake declined the carriage to night. 5683-32879-0000 8.92 It was not very much past eleven that morning when the pony carriage from Brandon drew up before the little garden wicket of Redman's Farm.
+5683-32879-0022 4.175 I like you still, Rachel; I'm sure I'll always like you. 5683-32879-0003 9.345 Women can hide their pain better than we men, and bear it better, too, except when shame drops fire into the dreadful chalice.
+5683-32866-0001 3.47 And he added something still less complimentary. 5683-32879-0005 6.11 This transient spring and lighting up are beautiful - a glamour beguiling our senses.
+5683-32865-0001 2.58 said Lord Chelford, addressing me. 5683-32879-0007 6.795 Rachel's pale and sharpened features and dilated eye struck her with a painful surprise.
+5683-32879-0008 2.95 You have been so ill, my poor Rachel. 5683-32879-0009 5.135 Ill and troubled, dear - troubled in mind, and miserably nervous.
+5683-32866-0006 4.215 Yes, so they said; but that would, I think, have been worse. 5683-32879-0010 7.75 Poor Rachel! her nature recoiled from deceit, and she told, at all events, as much of the truth as she dared.
+5683-32865-0014 2.615 He's not a man for country quarters! 5683-32879-0011 9.21 She spoke with a sudden energy, which partook of fear and passion, and flushed her thin cheek, and made her languid eyes flash.
+5683-32865-0015 4.145 I had a horrid dream about him last night.' That? 5683-32879-0012 4.38 Thank you, Rachel, my Cousin Rachel, my only friend.
+5683-32879-0001 3.66 Well, she was better, though she had had a bad night. 5683-32879-0014 8.405 Yes, something - everything,' said Rachel, hurriedly, looking frowningly at a flower which she was twirling in her fingers.
+5683-32866-0023 2.745 All the furniture belonged to other times. 5683-32879-0018 7.44 It is an antipathy - an antipathy I cannot get over, dear Dorcas; you may think it a madness, but don't blame me.
+5683-32866-0007 4.12 If a fellow's been a little bit wild, he's Beelzebub at once. 5683-32879-0019 6.35 I have very few to love me now, and I thought you might love me, as I have begun to love you.
+5683-32865-0014 2.615 He's not a man for country quarters! 5683-32879-0020 6.545 And she threw her arms round her cousin's neck, and brave Rachel at last burst into tears.
+5683-32865-0006 3.35 At dinner Lake was easy and amusing. 5683-32879-0021 4.09 Dorcas, in her strange way, was moved.
+5683-32865-0003 3.51 They are cousins, you know; we are all cousins. 5683-32879-0022 4.175 I like you still, Rachel; I'm sure I'll always like you.
+5683-32866-0001 3.47 And he added something still less complimentary. 5683-32879-0023 4.975 You resemble me, Rachel: you are fearless and inflexible and generous.
+1580-141084-0003 4.1 No names, please"! said Holmes, as we knocked at Gilchrist's door. 1580-141084-0000 4.615 It was the Indian, whose dark silhouette appeared suddenly upon his blind.
+1580-141084-0034 4.49 Well, well, don't trouble to answer. Listen, and see that I do you no injustice. 1580-141084-0002 5.905 This set of rooms is quite the oldest in the college, and it is not unusual for visitors to go over them.
+1580-141083-0041 3.575 Let us hear the suspicions. I will look after the proofs". 1580-141084-0003 4.1 No names, please"! said Holmes, as we knocked at Gilchrist's door.
+1580-141083-0050 3.085 I really don't think he knew much about it, mister Holmes. 1580-141084-0004 9.005 Of course, he did not realize that it was I who was knocking, but none the less his conduct was very uncourteous, and, indeed, under the circumstances rather suspicious".
+1580-141083-0046 3.53 But I have occasionally done the same thing at other times". 1580-141084-0008 6.795 I cannot allow the examination to be held if one of the papers has been tampered with. The situation must be faced".
+1580-141083-0021 3.715 There is no opening except the one pane," said our learned guide. 1580-141084-0009 4.685 It is possible that I may be in a position then to indicate some course of action.
+1580-141084-0037 2.965 When I approached your room, I examined the window. 1580-141084-0011 5 When we were out in the darkness of the quadrangle, we again looked up at the windows.
+1580-141084-0045 3.625 Suddenly he heard him at the very door. There was no possible escape. 1580-141084-0016 5.96 My friend did not appear to be depressed by his failure, but shrugged his shoulders in half humorous resignation.
+1580-141083-0016 4.255 I was in such a hurry to come to you". "You left your door open"? 1580-141084-0021 4.01 On the palm were three little pyramids of black, doughy clay.
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141084-0023 8.735 In a few hours the examination would commence, and he was still in the dilemma between making the facts public and allowing the culprit to compete for the valuable scholarship.
+1580-141083-0046 3.53 But I have occasionally done the same thing at other times". 1580-141084-0024 9.185 He could hardly stand still so great was his mental agitation, and he ran towards Holmes with two eager hands outstretched. "Thank heaven that you have come!
+1580-141083-0025 3.905 The man entered and took the papers, sheet by sheet, from the central table. 1580-141084-0026 6.995 If this matter is not to become public, we must give ourselves certain powers and resolve ourselves into a small private court martial.
+1580-141083-0046 3.53 But I have occasionally done the same thing at other times". 1580-141084-0029 8.075 His troubled blue eyes glanced at each of us, and finally rested with an expression of blank dismay upon Bannister in the farther corner.
+1580-141083-0050 3.085 I really don't think he knew much about it, mister Holmes. 1580-141084-0031 6.47 We want to know, mister Gilchrist, how you, an honourable man, ever came to commit such an action as that of yesterday"?
+1580-141083-0028 2.585 Then he tossed it down and seized the next. 1580-141084-0032 4.995 For a moment Gilchrist, with upraised hand, tried to control his writhing features.
+1580-141083-0040 3.75 One hardly likes to throw suspicion where there are no proofs". 1580-141084-0033 7 Come, come," said Holmes, kindly, "it is human to err, and at least no one can accuse you of being a callous criminal.
+1580-141083-0036 3.98 Holmes held it out on his open palm in the glare of the electric light. 1580-141084-0034 4.49 Well, well, don't trouble to answer. Listen, and see that I do you no injustice.
+1580-141084-0035 2.63 He could examine the papers in his own office. 1580-141084-0039 4.885 I entered, and I took you into my confidence as to the suggestions of the side table.
+1580-141084-0035 2.63 He could examine the papers in his own office. 1580-141084-0040 5.985 He returned carrying his jumping shoes, which are provided, as you are aware, with several sharp spikes.
+1580-141084-0045 3.625 Suddenly he heard him at the very door. There was no possible escape. 1580-141084-0041 7.99 No harm would have been done had it not been that, as he passed your door, he perceived the key which had been left by the carelessness of your servant.
+1580-141083-0024 4.48 You left him in a chair, you say. Which chair"? "By the window there". 1580-141084-0042 5.06 A sudden impulse came over him to enter, and see if they were indeed the proofs.
+1580-141083-0030 3.48 mister Soames was somewhat overwhelmed by this flood of information. 1580-141084-0047 5.25 I have a letter here, mister Soames, which I wrote to you early this morning in the middle of a restless night.
+1580-141084-0045 3.625 Suddenly he heard him at the very door. There was no possible escape. 1580-141084-0048 9.265 It will be clear to you, from what I have said, that only you could have let this young man out, since you were left in the room, and must have locked the door when you went out.
+1580-141083-0024 4.48 You left him in a chair, you say. Which chair"? "By the window there". 1580-141084-0049 7.575 It was simple enough, sir, if you only had known, but, with all your cleverness, it was impossible that you could know.
+6930-76324-0010 2.69 What in the world is that"? queried Joyce. 6930-75918-0002 5.025 Congratulations were poured in upon the princess everywhere during her journey.
+6930-76324-0013 4.305 It can't hurt anything, I'm sure, for we won't disturb things at all. 6930-75918-0006 5.85 This has indeed been a harassing day," continued the young man, his eyes fixed upon his friend.
+6930-75918-0000 3.505 Concord returned to its place amidst the tents. 6930-75918-0008 4.785 Can you imagine why Buckingham has been so violent"? "I suspect".
+6930-76324-0019 2.575 Now let's dust the furniture and pictures". 6930-75918-0009 7.28 It is you who are mistaken, Raoul; I have read his distress in his eyes, in his every gesture and action the whole day".
+6930-75918-0000 3.505 Concord returned to its place amidst the tents. 6930-75918-0015 6.38 Thus it is that the honor of three is saved: our country's, our master's, and our own.
+6930-76324-0013 4.305 It can't hurt anything, I'm sure, for we won't disturb things at all. 6930-75918-0017 6.16 But in this friendly pressure Raoul could detect the nervous agitation of a great internal conflict.
+4077-13751-0019 2.92 Who began the quarrel? Was it the "Mormons"? 4077-13754-0000 4.78 The army found the people in poverty, and left them in comparative wealth.
+4077-13751-0013 4.315 Their sufferings have never yet been fitly chronicled by human scribe. 4077-13754-0003 5.68 Moreover, had the people been inclined to rebellion what greater opportunity could they have wished?
+4077-13754-0001 3.77 But a word further concerning the expedition in general. 4077-13754-0004 4.985 Already a North and a South were talked of - why not set up also a West?
+4077-13751-0013 4.315 Their sufferings have never yet been fitly chronicled by human scribe. 4077-13754-0009 7.65 At the inception of plural marriage among the Latter day Saints, there was no law, national or state, against its practise.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1826-0000 9.485 In the debate between the senior societies her defence of the Fifteenth Amendment had been not only a notable bit of reasoning, but delivered with real enthusiasm.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1826-0002 4.605 John Taylor, who had supported her through college, was interested in cotton.
+1995-1837-0000 3.865 He knew the Silver Fleece - his and Zora's - must be ruined. 1995-1826-0005 5.125 But, John, there's no society - just elementary work
+1995-1837-0013 3.195 Then he looked down. The lagoon was dry. 1995-1826-0009 7.57 You ought to know, John, if I teach Negroes I'll scarcely see much of people in my own class".
+1995-1837-0020 3.21 The years of the days of her dying were ten. 1995-1826-0011 8.94 Here she was teaching dirty children, and the smell of confused odors and bodily perspiration was to her at times unbearable.
+1995-1836-0007 3.435 But you believe in some education"? asked Mary Taylor. 1995-1826-0012 6.18 She wanted a glance of the new books and periodicals and talk of great philanthropies and reforms.
+1995-1837-0009 3.76 The lagoon had been level with the dykes a week ago; and now? 1995-1826-0013 8.77 So for the hundredth time she was thinking today, as she walked alone up the lane back of the barn, and then slowly down through the bottoms.
+1995-1826-0015 3.55 She had almost forgotten that it was here within touch and sight. 1995-1826-0016 5.9 The glimmering sea of delicate leaves whispered and murmured before her, stretching away to the Northward.
+1995-1837-0022 3.415 Up in the sick room Zora lay on the little white bed. 1995-1826-0017 6.145 There might be a bit of poetry here and there, but most of this place was such desperate prose.
+1995-1837-0015 4.485 The squares of cotton, sharp edged, heavy, were just about to burst to bolls! 1995-1826-0018 5.01 Her regard shifted to the green stalks and leaves again, and she started to move away.
+1995-1826-0004 3.035 Might learn something useful down there". 1995-1826-0019 5.25 Cotton is a wonderful thing, is it not, boys"? she said rather primly.
+1995-1837-0011 3.375 He started at the thought. He hurried forth sadly. 1995-1826-0020 6.12 Miss Taylor did not know much about cotton, but at least one more remark seemed called for.
+1995-1826-0003 3.09 Better go," he had counselled, sententiously. 1995-1826-0022 4.745 I suppose, though, it's too early for them". Then came the explosion.
+1995-1837-0002 2.79 Ah! the swamp, the cruel swamp! 1995-1826-0024 5.095 The Golden Fleece - it's the Silver Fleece"! He harkened.
+5683-32866-0001 3.47 And he added something still less complimentary. 5683-32865-0004 7.365 Whatever Lord Chelford said, Miss Brandon received it very graciously, and even with a momentary smile.
+5683-32865-0002 2.78 He had his hand upon Lake's shoulder. 5683-32865-0007 6.065 I'm glad you like it,' says Wylder, chuckling benignantly on it, over his shoulder.
+5683-32866-0001 3.47 And he added something still less complimentary. 5683-32865-0008 6.12 I believe I have a little taste that way; those are all real, you know, those jewels.
+5683-32866-0000 2.645 Miss Lake declined the carriage to night. 5683-32865-0009 9.89 And he placed it in that gentleman's fingers, who now took his turn at the lamp, and contemplated the little parallelogram with a gleam of sly amusement.
+5683-32866-0006 4.215 Yes, so they said; but that would, I think, have been worse. 5683-32865-0010 6.335 I was thinking it's very like the ace of hearts,' answered the captain softly, smiling on.
+5683-32865-0003 3.51 They are cousins, you know; we are all cousins. 5683-32865-0011 6.355 Whereupon Lake laughed quietly, still looking on the ace of hearts with his sly eyes.
+5683-32865-0015 4.145 I had a horrid dream about him last night.' That? 5683-32865-0013 7.095 Do you know?' 'Lake? Oh! I really can't tell; but he'll soon tire of country life.
+5683-32879-0012 4.38 Thank you, Rachel, my Cousin Rachel, my only friend. 5683-32865-0015 4.145 I had a horrid dream about him last night.' That?
+5683-32866-0006 4.215 Yes, so they said; but that would, I think, have been worse. 5683-32865-0017 5.455 All the time he was talking to me his angry little eyes were following Lake.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0000 7.835 Notwithstanding the high resolution of Hawkeye he fully comprehended all the difficulties and danger he was about to incur.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0003 6.285 There was something in his air and manner that betrayed to the scout the utter confusion of the state of his mind.
+1320-122617-0008 4.185 The young man is in bondage, and much I fear his death is decreed. 1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied:
+1320-122612-0016 3.49 Run back, Uncas, and bring me the size of the singer's foot. 1320-122617-0006 5.655 Can these things be"? returned David, breathing more freely, as the truth began to dawn upon him.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0008 4.185 The young man is in bondage, and much I fear his death is decreed.
+1320-122612-0009 3.88 It would have been more wonderful had he spoken without a bidding. 1320-122617-0009 7.705 I greatly mourn that one so well disposed should die in his ignorance, and I have sought a goodly hymn-" "Can you lead me to him"?
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0010 10 The task will not be difficult," returned David, hesitating; "though I greatly fear your presence would rather increase than mitigate his unhappy fortunes".
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0011 9.76 The lodge in which Uncas was confined was in the very center of the village, and in a situation, perhaps, more difficult than any other to approach, or leave, without observation.
+1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions. 1320-122617-0012 7.59 Four or five of the latter only lingered about the door of the prison of Uncas, wary but close observers of the manner of their captive.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0014 4.9 They drew back a little from the entrance and motioned to the supposed conjurer to enter.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0015 5.125 But the bear, instead of obeying, maintained the seat it had taken, and growled:
+1320-122612-0016 3.49 Run back, Uncas, and bring me the size of the singer's foot. 1320-122617-0017 5.655 Then, as if satisfied of their safety, the scout left his position, and slowly entered the place.
+1320-122617-0008 4.185 The young man is in bondage, and much I fear his death is decreed. 1320-122617-0018 9.695 It was silent and gloomy, being tenanted solely by the captive, and lighted by the dying embers of a fire, which had been used for the purposed of cookery.
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0019 8.23 Uncas occupied a distant corner, in a reclining attitude, being rigidly bound, both hands and feet, by strong and painful withes.
+1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions. 1320-122617-0020 8.895 The scout, who had left David at the door, to ascertain they were not observed, thought it prudent to preserve his disguise until assured of their privacy.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0021 5.335 What shall we do with the Mingoes at the door? They count six, and this singer is as good as nothing".
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0023 7.815 Uncas, who had already approached the door, in readiness to lead the way, now recoiled, and placed himself, once more, in the bottom of the lodge.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0024 7.555 But Hawkeye, who was too much occupied with his own thoughts to note the movement, continued speaking more to himself than to his companion.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0025 6.36 So, Uncas, you had better take the lead, while I will put on the skin again, and trust to cunning for want of speed".
+1320-122617-0005 4.4 The bear shook his shaggy sides, and then a well known voice replied: 1320-122617-0026 5.225 Well, what can't be done by main courage, in war, must be done by circumvention.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0027 5.689938 As soon as these dispositions were made, the scout turned to David, and gave him his parting instructions.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0029 7.875 If you are not then knocked on the head, your being a non composser will protect you; and you'll then have a good reason to expect to die in your bed.
+1320-122617-0008 4.185 The young man is in bondage, and much I fear his death is decreed. 1320-122617-0031 6.285 Bravely and generously has he battled in my behalf, and this, and more, will I dare in his service".
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0034 9.485 Hold"! said David, perceiving that with this assurance they were about to leave him; "I am an unworthy and humble follower of one who taught not the damnable principle of revenge.
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0037 7.18 The Delaware dog"! he said, leaning forward, and peering through the dim light to catch the expression of the other's features; "is he afraid?
+1320-122617-0022 3.855 The Delawares are children of the tortoise, and they outstrip the deer". 1320-122617-0039 7.055 The Mohican started on his feet, and shook his shaggy covering, as though the animal he counterfeited was about to make some desperate effort.
+1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions. 1320-122617-0040 7.975 He had no occasion to delay, for at the next instant a burst of cries filled the outer air, and ran along the whole extent of the village.
+1320-122612-0016 3.49 Run back, Uncas, and bring me the size of the singer's foot. 1320-122617-0041 4.15 Uncas cast his skin, and stepped forth in his own beautiful proportions.
+121-127105-0036 4.15 But was that all her reward"? one of the ladies asked. 121-121726-0000 8.46 Also, a popular contrivance whereby love making may be suspended but not stopped during the picnic season.
+121-121726-0004 4.02 Heaven, a good place to be raised to. 121-121726-0001 5.925 Harangue The tiresome product of a tireless tongue.
+121-121726-0013 2.49 Tied to a woman. 121-121726-0002 4.41 angor, pain. Painful to hear.
+121-127105-0008 2.76 He hung fire again. "A woman's. 121-121726-0003 6.755 Hay fever, a heart trouble caused by falling in love with a grass widow.
+121-121726-0006 3.895 Heredity, the cause of all our faults. 121-121726-0004 4.02 Heaven, a good place to be raised to.
+121-127105-0008 2.76 He hung fire again. "A woman's. 121-121726-0007 6.73 Horse sense, a degree of wisdom that keeps one from betting on the races.
+121-121726-0014 3.165 Hypocrite, a horse dealer. 121-121726-0008 4.99 Hose Man's excuse for wetting the walk.
+121-121726-0006 3.895 Heredity, the cause of all our faults. 121-121726-0009 7.26 Hotel, a place where a guest often gives up good dollars for poor quarters.
+121-127105-0008 2.76 He hung fire again. "A woman's. 121-121726-0010 9.81 Housecleaning, a domestic upheaval that makes it easy for the government to enlist all the soldiers it needs.
+121-121726-0014 3.165 Hypocrite, a horse dealer. 121-121726-0011 4.035 Husband, the next thing to a wife.
+121-121726-0002 4.41 angor, pain. Painful to hear. 121-121726-0012 4.045 hussy, woman, and bond, tie.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70970-0000 6.075 Young Fitzooth had been commanded to his mother's chamber so soon as he had come out from his converse with the Squire.
+61-70970-0012 3.135 Yet he will teach you a few tricks when morning is come. 61-70970-0001 6.155 There befell an anxious interview, Mistress Fitzooth arguing for and against the Squire's project in a breath.
+61-70968-0045 3.475 Pray follow us, with mine and my lord Sheriff's men". 61-70970-0002 4.165 Most of all Robin thought of his father. What would he counsel?
+61-70968-0056 3.565 The wine did certainly bring back the color to the Squire's cheeks. 61-70970-0007 4.485 He was in deep converse with the clerk, and entered the hall holding him by the arm.
+61-70968-0039 3.805 And mine is Will Stuteley. Shall we be comrades"? 61-70970-0011 6.075 As any in England, I would say," said Gamewell, proudly. "That is, in his day.
+61-70968-0016 3.72 And then they became vexed, and would have snatched your purse from us. 61-70970-0013 4.35 There was no chance to alter his sleeping room to one nearer to Gamewell's chamber.
+61-70968-0046 3.55 Nottingham Castle was reached, and admittance was demanded. 61-70970-0015 8.415 Will," cried he, softly; and Stuteley, who had chosen his couch across the door of his young master's chamber, sprang up at once in answer.
+61-70968-0029 3.495 The Squire helped to thrust them all in and entered swiftly himself. 61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window.
+61-70968-0046 3.55 Nottingham Castle was reached, and admittance was demanded. 61-70970-0018 4.6 The hours passed wearily by, and movement could yet be heard about the hall.
+61-70970-0009 3.405 Tis late; and I go myself within a short space. 61-70970-0020 5.025 Will," whispered Robin, opening his door as he spoke, "are you ready"?
+61-70970-0013 4.35 There was no chance to alter his sleeping room to one nearer to Gamewell's chamber. 61-70970-0021 5.405 They then renewed their journey, and, under the better light, made a safe crossing of the stable roofs.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70970-0024 7.235 They moved thereafter cautiously about the hut, groping before and about them to find something to show that Warrenton had fulfilled his mission.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70970-0025 7.435 They were upon the verge of an open trap, in the far corner of the hut; and Stuteley had tripped over the edge of the reversed flap mouth of this pit.
+61-70970-0033 3.42 Truly such a horse should be worth much in Nottingham Fair! 61-70970-0026 5.475 Fitzooth's hand rested at last upon the top rung of a ladder, and slowly the truth came to him.
+61-70970-0032 3.135 enquired Robin, with his suspicions still upon him. 61-70970-0027 5.08 Robin carefully descended the ladder and found himself soon upon firm rocky ground.
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70970-0028 6.55 Stuteley was by his side in a flash: and then they both began feeling about them to ascertain the shape and character of this vault.
+61-70968-0055 3.965 Robin was glad when, at length, they were left to their own devices. 61-70970-0029 4.03 From the blackness behind the light they heard a voice - Warrenton's!
+61-70970-0007 4.485 He was in deep converse with the clerk, and entered the hall holding him by the arm. 61-70970-0031 5.135 cried he, waving the lanthorn before him to make sure that these were no ghosts in front of him.
+61-70968-0039 3.805 And mine is Will Stuteley. Shall we be comrades"? 61-70970-0034 4.485 Nay, nay, lording," answered Warrenton, with a half laugh.
+61-70968-0006 2.935 But then the picture was gone as quickly as it came". 61-70970-0035 7.405 Warrenton spoke thus with significance, to show Robin that he was not to think Geoffrey's claims to the estate would be passed by.
+61-70970-0033 3.42 Truly such a horse should be worth much in Nottingham Fair! 61-70970-0036 6.785 Robin Fitzooth saw that his doubts of Warrenton had been unfair: and he became ashamed of himself for harboring them.
+61-70968-0052 2.65 But who is this fellow plucking at your sleeve? 61-70970-0037 5.98 His tones rang pleasantly on Warrenton's ears, and forthwith a good fellowship was heralded between them.
+61-70968-0046 3.55 Nottingham Castle was reached, and admittance was demanded. 61-70970-0039 6.665 He implores us to be discreet as the grave in this matter, for in sooth his life is in the hollow of our hands".
+61-70970-0016 4.37 We will go out together to the bower; there is a way down to the court from my window. 61-70970-0040 4.165 They regained their apartment, apparently without disturbing the household of Gamewell.
+5105-28240-0002 4.01 exclaimed Servadac, keeping his eye unmoved at his telescope. 5105-28240-0000 5.455 Fast as his legs could carry him, Servadac had made his way to the top of the cliff.
+5105-28240-0016 4.17 To all these inquiries, the count responded in the affirmative. 5105-28240-0002 4.01 exclaimed Servadac, keeping his eye unmoved at his telescope.
+5105-28240-0013 2.96 Nothing more than you know yourself". 5105-28240-0003 5.515 She is under sail; but she is Count Timascheff's yacht". He was right.
+5105-28240-0014 3.07 Are you certain that this is the Mediterranean"? 5105-28240-0004 6.015 If the count were on board, a strange fatality was bringing him to the presence of his rival.
+5105-28240-0014 3.07 Are you certain that this is the Mediterranean"? 5105-28240-0005 7.4 He reckoned, therefore, not only upon ascertaining the extent of the late catastrophe, but upon learning its cause.
+5105-28240-0014 3.07 Are you certain that this is the Mediterranean"? 5105-28240-0007 4.625 Servadac took it for granted that the Dobryna was endeavoring to put in.
+5105-28241-0014 2.995 Another circumstance was most remarkable. 5105-28240-0011 6.02 I left you on a continent, and here I have the honor of finding you on an island".
+5105-28240-0014 3.07 Are you certain that this is the Mediterranean"? 5105-28240-0015 8.525 For some moments he seemed perfectly stupefied; then, recovering himself, he began to overwhelm the count with a torrent of questions.
+5105-28240-0002 4.01 exclaimed Servadac, keeping his eye unmoved at his telescope. 5105-28240-0016 4.17 To all these inquiries, the count responded in the affirmative.
+5105-28241-0014 2.995 Another circumstance was most remarkable. 5105-28240-0017 5.665 Some mysterious force seemed to have brought about a convulsion of the elements.
+5105-28241-0003 3.98 Steam up and canvas spread, the schooner started eastwards. 5105-28240-0019 6.240062 My yacht is at your service, sir, even should you require to make a tour round the world".
+5105-28233-0001 4.49 He seemed born to please without being conscious of the power he possessed. 5105-28240-0022 4.725 It was on the last day of January that the repairs of the schooner were completed.
+5105-28241-0003 3.98 Steam up and canvas spread, the schooner started eastwards. 5105-28240-0024 8.2 Doubts now arose, and some discussion followed, whether or not it was desirable for Ben Zoof to accompany his master.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0003 4.505 The hair was of brown yarn and hung down on her neck in several neat braids.
+1284-1180-0027 3.27 Yet that task was not so easy as you may suppose. 1284-1181-0004 7.15 Gold is the most common metal in the Land of Oz and is used for many purposes because it is soft and pliable.
+1284-1180-0027 3.27 Yet that task was not so easy as you may suppose. 1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles.
+1284-1180-0027 3.27 Yet that task was not so easy as you may suppose. 1284-1181-0008 6.08 I think that will do," she continued, "for the other qualities are not needed in a servant".
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0009 5.245 She ran to her husband's side at once and helped him lift the four kettles from the fire.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0010 6.435 Their contents had all boiled away, leaving in the bottom of each kettle a few grains of fine white powder.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0011 7.75 Very carefully the Magician removed this powder, placing it all together in a golden dish, where he mixed it with a golden spoon.
+1284-1180-0004 4.285 When they were outside, Unc simply latched the door and started up the path. 1284-1181-0012 8.51 No one saw him do this, for all were looking at the Powder of Life; but soon the woman remembered what she had been doing, and came back to the cupboard.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0014 7.92 He selected a small gold bottle with a pepper box top, so that the powder might be sprinkled on any object through the small holes.
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1181-0015 5.115 Most people talk too much, so it is a relief to find one who talks too little".
+1284-1181-0007 4.04 She poured into the dish a quantity from each of these bottles. 1284-1181-0016 9.515 I am not allowed to perform magic, except for my own amusement," he told his visitors, as he lighted a pipe with a crooked stem and began to smoke.
+1284-1181-0002 3.835 The head of the Patchwork Girl was the most curious part of her. 1284-1181-0020 6.73 Dear me; what a chatterbox you're getting to be, Unc," remarked the Magician, who was pleased with the compliment.
+4446-2271-0012 3.78 I say, Sir Harry, the little girl's going famously to night, isn't she"? 4446-2275-0000 6.34 The stop at Queenstown, the tedious passage up the Mersey, were things that he noted dimly through his growing impatience.
+4446-2273-0002 3.295 Lamb wouldn't care a great deal about many of them, I fancy". 4446-2275-0001 4.66 She blushed and smiled and fumbled his card in her confusion before she ran upstairs.
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2275-0002 7.675 Alexander paced up and down the hallway, buttoning and unbuttoning his overcoat, until she returned and took him up to Hilda's living room.
+4446-2271-0006 2.905 He's been wanting to marry Hilda these three years and more. 4446-2275-0005 4.445 I felt it in my bones when I woke this morning that something splendid was going to turn up.
+4446-2273-0005 4.125 I haven't had a chance yet to tell you what a jolly little place I think this is. 4446-2275-0007 8.975 She pushed him toward the big chair by the fire, and sat down on a stool at the opposite side of the hearth, her knees drawn up to her chin, laughing like a happy little girl.
+4446-2271-0003 3.7 It's been on only two weeks, and I've been half a dozen times already. 4446-2275-0008 4.13 When did you come, Bartley, and how did it happen? You haven't spoken a word".
+4446-2275-0035 4.075 Alexander rose and shook himself angrily. "Yes, I know I'm cowardly. 4446-2275-0012 6.025 She looked at his heavy shoulders and big, determined head, thrust forward like a catapult in leash.
+4446-2273-0036 3.12 Alexander unclenched the two hands at his sides. 4446-2275-0016 7.3 Hilda watched him from her corner, trembling and scarcely breathing, dark shadows growing about her eyes. "It...
+4446-2275-0015 2.98 He pulled up a window as if the air were heavy. 4446-2275-0019 4.93 The world is all there, just as it used to be, but I can't get at it any more.
+4446-2273-0033 3.3 For a long time neither Hilda nor Bartley spoke. 4446-2275-0021 5.05 Hilda's face quivered, but she whispered: "Yes, I think it must have been.
+4446-2273-0030 2.885 Alexander went over and opened the window for her. 4446-2275-0026 5.495 She closed her eyes and took a deep breath, as if to draw in again the fragrance of those days.
+4446-2275-0035 4.075 Alexander rose and shook himself angrily. "Yes, I know I'm cowardly. 4446-2275-0029 6.28 Please tell me one thing, Bartley. At least, tell me that you believe I thought I was making you happy".
+4446-2275-0010 3.735 Alexander leaned forward and warmed his hands before the blaze. 4446-2275-0033 7.06 What I mean is that I want you to promise never to see me again, no matter how often I come, no matter how hard I beg".
+4446-2271-0011 3.945 Sir Harry Towne, mister Bartley Alexander, the American engineer". 4446-2275-0035 4.075 Alexander rose and shook himself angrily. "Yes, I know I'm cowardly.
+4446-2273-0017 2.74 How jolly it was being young, Hilda! 4446-2275-0038 4.53 I will ask the least imaginable, but I must have something!
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2275-0040 6.965 The sight of you, Bartley, to see you living and happy and successful can I never make you understand what that means to me"?
+4446-2271-0005 3.395 She saves her hand, too. She's at her best in the second act. 4446-2275-0041 4.755 You see, loving some one as I love you makes the whole world different.
+4446-2275-0011 2.435 Bartley bent lower over the fire. 4446-2275-0042 5.4 And then you came back, not caring very much, but it made no difference".
+4446-2273-0033 3.3 For a long time neither Hilda nor Bartley spoke. 4446-2275-0043 5.88 Bartley bent over and took her in his arms, kissing her mouth and her wet, tired eyes.
+5142-33396-0015 4.31 As our boat flashed down the rollers into the water I made this song and sang it: 5142-36377-0001 5.39 In five minutes I was in a new world, and my melancholy room was full of the liveliest French company.
+5142-33396-0062 2.9 Now she put her hand on his arm and smiled and said: 5142-36377-0002 5.62 The sound of an imperative and uncompromising bell recalled me in due time to the regions of reality.
+5142-33396-0050 2.885 May you drink heart's ease from it for many years. 5142-36377-0004 5.485 She signed to me, with a ghostly solemnity, to take the vacant place on the left of her father.
+5142-33396-0023 3.48 It was so dark that I could see nothing but a few sparks on the hearth. 5142-36377-0005 7.085 The door opened again while I was still studying the two brothers, without, I honestly confess, being very favorably impressed by either of them.
+5142-33396-0049 3.305 Here, friend, take it,' and he thrust it into the farmer's hand. 5142-36377-0006 4.635 A new member of the family circle, who instantly attracted my attention, entered the room.
+5142-33396-0053 3.93 I took five great bracelets of gold from our treasure chest and gave them to him. 5142-36377-0007 6.18 A little cracked" - that in the popular phrase was my impression of the stranger who now made his appearance in the supper room.
+5142-36586-0000 3.65 It is manifest that man is now subject to much variability. 5142-36377-0010 4.294937 He is not well; he has come over the ocean for rest, and change of scene.
+5142-33396-0023 3.48 It was so dark that I could see nothing but a few sparks on the hearth. 5142-36377-0013 6.585 They pointedly drew back from John Jago as he approached the empty chair next to me and moved round to the opposite side of the table.
+5142-33396-0049 3.305 Here, friend, take it,' and he thrust it into the farmer's hand. 5142-36377-0015 4.34 Our first impressions of people are, in nine cases out of ten, the right impressions.
+5142-33396-0049 3.305 Here, friend, take it,' and he thrust it into the farmer's hand. 5142-36377-0017 4.685 The only cheerful conversation was the conversation across the table between Naomi and me.
+5142-33396-0002 3.67 Two hundred warriors feasted in his hall and followed him to battle. 5142-36377-0018 4.97 He looked up at Naomi doubtingly from his plate, and looked down again slowly with a frown.
+5142-33396-0011 3.52 There she sat on the rollers, as fair a ship as I ever saw. 5142-36377-0020 4.53 A more dreary and more disunited family party I never sat at the table with.
+5142-36586-0000 3.65 It is manifest that man is now subject to much variability. 5142-36377-0023 5.79 You were quite right to say 'No,'" Ambrose began. "Never smoke with John Jago. His cigars will poison you".
+5142-33396-0040 2.81 And these shall follow your thralls in the same way. 5142-36377-0024 5.78 Naomi shook her forefinger reproachfully at them, as if the two sturdy young farmers had been two children.
+8555-292519-0015 2.85 He had broken into her courtyard. 8555-292519-0005 9.575 While the old gold and the marble stays, Forever gleaming its soft strong blaze, Calm in the early evening glow.
+8555-292519-0013 4.185 That was but rustling of dripping plants in the dark. 8555-292519-0007 8.405 It is my heart hung in the sky; And no clouds ever float between The grave flowers and my heart on high.
+8555-292519-0015 2.85 He had broken into her courtyard. 8555-292519-0008 6.025 Over the track lined city street The young men, the grinning men, pass.
+8555-284449-0009 3.27 You are, mate," replied the sailor. 8555-292519-0010 5.77 Old dances are simplified of their yearning, bleached by Time.
+8555-292519-0015 2.85 He had broken into her courtyard. 8555-292519-0012 5.17 Through the black night rain, he sang to her window bars:
+8555-292519-0015 2.85 He had broken into her courtyard. 8555-292519-0013 4.185 That was but rustling of dripping plants in the dark.
+5683-32865-0001 2.58 said Lord Chelford, addressing me. 5683-32866-0002 5.125 But don't these very wise things sometimes turn out very foolishly?
+5683-32865-0001 2.58 said Lord Chelford, addressing me. 5683-32866-0004 9.225 By this time Lord Chelford and Wylder returned; and, disgusted rather with myself, I ruminated on my want of general ship.
+5683-32866-0014 3.97 Don't insult me, Stanley, by talking again as you did this morning. 5683-32866-0005 4.59 and he made a little dip of his cane towards Brandon Hall, over his shoulder.
+5683-32866-0008 3.3 Bracton's a very good fellow, I can assure you. 5683-32866-0006 4.215 Yes, so they said; but that would, I think, have been worse.
+5683-32879-0001 3.66 Well, she was better, though she had had a bad night. 5683-32866-0007 4.12 If a fellow's been a little bit wild, he's Beelzebub at once.
+5683-32866-0015 2.83 What I say is altogether on your own account. 5683-32866-0011 7.37 Their walk continued silent for the greater part, neither was quite satisfied with the other. But Rachel at last said
+5683-32866-0015 2.83 What I say is altogether on your own account. 5683-32866-0012 8.26 Now that's impossible, Radie; for I really don't think I once thought of him all this evening - except just while we were talking.
+5683-32866-0014 3.97 Don't insult me, Stanley, by talking again as you did this morning. 5683-32866-0013 9.93 There was a bright moonlight, broken by the shadows of overhanging boughs and withered leaves; and the mottled lights and shadows glided oddly across his pale features.
+5683-32866-0006 4.215 Yes, so they said; but that would, I think, have been worse. 5683-32866-0016 4.88 Mark my words, you'll find him too strong for you; aye, and too deep.
+5683-32865-0001 2.58 said Lord Chelford, addressing me. 5683-32866-0017 4.585 I am very uneasy about it, whatever it is. I can't help it.
+5683-32879-0001 3.66 Well, she was better, though she had had a bad night. 5683-32866-0018 5.455 To my mind there has always been something inexpressibly awful in family feuds.
+5683-32866-0001 3.47 And he added something still less complimentary. 5683-32866-0021 7.9 My bed was unexceptionably comfortable, but, in my then mood, I could have wished it a great deal more modern.
+5683-32866-0014 3.97 Don't insult me, Stanley, by talking again as you did this morning. 5683-32866-0024 9.855 I shan't trouble you about my train of thoughts or fancies; but I began to feel very like a gentleman in a ghost story, watching experimentally in a haunted chamber.
+5683-32866-0008 3.3 Bracton's a very good fellow, I can assure you. 5683-32866-0027 4.755 A cold, bright moon was shining with clear sharp lights and shadows.
+5683-32879-0012 4.38 Thank you, Rachel, my Cousin Rachel, my only friend. 5683-32866-0028 5.62 The sombre old trees, like gigantic hearse plumes, black and awful.
+5683-32866-0003 2.865 In the meantime I had formed a new idea of her. 5683-32866-0030 4.845 A little bit of plaster tumbled down the chimney, and startled me confoundedly.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0001 8.63 Then they all marched out a little way into the fields and found that the Army of Pinkies had already formed and was advancing steadily toward them.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0003 8.875 When the Blueskins saw Ghip Ghisizzle they raised another great shout, for he was the favorite of the soldiers and very popular with all the people.
+8555-284447-0003 4.415 But Captain Bill made no such attempt, knowing it would be useless. 8555-284449-0007 9.31 Now, then, let's enter the City and enjoy the grand feast that's being cooked. I'm nearly starved, myself, for this conquering kingdoms is hard work".
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0008 6.135 Then she gave Rosalie back her magic ring, thanking the kind Witch for all she had done for them.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0012 9.87 I'll gladly do that," promised the new Boolooroo; "and I'll feed the honorable goat all the shavings and leather and tin cans he can eat, besides the grass.
+8555-284447-0003 4.415 But Captain Bill made no such attempt, knowing it would be useless. 8555-284449-0013 5.775 Scuse me," said Trot; "I neglected to tell you that you're not the Boolooroo any more.
+8555-292519-0013 4.185 That was but rustling of dripping plants in the dark. 8555-284449-0015 5.12 I'll not be wicked any more," sighed the old Boolooroo; "I'll reform.
+8555-284447-0022 3.56 I had a notion it was you, mate, as saved me from the knife. 8555-284449-0016 5.895 As a private citizen I shall be a model of deportment, because it would be dangerous to be otherwise".
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0018 7.03 So Ghip Ghisizzle ordered the Captain to take a file of soldiers and escort the raving beauties to their new home.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0019 7.61 That evening Trot gave a grand ball in the palace, to which the most important of the Pinkies and the Blueskins were invited.
+8555-284447-0020 4.09 The goat's warlike spirit was roused by this successful attack. 8555-284449-0020 5.095 The combined bands of both the countries played the music and a fine supper was served.
\ No newline at end of file
diff --git a/data/ljspeech_inset_test_9s.lst b/data/ljspeech_inset_test_9s.lst
new file mode 100644
index 0000000000000000000000000000000000000000..7214034e2439a67c98c11578e3866ba19694d4a9
--- /dev/null
+++ b/data/ljspeech_inset_test_9s.lst
@@ -0,0 +1,682 @@
+LJ015-0184 3.815192743764172 and he looked about him with wayward, furtive glances. LJ018-0064 4.662721088435374 afterwards in the British German Legion raised for the Crimean War.
+LJ012-0203 4.117052154195012 Eventually the law overtook them, but almost by accident. LJ012-0014 4.117052154195012 Edwards was sentenced to two years' imprisonment in Newgate,
+LJ024-0097 4.1518820861678005 has ever been ratified within anything like a reasonable time. LJ021-0048 4.1518820861678005 the careful checking of new securities under the Securities Act
+LJ005-0104 3.1185941043083902 The progress of improvement was certainly extremely slow. LJ008-0003 5.846938775510204 which we left at the time of the discontinuance of the long-practiced procession to Tyburn.
+LJ001-0160 3.455283446712018 by that made in America, which is the worst conceivable. LJ008-0059 4.83687074829932 Under this bar at a proper distance is a piece of flooring or platform,
+LJ035-0203 4.221541950113378 and also handled a paper bag which was found near the cartons. LJ041-0116 4.221541950113378 after it was learned that he had defected to the Soviet Union.
+LJ048-0135 3.165034013605442 Liaison with local law enforcement authorities. LJ039-0032 4.221541950113378 was on November twenty to twenty-one, nineteen sixty-three.
+LJ013-0055 4.000952380952381 The jury did not believe him, and the verdict was for the defendants. LJ034-0086 4.000952380952381 This clipboard had been made by Kaiser and had his name on it.
+LJ028-0113 4.093832199546485 With mortar and bricks he built two moat-walls about the city, LJ018-0385 4.465351473922903 It was his own handiwork -- a bird pecking at a flower;
+LJ008-0015 3.6410430839002266 was executed on a gibbet in front of his victim's house. LJ013-0162 4.964580498866213 a bundle lying on the floor, as though thieves had been interrupted in the act.
+LJ030-0107 3.1998639455782314 Presidential car, Presidential follow-up car, LJ027-0084 5.7540589569161 Romanes's "Darwin and After Darwin", and Le Conte's "Evolution."
+LJ005-0156 4.1867120181405895 in others meat, soup, gruel, beer were given. LJ021-0176 4.1867120181405895 Did England let nature take her course? No.
+LJ028-0141 4.070612244897959 so that the entire circuit is four hundred and eighty furlongs. LJ037-0008 4.070612244897959 Two witnesses testified that Oswald resembled the man they had seen.
+LJ038-0164 3.38562358276644 The Attempt on the Life of Maj. Gen. Edwin A. Walker LJ013-0055 4.000952380952381 The jury did not believe him, and the verdict was for the defendants.
+LJ036-0145 3.455283446712018 However, Neches and Beckley do not intersect. LJ021-0096 4.442131519274376 under the able and energetic leadership of General Johnson.
+LJ019-0109 4.395691609977324 Mr. Pearson backed up his recommendations by many sound arguments. LJ002-0182 4.395691609977324 the Fleet, and the Marshalsea prisons especially devoted to them,
+LJ038-0049 3.153424036281179 Although the witnesses did not hear the sound of a misfire, LJ032-0156 4.012562358276644 In a crevice between the butt plate of the rifle and the wooden stock
+LJ011-0098 4.407301587301587 He soon, however, became deeply involved in Stock Exchange speculations, LJ033-0138 4.407301587301587 It was the appropriate size to contain, in disassembled form,
+LJ031-0113 3.2927437641723354 This operation was concluded at three:twenty p.m. LJ002-0116 4.233151927437642 The number of processes against debtors annually was extraordinary.
+LJ024-0123 3.2695238095238097 An amendment, like the rest of the Constitution, LJ009-0200 5.312879818594104 were publicly exposed in a stable in Little Bridge Street, near Apothecaries' Hall,
+LJ006-0031 3.65265306122449 that punishment must be reformatory as well as deterrent. LJ007-0181 5.278049886621315 A committee of aldermen was forthwith appointed to report upon the inspectors' report,
+LJ005-0101 4.244761904761905 whence it deduced the practice and condition of every prison that replied. LJ006-0210 4.244761904761905 Drink, in more or less unlimited quantities, was still to be had.
+LJ003-0307 4.430521541950113 but as yet no suggestion was made to provide prison uniform. LJ002-0272 4.430521541950113 on the opening of Whitecross prison for debtors in eighteen fifteen.
+LJ012-0216 3.38562358276644 Williams, and May had been concerned in the transaction. LJ025-0089 5.266439909297052 The third distinction is based on a completely erroneous conception of the chemical differences
+LJ031-0224 4.024172335600907 with a sizable metal fragment lying just above the right eye. LJ030-0252 4.7556009070294785 Secret Service procedure requires that each agent stay with the person being protected
+LJ041-0122 4.256371882086168 and he must have known that President Kennedy had had nothing to do with it. LJ001-0155 4.256371882086168 and that laterally the page looks as if it were being driven off the paper.
+LJ040-0090 3.1185941043083902 Pic did turn over part of his income to his mother, LJ014-0295 5.382539682539683 This man got up to look for him, and found him hanging from the bars of a neighboring room.
+LJ046-0093 4.476961451247165 and accepts the necessary security precautions which they recommend. LJ031-0173 4.476961451247165 Mrs. Kennedy alternated between watching them and waiting outside.
+LJ020-0050 4.395691609977324 Toss the lump dough upon it and knead thoroughly for five minutes. LJ016-0362 4.395691609977324 and the great outside world shared in the completion of the sacrifice.
+LJ031-0128 3.954512471655329 and escorted them into Parkland Hospital through the emergency entrance. LJ049-0031 4.349251700680272 The Presidential vehicle in use in Dallas, described in chapter two,
+LJ028-0260 3.188253968253968 The following story from Herodotus tells the results: LJ024-0076 5.579909297052154 If such a law as I propose is regarded as establishing a new precedent,
+LJ028-0063 4.000952380952381 Then Syria and Palestine were added to his future empire. LJ035-0011 4.000952380952381 a strong wind blowing from the north almost unseated him.
+LJ031-0005 4.384081632653062 approximately four miles from the Texas School Book Depository Building. LJ002-0096 4.384081632653062 The eight courts above enumerated were well supplied with water;
+LJ022-0028 4.30281179138322 I am reminded sometimes of what President Wilson once said: LJ036-0171 4.30281179138322 he would have arrived there about twelve:fifty-nine to one p.m.
+LJ028-0119 3.5017233560090704 but I, his first-born, the beloved of his heart, LJ014-0256 4.279591836734694 It seems incredible that this passbook, which when produced in court
+LJ030-0244 4.476961451247165 hitting me on the shoulder, and shouted to all of us in the back seat to get down. LJ008-0274 4.233151927437642 The result in the latter case was left in the first place to the king in council,
+LJ019-0334 4.291201814058957 Under them the governor or jailer was held strictly responsible. LJ021-0129 4.291201814058957 The employer who turns away from impartial agencies of peace,
+LJ038-0259 4.256371882086168 The oral report was negative because of the battered condition of the bullet. LJ012-0026 4.256371882086168 With this capital he returned to London and set up as a fence.
+LJ045-0160 3.397233560090703 Question: And how did he show that he was upset? LJ002-0200 4.7556009070294785 The marshal was supposed to be resident either within the prison or the rules.
+LJ033-0142 3.954512471655329 because the cartons stacked around the southeast corner would shield him. LJ028-0004 5.034240362811792 and along the narrow winding lane which was once called the "Street Called Straight."
+LJ036-0064 3.2346938775510203 Marsalis Street is seven blocks from Beckley. LJ026-0041 5.545079365079365 may flourish in solutions wholly devoid of organic matter is very significant.
+LJ031-0173 4.476961451247165 Mrs. Kennedy alternated between watching them and waiting outside. LJ046-0093 4.476961451247165 and accepts the necessary security precautions which they recommend.
+LJ031-0072 3.733922902494331 Dr. Clark did not see any other hole or wound on the President's head. LJ033-0067 4.802040816326531 She pointed to the blanket which was on the floor very close to where Ruth Paine was standing.
+LJ003-0188 4.476961451247165 The old press yard has been fully described in a previous chapter. LJ042-0241 4.476961451247165 Soon after his arrival he wrote to the Soviet Embassy in Washington
+LJ009-0132 3.757142857142857 Although this misapplication of religious services still went on, LJ005-0133 5.011020408163265 The provision of separate sleeping cells was still quite inadequate. For instance,
+LJ035-0125 4.163492063492064 Victoria Adams, who worked on the fourth floor of the Depository Building, LJ042-0231 4.163492063492064 His second answer to this question was, quote, No of course not,
+LJ015-0306 3.710702947845805 and the whole scheme of systematic forgery was laid bare. LJ007-0100 5.196780045351474 These were the gentlemen concerned in the bribery case at Ipswich in eighteen thirty-five,
+LJ029-0041 4.30281179138322 who was the Secret Service official responsible for the entire Texas journey. LJ024-0028 4.30281179138322 The statute would apply to all the courts in the federal system.
+LJ004-0123 3.095374149659864 sixty-eight had only two divisions, and so on. LJ049-0001 4.256371882086168 Report of the President's Commission on the Assassination of President Kennedy.
+LJ027-0043 3.1185941043083902 and mean nothing more than similarity of environment. LJ040-0069 5.846938775510204 Reminding her sons that they were orphans and that the family's financial condition was poor,
+LJ009-0099 4.372471655328798 Meanwhile the clergyman, still bent into the form of a sleeping dog, LJ036-0179 4.372471655328798 He signed his name as O. H. Lee on the roominghouse register.
+LJ011-0225 4.337641723356009 will be admitted by those who have read his book on "the punishment of death, LJ002-0204 4.337641723356009 When they were sick no more notice was taken of them than of a dog.
+LJ014-0119 4.117052154195012 He had fled to Jersey, where he was recognized and arrested. LJ023-0121 4.117052154195012 How then could we proceed to perform the mandate given us?
+LJ016-0304 4.244761904761905 Numbers of humane and thoughtful persons had long been convinced of this. LJ047-0193 4.244761904761905 and so advised the Dallas office in the ordinary course of business.
+LJ007-0073 3.0024943310657597 to that line of conduct which his duty imposed on him LJ031-0131 5.185170068027211 An agent was stationed at the entrance to stop anyone who was not a member of the Presidential party.
+LJ016-0362 4.395691609977324 and the great outside world shared in the completion of the sacrifice. LJ020-0050 4.395691609977324 Toss the lump dough upon it and knead thoroughly for five minutes.
+LJ032-0166 4.1518820861678005 Judgments as to probability will depend on the number and types of matches. LJ032-0214 4.790430839002267 Using a recognized technique of determining whether a picture was taken with a particular camera,
+LJ045-0092 3.420453514739229 as to the fact that he was an outstanding man, end quote. LJ038-0146 4.848480725623583 was a lunch sack which he kept on his lap during the ride from Irving to Dallas.
+LJ024-0082 4.012562358276644 would deny us the necessary means of dealing with the present. LJ009-0138 4.012562358276644 all the avenues to the prison gates were blocked by ticket-holders.
+LJ017-0173 4.360861678004535 Catherine Wilson was a female poisoner who did business wholesale. LJ028-0151 4.360861678004535 leaving between them room for a four-horse chariot to turn.
+LJ016-0200 4.209931972789116 without favoring father or mother or any other relation or friend. LJ023-0055 4.209931972789116 Like the Bible, it ought to be read again and again.
+LJ028-0207 3.9080725623582766 On the fourteenth day Sippar was taken without a battle. LJ050-0159 5.080680272108843 The Commission recommends that prompt and favorable consideration be given to this request.
+LJ010-0138 4.314421768707483 and died in a manner strongly contrasting with that of his fellows. LJ014-0335 4.314421768707483 which were soon developed, much to that firm's subsequent anger and regret.
+LJ024-0027 4.465351473922903 commonly fix the retirement age at seventy years or less. LJ038-0268 4.465351473922903 the FBI refuses to draw any conclusion as to probability.
+LJ006-0089 4.117052154195012 to be pitchforked by chance anywhere, into any sort of company, LJ009-0156 4.117052154195012 "with a view," as he himself said, "to his professional studies."
+LJ010-0101 4.047392290249433 the lights were extinguished, and a desperate conflict ensued. LJ011-0233 4.047392290249433 that thieves or depredators were idle or entirely unsuccessful.
+LJ033-0171 3.8732426303854877 I found that the paper sack found on the sixth floor and the sample LJ009-0124 4.976190476190476 occupied when they saw it last, but a few hours ago, by their comrades who are now dead;
+LJ012-0268 4.488571428571428 Suspicion grew almost to certainty as the evidence was unfolded. LJ010-0017 4.488571428571428 eluding the keenest vigilance, and carried out with reckless daring;
+LJ013-0201 3.5017233560090704 The prisoner's demeanor had greatly changed during the trial. LJ006-0298 4.279591836734694 while older women in infirm health were sent across the seas.
+LJ038-0187 3.466893424036281 I paid for the box last month so don't worry about it. LJ040-0101 4.906530612244898 When she worked during the school year, Lee had to leave an empty house in the morning,
+LJ018-0378 4.279591836734694 In Newgate the 'Lennie' mutineers were extremely well behaved. LJ050-0266 4.279591836734694 The exchange of letters dated August thirty-one, nineteen sixty-four,
+LJ024-0142 3.5481632653061226 I seek to make American democracy succeed. LJ021-0192 5.069070294784581 We are not frightened by reactionary lawyers or political editors.
+LJ018-0003 4.4189115646258506 As the circumstances under which it was perpetrated were somewhat novel, LJ009-0108 4.4189115646258506 The two masses of prisoners for trial undulate and slightly murmur,
+LJ022-0022 3.954512471655329 That is a tremendous gain for the principles of democracy. LJ028-0258 4.349251700680272 Then the Babylonians secretly plotted to throw off the Persian yoke.
+LJ016-0169 4.1867120181405895 As more humane principles were introduced into prison management, LJ041-0094 4.1867120181405895 He had the nickname, quote, Ozzie Rabbit, end quote.
+LJ004-0191 3.2695238095238097 and in comparative comfort, with a bed and proper bedding. LJ002-0081 5.231609977324263 and beyond it was now a day room for the capital convicts or those awaiting execution.
+LJ025-0063 4.1867120181405895 and with all the appearances of spontaneity as locomotive bodies, LJ014-0160 4.6046712018140585 elucidated all dark and uncertain points in connection with the crime.
+LJ009-0207 3.6178231292517005 extended at full length on an inclined platform LJ040-0044 4.976190476190476 Oswald apparently started reading about communism when he was about fifteen.
+LJ040-0151 4.442131519274376 He was also described as having a, quote, Vivid fantasy life, LJ041-0055 4.442131519274376 a dissatisfaction which seemed to find expression at this particular point
+LJ032-0056 3.1766439909297053 bearing serial number C two seven six six. LJ012-0134 5.161950113378685 Presently the proper person arrived from the consignees, but found the gold-dust gone.
+LJ003-0288 4.430521541950113 The above-mentioned report was ordered to be printed upon the ninth May. LJ004-0207 4.430521541950113 and all the material for prisoners' apparel was manufactured in the jail.
+LJ006-0164 4.442131519274376 But when he did visit, his inspections were of the most superficial character LJ007-0042 4.442131519274376 so that men in the most awful situation, daily expecting to be hanged,
+LJ045-0204 4.1518820861678005 he had never found anything to which he felt he could really belong. LJ047-0236 4.790430839002267 was capable or potentially an assassin of the President of the United States, end quote.
+LJ016-0281 3.8268027210884354 Rain fell heavily at intervals, but did not thin the concourse. LJ029-0006 4.175102040816326 Beginning with the advance plans and Secret Service preparations for the trip,
+LJ015-0172 4.070612244897959 The inquiry soon revealed the colossal character of the frauds. LJ009-0113 4.070612244897959 whistles merrily, and points upwards with madness in his look.
+LJ045-0223 3.374013605442177 were part of his character long before he met his wife LJ011-0102 5.521859410430839 He had gone on board in his Quaker dress, but when captured was found in a light-green frock,
+LJ005-0166 4.360861678004535 Mr. Peel, who as Home Secretary had charge of the bill, LJ002-0180 4.360861678004535 Before dealing with the debtors in Newgate, I may refer incidentally
+LJ011-0073 4.291201814058957 several persons were sentenced to or suffered death for this crime. LJ013-0173 4.291201814058957 The researches of the police soon laid bare other suspicious facts.
+LJ047-0206 4.442131519274376 I would think his continued association with the Russian Embassy after his return, LJ040-0213 4.442131519274376 that he had great difficulty in adapting himself to conditions in that city.
+LJ018-0353 4.476961451247165 Wainwright's demeanor after sentence has been described in the last chapter. LJ042-0001 4.476961451247165 Report of the President's Commission on the Assassination of President Kennedy.
+LJ011-0282 4.128662131519274 he gave in, and signed the documents thus illegally extorted. LJ012-0129 4.128662131519274 learnt through the firm's correspondence that a quantity of gold-dust
+LJ037-0129 4.372471655328798 When the man reached Jefferson, he turned right and headed west. LJ044-0111 4.372471655328798 for anybody who is concerned about developments in Cuba, end quote,
+LJ035-0066 3.9312925170068027 In an effort to determine whether Oswald could have descended to the lunchroom LJ012-0201 4.535011337868481 Bishop confessed that he was moved to this by the example of Burke and Hare.
+LJ044-0001 4.128662131519274 Report of the President's Commission on the Assassination of President Kennedy. LJ046-0030 4.128662131519274 particularly when the President is traveling in this country or abroad.
+LJ047-0203 3.710702947845805 have made Oswald a subject of concern to the Secret Service. LJ002-0070 4.047392290249433 The state side was the part stolen from the female felons' side.
+LJ031-0086 4.140272108843537 the President remained on his back throughout his medical treatment at Parkland. LJ038-0028 4.140272108843537 Brewer met McDonald and the other policemen at the alley exit door,
+LJ036-0011 4.384081632653062 (three) evidence establishing the ownership of the murder weapon, LJ005-0074 4.384081632653062 cap. sixty-four, and five George the fourth cap. eighty-five
+LJ009-0242 3.397233560090703 and the sentence was properly and completely carried out. LJ008-0002 4.1518820861678005 I propose to return now to the subject of Newgate executions,
+LJ002-0180 4.360861678004535 Before dealing with the debtors in Newgate, I may refer incidentally LJ005-0166 4.360861678004535 Mr. Peel, who as Home Secretary had charge of the bill,
+LJ022-0171 4.337641723356009 designed to improve the status of our transportation agencies. LJ001-0054 4.337641723356009 Jenson, however, had many contemporaries who used beautiful type,
+LJ018-0223 3.374013605442177 In eighteen fifty-six the father died. LJ043-0146 5.057460317460317 Following his unsuccessful attack on Walker, Oswald returned home.
+LJ020-0025 3.5713832199546487 One quart of Graham flour, one cup of white flour. LJ014-0216 4.999410430839002 and by getting his hand inside Dwyer's stock, with the idea of strangling him.
+LJ008-0123 3.710702947845805 "Sir," he answered, "they sent me the very riff-raff." LJ003-0182 4.535011337868481 The tried and the untried, young and old, were herded together
+LJ020-0038 4.465351473922903 Turn the pans once while baking, moving them as gently as possible. LJ029-0099 4.465351473922903 From Love Field the route passed through a portion of suburban Dallas,
+LJ007-0108 4.175102040816326 Dasent and Pilgrim were released in ten days, on making due submission. LJ018-0142 4.175102040816326 By this time Brown alone had stolen three or four hundred sheets,
+LJ038-0226 3.8964625850340138 Oswald had apparently mistaken the county jail for the city jail. LJ027-0100 4.6046712018140585 are the thousands of cases of rudimentary or vestigial structures to be found.
+LJ047-0084 3.095374149659864 and his application was approved on the following day. LJ016-0146 5.846938775510204 from the building he was on to a distant wall, with a drop of sixty feet between.
+LJ029-0117 4.000952380952381 According to Lawson, the chosen route seemed to be the best. LJ004-0081 4.000952380952381 decent clothing and bedding, and a diet sufficient to support him."
+LJ039-0117 4.488571428571428 He had the services of an experienced highly trained coach. LJ038-0111 4.488571428571428 At that point, Oswald refused to answer any further questions.
+LJ013-0243 4.372471655328798 Good now offered to go to Wandsworth and satisfy the pawnbroker. LJ036-0177 4.372471655328798 knew Lee Harvey Oswald under the alias of O. H. Lee.
+LJ004-0125 4.395691609977324 in the balance some work was done, but with the most meager results. LJ028-0350 4.395691609977324 It is from these women that the Babylonians of our times are sprung.
+LJ007-0035 3.65265306122449 The better-disposed complained bitterly of what they had to endure; LJ002-0174 5.115510204081633 Mr. Buxton's friends at once paid the forty shillings, and the boy was released.
+LJ008-0251 4.105442176870748 was an hour before kicked to death by the savage and brutal mob. LJ036-0070 4.105442176870748 rather than wait for one which stopped across the street from his roominghouse.
+LJ013-0013 4.372471655328798 with other underwriters for a second sum of two thousand pounds. LJ002-0111 4.372471655328798 Of these the debtors, male and female, formed a large proportion.
+LJ049-0212 4.012562358276644 to put it in a position to reach final conclusions in this respect. LJ003-0153 4.012562358276644 Idleness was not so universally the rule in this part of the jail.
+LJ018-0080 3.0605442176870747 Sattler was tried for murder and convicted; LJ019-0326 4.372471655328798 Steps were taken to provide the illiterate with secular instruction.
+LJ014-0288 3.3624036281179137 That same evening he committed suicide in Newgate. LJ050-0130 5.463809523809524 Finally, these agreements with Federal and local authorities will be of little value
+LJ012-0025 4.093832199546485 at which he realized one hundred fifty pounds within a couple of years. LJ025-0138 4.093832199546485 The results of inquiries into the structure of the nervous system of animals
+LJ027-0061 4.360861678004535 in order to enclose and protect a similar enlargement of the nervous center, LJ012-0152 4.360861678004535 which he refused to redeem on account of the row about the robbery.
+LJ021-0011 4.488571428571428 Men may differ as to the particular form of governmental activity LJ019-0132 4.488571428571428 in the inquiry which followed, attention was again attracted to Newgate.
+LJ036-0081 3.977732426303855 The station wagon stopped to pick up the man and then drove off. LJ037-0093 4.894920634920635 William Arthur Smith was about a block east of tenth and Patton when he heard shots.
+LJ013-0008 3.65265306122449 came to light in this same year, eighteen forty-one. LJ017-0034 5.278049886621315 The case contained elements of much uncertainty, and yet it was so essential,
+LJ027-0028 4.000952380952381 Such structures or organs are most often found internally. LJ015-0005 4.000952380952381 About this time Davidson and Gordon, the people above-mentioned,
+LJ032-0122 3.5017233560090704 At eleven:forty-five p.m. on November twenty-two, LJ044-0003 5.254829931972789 Lee Harvey Oswald: Background and Possible Motives, Part five.
+LJ010-0240 4.407301587301587 The Queen was apprised of the danger, and begged not to go abroad; LJ009-0264 4.407301587301587 His face was visible to the whole crowd, and was fearful to behold.
+LJ012-0049 4.279591836734694 led him to think seriously of trying his fortunes in another land. LJ033-0025 4.279591836734694 The two men left work at four:forty p.m. and drove to Irving.
+LJ042-0158 4.256371882086168 left a far mean streak of independence brought on by neglect. LJ037-0135 4.256371882086168 Russell confirmed this statement in a sworn affidavit for the Commission.
+LJ019-0055 3.65265306122449 High authorities were in favor of continuous separation. LJ047-0113 5.0226303854875285 For example, Oswald claimed that his wife's maiden name was Prossa
+LJ010-0017 4.488571428571428 eluding the keenest vigilance, and carried out with reckless daring; LJ012-0268 4.488571428571428 Suspicion grew almost to certainty as the evidence was unfolded.
+LJ001-0135 4.30281179138322 it is impossible that they should be quite equal except in lines of poetry LJ009-0013 4.30281179138322 and kept altogether separate from the other prisoners until the day of his death.
+LJ033-0138 4.407301587301587 It was the appropriate size to contain, in disassembled form, LJ011-0098 4.407301587301587 He soon, however, became deeply involved in Stock Exchange speculations,
+LJ010-0301 3.3275736961451248 He had entered the house as clerk in eighteen hundred; LJ041-0069 4.326031746031746 he did not adjust well to conditions which he found in that service.
+LJ048-0033 3.1185941043083902 Prior to November twenty-two, nineteen sixty-three LJ037-0237 5.196780045351474 When interviewed by FBI agents on January twenty-one, nineteen sixty-four,
+LJ001-0095 4.198321995464853 These and similar founts, cast by the above firm and others, LJ001-0175 4.198321995464853 Simple as this proposition is, it is necessary to be stated,
+LJ035-0011 4.000952380952381 a strong wind blowing from the north almost unseated him. LJ028-0063 4.000952380952381 Then Syria and Palestine were added to his future empire.
+LJ005-0129 4.314421768707483 "a measure which must greatly tend to discourage attempts to escape." LJ016-0158 4.314421768707483 It was that of a "Long Firm" swindler, by name Johnson,
+LJ008-0318 4.175102040816326 The men who were doomed often fell down in convulsions upon the floor. LJ012-0148 4.175102040816326 instead of handing it or the price of it back to the Caspars.
+LJ007-0136 4.047392290249433 But there were others remediable under a better system of management. LJ004-0077 4.047392290249433 nor has he a right to poison or starve his fellow-creatures."
+LJ028-0085 4.372471655328798 The eyes are suggestive of the Semitic; the nose is of the Greek type; LJ016-0284 4.372471655328798 There were preachers among the crowd, but they could not get a patient hearing.
+LJ033-0006 3.5481632653061226 In this connection the Commission considered (one) LJ028-0373 5.069070294784581 The Hebrew exiles, whose ancestors Nebuchadnezzar had brought from Jerusalem,
+LJ030-0222 4.279591836734694 Mrs. Kennedy had no recollection of climbing onto the back of the car. LJ037-0090 4.279591836734694 she testified, quote, I would say that was him for sure, end quote.
+LJ010-0123 4.267981859410431 an ample pension, so long as he did not return to England. LJ001-0144 4.267981859410431 the words may be set much closer together, without loss of clearness.
+LJ012-0129 4.128662131519274 learnt through the firm's correspondence that a quantity of gold-dust LJ011-0282 4.128662131519274 he gave in, and signed the documents thus illegally extorted.
+LJ022-0144 3.5713832199546487 As we have proceeded with the administration of this Act, LJ016-0059 4.999410430839002 Here he came upon a woman on the leads hanging out clothes to dry.
+LJ008-0024 3.5017233560090704 of the trading vessel 'Adventure,' upon the high seas. LJ002-0166 4.279591836734694 Mr. Buxton, in his "Inquiry into the System of Prison Discipline,"
+LJ036-0171 4.30281179138322 he would have arrived there about twelve:fifty-nine to one p.m. LJ022-0028 4.30281179138322 I am reminded sometimes of what President Wilson once said:
+LJ002-0111 4.372471655328798 Of these the debtors, male and female, formed a large proportion. LJ013-0013 4.372471655328798 with other underwriters for a second sum of two thousand pounds.
+LJ022-0154 4.175102040816326 I consider this legislation a positive recovery measure. LJ007-0230 4.175102040816326 Newgate, Giltspur St. Compter, and the City Bridewell,
+LJ002-0166 4.279591836734694 Mr. Buxton, in his "Inquiry into the System of Prison Discipline," LJ031-0001 4.279591836734694 Report of the President's Commission on the Assassination of President Kennedy.
+LJ045-0124 4.326031746031746 Marina Oswald thought he did so in order to emphasize his importance. LJ015-0234 4.326031746031746 Courier bags were bought to carry the "stuff" slung over the shoulders;
+LJ015-0005 4.000952380952381 About this time Davidson and Gordon, the people above-mentioned, LJ027-0028 4.000952380952381 Such structures or organs are most often found internally.
+LJ021-0176 4.1867120181405895 Did England let nature take her course? No. LJ005-0156 4.1867120181405895 in others meat, soup, gruel, beer were given.
+LJ027-0047 4.03578231292517 totally different structures are modified to perform the same functions. LJ021-0159 4.03578231292517 Morally, it is the greatest menace to our social order.
+LJ048-0220 4.465351473922903 Conduct of Secret Service agents in Fort Worth on November twenty-two. LJ021-0017 4.059002267573696 Instead of the give and take of free individual contract,
+LJ016-0273 4.360861678004535 At Müller's execution there was great competition for front seats, LJ002-0026 4.360861678004535 in the three years between eighteen thirteen and eighteen sixteen,
+LJ011-0254 4.4189115646258506 A life and death struggle ensued. Mullay cried "Murder!" LJ036-0074 4.4189115646258506 If Oswald left the Depository Building at twelve:thirty-three p.m.,
+LJ028-0151 4.360861678004535 leaving between them room for a four-horse chariot to turn. LJ017-0173 4.360861678004535 Catherine Wilson was a female poisoner who did business wholesale.
+LJ023-0110 4.244761904761905 a super-legislature, as one of the justices has called it LJ038-0068 4.244761904761905 cursing a little bit and hollering police brutality, end quote.
+LJ022-0051 4.267981859410431 In spite of the fact that unemployment remains a serious problem LJ028-0184 4.267981859410431 he extended his empire to the Mediterranean and even to Egypt.
+LJ042-0102 4.384081632653062 Reminiscent of his attitude toward his superiors in the Marine Corps, LJ029-0156 4.384081632653062 the two Dallas newspapers carried several reports of his motorcade route.
+LJ028-0410 4.140272108843537 There among the ruins they still live in the same kind of houses, LJ013-0003 4.140272108843537 They not only became more numerous, but they were on a wider scale.
+LJ005-0300 4.093832199546485 and the establishment of municipal institutions upon a proper footing, LJ024-0048 4.093832199546485 The number of justices has been changed several times before,
+LJ014-0227 3.594603174603175 One of these was Mobbs, who lived in the Minories, LJ048-0094 5.034240362811792 Lawson was responsible for working out a great many arrangements for the President's trip.
+LJ036-0012 4.407301587301587 (four) evidence establishing the ownership of a zipper jacket LJ030-0191 4.407301587301587 According to Kellerman, Mrs. Kennedy then cried out, quote,
+LJ002-0204 4.337641723356009 When they were sick no more notice was taken of them than of a dog. LJ011-0225 4.337641723356009 will be admitted by those who have read his book on "the punishment of death,
+LJ045-0030 3.6294331065759637 when his wife asked Oswald not to come to Irving. LJ004-0154 5.080680272108843 One hundred and fifty were lodged in a prison just capable of holding fifty-two.
+LJ036-0025 3.2114739229024942 McWatters was sure that he left the checkpoint on time LJ045-0035 5.138730158730159 She testified that Oswald, quote, was very happy, end quote, about the birth of the child.
+LJ015-0108 4.384081632653062 where a fish curry and a brace of partridges were set before him, LJ024-0102 4.384081632653062 would be the first to exclaim as soon as an amendment was proposed
+LJ011-0138 4.442131519274376 It passed the Commons, but opposition was again encountered in the Lords. LJ002-0261 4.442131519274376 The poorer prisoners were not in abject want, as in other prisons,
+LJ040-0229 4.476961451247165 in a sustained relationship with one therapist might bring results. LJ003-0149 4.476961451247165 supported themselves; they had the ration of prison bread only,
+LJ017-0245 4.326031746031746 On the second October they sighted land, ten miles distant; LJ008-0100 4.326031746031746 The yeoman was, however, under-sold by his wife, "Rosy Emma,"
+LJ013-0173 4.291201814058957 The researches of the police soon laid bare other suspicious facts. LJ011-0073 4.291201814058957 several persons were sentenced to or suffered death for this crime.
+LJ004-0229 4.372471655328798 Convicts were not even compelled to wear irons, providing they behaved well. LJ008-0285 4.372471655328798 on the one hand the gallows, on the other a short imprisonment.
+LJ033-0025 4.279591836734694 The two men left work at four:forty p.m. and drove to Irving. LJ012-0049 4.279591836734694 led him to think seriously of trying his fortunes in another land.
+LJ038-0028 4.140272108843537 Brewer met McDonald and the other policemen at the alley exit door, LJ031-0086 4.140272108843537 the President remained on his back throughout his medical treatment at Parkland.
+LJ021-0129 4.291201814058957 The employer who turns away from impartial agencies of peace, LJ019-0334 4.291201814058957 Under them the governor or jailer was held strictly responsible.
+LJ014-0253 3.5597732426303854 there was no independent check upon him if he chose to tamper with it. LJ045-0175 4.825260770975056 She did not speak to him when she joined him there, although she thought that he was still awake.
+LJ011-0160 4.372471655328798 and a servant hurriedly alighted from it, bearing a letter for Miss Turner. LJ001-0112 4.03578231292517 instead of ending in the sharp and clear stroke of Jenson's letters;
+LJ002-0019 3.4436734693877553 who seldom let a session go by without visiting Newgate. LJ035-0156 5.510249433106576 Mrs. Reid testified that when she saw Oswald, he was wearing a T-shirt and no jacket.
+LJ006-0023 4.267981859410431 had made such prisons as Auburn a model for imitation. LJ012-0208 4.267981859410431 Reference was made to Mr. Partridge, the demonstrator in anatomy,
+LJ013-0043 4.442131519274376 This person made much of Wallace, encouraged his attentions to his daughter, LJ014-0298 4.442131519274376 Strange to say, a second suicide occurred in Newgate the same night,
+LJ004-0205 4.244761904761905 Industrial labor had also been introduced with satisfactory results. LJ007-0048 4.244761904761905 so subversive of meditation, so disturbing to the thoughts;
+LJ021-0008 3.2230839002267575 we are bringing order out of the old chaos LJ004-0067 5.730839002267573 or to make him sleep in close contact with the victims of contagious and loathsome disease,
+LJ040-0224 4.4537414965986395 and not on any particular mental disturbance, in the boy himself. LJ002-0309 4.4537414965986395 There was this much honest forbearance in Newgate in these days,
+LJ020-0029 3.954512471655329 Put the brown or Graham flour unsifted into the bread-bowl. LJ013-0093 4.349251700680272 where the cash was transferred from the carpet-bag to a portmanteau.
+LJ023-0034 3.188253968253968 The American people have learned from the depression. LJ046-0244 4.384081632653062 PRS should have investigated and been prepared to guard against it.
+LJ038-0061 4.209931972789116 He saw no shotgun in the possession of any policeman near Oswald. LJ018-0285 4.209931972789116 With this as capital they came back to England via Buenos Aires,
+LJ041-0097 3.2114739229024942 According to Powers, Oswald said, quote, LJ025-0072 4.813650793650794 Hence the teleological argument for Cuvier's first diagnostic character
+LJ029-0122 4.140272108843537 Elm Street, parallel to Main Street and one block north, LJ022-0109 4.140272108843537 The allotment of funds for desirable projects has already begun.
+LJ009-0025 3.2811337868480726 As to the exclusion of strangers on these occasions, LJ014-0280 5.10390022675737 But it was proved that Watts had appropriated one cheque for fourteen hundred pounds,
+LJ030-0191 4.407301587301587 According to Kellerman, Mrs. Kennedy then cried out, quote, LJ036-0012 4.407301587301587 (four) evidence establishing the ownership of a zipper jacket
+LJ045-0213 4.082222222222223 The conversation on Monday, November eighteen, nineteen sixty-three, LJ018-0393 4.593061224489796 Messrs. Swindlehurst, Saffery, and Langley cleared a large profit
+LJ040-0015 4.384081632653062 There is, however, a large amount of material available in his writings LJ034-0132 4.384081632653062 From the street, this creates the impression that the person is standing.
+LJ020-0105 4.314421768707483 Weave the little duties in and under and among what seem to be the greater. LJ035-0142 4.314421768707483 then her estimate of the time when she descended from the fourth floor is incorrect,
+LJ009-0148 4.1867120181405895 But the chaplain admitted that the solitude of the convict's cell LJ007-0221 4.1867120181405895 The reports as the years flow on reiterate the same complaints.
+LJ005-0213 4.221541950113378 Newgate through all these years continued a bye-word with the Society. LJ003-0003 4.221541950113378 Prisoners were committed to it quite without reference to its capacity.
+LJ040-0197 4.488571428571428 He told Mrs. Siegel that he would run away if sent to a boarding school. LJ028-0280 4.488571428571428 Calling to mind then the words of the Babylonian at the beginning of the siege:
+LJ005-0277 4.407301587301587 This was the first enunciation of the system of separate confinement, LJ032-0259 4.407301587301587 On several occasions, Michael Paine moved the blanket in the garage.
+LJ012-0280 4.024172335600907 or of Gardelle's frantic efforts to conceal his crime. LJ020-0006 4.024172335600907 Three potatoes of fair size, peeled and boiled mealy.
+LJ016-0284 4.372471655328798 There were preachers among the crowd, but they could not get a patient hearing. LJ028-0085 4.372471655328798 The eyes are suggestive of the Semitic; the nose is of the Greek type;
+LJ037-0191 3.8732426303854877 Sometime after January twenty-seven, nineteen sixty-three, LJ002-0252 4.523401360544217 The inmates, who euphemistically styled themselves "collegians,"
+LJ010-0088 3.594603174603175 and that when it was opened the whole band should rush in. LJ020-0033 5.092290249433106 It will not swell so fast as the white, so give yourself more time for making it.
+LJ002-0026 4.360861678004535 in the three years between eighteen thirteen and eighteen sixteen, LJ016-0273 4.360861678004535 At Müller's execution there was great competition for front seats,
+LJ028-0206 4.267981859410431 he subdued the people, and wherever they collected, he slew them. LJ028-0305 4.267981859410431 troops for whose loss thou wilt care little, a thousand men.
+LJ019-0148 4.024172335600907 The prisoners were still left to themselves till next morning's unlocking, LJ036-0142 4.024172335600907 Whaley was somewhat imprecise as to where he unloaded his passenger.
+LJ044-0154 3.2230839002267575 she wrote in her letter of July nineteen sixty-three, LJ050-0181 5.730839002267573 The Commission regards this as a most useful innovation and urges that the practice be continued.
+LJ008-0222 4.244761904761905 of those who had shown the white, and those who had died game. LJ040-0106 4.244761904761905 It also appears that Lee tried to tag along with his older brothers
+LJ029-0194 4.291201814058957 Any thought that the President might cancel his visit to Dallas was ended LJ050-0225 4.291201814058957 and be available to protect the President or Vice President when they travel;
+LJ048-0100 3.9080725623582766 who had just completed advance work on the President's trip to Tampa. LJ008-0296 4.233151927437642 The time of the arrival of this report was generally known at Newgate,
+LJ026-0105 4.4537414965986395 This is done by diastase, an enzyme of plant cells. LJ019-0315 4.4537414965986395 also their constant employment in labor appropriate to their condition.
+LJ031-0034 4.128662131519274 The Governor was lifted onto a stretcher and taken into trauma room two. LJ008-0004 4.128662131519274 The reasons for this change were fully set forth in a previous chapter.
+LJ019-0315 4.4537414965986395 also their constant employment in labor appropriate to their condition. LJ026-0105 4.4537414965986395 This is done by diastase, an enzyme of plant cells.
+LJ018-0237 4.070612244897959 No fortune could stand the inroads he made into his mother's money, LJ015-0070 4.070612244897959 whence he passed to a better position under the Crystal Palace Company.
+LJ008-0310 4.1867120181405895 which was done with a sort of ceremony intended to be impressive. LJ003-0264 4.535011337868481 Among the daily visitors were members of the criminal classes still at large,
+LJ028-0058 4.430521541950113 Early he married Amuhia, a daughter of the Medean king. LJ028-0372 4.430521541950113 The poor of the surrounding country occupied its dismantled palaces.
+LJ003-0003 4.221541950113378 Prisoners were committed to it quite without reference to its capacity. LJ005-0213 4.221541950113378 Newgate through all these years continued a bye-word with the Society.
+LJ038-0128 4.105442176870748 He also denied that he had received the rifle through this box. LJ046-0221 4.105442176870748 where it will be made available to Secret Service headquarters in Washington.
+LJ014-0290 3.397233560090703 In Giltspur Street Compter, where he was first lodged LJ028-0315 4.906530612244898 He replied that he was Zopyrus, and deserted to them from the Persians.
+LJ024-0028 4.30281179138322 The statute would apply to all the courts in the federal system. LJ029-0041 4.30281179138322 who was the Secret Service official responsible for the entire Texas journey.
+LJ038-0111 4.488571428571428 At that point, Oswald refused to answer any further questions. LJ039-0117 4.488571428571428 He had the services of an experienced highly trained coach.
+LJ001-0084 4.209931972789116 But for the beauty of the earlier work they might have seemed tolerable. LJ037-0158 4.209931972789116 He concluded that all of these cartridges were fired from the same weapon.
+LJ010-0069 4.175102040816326 She died early, and Thistlewood, left to his own resources, LJ044-0205 4.175102040816326 and promised prompt U.S. aid if they do, end quote.
+LJ004-0243 3.2695238095238097 The bulk of the prisoners were still left in idleness. LJ018-0075 5.231609977324263 while at sea the captain of the ship was responsible for the security of the prisoner.
+LJ022-0106 4.476961451247165 This will make certain that the largest possible portion of the funds allotted LJ022-0029 4.476961451247165 So many people come to Washington who know things that are not so,
+LJ023-0011 4.163492063492064 Today's recovery proves how right that policy was. LJ033-0148 4.163492063492064 Using a standard chemical method involving silver nitrates
+LJ031-0214 4.082222222222223 The autopsy examination revealed two wounds in the President's head. LJ036-0102 4.082222222222223 He testified that Oswald looked older than the other boys.
+LJ015-0027 4.384081632653062 Yet even so early as the death of the first Sir John Paul, LJ015-0108 4.384081632653062 where a fish curry and a brace of partridges were set before him,
+LJ024-0006 4.349251700680272 a new member shall be appointed by the President then in office, LJ040-0130 4.349251700680272 and interviewed and observed by other members of the Youth House staff.
+LJ011-0233 4.047392290249433 that thieves or depredators were idle or entirely unsuccessful. LJ010-0101 4.047392290249433 the lights were extinguished, and a desperate conflict ensued.
+LJ028-0220 4.4189115646258506 The inscription continues: I am Cyrus, king of the world. LJ001-0079 4.4189115646258506 Caslon's type is clear and neat, and fairly well designed;
+LJ032-0259 4.407301587301587 On several occasions, Michael Paine moved the blanket in the garage. LJ049-0049 4.407301587301587 About three point seven seconds after the President received this wound,
+LJ006-0166 3.8616326530612244 dice, dangerous implements, or other prohibited articles. LJ020-0090 4.964580498866213 Active exercise in like circumstances tempts debility and disease.
+LJ007-0221 4.1867120181405895 The reports as the years flow on reiterate the same complaints. LJ009-0148 4.1867120181405895 But the chaplain admitted that the solitude of the convict's cell
+LJ036-0095 4.360861678004535 but the Commission concluded that this man was not Lee Harvey Oswald, LJ012-0235 4.360861678004535 While they were in a state of insensibility the murder was committed.
+LJ018-0231 3.5365532879818593 namely, to suppress it and substitute another. LJ023-0039 4.546621315192744 by meeting squarely our modern social and economic conditions.
+LJ031-0012 3.8384126984126983 The base station replied, quote, They have been notified, end quote, LJ008-0310 4.1867120181405895 which was done with a sort of ceremony intended to be impressive.
+LJ037-0049 3.6178231292517005 A few minutes later she described the gunman to a policeman. LJ035-0085 4.6046712018140585 from the southeast corner of the sixth floor down the stairway to the lunchroom.
+LJ005-0142 3.432063492063492 occupying barely three hundred ninety feet lineal LJ003-0191 5.394149659863945 strange and inconceivable delay occurred in carrying out the extreme sentence.
+LJ028-0166 4.175102040816326 The center of each division of the town is occupied by a fortress. LJ048-0241 4.175102040816326 These agents were each relieved for a half hour break during the night.
+LJ012-0249 4.4537414965986395 returned a verdict of willful murder against some person unknown. LJ005-0017 4.4537414965986395 tending to divest punishment of its just and salutary terrors;
+LJ003-0153 4.012562358276644 Idleness was not so universally the rule in this part of the jail. LJ049-0212 4.012562358276644 to put it in a position to reach final conclusions in this respect.
+LJ024-0051 3.9080725623582766 I suggest only the addition of justices to the bench LJ049-0099 5.080680272108843 A number of bills were introduced immediately following the assassination of President Kennedy.
+LJ013-0003 4.140272108843537 They not only became more numerous, but they were on a wider scale. LJ028-0410 4.140272108843537 There among the ruins they still live in the same kind of houses,
+LJ023-0130 4.070612244897959 was to infuse new blood into all our courts. LJ045-0133 4.070612244897959 The claimed warning was one more of Oswald's fabrications.
+LJ015-0234 4.326031746031746 Courier bags were bought to carry the "stuff" slung over the shoulders; LJ045-0124 4.326031746031746 Marina Oswald thought he did so in order to emphasize his importance.
+LJ045-0081 3.5481632653061226 Although she denied it in some of her testimony before the Commission, LJ012-0105 4.732380952380953 The police were of opinion that these robberies were both the work of the same hand.
+LJ017-0224 4.198321995464853 A simultaneous attack was made upon the captain and the first mate. LJ015-0004 4.198321995464853 The goods having no existence, Cole of course could not deliver them.
+LJ015-0161 3.130204081632653 There was something dramatic in Redpath's detection LJ012-0280 4.024172335600907 or of Gardelle's frantic efforts to conceal his crime.
+LJ037-0200 3.5713832199546487 The name written in this space was D. F. Drittal. LJ018-0388 4.999410430839002 and the bird's legs were a couple of teeth broken off the prisoner's comb.
+LJ022-0159 4.256371882086168 The absentee management of unnecessary holding company control LJ003-0123 4.256371882086168 The most trifling acts were magnified into offenses.
+LJ019-0045 4.430521541950113 Not less remarkable than this diverse interpretation of a manifest duty LJ042-0068 4.430521541950113 Somewhere, a violin plays, as I watch my life whirl away.
+LJ043-0097 3.072154195011338 In February or March of nineteen sixty-three, LJ050-0048 5.266439909297052 It has received assistance also from data processing experts at the CIA
+LJ032-0266 3.2695238095238097 Paul M. Stombaugh, of the FBI Laboratory, LJ036-0209 5.138730158730159 A similar description was given on channel two at twelve:forty-five p.m.
+LJ025-0120 3.8964625850340138 which are not only similar in animals and in plants respectively, LJ016-0032 4.6046712018140585 Williams as a capital convict was lodged in the press-yard or condemned ward.
+LJ016-0102 3.0024943310657597 By evening he manufactured a good long length, LJ049-0040 4.128662131519274 The assassination suggests that it would have been of prime importance
+LJ026-0126 3.38562358276644 as a preliminary to the real processes of nutrition. LJ038-0154 5.266439909297052 Shelley denied seeing Oswald after twelve noon or at any time after the shooting.
+LJ028-0026 4.442131519274376 Here in the valley the water is sweet and the food abundant. LJ026-0065 4.442131519274376 Matter enters the plant in the liquid or gaseous form by diffusion,
+LJ042-0170 3.3624036281179137 There are two great representatives of power in the world, LJ035-0102 5.045850340136054 Truly and Baker continued up the stairs after the encounter with Oswald in the lunchroom.
+LJ032-0128 4.070612244897959 or a determination that the print was not identical with the prints of people. LJ001-0098 4.651111111111111 and the whole effect is a little too gray, owing to the thinness of the letters.
+LJ006-0097 3.3159637188208615 Water might not be taken into the ward for washing purposes. LJ047-0098 5.127120181405895 inasmuch as the police had not given Oswald's name to the Bureau when they called the office.
+LJ041-0094 4.1867120181405895 He had the nickname, quote, Ozzie Rabbit, end quote. LJ016-0169 4.1867120181405895 As more humane principles were introduced into prison management,
+LJ018-0202 4.163492063492064 But the police nearly paid the penalty of capture with their lives. LJ035-0033 4.163492063492064 The stairway is located in the northwest corner of the Depository Building.
+LJ046-0057 3.455283446712018 or Thomas Jefferson from Washington to Monticello. LJ041-0104 5.428979591836734 While in Japan, Oswald's new found apparent self confidence and pugnaciousness
+LJ026-0118 4.326031746031746 Fat and carbohydrate foods, then, never become living matter. LJ017-0114 4.326031746031746 The intestines were, however, preserved and sent for analysis,
+LJ049-0229 3.815192743764172 while assuming no radical relocation of responsibilities, LJ046-0151 4.360861678004535 All material received by PRS was separately screened
+LJ010-0234 4.349251700680272 backed possibly with the hope that, as in a much more recent case, LJ028-0455 4.349251700680272 It seems that the circuit of the outer wall was about eleven miles.
+LJ042-0053 4.395691609977324 Responding to Robert's statement that he had not "renounced" him, LJ025-0007 4.395691609977324 so much so as to require discussion in different treatises.
+LJ023-0121 4.117052154195012 How then could we proceed to perform the mandate given us? LJ014-0119 4.117052154195012 He had fled to Jersey, where he was recognized and arrested.
+LJ039-0018 4.209931972789116 He also said that he would use the pistol if the opportunity arose. LJ042-0027 4.209931972789116 In addition to studying the Russian language while he was in the Marines,
+LJ041-0142 4.117052154195012 Once it had started down Elm Street toward the Triple Underpass, however, LJ028-0038 4.117052154195012 Its history for the next fifteen hundred years or more is obscure.
+LJ032-0138 3.2695238095238097 Nor was there any indication that the lift had been performed. LJ011-0196 4.7556009070294785 Mr. Turner at once set off for London, where he sought the assistance of the police,
+LJ018-0067 3.1766439909297053 Thither, he was pursued by a detective officer, LJ004-0176 5.161950113378685 Sick women and their children remained in the ordinary wards, and propagated disease.
+LJ028-0504 3.954512471655329 designed in colors of white and blue and yellow and black. LJ047-0060 4.314421768707483 Fain had been assigned to see Marina Oswald at an appropriate time.
+LJ004-0178 4.1867120181405895 The bedclothes consisted only of a single "very slight" rug. LJ016-0333 4.1867120181405895 from Clerkenwell prison, by which many persons lost their lives.
+LJ014-0130 4.070612244897959 Manning, when sentence of death was passed on him, said nothing; LJ003-0086 4.070612244897959 The crowding was in consequence of the delay in removing transports.
+LJ018-0285 4.209931972789116 With this as capital they came back to England via Buenos Aires, LJ038-0061 4.209931972789116 He saw no shotgun in the possession of any policeman near Oswald.
+LJ009-0113 4.070612244897959 whistles merrily, and points upwards with madness in his look. LJ015-0172 4.070612244897959 The inquiry soon revealed the colossal character of the frauds.
+LJ050-0214 4.465351473922903 Although the Commission does not know whether the cases involved are entirely comparable, LJ031-0074 4.465351473922903 quote, could have easily been hidden in the blood and hair, end quote,
+LJ018-0083 4.198321995464853 Sattler was a very excitable although not an ill-tempered man. LJ005-0269 4.198321995464853 Prison officers should not have any share in prisoners' earnings,
+LJ002-0191 3.153424036281179 Besides those actually resident within the walls, LJ017-0256 5.405759637188209 The mutineers were arrested, the case inquired into by a naval court-martial,
+LJ014-0117 4.465351473922903 An examination of her boxes disclosed a quantity of O'Connor's property. LJ016-0252 4.465351473922903 Possibly such changes may be introduced into the method of execution
+LJ019-0204 3.1766439909297053 a serious effort was made to reconstruct Newgate. LJ006-0056 5.161950113378685 Some rooms remained quite empty and unoccupied, while others were full to overflowing.
+LJ034-0086 4.000952380952381 This clipboard had been made by Kaiser and had his name on it. LJ006-0102 4.616281179138322 This, too, was in the depth of the winter, and during a most inclement season.
+LJ016-0412 4.651111111111111 Wainwright's execution was within the jail, but only nominally private. LJ048-0086 4.1867120181405895 Other Protective Measures and Aspects of Secret Service Performance
+LJ036-0102 4.082222222222223 He testified that Oswald looked older than the other boys. LJ031-0214 4.082222222222223 The autopsy examination revealed two wounds in the President's head.
+LJ017-0074 3.815192743764172 whose life he had insured for thirteen thousand pounds. LJ042-0210 4.662721088435374 A suggestion that Oswald hated more than just capitalism and communism
+LJ003-0149 4.476961451247165 supported themselves; they had the ration of prison bread only, LJ040-0229 4.476961451247165 in a sustained relationship with one therapist might bring results.
+LJ003-0135 4.03578231292517 She went up to the ward and found him lying down, quote, LJ008-0213 4.03578231292517 By this time the workmen might be heard busily erecting the gallows;
+LJ008-0172 4.279591836734694 In another part seven persons met their death by suffocation. LJ011-0257 4.279591836734694 Howard was secured, given into custody, and committed to Newgate.
+LJ011-0202 3.141814058956916 The uncle claimed her. The husband resisted. LJ008-0223 5.835328798185941 The approaching ceremony had evidently no terrors for these "idolaters of the gallows."
+LJ019-0132 4.488571428571428 in the inquiry which followed, attention was again attracted to Newgate. LJ021-0011 4.488571428571428 Men may differ as to the particular form of governmental activity
+LJ048-0089 4.209931972789116 Against the background of the critical events of November twenty-two, however, LJ032-0066 4.593061224489796 was thrown away after the box was closed in May nineteen sixty-three.
+LJ032-0005 4.395691609977324 and that the weapon which fired these bullets was a Mannlicher-Carcano LJ021-0033 4.395691609977324 This has given safety to millions of depositors in these banks.
+LJ015-0296 4.221541950113378 Hardwicke, or "Ralph," appealed to Saward in his difficulty LJ019-0312 4.221541950113378 with the local jurisdictions, although still very leniently disposed.
+LJ038-0271 3.2114739229024942 It was a six point five-millimeter bullet LJ033-0146 4.128662131519274 Scientific Evidence Linking Rifle and Oswald to Paper Bag
+LJ035-0033 4.163492063492064 The stairway is located in the northwest corner of the Depository Building. LJ018-0202 4.163492063492064 But the police nearly paid the penalty of capture with their lives.
+LJ007-0042 4.442131519274376 so that men in the most awful situation, daily expecting to be hanged, LJ006-0164 4.442131519274376 But when he did visit, his inspections were of the most superficial character
+LJ030-0172 4.326031746031746 From his position in the right jump seat immediately in front of the President, LJ028-0501 4.326031746031746 Nor were the walls about the palace a great mass of dull brick masonry.
+LJ010-0110 4.1867120181405895 Several of the other prisoners took the same line as regards Edwards, LJ010-0011 4.535011337868481 This led to a rapid and marked increase in all kinds of fraud;
+LJ036-0177 4.372471655328798 knew Lee Harvey Oswald under the alias of O. H. Lee. LJ013-0243 4.372471655328798 Good now offered to go to Wandsworth and satisfy the pawnbroker.
+LJ021-0014 3.466893424036281 but also our processes of civilization. LJ049-0142 4.627891156462585 by defining responsibilities clearly and overseeing their execution.
+LJ021-0015 3.0141043083900225 The underlying necessity for such activity LJ030-0099 5.0226303854875285 telephone and Western Union vehicles, a White House communications car,
+LJ031-0176 4.314421768707483 A casket was obtained and the President's body was prepared for removal. LJ045-0061 4.314421768707483 While Marina Oswald said that her husband wanted her to learn English,
+LJ021-0178 3.397233560090703 Has England gone back to the gold standard today? LJ030-0170 4.906530612244898 Governor Connally testified that he recognized the first noise as a rifle shot
+LJ002-0141 4.279591836734694 and indeed supplied the bulk of the poor debtors committed to prison. LJ009-0216 4.279591836734694 Hanging in chains upon the gibbet which had served for the execution,
+LJ014-0335 4.314421768707483 which were soon developed, much to that firm's subsequent anger and regret. LJ010-0138 4.314421768707483 and died in a manner strongly contrasting with that of his fellows.
+LJ021-0048 4.1518820861678005 the careful checking of new securities under the Securities Act LJ024-0097 4.1518820861678005 has ever been ratified within anything like a reasonable time.
+LJ043-0173 3.3275736961451248 and the trail of evidence he left behind him on that occasion. LJ025-0133 5.266439909297052 The reflex action of the snail is the result of the presence of a nervous system in the animal.
+LJ050-0266 4.279591836734694 The exchange of letters dated August thirty-one, nineteen sixty-four, LJ018-0378 4.279591836734694 In Newgate the 'Lennie' mutineers were extremely well behaved.
+LJ007-0188 3.38562358276644 the misemployment of officers and prisoners by the governor. LJ006-0265 5.266439909297052 The untried might see their friends three times a week, the convicted only once.
+LJ009-0264 4.407301587301587 His face was visible to the whole crowd, and was fearful to behold. LJ010-0240 4.407301587301587 The Queen was apprised of the danger, and begged not to go abroad;
+LJ023-0051 4.488571428571428 It is the American people themselves who are in the driver's seat. LJ038-0011 4.488571428571428 A police car made a U-turn, and as the sirens grew fainter,
+LJ031-0074 4.465351473922903 quote, could have easily been hidden in the blood and hair, end quote, LJ050-0214 4.465351473922903 Although the Commission does not know whether the cases involved are entirely comparable,
+LJ046-0115 4.198321995464853 Adequacy of preventive intelligence operations of the Secret Service. LJ045-0145 4.198321995464853 Those arguments, however, were not persuasive to Marina Oswald,
+LJ038-0183 3.710702947845805 In translation, the note read as follows: one. LJ046-0251 4.175102040816326 to the other agencies. No specific guidance was provided.
+LJ003-0086 4.070612244897959 The crowding was in consequence of the delay in removing transports. LJ014-0130 4.070612244897959 Manning, when sentence of death was passed on him, said nothing;
+LJ004-0081 4.000952380952381 decent clothing and bedding, and a diet sufficient to support him." LJ029-0117 4.000952380952381 According to Lawson, the chosen route seemed to be the best.
+LJ049-0218 4.337641723356009 between the Secret Service and the President and his family is contemplated. LJ008-0141 4.337641723356009 the doubtfulness of the issue, or the superior position of the perpetrator,
+LJ010-0113 4.395691609977324 he had neither a bed to lie upon nor a coat to his back. LJ044-0030 4.395691609977324 five of which were usually present at meetings which were held once a month.
+LJ009-0013 4.30281179138322 and kept altogether separate from the other prisoners until the day of his death. LJ001-0135 4.30281179138322 it is impossible that they should be quite equal except in lines of poetry
+LJ021-0159 4.03578231292517 Morally, it is the greatest menace to our social order. LJ027-0047 4.03578231292517 totally different structures are modified to perform the same functions.
+LJ048-0212 3.91968253968254 Lawson stated that he, quote, was looking back a good deal of the time, LJ024-0114 4.476961451247165 and who would be willing to support a reasonable amendment if they could agree on one.
+LJ032-0232 4.093832199546485 The dates surrounding the taking of this picture and the purchase of the rifle LJ015-0257 4.093832199546485 Kay, who had been living with Agar at the time of the bullion robbery,
+LJ013-0076 4.407301587301587 and held all the threads of these intricate and nefarious transactions. LJ048-0064 4.407301587301587 While the Secret Service bears the principal responsibility for this failure,
+LJ011-0044 3.072154195011338 will no longer be herded indiscriminately together. LJ003-0065 5.266439909297052 All the misdemeanants, whatever their offense, were lodged in this chapel ward.
+LJ005-0034 3.65265306122449 Undeterred by these sarcasms and misrepresentations, LJ018-0016 4.871700680272109 T. Briggs, Esq., Robarts and Co., Lombard Street.
+LJ039-0224 4.209931972789116 show that he possessed ample capability to commit the assassination. LJ013-0183 4.209931972789116 The valet's strange demeanor had attracted attention from the first.
+LJ001-0185 3.095374149659864 printed books might once again illustrate to the full LJ007-0064 5.846938775510204 and the day of whose execution was fixed. He had no doubt a difficult mission to discharge;
+LJ043-0086 3.2695238095238097 through a work-study program at a local college. LJ038-0147 5.312879818594104 Frazier testified before the Commission that Oswald carried no lunch sack that day.
+LJ018-0385 4.465351473922903 It was his own handiwork -- a bird pecking at a flower; LJ020-0038 4.465351473922903 Turn the pans once while baking, moving them as gently as possible.
+LJ040-0084 3.2811337868480726 dwelling on the fact that she was a widow with three children. LJ029-0026 4.651111111111111 it was agreed that the planning of events in Texas would be left largely to the Governor.
+LJ027-0031 4.4189115646258506 but not in any striking way is there change in the internal organs. LJ047-0168 4.4189115646258506 and that he had given as his address Mrs. Paine's residence in Irving.
+LJ023-0024 4.30281179138322 not this week or month perhaps, but within a year or two. LJ001-0094 4.30281179138322 were induced to cut punches for a series of "old style" letters.
+LJ027-0038 4.024172335600907 between the heart of an insect and the heart of a vertebrate animal LJ001-0041 4.95297052154195 It must be said that it is in no way like the transition type of Subiaco,
+LJ017-0100 3.7455328798185943 Next night Cook had a second and a more violent attack. LJ037-0027 4.767210884353742 Benavides stopped and waited in the truck until the gunman ran to the corner.
+LJ012-0114 3.1766439909297053 but their request, in spite of their earnest entreaties, LJ025-0141 4.941360544217687 the diameter of which dwindles down to the limits of our present microscopic vision,
+LJ009-0005 4.476961451247165 which persons under sentence of death obtain from all the officers of the prison. LJ036-0182 4.476961451247165 She recalled that it was subsequent to the time the President had been shot.
+LJ012-0235 4.360861678004535 While they were in a state of insensibility the murder was committed. LJ036-0095 4.360861678004535 but the Commission concluded that this man was not Lee Harvey Oswald,
+LJ028-0184 4.267981859410431 he extended his empire to the Mediterranean and even to Egypt. LJ022-0051 4.267981859410431 In spite of the fact that unemployment remains a serious problem
+LJ032-0088 4.360861678004535 Post Office Box three zero zero one six, New Orleans LJ035-0031 4.360861678004535 He shouted twice, quote, Turn loose the elevator, end quote,
+LJ041-0055 4.442131519274376 a dissatisfaction which seemed to find expression at this particular point LJ040-0151 4.442131519274376 He was also described as having a, quote, Vivid fantasy life,
+LJ019-0113 4.105442176870748 The scheme was no doubt fascinating, and in many respects feasible; LJ028-0506 4.105442176870748 A modern artist would have difficulty in doing such accurate work.
+LJ012-0026 4.256371882086168 With this capital he returned to London and set up as a fence. LJ038-0259 4.256371882086168 The oral report was negative because of the battered condition of the bullet.
+LJ008-0100 4.326031746031746 The yeoman was, however, under-sold by his wife, "Rosy Emma," LJ017-0245 4.326031746031746 On the second October they sighted land, ten miles distant;
+LJ008-0141 4.337641723356009 the doubtfulness of the issue, or the superior position of the perpetrator, LJ049-0218 4.337641723356009 between the Secret Service and the President and his family is contemplated.
+LJ009-0164 4.047392290249433 sheep or horse stealing, and stealing in a dwelling-house. LJ008-0220 4.047392290249433 hoary-headed and hardened in guilt, were still at large.
+LJ010-0135 3.954512471655329 yelled out three cheers to the populace whom he faced. LJ006-0285 4.349251700680272 which numbers of well-meaning but inquisitive people were anxious to witness.
+LJ021-0131 3.954512471655329 is not fully supporting the recovery effort of his government. LJ022-0191 4.349251700680272 They are essential factors in a rounded program for national recovery.
+LJ011-0231 4.291201814058957 Miss Turner subsequently married Mr. Legh of Lym Hall, Cheshire. LJ012-0128 4.291201814058957 A young man named Caspar, clerk to a steam-ship company,
+LJ041-0116 4.221541950113378 after it was learned that he had defected to the Soviet Union. LJ035-0203 4.221541950113378 and also handled a paper bag which was found near the cartons.
+LJ043-0056 3.397233560090703 Even though Oswald cut off relations with his mother, LJ031-0119 4.906530612244898 The fracture was set, and a cast was applied with some traction utilized.
+LJ016-0268 3.5597732426303854 The remarks heard amongst the crowd were of coarse approval. LJ028-0090 4.627891156462585 He was fond of restoring the ruined temples of the old Babylonian cities,
+LJ037-0206 4.326031746031746 The balance due on the purchase was nineteen dollars, ninety-five cents. LJ038-0284 4.326031746031746 Although the Commission recognizes that neither expert was able to state
+LJ007-0048 4.244761904761905 so subversive of meditation, so disturbing to the thoughts; LJ004-0205 4.244761904761905 Industrial labor had also been introduced with satisfactory results.
+LJ028-0350 4.395691609977324 It is from these women that the Babylonians of our times are sprung. LJ004-0125 4.395691609977324 in the balance some work was done, but with the most meager results.
+LJ008-0004 4.128662131519274 The reasons for this change were fully set forth in a previous chapter. LJ031-0034 4.128662131519274 The Governor was lifted onto a stretcher and taken into trauma room two.
+LJ021-0017 4.059002267573696 Instead of the give and take of free individual contract, LJ048-0220 4.465351473922903 Conduct of Secret Service agents in Fort Worth on November twenty-two.
+LJ015-0242 4.407301587301587 re-fastened and re-sealed the bullion box, and replaced it in the safe. LJ043-0068 4.407301587301587 While he might have expected difficulty from such an approach, in fact
+LJ014-0041 4.105442176870748 Such an extravagant defense did not weigh with judge or jury; LJ011-0079 4.105442176870748 he soon left the service and betook himself to dishonest ways.
+LJ037-0090 4.279591836734694 she testified, quote, I would say that was him for sure, end quote. LJ030-0222 4.279591836734694 Mrs. Kennedy had no recollection of climbing onto the back of the car.
+LJ004-0077 4.047392290249433 nor has he a right to poison or starve his fellow-creatures." LJ007-0136 4.047392290249433 But there were others remediable under a better system of management.
+LJ004-0129 3.0024943310657597 Many of the jails were in the most deplorable condition: LJ018-0350 5.10390022675737 He might swear he was not the murderer, that he never fired a pistol in his life,
+LJ036-0074 4.4189115646258506 If Oswald left the Depository Building at twelve:thirty-three p.m., LJ011-0254 4.4189115646258506 A life and death struggle ensued. Mullay cried "Murder!"
+LJ036-0031 4.384081632653062 and requested a transfer which she might use if she got through the traffic. LJ038-0013 4.384081632653062 The man wore a T-shirt beneath his outer shirt and he had no jacket.
+LJ043-0178 3.8964625850340138 as, in fact, one of them did appear after the assassination. LJ028-0510 4.6046712018140585 Probably their metal was far too valuable for the enemy to leave behind.
+LJ028-0342 3.0024943310657597 Thus was Babylon taken for the second time. LJ028-0069 5.254829931972789 how he cast Hebrew lads into a fiery furnace and into the lions' den,
+LJ017-0088 3.4436734693877553 Quantities of antimony were found in the body after death. LJ036-0096 5.510249433106576 because of the overwhelming evidence that Oswald was far away from the building by that time.
+LJ012-0152 4.360861678004535 which he refused to redeem on account of the row about the robbery. LJ027-0061 4.360861678004535 in order to enclose and protect a similar enlargement of the nervous center,
+LJ010-0037 4.000952380952381 Now and again there seemed to be a recurrence of a murder epidemic, LJ023-0017 4.000952380952381 that we could not afford to take the risk of another great depression.
+LJ005-0185 4.279591836734694 As time passed, however, these magistrates made no effort at reform. LJ032-0050 4.279591836734694 It bore the manufacturer's serial number C two seven six six.
+LJ032-0240 3.2114739229024942 By Sunday, March thirty-one, nineteen sixty-three, LJ007-0208 4.279591836734694 In the inspectors' fourth report, dated eighteen thirty-nine,
+LJ014-0293 3.2114739229024942 He returned from court in a state of gloomy dejection, LJ003-0157 5.138730158730159 The best accommodation the jail could offer was reserved for the prisoners on the state side,
+LJ016-0179 3.594603174603175 contracted with sheriffs and conveners to work by the job. LJ003-0343 5.394149659863945 With the seeming impossibility of extending the limits of the prison as it then stood,
+LJ038-0011 4.488571428571428 A police car made a U-turn, and as the sirens grew fainter, LJ023-0051 4.488571428571428 It is the American people themselves who are in the driver's seat.
+LJ028-0506 4.105442176870748 A modern artist would have difficulty in doing such accurate work. LJ019-0113 4.105442176870748 The scheme was no doubt fascinating, and in many respects feasible;
+LJ047-0062 4.30281179138322 In March nineteen sixty-three, while attempting to locate Marina Oswald, LJ048-0221 4.30281179138322 In the early morning hours on November twenty-two, nineteen sixty-three,
+LJ012-0148 4.175102040816326 instead of handing it or the price of it back to the Caspars. LJ008-0318 4.175102040816326 The men who were doomed often fell down in convulsions upon the floor.
+LJ046-0177 3.710702947845805 which is maintained on a geographical field office basis. LJ005-0182 4.535011337868481 that for long no idea of interfering with them was entertained.
+LJ024-0048 4.093832199546485 The number of justices has been changed several times before, LJ005-0300 4.093832199546485 and the establishment of municipal institutions upon a proper footing,
+LJ016-0158 4.314421768707483 It was that of a "Long Firm" swindler, by name Johnson, LJ005-0129 4.314421768707483 "a measure which must greatly tend to discourage attempts to escape."
+LJ030-0094 3.153424036281179 Driven by an officer of the Dallas Police Department, LJ003-0249 5.254829931972789 were imposed in case of misconduct; and when there had been an attempt at escape,
+LJ047-0168 4.4189115646258506 and that he had given as his address Mrs. Paine's residence in Irving. LJ027-0031 4.4189115646258506 but not in any striking way is there change in the internal organs.
+LJ013-0002 3.8035827664399093 As the century advanced crimes of fraud increased. LJ008-0262 4.7556009070294785 and with them indeed this dispatch amounted to undue precipitancy.
+LJ038-0205 4.070612244897959 She thought he was attending a class or was on his own business. LJ042-0029 4.384081632653062 While there is no proof that he saved fifteen hundred dollars, as he claimed,
+LJ039-0002 4.163492063492064 Report of the President's Commission on the Assassination of President Kennedy. LJ022-0114 4.163492063492064 Our responsibility is to all of the people in this country.
+LJ003-0140 4.337641723356009 otherwise he would have been stripped of his clothes. End quote. LJ007-0002 4.337641723356009 Eighteen years had elapsed since the formation of the "Ladies' Association,"
+LJ039-0205 3.0024943310657597 five point six, and six point five seconds. LJ050-0124 5.254829931972789 to use the data developed by these agencies to carry out its special duties.
+LJ009-0138 4.012562358276644 all the avenues to the prison gates were blocked by ticket-holders. LJ024-0082 4.012562358276644 would deny us the necessary means of dealing with the present.
+LJ014-0155 4.372471655328798 Now she abused the jury, now called Manning a vagabond, LJ007-0202 4.372471655328798 But the one great and most crying evil remained unremedied.
+LJ017-0171 4.012562358276644 Smethurst was therefore given a free pardon for the offense of murder, LJ008-0143 4.012562358276644 This was notably the case at the execution of Holloway and Haggerty
+LJ008-0285 4.372471655328798 on the one hand the gallows, on the other a short imprisonment. LJ004-0229 4.372471655328798 Convicts were not even compelled to wear irons, providing they behaved well.
+LJ028-0251 3.65265306122449 When Cyrus took Babylon, little or no force was employed. LJ028-0374 5.115510204081633 settled there, and finally the place was abandoned to the Arabs of the desert.
+LJ017-0160 4.117052154195012 as indicating a motive for keeping her alive rather than killing her. LJ006-0178 4.117052154195012 and for years, felons who should have been sent beyond the seas.
+LJ048-0221 4.30281179138322 In the early morning hours on November twenty-two, nineteen sixty-three, LJ047-0062 4.30281179138322 In March nineteen sixty-three, while attempting to locate Marina Oswald,
+LJ017-0217 4.4537414965986395 Navigation and discipline could not be easy with such a nondescript crew. LJ024-0022 4.4537414965986395 It has been discussed and approved by many persons of high authority
+LJ045-0133 4.070612244897959 The claimed warning was one more of Oswald's fabrications. LJ023-0130 4.070612244897959 was to infuse new blood into all our courts.
+LJ011-0162 4.082222222222223 and it stated that Mrs. Turner had been stricken with paralysis. LJ006-0251 4.082222222222223 but the presence and authority of the governor himself became indispensable.
+LJ003-0123 4.256371882086168 The most trifling acts were magnified into offenses. LJ022-0159 4.256371882086168 The absentee management of unnecessary holding company control
+LJ008-0317 3.490113378684807 The fatal news was not always received in the same way. LJ025-0031 5.394149659863945 there were no means by which the motion of its fluids could be produced by internal causes.
+LJ010-0193 3.2927437641723354 When brought to trial he hardly realized his position, LJ019-0347 4.024172335600907 chairman of quarter sessions, or even by a couple of justices.
+LJ002-0182 4.395691609977324 the Fleet, and the Marshalsea prisons especially devoted to them, LJ019-0109 4.395691609977324 Mr. Pearson backed up his recommendations by many sound arguments.
+LJ007-0202 4.372471655328798 But the one great and most crying evil remained unremedied. LJ014-0155 4.372471655328798 Now she abused the jury, now called Manning a vagabond,
+LJ009-0108 4.4189115646258506 The two masses of prisoners for trial undulate and slightly murmur, LJ018-0003 4.4189115646258506 As the circumstances under which it was perpetrated were somewhat novel,
+LJ030-0052 4.442131519274376 with two collapsible jump seats between the front and rear seats. LJ019-0076 4.442131519274376 This variety was often extended to all branches of prison economy.
+LJ044-0224 3.2230839002267575 would not agree with that particular wording, end quote. LJ001-0052 5.37092970521542 yet their type is artistically on a much lower level than Jenson's, and in fact
+LJ012-0014 4.117052154195012 Edwards was sentenced to two years' imprisonment in Newgate, LJ012-0203 4.117052154195012 Eventually the law overtook them, but almost by accident.
+LJ042-0068 4.430521541950113 Somewhere, a violin plays, as I watch my life whirl away. LJ019-0045 4.430521541950113 Not less remarkable than this diverse interpretation of a manifest duty
+LJ009-0121 4.4537414965986395 for all thy goodness and loving-kindness to us, and to all men; LJ008-0259 4.4537414965986395 and of their demeanor after sentence until the last penalty was paid.
+LJ001-0112 4.03578231292517 instead of ending in the sharp and clear stroke of Jenson's letters; LJ003-0135 4.03578231292517 She went up to the ward and found him lying down, quote,
+LJ029-0099 4.465351473922903 From Love Field the route passed through a portion of suburban Dallas, LJ048-0104 4.465351473922903 There were far safer routes via freeways directly to the Trade Mart,
+LJ035-0142 4.314421768707483 then her estimate of the time when she descended from the fourth floor is incorrect, LJ020-0105 4.314421768707483 Weave the little duties in and under and among what seem to be the greater.
+LJ008-0143 4.012562358276644 This was notably the case at the execution of Holloway and Haggerty LJ017-0171 4.012562358276644 Smethurst was therefore given a free pardon for the offense of murder,
+LJ007-0146 3.9080725623582766 vaunting his own adventures, or listening to those of others; LJ013-0161 5.080680272108843 the furniture turned upside down, the drawers of the escritoire open and rifled,
+LJ016-0141 4.221541950113378 He was at work under the supervision of the artisan warder of the prison, LJ028-0270 4.221541950113378 This was said by a Babylonian who thought that a mule would never foal.
+LJ008-0111 4.465351473922903 They entered a "stone cold room," and were presently joined by the prisoner. LJ016-0366 4.465351473922903 and placed decently in a shell by the workmen who removed the gallows.
+LJ015-0257 4.093832199546485 Kay, who had been living with Agar at the time of the bullion robbery, LJ032-0232 4.093832199546485 The dates surrounding the taking of this picture and the purchase of the rifle
+LJ040-0209 4.267981859410431 well I've got to live with her. I guess I love her, end quote. LJ028-0386 4.267981859410431 But the walls of the old city had not yet served their full purpose.
+LJ005-0139 4.221541950113378 making an average of nineteen persons occupying each room. LJ009-0144 4.221541950113378 In fact his looks denoted extreme sorrow and contrition,
+LJ048-0194 3.513333333333333 during the morning of November twenty-two prior to the motorcade. LJ009-0139 4.918140589569161 In spite of the throng, owing to the excellent arrangements made by the sheriffs,
+LJ005-0218 3.455283446712018 The chapel still continued incommodious and insufficient LJ018-0344 4.442131519274376 In cold-blooded premeditation it rivaled that of the Mannings.
+LJ001-0175 4.198321995464853 Simple as this proposition is, it is necessary to be stated, LJ001-0095 4.198321995464853 These and similar founts, cast by the above firm and others,
+LJ007-0002 4.337641723356009 Eighteen years had elapsed since the formation of the "Ladies' Association," LJ003-0140 4.337641723356009 otherwise he would have been stripped of his clothes. End quote.
+LJ031-0089 3.5017233560090704 considerable time which at this juncture was not available. LJ028-0013 4.279591836734694 The Damascus mosques and their minarets sink beneath the western sky.
+LJ029-0127 4.233151927437642 Elm Street was to be reached from Main by turning right at Houston, LJ025-0124 4.558231292517007 but in the plants the act of contraction has been found to be accompanied,
+LJ029-0116 4.221541950113378 and could not accommodate spectators as conveniently as Harwood Street. LJ028-0331 4.221541950113378 After this second exploit, his praise was in all mouths.
+LJ013-0183 4.209931972789116 The valet's strange demeanor had attracted attention from the first. LJ039-0224 4.209931972789116 show that he possessed ample capability to commit the assassination.
+LJ014-0298 4.442131519274376 Strange to say, a second suicide occurred in Newgate the same night, LJ013-0043 4.442131519274376 This person made much of Wallace, encouraged his attentions to his daughter,
+LJ001-0054 4.337641723356009 Jenson, however, had many contemporaries who used beautiful type, LJ022-0171 4.337641723356009 designed to improve the status of our transportation agencies.
+LJ005-0017 4.4537414965986395 tending to divest punishment of its just and salutary terrors; LJ012-0249 4.4537414965986395 returned a verdict of willful murder against some person unknown.
+LJ041-0138 4.476961451247165 and that she could not think of any reason why Oswald would want to kill President Kennedy. LJ033-0048 4.465351473922903 Mrs. Paine was certain that she had not left the light on in the garage after dinner.
+LJ037-0118 4.209931972789116 Callaway told the Commission, quote, So they brought four men in. LJ048-0089 4.209931972789116 Against the background of the critical events of November twenty-two, however,
+LJ046-0030 4.128662131519274 particularly when the President is traveling in this country or abroad. LJ044-0001 4.128662131519274 Report of the President's Commission on the Assassination of President Kennedy.
+LJ023-0055 4.209931972789116 Like the Bible, it ought to be read again and again. LJ030-0047 4.209931972789116 The occupants scanned the crowd and the buildings along the route.
+LJ008-0274 4.233151927437642 The result in the latter case was left in the first place to the king in council, LJ030-0244 4.476961451247165 hitting me on the shoulder, and shouted to all of us in the back seat to get down.
+LJ040-0130 4.349251700680272 and interviewed and observed by other members of the Youth House staff. LJ024-0006 4.349251700680272 a new member shall be appointed by the President then in office,
+LJ004-0207 4.430521541950113 and all the material for prisoners' apparel was manufactured in the jail. LJ003-0288 4.430521541950113 The above-mentioned report was ordered to be printed upon the ninth May.
+LJ016-0366 4.465351473922903 and placed decently in a shell by the workmen who removed the gallows. LJ008-0111 4.465351473922903 They entered a "stone cold room," and were presently joined by the prisoner.
+LJ028-0305 4.267981859410431 troops for whose loss thou wilt care little, a thousand men. LJ028-0206 4.267981859410431 he subdued the people, and wherever they collected, he slew them.
+LJ003-0273 4.233151927437642 "I believe," says Mr. Bennet in the letter already largely quoted, LJ004-0217 4.233151927437642 The old haphazard system, by which meat was issued in bulk,
+LJ038-0144 3.165034013605442 that must have been some other time he picked me up, end quote, LJ035-0092 5.312879818594104 and this would be the minimum, because I am sure that I, you know, it took me a little longer, end quote,
+LJ025-0007 4.395691609977324 so much so as to require discussion in different treatises. LJ042-0053 4.395691609977324 Responding to Robert's statement that he had not "renounced" him,
+LJ034-0169 3.699092970521542 the same corner where Brennan was sitting on a concrete wall. LJ027-0129 5.045850340136054 Convincing as are the evidences of descent recorded in the structure of plants and animals,
+LJ028-0455 4.349251700680272 It seems that the circuit of the outer wall was about eleven miles. LJ010-0234 4.349251700680272 backed possibly with the hope that, as in a much more recent case,
+LJ039-0130 3.0373242630385486 After reviewing Oswald's marksmanship scores, LJ027-0002 4.860090702947846 Biology. Chapter ten. Morphology and Embryology, Part One.
+LJ028-0443 4.267981859410431 because great masses of masonry used to project from its surface. LJ033-0050 4.267981859410431 Marina Oswald testified that it was between nine and ten p.m.
+LJ047-0160 4.105442176870748 found it to be four one one Elm Street. End quote. LJ042-0249 4.105442176870748 Even though his primary purpose probably was to get to Cuba,
+LJ015-0213 3.5249433106575965 a third with the captain of the Folkestone and Boulogne boat. LJ013-0053 5.127120181405895 Miss Bailey, the doctor's sister, in whose favor the note was said to have been given,
+LJ003-0252 4.256371882086168 of distinguishing a prisoner from a stranger and temporary visitor. LJ010-0065 4.256371882086168 At the former the "Provisional Government" was to be established,
+LJ027-0040 3.408843537414966 between the fin of a fish and the paddle of a whale LJ019-0002 5.394149659863945 The time at length approached when a radical and complete change was to come over the old city jail.
+LJ042-0241 4.476961451247165 Soon after his arrival he wrote to the Soviet Embassy in Washington LJ003-0188 4.476961451247165 The old press yard has been fully described in a previous chapter.
+LJ032-0154 4.256371882086168 The print is additional proof that the rifle was in Oswald's possession. LJ018-0254 4.256371882086168 He declined to plead, but a plea of "Not Guilty" was recorded.
+LJ038-0141 3.2927437641723354 therefore, he made his weekly visit on Thursday night. LJ035-0056 4.024172335600907 Meanwhile, Truly had run up several steps toward the third floor.
+LJ014-0030 4.256371882086168 These were damnatory facts which well supported the prosecution. LJ016-0276 4.256371882086168 Never, indeed, had an execution been more generally patronized.
+LJ033-0050 4.267981859410431 Marina Oswald testified that it was between nine and ten p.m. LJ028-0443 4.267981859410431 because great masses of masonry used to project from its surface.
+LJ019-0347 4.024172335600907 chairman of quarter sessions, or even by a couple of justices. LJ016-0317 4.7556009070294785 but believed that a public ceremony destroyed the whole value of an execution.
+LJ021-0033 4.395691609977324 This has given safety to millions of depositors in these banks. LJ032-0005 4.395691609977324 and that the weapon which fired these bullets was a Mannlicher-Carcano
+LJ045-0061 4.314421768707483 While Marina Oswald said that her husband wanted her to learn English, LJ031-0176 4.314421768707483 A casket was obtained and the President's body was prepared for removal.
+LJ012-0128 4.291201814058957 A young man named Caspar, clerk to a steam-ship company, LJ011-0231 4.291201814058957 Miss Turner subsequently married Mr. Legh of Lym Hall, Cheshire.
+LJ015-0209 3.141814058956916 Burgess detailed the whole system of transmission. LJ018-0153 5.835328798185941 the officers ensconced themselves in the latter, and waited for Buncher's expected visit.
+LJ048-0238 3.083764172335601 one agent was there from two until five a.m. LJ005-0221 5.138730158730159 and the panes were filled in with oiled paper, an insufficient protection against the weather;
+LJ012-0294 3.65265306122449 without hesitation brought in a verdict of willful murder. LJ015-0174 5.278049886621315 Thither police officers followed, only to find that he had returned to London.
+LJ017-0114 4.326031746031746 The intestines were, however, preserved and sent for analysis, LJ026-0118 4.326031746031746 Fat and carbohydrate foods, then, never become living matter.
+LJ034-0132 4.384081632653062 From the street, this creates the impression that the person is standing. LJ040-0015 4.384081632653062 There is, however, a large amount of material available in his writings
+LJ040-0213 4.442131519274376 that he had great difficulty in adapting himself to conditions in that city. LJ047-0206 4.442131519274376 I would think his continued association with the Russian Embassy after his return,
+LJ011-0012 4.082222222222223 It must be added that the Bank of England, on discovering the forgeries, LJ010-0115 4.082222222222223 and it is pretty certain that for some time he served both sides;
+LJ014-0056 4.175102040816326 while in Ireland a wife dashed out her husband's brains with a hammer. LJ018-0180 4.175102040816326 But he was not long at large; he was too active an evil-doer
+LJ019-0282 4.03578231292517 Their origin it will be seen dates back much further than that. LJ011-0160 4.372471655328798 and a servant hurriedly alighted from it, bearing a letter for Miss Turner.
+LJ015-0288 3.9080725623582766 so that Saward and the rest might make themselves scarce. LJ048-0217 5.080680272108843 The agents in the follow-up car also were expected to scan adjacent buildings.
+LJ009-0151 4.349251700680272 The atrocity of the murder no doubt attracted extraordinary attention to it. LJ015-0077 4.349251700680272 He was not the first man of loose morality and expensive tastes
+LJ019-0290 4.30281179138322 There were dormitories without light, control, or regulation at night, LJ022-0021 4.30281179138322 or to one industry, or to an individual private occupation.
+LJ035-0014 3.455283446712018 it sounded high and I immediately kind of looked up, LJ030-0147 4.83687074829932 that it was twelve:thirty p.m., the time they were due at the Trade Mart.
+LJ001-0079 4.4189115646258506 Caslon's type is clear and neat, and fairly well designed; LJ028-0220 4.4189115646258506 The inscription continues: I am Cyrus, king of the world.
+LJ013-0267 3.2346938775510203 He made a rambling defense, ending by saying, LJ009-0268 5.661179138321995 through the improper adjustment of the rope his sufferings were prolonged for five minutes;
+LJ002-0096 4.384081632653062 The eight courts above enumerated were well supplied with water; LJ031-0005 4.384081632653062 approximately four miles from the Texas School Book Depository Building.
+LJ033-0148 4.163492063492064 Using a standard chemical method involving silver nitrates LJ023-0011 4.163492063492064 Today's recovery proves how right that policy was.
+LJ044-0030 4.395691609977324 five of which were usually present at meetings which were held once a month. LJ010-0113 4.395691609977324 he had neither a bed to lie upon nor a coat to his back.
+LJ001-0037 4.256371882086168 and the next year Gunther Zeiner at Augsburg followed suit; LJ001-0114 4.256371882086168 an ugly pear-shaped swelling defacing the form of the letter:
+LJ021-0102 4.128662131519274 If the codes which have been written have been too complicated, LJ042-0070 4.128662131519274 Oswald was discovered in time to thwart his attempt at suicide.
+LJ046-0208 4.140272108843537 Presidential protection was an important topic in these training programs. LJ029-0158 4.140272108843537 The following day, the newspaper reported that the Presidential party
+LJ006-0178 4.117052154195012 and for years, felons who should have been sent beyond the seas. LJ017-0160 4.117052154195012 as indicating a motive for keeping her alive rather than killing her.
+LJ015-0189 4.314421768707483 and the prototype of a class not uncommon in our later days LJ019-0155 4.314421768707483 The enforcement of discipline depended upon the want of honor among thieves.
+LJ011-0167 4.256371882086168 At Manchester, however, the carriage stopped at the Albion Hotel. LJ039-0116 4.256371882086168 he had just completed a very intensive preliminary training period.
+LJ039-0170 3.072154195011338 and eight point two five seconds respectively. LJ031-0198 5.266439909297052 Upon arrival, President Johnson made a brief statement over television and radio.
+LJ037-0248 3.6062131519274376 The eyewitnesses vary in their identification of the jacket. LJ013-0076 4.407301587301587 and held all the threads of these intricate and nefarious transactions.
+LJ009-0216 4.279591836734694 Hanging in chains upon the gibbet which had served for the execution, LJ002-0141 4.279591836734694 and indeed supplied the bulk of the poor debtors committed to prison.
+LJ039-0228 3.432063492063492 Concerning the shots which struck the President in the back of the neck, LJ014-0062 5.533469387755102 He had failed in this as well as in the business of a publican, which he had at one time adopted.
+LJ005-0212 3.5249433106575965 and the prison allowance was still limited to bread and water. LJ008-0206 5.127120181405895 and caused a number of stout additional barriers to be erected in front of the scaffold,
+LJ006-0210 4.244761904761905 Drink, in more or less unlimited quantities, was still to be had. LJ005-0101 4.244761904761905 whence it deduced the practice and condition of every prison that replied.
+LJ014-0147 4.105442176870748 shaking her clenched and manacled hands in the officers' faces. LJ047-0039 4.105442176870748 From return to Fort Worth to move to New Orleans.
+LJ015-0004 4.198321995464853 The goods having no existence, Cole of course could not deliver them. LJ017-0224 4.198321995464853 A simultaneous attack was made upon the captain and the first mate.
+LJ036-0077 4.291201814058957 Roger D. Craig, a deputy sheriff of Dallas County, LJ008-0152 4.291201814058957 made a full confession, and implicated Holloway and Haggerty.
+LJ019-0123 4.221541950113378 On that account he made no provision to insure safe custody, LJ011-0015 4.6046712018140585 His hair, though gray, was thick, and lay smooth over his forehead.
+LJ018-0180 4.175102040816326 But he was not long at large; he was too active an evil-doer LJ014-0056 4.175102040816326 while in Ireland a wife dashed out her husband's brains with a hammer.
+LJ008-0088 4.093832199546485 As many spectators as ever thronged to see the dreadful show, LJ020-0092 4.093832199546485 Have yourself called on biscuit mornings an hour earlier than usual.
+LJ028-0222 3.048934240362812 My many troops marched peacefully into Babylon. LJ034-0083 4.790430839002267 The significance of Givens' observation that Oswald was carrying his clipboard
+LJ007-0230 4.175102040816326 Newgate, Giltspur St. Compter, and the City Bridewell, LJ022-0154 4.175102040816326 I consider this legislation a positive recovery measure.
+LJ028-0436 4.117052154195012 The Germans maintain that it is the ruin of the Tower of Babel. LJ033-0047 4.117052154195012 I noticed when I went out that the light was on, end quote,
+LJ042-0070 4.128662131519274 Oswald was discovered in time to thwart his attempt at suicide. LJ021-0102 4.128662131519274 If the codes which have been written have been too complicated,
+LJ041-0003 3.153424036281179 Return to New Orleans and Joining the Marine Corps LJ014-0101 5.254829931972789 he found that it was soft and new, while elsewhere it was set and hard.
+LJ022-0109 4.140272108843537 The allotment of funds for desirable projects has already begun. LJ029-0122 4.140272108843537 Elm Street, parallel to Main Street and one block north,
+LJ039-0116 4.256371882086168 he had just completed a very intensive preliminary training period. LJ011-0167 4.256371882086168 At Manchester, however, the carriage stopped at the Albion Hotel.
+LJ022-0093 4.047392290249433 The next step will be to notify the proper government agency LJ030-0058 4.047392290249433 Elevated approximately fifteen inches above the back of the front seat
+LJ037-0030 3.072154195011338 quote, We've had a shooting out here, end quote, LJ038-0132 4.778820861678004 When asked why he lived at his roominghouse under the name O. H. Lee,
+LJ001-0144 4.267981859410431 the words may be set much closer together, without loss of clearness. LJ010-0123 4.267981859410431 an ample pension, so long as he did not return to England.
+LJ028-0048 3.408843537414966 In six twenty-six Assurbanipal died, LJ048-0260 4.117052154195012 which provides, quote, Liquor, use of
+LJ036-0182 4.476961451247165 She recalled that it was subsequent to the time the President had been shot. LJ009-0005 4.476961451247165 which persons under sentence of death obtain from all the officers of the prison.
+LJ009-0144 4.221541950113378 In fact his looks denoted extreme sorrow and contrition, LJ005-0139 4.221541950113378 making an average of nineteen persons occupying each room.
+LJ003-0200 3.432063492063492 Visitors were permitted access to them without stint; LJ028-0201 4.291201814058957 "Thou art weighed in the balances and art found wanting."
+LJ043-0040 4.279591836734694 by so-called exploitation of his mother by the capitalist system. LJ043-0183 4.279591836734694 Oswald did not lack the determination and other traits required
+LJ034-0195 3.432063492063492 based on other evidence, to have fired the shots from the window. LJ011-0039 4.291201814058957 but in a separate chamber, that belonging to one of the warders of the jail.
+LJ036-0083 3.699092970521542 and told Captain Fritz that Oswald was the man he saw. LJ028-0176 5.045850340136054 Should we compare these ancient descriptions of the walls, we should find them hopelessly conflicting.
+LJ036-0070 4.105442176870748 rather than wait for one which stopped across the street from his roominghouse. LJ008-0251 4.105442176870748 was an hour before kicked to death by the savage and brutal mob.
+LJ002-0272 4.430521541950113 on the opening of Whitecross prison for debtors in eighteen fifteen. LJ003-0307 4.430521541950113 but as yet no suggestion was made to provide prison uniform.
+LJ026-0130 3.791972789115646 and may thus be easily transported to all parts of the plant. LJ011-0207 5.057460317460317 whom I never saw until I was taken from Liverpool, and never want to see again.
+LJ043-0003 3.2230839002267575 Background and Possible Motives, Part four. LJ020-0001 5.37092970521542 Marion Harland's Cookery for Beginners. Bread Sponge and Breakfast Breads.
+LJ018-0354 3.2695238095238097 Doubts were long entertained whether Thomas Wainwright, LJ025-0117 5.138730158730159 that a fundamental unity of structure obtains in animals and plants,
+LJ025-0134 3.513333333333333 A molecular change takes place in the nerve of the tentacle, LJ032-0166 4.1518820861678005 Judgments as to probability will depend on the number and types of matches.
+LJ046-0221 4.105442176870748 where it will be made available to Secret Service headquarters in Washington. LJ038-0128 4.105442176870748 He also denied that he had received the rifle through this box.
+LJ008-0259 4.4537414965986395 and of their demeanor after sentence until the last penalty was paid. LJ009-0121 4.4537414965986395 for all thy goodness and loving-kindness to us, and to all men;
+LJ024-0033 3.083764172335601 and that a baneful precedent will be established. LJ002-0080 5.011020408163265 The long narrow yard still remained as we saw it in Jacobite times,
+LJ012-0208 4.267981859410431 Reference was made to Mr. Partridge, the demonstrator in anatomy, LJ006-0023 4.267981859410431 had made such prisons as Auburn a model for imitation.
+LJ039-0072 3.083764172335601 From my own experience in shooting over the years, LJ044-0107 4.4537414965986395 and advised them of some of his activities on behalf of the organization.
+LJ013-0259 4.30281179138322 The actual method of the murder was never exactly ascertained. LJ014-0033 4.30281179138322 When her ruin was discovered her brother panted for revenge.
+LJ005-0252 3.5597732426303854 A committee was appointed, under the presidency of the Duke of Richmond LJ028-0344 4.1518820861678005 for Cyrus had done neither the one nor the other when he took Babylon.
+LJ033-0101 3.2695238095238097 so that it was carried straight and parallel to his body. LJ034-0043 4.7556009070294785 The print, therefore, could have been placed on the carton at any time within this period.
+LJ001-0155 4.256371882086168 and that laterally the page looks as if it were being driven off the paper. LJ041-0122 4.256371882086168 and he must have known that President Kennedy had had nothing to do with it.
+LJ042-0001 4.476961451247165 Report of the President's Commission on the Assassination of President Kennedy. LJ018-0353 4.476961451247165 Wainwright's demeanor after sentence has been described in the last chapter.
+LJ043-0183 4.279591836734694 Oswald did not lack the determination and other traits required LJ043-0040 4.279591836734694 by so-called exploitation of his mother by the capitalist system.
+LJ050-0174 3.675873015873016 Protective Research participation in advance arrangements. LJ038-0301 4.291201814058957 (two) the photographs found among Oswald's possessions,
+LJ005-0158 4.198321995464853 Bedding and clothing was still denied, but only in a few jails; LJ005-0241 4.198321995464853 till the whole body of the slaves were manumitted in eighteen thirty-three.
+LJ022-0029 4.476961451247165 So many people come to Washington who know things that are not so, LJ022-0106 4.476961451247165 This will make certain that the largest possible portion of the funds allotted
+LJ006-0168 3.072154195011338 to taking the descriptions of newly-arrived prisoners. LJ001-0016 5.266439909297052 The Middle Ages brought calligraphy to perfection, and it was natural therefore
+LJ011-0257 4.279591836734694 Howard was secured, given into custody, and committed to Newgate. LJ008-0172 4.279591836734694 In another part seven persons met their death by suffocation.
+LJ018-0393 4.593061224489796 Messrs. Swindlehurst, Saffery, and Langley cleared a large profit LJ045-0213 4.082222222222223 The conversation on Monday, November eighteen, nineteen sixty-three,
+LJ028-0270 4.221541950113378 This was said by a Babylonian who thought that a mule would never foal. LJ016-0141 4.221541950113378 He was at work under the supervision of the artisan warder of the prison,
+LJ015-0070 4.070612244897959 whence he passed to a better position under the Crystal Palace Company. LJ018-0237 4.070612244897959 No fortune could stand the inroads he made into his mother's money,
+LJ022-0182 3.5249433106575965 To this end it was decided more than twenty years ago LJ038-0145 5.127120181405895 In one interview, he told Fritz that the only sack he carried to work that day
+LJ018-0073 4.012562358276644 This reply of his contained no promise of immediate release. LJ012-0112 4.012562358276644 notwithstanding a minute search through the room they had occupied.
+LJ037-0008 4.070612244897959 Two witnesses testified that Oswald resembled the man they had seen. LJ028-0141 4.070612244897959 so that the entire circuit is four hundred and eighty furlongs.
+LJ038-0268 4.465351473922903 the FBI refuses to draw any conclusion as to probability. LJ024-0027 4.465351473922903 commonly fix the retirement age at seventy years or less.
+LJ044-0111 4.372471655328798 for anybody who is concerned about developments in Cuba, end quote, LJ037-0129 4.372471655328798 When the man reached Jefferson, he turned right and headed west.
+LJ042-0231 4.163492063492064 His second answer to this question was, quote, No of course not, LJ035-0125 4.163492063492064 Victoria Adams, who worked on the fourth floor of the Depository Building,
+LJ008-0108 3.9661224489795917 The ordinary "gravely uttered, 'Come this way, Mr. Smith.' LJ048-0200 4.407301587301587 paying particular attention to the crowd for any unusual activity.
+LJ016-0252 4.465351473922903 Possibly such changes may be introduced into the method of execution LJ014-0117 4.465351473922903 An examination of her boxes disclosed a quantity of O'Connor's property.
+LJ029-0158 4.140272108843537 The following day, the newspaper reported that the Presidential party LJ046-0208 4.140272108843537 Presidential protection was an important topic in these training programs.
+LJ030-0203 3.4436734693877553 From the left front running board of the President's follow-up car, LJ022-0076 5.011020408163265 and we have every reason to believe that it should be in full swing by autumn.
+LJ002-0116 4.233151927437642 The number of processes against debtors annually was extraordinary. LJ013-0193 4.233151927437642 Courvoisier, when put on his trial, pleaded not guilty;
+LJ006-0302 4.465351473922903 The governor had a great dislike, he said, to seeing strangers in his house. LJ004-0203 4.465351473922903 The new jail had been in a great measure constructed by the prisoners themselves.
+LJ003-0120 3.5597732426303854 The culprit was then compelled to carry the chair about with him. LJ001-0161 4.1518820861678005 There seems to be no reason why ordinary paper should not be better made,
+LJ001-0114 4.256371882086168 an ugly pear-shaped swelling defacing the form of the letter: LJ001-0037 4.256371882086168 and the next year Gunther Zeiner at Augsburg followed suit;
+LJ030-0179 4.1518820861678005 She watched as he slumped down with an empty expression on his face. LJ045-0204 4.1518820861678005 he had never found anything to which he felt he could really belong.
+LJ007-0040 3.7687528344671204 in a second room were fourteen more who had every hope of a reprieve. LJ039-0075 5.115510204081633 once you know that you must put the crosshairs on the target and that is all that is necessary.
+LJ004-0203 4.465351473922903 The new jail had been in a great measure constructed by the prisoners themselves. LJ006-0302 4.465351473922903 The governor had a great dislike, he said, to seeing strangers in his house.
+LJ028-0038 4.117052154195012 Its history for the next fifteen hundred years or more is obscure. LJ041-0142 4.117052154195012 Once it had started down Elm Street toward the Triple Underpass, however,
+LJ011-0079 4.105442176870748 he soon left the service and betook himself to dishonest ways. LJ014-0041 4.105442176870748 Such an extravagant defense did not weigh with judge or jury;
+LJ016-0341 3.2927437641723354 The sufferer was stolid and reticent to the last. LJ031-0224 4.024172335600907 with a sizable metal fragment lying just above the right eye.
+LJ028-0199 4.209931972789116 there suddenly appeared upon the wall an armless hand. LJ037-0254 4.209931972789116 Two other witnesses, Sam Guinyard and William Arthur Smith,
+LJ003-0284 3.2811337868480726 that when they were not carousing, plotting, or scheming, LJ011-0220 5.10390022675737 The marriage was annulled by an Act of Parliament, although Wakefield petitioned against it,
+LJ048-0056 3.153424036281179 Had such a review been undertaken by the FBI, LJ022-0181 5.254829931972789 but that its resources be most fully utilized in the economic life of the country
+LJ049-0117 4.372471655328798 that the interruption shall not take place for an hour, end quote. LJ049-0167 4.372471655328798 in the field of preventive investigation in regard to the President's security.
+LJ006-0251 4.082222222222223 but the presence and authority of the governor himself became indispensable. LJ011-0162 4.082222222222223 and it stated that Mrs. Turner had been stricken with paralysis.
+LJ006-0041 3.490113378684807 Changes introduced under pressure had been only skin deep. LJ005-0160 5.428979591836734 It was plain that although the law had defined general principles of prison government,
+LJ018-0322 3.5713832199546487 Nor were these two abortive efforts all that were planned. LJ013-0108 4.999410430839002 Next day a person betrayed him for the reward, and he was soon captured.
+LJ039-0113 3.048934240362812 as a, quote, rather poor shot, end quote. LJ035-0078 5.336099773242631 Then Howlett walked down the stairway to the second-floor landing and entered the lunchroom.
+LJ029-0102 3.130204081632653 After the selection of the Trade Mart as the luncheon site, LJ033-0211 4.83687074829932 and the obvious bulk of the package which he intended to bring to work the next day;
+LJ046-0046 3.420453514739229 In all of these roles the President must go to the people. LJ034-0080 5.127120181405895 When he reached the first floor, the west elevator -- the one with the gate was not there.
+LJ010-0065 4.256371882086168 At the former the "Provisional Government" was to be established, LJ003-0252 4.256371882086168 of distinguishing a prisoner from a stranger and temporary visitor.
+LJ005-0132 3.2927437641723354 Only a few glaring evils still demanded a remedy. LJ019-0148 4.024172335600907 The prisoners were still left to themselves till next morning's unlocking,
+LJ030-0029 3.048934240362812 After a welcome from the Dallas reception committee, LJ014-0087 5.336099773242631 A quantity of quicklime was thrown in with the body to destroy all identification.
+LJ037-0158 4.209931972789116 He concluded that all of these cartridges were fired from the same weapon. LJ001-0084 4.209931972789116 But for the beauty of the earlier work they might have seemed tolerable.
+LJ045-0145 4.198321995464853 Those arguments, however, were not persuasive to Marina Oswald, LJ046-0115 4.198321995464853 Adequacy of preventive intelligence operations of the Secret Service.
+LJ025-0138 4.093832199546485 The results of inquiries into the structure of the nervous system of animals LJ012-0025 4.093832199546485 at which he realized one hundred fifty pounds within a couple of years.
+LJ017-0045 3.65265306122449 The Central Criminal Court was crowded to suffocation. LJ002-0178 5.0226303854875285 affidavit of service, and many more, amounting in all to twenty-seven,
+LJ028-0386 4.267981859410431 But the walls of the old city had not yet served their full purpose. LJ040-0209 4.267981859410431 well I've got to live with her. I guess I love her, end quote.
+LJ032-0066 4.593061224489796 was thrown away after the box was closed in May nineteen sixty-three. LJ002-0237 4.209931972789116 This very ancient prison, which stood in the High Street, Southwark,
+LJ007-0069 3.2579138321995464 While admitting that he had had many difficulties to contend with, LJ001-0157 4.442131519274376 of this it may be said that though there is some good paper made now,
+LJ008-0086 4.442131519274376 A great concourse of people attended on this melancholy occasion. LJ038-0138 4.442131519274376 When asked about the curtain rod story, Oswald lied again.
+LJ016-0275 4.337641723356009 As much as twenty-five pounds was paid for a first-floor front on this occasion. LJ004-0039 4.337641723356009 They were hopeless of any general reform by the action of the executive alone.
+LJ024-0022 4.4537414965986395 It has been discussed and approved by many persons of high authority LJ017-0217 4.4537414965986395 Navigation and discipline could not be easy with such a nondescript crew.
+LJ002-0261 4.442131519274376 The poorer prisoners were not in abject want, as in other prisons, LJ011-0138 4.442131519274376 It passed the Commons, but opposition was again encountered in the Lords.
+LJ010-0192 3.5017233560090704 or of the fatal consequences which might have ensued. LJ005-0185 4.279591836734694 As time passed, however, these magistrates made no effort at reform.
+LJ005-0269 4.198321995464853 Prison officers should not have any share in prisoners' earnings, LJ018-0083 4.198321995464853 Sattler was a very excitable although not an ill-tempered man.
+LJ017-0234 4.256371882086168 verified the murderers, and then shut himself up in his cabin. LJ011-0182 4.256371882086168 Miss Turner, thus pressed, consented to go on to Gretna Green.
+LJ048-0152 3.455283446712018 At some overpasses all persons were excluded LJ044-0075 5.428979591836734 of the alleged FPCC, quote, organization, end quote, in New Orleans.
+LJ005-0014 3.9429024943310655 Speaking on a debate on prison matters, he declared that LJ048-0136 4.337641723356009 In the description of the important aspects of the advance preparations,
+LJ013-0216 3.083764172335601 His account of his acts and movements after the deed LJ035-0077 5.8585487528344675 He placed the rifle on the floor near the site where Oswald's rifle was actually found after the shooting.
+LJ038-0068 4.244761904761905 cursing a little bit and hollering police brutality, end quote. LJ023-0110 4.244761904761905 a super-legislature, as one of the justices has called it
+LJ005-0074 4.384081632653062 cap. sixty-four, and five George the fourth cap. eighty-five LJ036-0011 4.384081632653062 (three) evidence establishing the ownership of the murder weapon,
+LJ028-0331 4.221541950113378 After this second exploit, his praise was in all mouths. LJ029-0116 4.221541950113378 and could not accommodate spectators as conveniently as Harwood Street.
+LJ049-0024 3.490113378684807 has developed a vehicle for the better protection of the President. LJ033-0210 5.394149659863945 told the curtain rod story to Frazier to explain both the return to Irving on a Thursday
+LJ049-0167 4.372471655328798 in the field of preventive investigation in regard to the President's security. LJ049-0117 4.372471655328798 that the interruption shall not take place for an hour, end quote.
+LJ018-0254 4.256371882086168 He declined to plead, but a plea of "Not Guilty" was recorded. LJ032-0154 4.256371882086168 The print is additional proof that the rifle was in Oswald's possession.
+LJ035-0031 4.360861678004535 He shouted twice, quote, Turn loose the elevator, end quote, LJ032-0088 4.360861678004535 Post Office Box three zero zero one six, New Orleans
+LJ002-0237 4.209931972789116 This very ancient prison, which stood in the High Street, Southwark, LJ016-0200 4.209931972789116 without favoring father or mother or any other relation or friend.
+LJ008-0220 4.047392290249433 hoary-headed and hardened in guilt, were still at large. LJ009-0164 4.047392290249433 sheep or horse stealing, and stealing in a dwelling-house.
+LJ005-0228 4.175102040816326 As yet no rules or regulations had been printed or prepared. LJ028-0250 4.175102040816326 Such, then, were the circumstances of the first taking of Babylon.
+LJ042-0249 4.105442176870748 Even though his primary purpose probably was to get to Cuba, LJ047-0160 4.105442176870748 found it to be four one one Elm Street. End quote.
+LJ018-0061 3.6410430839002266 One other curious murder may be added to the two foregoing. LJ048-0243 4.964580498866213 Only one stayed as long as a half hour, and none had any beverage there.
+LJ029-0156 4.384081632653062 the two Dallas newspapers carried several reports of his motorcade route. LJ042-0102 4.384081632653062 Reminiscent of his attitude toward his superiors in the Marine Corps,
+LJ042-0031 3.8384126984126983 The extent of Oswald's desire to go to the Soviet Union LJ010-0110 4.1867120181405895 Several of the other prisoners took the same line as regards Edwards,
+LJ008-0152 4.291201814058957 made a full confession, and implicated Holloway and Haggerty. LJ036-0077 4.291201814058957 Roger D. Craig, a deputy sheriff of Dallas County,
+LJ036-0002 3.3624036281179137 Chapter four. The Assassin: Part five. LJ048-0045 5.60312925170068 his pro-Castro tendencies, his lies when interrogated by the FBI,
+LJ050-0225 4.291201814058957 and be available to protect the President or Vice President when they travel; LJ029-0194 4.291201814058957 Any thought that the President might cancel his visit to Dallas was ended
+LJ043-0121 4.024172335600907 A placement interviewer of the Louisiana Department of Labor LJ021-0005 4.918140589569161 Recently the most notable public questions that have concerned us all
+LJ022-0114 4.163492063492064 Our responsibility is to all of the people in this country. LJ039-0002 4.163492063492064 Report of the President's Commission on the Assassination of President Kennedy.
+LJ042-0072 3.65265306122449 Still intent, however, on staying in the Soviet Union, LJ017-0178 5.278049886621315 It appeared that several persons with whom she was intimate had succumbed suddenly.
+LJ028-0501 4.326031746031746 Nor were the walls about the palace a great mass of dull brick masonry. LJ030-0172 4.326031746031746 From his position in the right jump seat immediately in front of the President,
+LJ005-0241 4.198321995464853 till the whole body of the slaves were manumitted in eighteen thirty-three. LJ005-0158 4.198321995464853 Bedding and clothing was still denied, but only in a few jails;
+LJ019-0355 3.1185941043083902 came up in all respects to modern requirements. LJ009-0109 5.846938775510204 while the capital convicts who were lately in that black pew appear faint with emotion.
+LJ047-0060 4.314421768707483 Fain had been assigned to see Marina Oswald at an appropriate time. LJ003-0110 4.674331065759637 They viewed him with some suspicion, as one of whom they knew nothing.
+LJ028-0372 4.430521541950113 The poor of the surrounding country occupied its dismantled palaces. LJ028-0058 4.430521541950113 Early he married Amuhia, a daughter of the Medean king.
+LJ048-0086 4.1867120181405895 Other Protective Measures and Aspects of Secret Service Performance LJ016-0412 4.651111111111111 Wainwright's execution was within the jail, but only nominally private.
+LJ033-0047 4.117052154195012 I noticed when I went out that the light was on, end quote, LJ028-0436 4.117052154195012 The Germans maintain that it is the ruin of the Tower of Babel.
+LJ001-0041 4.95297052154195 It must be said that it is in no way like the transition type of Subiaco, LJ027-0038 4.024172335600907 between the heart of an insect and the heart of a vertebrate animal
+LJ038-0284 4.326031746031746 Although the Commission recognizes that neither expert was able to state LJ037-0206 4.326031746031746 The balance due on the purchase was nineteen dollars, ninety-five cents.
+LJ019-0076 4.442131519274376 This variety was often extended to all branches of prison economy. LJ030-0052 4.442131519274376 with two collapsible jump seats between the front and rear seats.
+LJ016-0177 3.65265306122449 Marwood, whose name is so familiar with the present generation, LJ016-0030 5.115510204081633 they preferred to credit it to carelessness or collusion from officers of the jail.
+LJ041-0066 4.117052154195012 his general personality would alienate the group against him, end quote. LJ045-0176 4.117052154195012 The next morning he left for work before anyone else arose.
+LJ011-0182 4.256371882086168 Miss Turner, thus pressed, consented to go on to Gretna Green. LJ017-0234 4.256371882086168 verified the murderers, and then shut himself up in his cabin.
+LJ048-0241 4.175102040816326 These agents were each relieved for a half hour break during the night. LJ028-0166 4.175102040816326 The center of each division of the town is occupied by a fortress.
+LJ021-0136 3.2230839002267575 We have passed through more than a year of education. LJ033-0064 4.511791383219955 Mrs. Paine pointed out that most of the Oswalds' possessions were in the garage.
+LJ001-0043 3.8964625850340138 A further development of the Roman letter took place at Venice. LJ008-0276 4.6046712018140585 Neither in town or country were cases entirely taken on their own merits.
+LJ038-0138 4.442131519274376 When asked about the curtain rod story, Oswald lied again. LJ008-0086 4.442131519274376 A great concourse of people attended on this melancholy occasion.
+LJ009-0156 4.117052154195012 "with a view," as he himself said, "to his professional studies." LJ006-0089 4.117052154195012 to be pitchforked by chance anywhere, into any sort of company,
+LJ002-0029 3.6062131519274376 as it was occupied and appropriated in eighteen ten. LJ005-0277 4.407301587301587 This was the first enunciation of the system of separate confinement,
+LJ004-0156 3.5713832199546487 children hardly old enough to be released from the nursery. LJ012-0207 4.999410430839002 The porter asked what he had got, and the answer was, a male subject.
+LJ008-0077 3.490113378684807 where the apparatus for the punishment she was about to experience LJ001-0080 5.394149659863945 he seems to have taken the letter of the Elzevirs of the seventeenth century for his model:
+LJ029-0174 3.699092970521542 Dallas, Fort Worth, San Antonio, and Houston LJ037-0177 4.7556009070294785 Therefore, either one bullet of Remington-Peters manufacture is missing
+LJ042-0027 4.209931972789116 In addition to studying the Russian language while he was in the Marines, LJ039-0018 4.209931972789116 He also said that he would use the pistol if the opportunity arose.
+LJ002-0309 4.4537414965986395 There was this much honest forbearance in Newgate in these days, LJ040-0224 4.4537414965986395 and not on any particular mental disturbance, in the boy himself.
+LJ004-0217 4.233151927437642 The old haphazard system, by which meat was issued in bulk, LJ003-0273 4.233151927437642 "I believe," says Mr. Bennet in the letter already largely quoted,
+LJ045-0176 4.117052154195012 The next morning he left for work before anyone else arose. LJ041-0066 4.117052154195012 his general personality would alienate the group against him, end quote.
+LJ030-0058 4.047392290249433 Elevated approximately fifteen inches above the back of the front seat LJ022-0093 4.047392290249433 The next step will be to notify the proper government agency
+LJ037-0063 3.6294331065759637 A review of the complete transcript has satisfied the Commission LJ002-0247 5.080680272108843 As the business of the Marshalsea Court declined, the numbers in its prison diminished.
+LJ038-0013 4.384081632653062 The man wore a T-shirt beneath his outer shirt and he had no jacket. LJ036-0031 4.384081632653062 and requested a transfer which she might use if she got through the traffic.
+LJ028-0250 4.175102040816326 Such, then, were the circumstances of the first taking of Babylon. LJ005-0228 4.175102040816326 As yet no rules or regulations had been printed or prepared.
+LJ021-0135 3.4436734693877553 which is one of the high purposes of the Recovery Act. LJ038-0205 4.070612244897959 She thought he was attending a class or was on his own business.
+LJ012-0112 4.012562358276644 notwithstanding a minute search through the room they had occupied. LJ018-0073 4.012562358276644 This reply of his contained no promise of immediate release.
+LJ039-0215 3.7687528344671204 Frazier added that the scope would cause a slight miss to the right. LJ033-0124 4.059002267573696 And she folded the bag to length of about twenty-eight and a half inches.
+LJ019-0200 3.153424036281179 It would be far better to begin at the beginning, LJ006-0055 5.359319727891156 and when the population fell they shut up one half the jail and crowded up the other.
+LJ008-0296 4.233151927437642 The time of the arrival of this report was generally known at Newgate, LJ029-0127 4.233151927437642 Elm Street was to be reached from Main by turning right at Houston,
+LJ030-0047 4.209931972789116 The occupants scanned the crowd and the buildings along the route. LJ037-0118 4.209931972789116 Callaway told the Commission, quote, So they brought four men in.
+LJ024-0015 3.38562358276644 or those who would subsequently reach the age of seventy. LJ012-0291 5.417369614512472 as she leant back he put his foot against the chair, and so tilted it over.
+LJ040-0106 4.244761904761905 It also appears that Lee tried to tag along with his older brothers LJ008-0222 4.244761904761905 of those who had shown the white, and those who had died game.
+LJ014-0095 3.38562358276644 On the third day his friends began to inquire for him, LJ010-0037 4.000952380952381 Now and again there seemed to be a recurrence of a murder epidemic,
+LJ017-0036 3.594603174603175 that the trial was transferred to the Central Criminal Court, LJ016-0086 5.394149659863945 were fixed over the fireplaces, and the prisoners had no longer access to the chimneys.
+LJ023-0017 4.000952380952381 that we could not afford to take the risk of another great depression. LJ003-0327 4.616281179138322 It will hardly be denied that these proposals went to the root of the matter.
+LJ020-0092 4.093832199546485 Have yourself called on biscuit mornings an hour earlier than usual. LJ008-0088 4.093832199546485 As many spectators as ever thronged to see the dreadful show,
+LJ019-0312 4.221541950113378 with the local jurisdictions, although still very leniently disposed. LJ015-0296 4.221541950113378 Hardwicke, or "Ralph," appealed to Saward in his difficulty
+LJ026-0065 4.442131519274376 Matter enters the plant in the liquid or gaseous form by diffusion, LJ028-0026 4.442131519274376 Here in the valley the water is sweet and the food abundant.
+LJ008-0161 3.65265306122449 presently fell, and were at once trampled to death. LJ007-0218 5.278049886621315 Newgate is only less extensively injurious than formerly because it is less crowded.
+LJ016-0276 4.256371882086168 Never, indeed, had an execution been more generally patronized. LJ014-0030 4.256371882086168 These were damnatory facts which well supported the prosecution.
+LJ028-0280 4.488571428571428 Calling to mind then the words of the Babylonian at the beginning of the siege: LJ040-0197 4.488571428571428 He told Mrs. Siegel that he would run away if sent to a boarding school.
+LJ020-0006 4.024172335600907 Three potatoes of fair size, peeled and boiled mealy. LJ043-0121 4.024172335600907 A placement interviewer of the Louisiana Department of Labor
+LJ002-0070 4.047392290249433 The state side was the part stolen from the female felons' side. LJ015-0027 4.384081632653062 Yet even so early as the death of the first Sir John Paul,
+LJ018-0142 4.175102040816326 By this time Brown alone had stolen three or four hundred sheets, LJ007-0108 4.175102040816326 Dasent and Pilgrim were released in ten days, on making due submission.
+LJ043-0068 4.407301587301587 While he might have expected difficulty from such an approach, in fact LJ015-0242 4.407301587301587 re-fastened and re-sealed the bullion box, and replaced it in the safe.
+LJ037-0135 4.256371882086168 Russell confirmed this statement in a sworn affidavit for the Commission. LJ042-0158 4.256371882086168 left a far mean streak of independence brought on by neglect.
+LJ002-0009 3.1185941043083902 On the twenty-seventh April, in the following year, LJ001-0119 5.846938775510204 and the elegance and legibility of the ancient more striking than in the Arabic numerals.
+LJ047-0193 4.244761904761905 and so advised the Dallas office in the ordinary course of business. LJ016-0304 4.244761904761905 Numbers of humane and thoughtful persons had long been convinced of this.
+LJ022-0021 4.30281179138322 or to one industry, or to an individual private occupation. LJ019-0290 4.30281179138322 There were dormitories without light, control, or regulation at night,
+LJ044-0205 4.175102040816326 and promised prompt U.S. aid if they do, end quote. LJ010-0069 4.175102040816326 She died early, and Thistlewood, left to his own resources,
+LJ010-0094 3.397233560090703 bound, as it happened, to the Archbishop of York's. LJ034-0217 4.1518820861678005 One of these employees was alleged to resemble Lee Harvey Oswald.
+LJ037-0254 4.209931972789116 Two other witnesses, Sam Guinyard and William Arthur Smith, LJ028-0199 4.209931972789116 there suddenly appeared upon the wall an armless hand.
+LJ047-0039 4.105442176870748 From return to Fort Worth to move to New Orleans. LJ014-0147 4.105442176870748 shaking her clenched and manacled hands in the officers' faces.
+LJ016-0333 4.1867120181405895 from Clerkenwell prison, by which many persons lost their lives. LJ004-0178 4.1867120181405895 The bedclothes consisted only of a single "very slight" rug.
+LJ018-0222 3.072154195011338 obtained a mortgage of seven thousand pounds. LJ018-0252 5.266439909297052 to deeds involving on the whole some three hundred fifty thousand pounds.
+LJ001-0094 4.30281179138322 were induced to cut punches for a series of "old style" letters. LJ023-0024 4.30281179138322 not this week or month perhaps, but within a year or two.
+LJ004-0039 4.337641723356009 They were hopeless of any general reform by the action of the executive alone. LJ016-0275 4.337641723356009 As much as twenty-five pounds was paid for a first-floor front on this occasion.
+LJ008-0213 4.03578231292517 By this time the workmen might be heard busily erecting the gallows; LJ019-0282 4.03578231292517 Their origin it will be seen dates back much further than that.
+LJ014-0033 4.30281179138322 When her ruin was discovered her brother panted for revenge. LJ013-0259 4.30281179138322 The actual method of the murder was never exactly ascertained.
+LJ036-0179 4.372471655328798 He signed his name as O. H. Lee on the roominghouse register. LJ009-0099 4.372471655328798 Meanwhile the clergyman, still bent into the form of a sleeping dog,
+LJ015-0077 4.349251700680272 He was not the first man of loose morality and expensive tastes LJ009-0151 4.349251700680272 The atrocity of the murder no doubt attracted extraordinary attention to it.
+LJ010-0115 4.082222222222223 and it is pretty certain that for some time he served both sides; LJ011-0012 4.082222222222223 It must be added that the Bank of England, on discovering the forgeries,
+LJ027-0151 3.455283446712018 The only alternative view is that as species of deer, LJ016-0301 4.83687074829932 amid hisses and sneering inquiries of what he had had to drink that morning.
+LJ006-0123 3.513333333333333 The man intrusted with this privilege was often the inner gatesman, LJ030-0179 4.1518820861678005 She watched as he slumped down with an empty expression on his face.
+LJ017-0090 3.687482993197279 and so got the money for which he was prepared to barter his soul. LJ041-0138 4.476961451247165 and that she could not think of any reason why Oswald would want to kill President Kennedy.
+LJ019-0155 4.314421768707483 The enforcement of discipline depended upon the want of honor among thieves. LJ015-0189 4.314421768707483 and the prototype of a class not uncommon in our later days
+LJ040-0227 3.594603174603175 Mrs. Siegel concluded her report with the statement that, quote, LJ016-0368 5.394149659863945 It was they who formed the chief part of the small select group of spectators;
+LJ004-0150 3.153424036281179 Matters were on much the same footing at St. Albans. LJ032-0172 5.045850340136054 Marina Oswald testified that she thought her husband wore this shirt to work on that day.
+LJ033-0076 3.188253968253968 On the morning of November twenty-two, nineteen sixty-three, LJ034-0127 5.579909297052154 Brennan testified that they were standing, which is their apparent position in the photograph.
+LJ004-0042 3.757142857142857 The association was organized under the most promising auspices. LJ003-0071 5.011020408163265 It was particularly recommended by the Committee on Jails in eighteen fourteen
diff --git a/docs/static/images/wavtts_pipeline.png b/docs/static/images/wavtts_pipeline.png
new file mode 100644
index 0000000000000000000000000000000000000000..87447d5f8396e37a752b53316dcfda728c87621a
--- /dev/null
+++ b/docs/static/images/wavtts_pipeline.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:da72bf14e46e29ec588512e82335721f8d5c4fe9c8b7f8792c8791d5379deaf6
+size 664779
diff --git a/packages.txt b/packages.txt
new file mode 100644
index 0000000000000000000000000000000000000000..20645e641240cb419f5fc66c14c1447e91daf669
--- /dev/null
+++ b/packages.txt
@@ -0,0 +1 @@
+ffmpeg
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000000000000000000000000000000000000..e9caa4b29e70891d90bba936f1a8909e83fee1ce
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,69 @@
+[build-system]
+requires = ["setuptools >= 61.0", "setuptools-scm>=8.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "wavtts"
+version = "1.1.10"
+description = "WavTTS: Towards High-Quality Zero-Shot TTS via Direct Raw Waveform Modeling"
+readme = "README.md"
+license = {text = "MIT License"}
+classifiers = [
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3",
+]
+dependencies = [
+ "accelerate>=0.33.0",
+ "bitsandbytes>0.37.0; platform_machine!='arm64' and platform_system!='Darwin'",
+ "cached_path",
+ "click",
+ "datasets",
+ "einops>=0.8.2",
+ "ema_pytorch>=0.5.2",
+ "hydra-core>=1.3.2",
+ "huggingface-hub>=0.26.0,<1.0",
+ "librosa",
+ "matplotlib",
+ "numpy<2.0.0",
+ "pydantic<=2.10.6",
+ "pydub",
+ "pypinyin",
+ "rjieba",
+ "safetensors",
+ "soundfile>=0.13.1",
+ "tomli",
+ "torch>=2.0.0",
+ "torchaudio>=2.0.0",
+ "torchcodec",
+ "torchdiffeq",
+ "tqdm",
+ "transformers",
+ "transformers-stream-generator",
+ "unidecode",
+ "wandb",
+ "x-transformers>=1.31.14",
+]
+
+[project.optional-dependencies]
+space = [
+ "gradio",
+ "spaces",
+]
+dev = [
+ "pytest",
+]
+eval = [
+ "faster_whisper==0.10.1",
+ "funasr",
+ "jiwer==3.1.0",
+ "modelscope",
+ "zhconv",
+ "zhon",
+]
+
+[project.urls]
+Homepage = "https://github.com/cwx-worst-one/WavTTS"
+
+[project.scripts]
+"wavtts_infer-cli" = "wavtts.infer.infer_cli:main"
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..439bfec90d945591a0ed780dca55b4480409e281
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+-e .[space]
diff --git a/ruff.toml b/ruff.toml
new file mode 100644
index 0000000000000000000000000000000000000000..ce194b576cc5fc3d6478535614de98858152614c
--- /dev/null
+++ b/ruff.toml
@@ -0,0 +1,11 @@
+line-length = 120
+target-version = "py310"
+
+[lint]
+extend-select = ["I"]
+# Only ignore variables with names starting with "_".
+dummy-variable-rgx = "^_.*$"
+
+[lint.isort]
+force-single-line = false
+lines-after-imports = 2
diff --git a/src/wavtts/__init__.py b/src/wavtts/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..b71ec315611a7ac8a4d1bac617003ef60bb7254f
--- /dev/null
+++ b/src/wavtts/__init__.py
@@ -0,0 +1 @@
+"""WavTTS package."""
diff --git a/src/wavtts/configs/WavTTS.yaml b/src/wavtts/configs/WavTTS.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..f7f861506c84101c146c8e60c72bafc2b8ff850b
--- /dev/null
+++ b/src/wavtts/configs/WavTTS.yaml
@@ -0,0 +1,65 @@
+hydra:
+ run:
+ dir: ckpts/${model.name}_${model.tokenizer}_${datasets.name}/${now:%Y-%m-%d}/${now:%H-%M-%S}
+
+datasets:
+ name: Emilia_ZH_EN # dataset name
+ batch_size_per_gpu: 19200 # 8 GPUs, 8 * 19200 = 153,600
+ batch_size_type: frame # frame | sample
+ max_samples: 64 # max sequences per batch if use frame-wise batch_size. we set 32 for small models, 64 for base models
+ num_workers: 16
+
+optim:
+ epochs: 686
+ learning_rate: 7.5e-5
+ num_warmup_updates: 20000 # warmup updates
+ grad_accumulation_steps: 1 # note: updates = steps / grad_accumulation_steps
+ max_grad_norm: 1.0 # gradient clipping
+ bnb_optimizer: False # use bnb 8bit AdamW optimizer or not
+
+model:
+ name: WavTTS_Large # model name
+ tokenizer: pinyin # tokenizer type (pinyin for bilingual, char for English only)
+ tokenizer_path: null # if 'custom' tokenizer, define the path want to use (should be vocab.txt)
+ backbone: DiT
+ cfm:
+ prediction: x_pred # flow | x_pred
+ loss_space: v # flow | v (v is typical for x_pred mode)
+ t_sampling: logistic_normal # uniform | logistic_normal
+ P_mean: -0.8
+ P_std: 0.8
+ t_eps: 0.02
+ latents_scale: 9.0
+ use_aux_mel_loss: True
+ aux_mel_loss_weight: 0.05
+ sample_rate: 16000
+ joint_cond_drop_prob: 0.1
+ arch:
+ dim: 1152
+ depth: 28
+ heads: 16
+ dropout: 0.0
+ ff_mult: 4
+ text_dim: 512
+ text_mask_padding: True
+ qk_norm: null # null | rms_norm
+ conv_layers: 4
+ pe_attn_head: null
+ attn_backend: torch # torch | flash_attn
+ attn_mask_enabled: False
+ checkpoint_activations: False # recompute activations and save memory for extra compute
+ use_audio_proj: True
+ audio_proj_dim: 1024
+ audio_proj_hidden: 768
+ waveform:
+ target_sample_rate: 16000
+ wav_frame_len: 160 # 160 @16k = 100Hz
+
+ckpts:
+ logger: wandb # wandb | tensorboard | null
+ log_samples: True # infer random sample per save checkpoint. wip, normal to fail with extra long samples
+ save_per_updates: 50000 # save checkpoint per updates 50000
+ keep_last_n_checkpoints: -1 # -1 to keep all, 0 to not save intermediate, > 0 to keep last N checkpoints
+ last_per_updates: 5000 # save last checkpoint per updates 5000
+ exp_name: ${model.name}_${model.tokenizer}_${datasets.name}
+ save_dir: ckpts/${model.name}_${model.tokenizer}_${datasets.name}
diff --git a/src/wavtts/eval/README.md b/src/wavtts/eval/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..19fbff09ed2bb79e7fae174d7e265e9126f5f968
--- /dev/null
+++ b/src/wavtts/eval/README.md
@@ -0,0 +1,67 @@
+# Evaluation
+
+## 1. Installation
+
+First, install the optional evaluation dependencies from the WavTTS root directory:
+
+```bash
+pip install -e .[eval]
+```
+
+## 2. Prepare Evaluation Models
+
+Objective evaluation requires ASR models and a speaker similarity model.
+
+1. Chinese ASR Model: [Paraformer-zh](https://huggingface.co/funasr/paraformer-zh)
+2. English ASR Model: [Faster-Whisper](https://huggingface.co/Systran/faster-whisper-large-v3)
+3. Speaker Similarity Model: WavLM (download `wavlm_large_finetune.pth` from [Google Drive](https://drive.google.com/file/d/1-aE1NfzpRCLxA4GUxX9ITI3F9LlbtEGP/view))
+
+> **⚠️ Important Checkpoint Setup:**
+> - **ASR Models:** By default, the ASR models will be downloaded automatically from Hugging Face. If you are running in an offline environment with the `--local` flag, download them manually and update `asr_ckpt_dir` in `eval_librispeech_test_clean.py` and `eval_seedtts_testset.py`.
+> - **WavLM Model:** This model **MUST** be downloaded manually. Pass the downloaded `wavlm_large_finetune.pth` path with `--wavlm_ckpt_dir` for SIM metric scripts.
+
+## 3. Prepare Test Datasets
+
+We recommend using the following standard datasets for evaluation:
+
+1. Seed-TTS Testset (ZH/EN): Download from [seed-tts-eval](https://github.com/BytedanceSpeech/seed-tts-eval).
+2. LibriSpeech test-clean (EN): Download from [OpenSLR](http://www.openslr.org/12/).
+
+Unzip the downloaded datasets and place them into your local `data/` directory.
+
+## 4. Running Evaluations
+
+You can either run the full generation and evaluation pipeline automatically, or compute metrics step by step on existing audio files.
+
+### A. All-in-One Batch Inference & Evaluation
+
+To run batch inference and evaluation, execute the following commands:
+
+```bash
+# Set up Accelerate if you have not configured it yet.
+accelerate config
+
+# Generate audio only, skipping metric calculation.
+bash src/wavtts/eval/eval_infer_batch.sh --infer-only
+
+# Generate audio and calculate objective metrics automatically.
+bash src/wavtts/eval/eval_infer_batch.sh --full-eval --wavlm-ckpt-dir ""
+```
+
+### B. Calculate Metrics Manually
+
+If you have already generated `.wav` files via batch inference, you can evaluate them independently by pointing the scripts to your ``.
+
+```bash
+# Evaluation [WER] for Seed-TTS test [ZH] set
+python src/wavtts/eval/eval_seedtts_testset.py --eval_task wer --lang zh --gen_wav_dir "" --gpu_nums 8
+
+# Evaluation [SIM] for LibriSpeech-PC test-clean (cross-sentence)
+python src/wavtts/eval/eval_librispeech_test_clean.py --eval_task sim --gen_wav_dir "" --librispeech_test_clean_path "" --wavlm_ckpt_dir ""
+
+# Evaluation [UTMOS] for any directory containing audio files
+python src/wavtts/eval/eval_utmos.py --audio_dir "" --ext wav
+```
+
+> **💡 Tip:**
+> Once evaluation is completed, detailed results will be saved as `_*_results.jsonl` files directly within your `` directory.
diff --git a/src/wavtts/eval/ecapa_tdnn.py b/src/wavtts/eval/ecapa_tdnn.py
new file mode 100644
index 0000000000000000000000000000000000000000..f0e4c9cc20c3a9f251fd22f4f27851fd04238962
--- /dev/null
+++ b/src/wavtts/eval/ecapa_tdnn.py
@@ -0,0 +1,331 @@
+# just for speaker similarity evaluation, third-party code
+
+# From https://github.com/microsoft/UniSpeech/blob/main/downstreams/speaker_verification/models/
+# part of the code is borrowed from https://github.com/lawlict/ECAPA-TDNN
+
+import os
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+
+
+""" Res2Conv1d + BatchNorm1d + ReLU
+"""
+
+
+class Res2Conv1dReluBn(nn.Module):
+ """
+ in_channels == out_channels == channels
+ """
+
+ def __init__(self, channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=True, scale=4):
+ super().__init__()
+ assert channels % scale == 0, "{} % {} != 0".format(channels, scale)
+ self.scale = scale
+ self.width = channels // scale
+ self.nums = scale if scale == 1 else scale - 1
+
+ self.convs = []
+ self.bns = []
+ for i in range(self.nums):
+ self.convs.append(nn.Conv1d(self.width, self.width, kernel_size, stride, padding, dilation, bias=bias))
+ self.bns.append(nn.BatchNorm1d(self.width))
+ self.convs = nn.ModuleList(self.convs)
+ self.bns = nn.ModuleList(self.bns)
+
+ def forward(self, x):
+ out = []
+ spx = torch.split(x, self.width, 1)
+ for i in range(self.nums):
+ if i == 0:
+ sp = spx[i]
+ else:
+ sp = sp + spx[i]
+ # Order: conv -> relu -> bn
+ sp = self.convs[i](sp)
+ sp = self.bns[i](F.relu(sp))
+ out.append(sp)
+ if self.scale != 1:
+ out.append(spx[self.nums])
+ out = torch.cat(out, dim=1)
+
+ return out
+
+
+""" Conv1d + BatchNorm1d + ReLU
+"""
+
+
+class Conv1dReluBn(nn.Module):
+ def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=True):
+ super().__init__()
+ self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, stride, padding, dilation, bias=bias)
+ self.bn = nn.BatchNorm1d(out_channels)
+
+ def forward(self, x):
+ return self.bn(F.relu(self.conv(x)))
+
+
+""" The SE connection of 1D case.
+"""
+
+
+class SE_Connect(nn.Module):
+ def __init__(self, channels, se_bottleneck_dim=128):
+ super().__init__()
+ self.linear1 = nn.Linear(channels, se_bottleneck_dim)
+ self.linear2 = nn.Linear(se_bottleneck_dim, channels)
+
+ def forward(self, x):
+ out = x.mean(dim=2)
+ out = F.relu(self.linear1(out))
+ out = torch.sigmoid(self.linear2(out))
+ out = x * out.unsqueeze(2)
+
+ return out
+
+
+""" SE-Res2Block of the ECAPA-TDNN architecture.
+"""
+
+# def SE_Res2Block(channels, kernel_size, stride, padding, dilation, scale):
+# return nn.Sequential(
+# Conv1dReluBn(channels, 512, kernel_size=1, stride=1, padding=0),
+# Res2Conv1dReluBn(512, kernel_size, stride, padding, dilation, scale=scale),
+# Conv1dReluBn(512, channels, kernel_size=1, stride=1, padding=0),
+# SE_Connect(channels)
+# )
+
+
+class SE_Res2Block(nn.Module):
+ def __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation, scale, se_bottleneck_dim):
+ super().__init__()
+ self.Conv1dReluBn1 = Conv1dReluBn(in_channels, out_channels, kernel_size=1, stride=1, padding=0)
+ self.Res2Conv1dReluBn = Res2Conv1dReluBn(out_channels, kernel_size, stride, padding, dilation, scale=scale)
+ self.Conv1dReluBn2 = Conv1dReluBn(out_channels, out_channels, kernel_size=1, stride=1, padding=0)
+ self.SE_Connect = SE_Connect(out_channels, se_bottleneck_dim)
+
+ self.shortcut = None
+ if in_channels != out_channels:
+ self.shortcut = nn.Conv1d(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=1,
+ )
+
+ def forward(self, x):
+ residual = x
+ if self.shortcut:
+ residual = self.shortcut(x)
+
+ x = self.Conv1dReluBn1(x)
+ x = self.Res2Conv1dReluBn(x)
+ x = self.Conv1dReluBn2(x)
+ x = self.SE_Connect(x)
+
+ return x + residual
+
+
+""" Attentive weighted mean and standard deviation pooling.
+"""
+
+
+class AttentiveStatsPool(nn.Module):
+ def __init__(self, in_dim, attention_channels=128, global_context_att=False):
+ super().__init__()
+ self.global_context_att = global_context_att
+
+ # Use Conv1d with stride == 1 rather than Linear, then we don't need to transpose inputs.
+ if global_context_att:
+ self.linear1 = nn.Conv1d(in_dim * 3, attention_channels, kernel_size=1) # equals W and b in the paper
+ else:
+ self.linear1 = nn.Conv1d(in_dim, attention_channels, kernel_size=1) # equals W and b in the paper
+ self.linear2 = nn.Conv1d(attention_channels, in_dim, kernel_size=1) # equals V and k in the paper
+
+ def forward(self, x):
+ if self.global_context_att:
+ context_mean = torch.mean(x, dim=-1, keepdim=True).expand_as(x)
+ context_std = torch.sqrt(torch.var(x, dim=-1, keepdim=True) + 1e-10).expand_as(x)
+ x_in = torch.cat((x, context_mean, context_std), dim=1)
+ else:
+ x_in = x
+
+ # DON'T use ReLU here! In experiments, I find ReLU hard to converge.
+ alpha = torch.tanh(self.linear1(x_in))
+ # alpha = F.relu(self.linear1(x_in))
+ alpha = torch.softmax(self.linear2(alpha), dim=2)
+ mean = torch.sum(alpha * x, dim=2)
+ residuals = torch.sum(alpha * (x**2), dim=2) - mean**2
+ std = torch.sqrt(residuals.clamp(min=1e-9))
+ return torch.cat([mean, std], dim=1)
+
+
+class ECAPA_TDNN(nn.Module):
+ def __init__(
+ self,
+ feat_dim=80,
+ channels=512,
+ emb_dim=192,
+ global_context_att=False,
+ feat_type="wavlm_large",
+ sr=16000,
+ feature_selection="hidden_states",
+ update_extract=False,
+ config_path=None,
+ ):
+ super().__init__()
+
+ self.feat_type = feat_type
+ self.feature_selection = feature_selection
+ self.update_extract = update_extract
+ self.sr = sr
+
+ torch.hub._validate_not_a_forked_repo = lambda a, b, c: True
+ try:
+ local_s3prl_path = os.path.expanduser("~/.cache/torch/hub/s3prl_s3prl_main")
+ self.feature_extract = torch.hub.load(local_s3prl_path, feat_type, source="local", config_path=config_path)
+ except: # noqa: E722
+ self.feature_extract = torch.hub.load("s3prl/s3prl", feat_type)
+
+ if len(self.feature_extract.model.encoder.layers) == 24 and hasattr(
+ self.feature_extract.model.encoder.layers[23].self_attn, "fp32_attention"
+ ):
+ self.feature_extract.model.encoder.layers[23].self_attn.fp32_attention = False
+ if len(self.feature_extract.model.encoder.layers) == 24 and hasattr(
+ self.feature_extract.model.encoder.layers[11].self_attn, "fp32_attention"
+ ):
+ self.feature_extract.model.encoder.layers[11].self_attn.fp32_attention = False
+
+ self.feat_num = self.get_feat_num()
+ self.feature_weight = nn.Parameter(torch.zeros(self.feat_num))
+
+ if feat_type != "fbank" and feat_type != "mfcc":
+ freeze_list = ["final_proj", "label_embs_concat", "mask_emb", "project_q", "quantizer"]
+ for name, param in self.feature_extract.named_parameters():
+ for freeze_val in freeze_list:
+ if freeze_val in name:
+ param.requires_grad = False
+ break
+
+ if not self.update_extract:
+ for param in self.feature_extract.parameters():
+ param.requires_grad = False
+
+ self.instance_norm = nn.InstanceNorm1d(feat_dim)
+ # self.channels = [channels] * 4 + [channels * 3]
+ self.channels = [channels] * 4 + [1536]
+
+ self.layer1 = Conv1dReluBn(feat_dim, self.channels[0], kernel_size=5, padding=2)
+ self.layer2 = SE_Res2Block(
+ self.channels[0],
+ self.channels[1],
+ kernel_size=3,
+ stride=1,
+ padding=2,
+ dilation=2,
+ scale=8,
+ se_bottleneck_dim=128,
+ )
+ self.layer3 = SE_Res2Block(
+ self.channels[1],
+ self.channels[2],
+ kernel_size=3,
+ stride=1,
+ padding=3,
+ dilation=3,
+ scale=8,
+ se_bottleneck_dim=128,
+ )
+ self.layer4 = SE_Res2Block(
+ self.channels[2],
+ self.channels[3],
+ kernel_size=3,
+ stride=1,
+ padding=4,
+ dilation=4,
+ scale=8,
+ se_bottleneck_dim=128,
+ )
+
+ # self.conv = nn.Conv1d(self.channels[-1], self.channels[-1], kernel_size=1)
+ cat_channels = channels * 3
+ self.conv = nn.Conv1d(cat_channels, self.channels[-1], kernel_size=1)
+ self.pooling = AttentiveStatsPool(
+ self.channels[-1], attention_channels=128, global_context_att=global_context_att
+ )
+ self.bn = nn.BatchNorm1d(self.channels[-1] * 2)
+ self.linear = nn.Linear(self.channels[-1] * 2, emb_dim)
+
+ def get_feat_num(self):
+ self.feature_extract.eval()
+ wav = [torch.randn(self.sr).to(next(self.feature_extract.parameters()).device)]
+ with torch.no_grad():
+ features = self.feature_extract(wav)
+ select_feature = features[self.feature_selection]
+ if isinstance(select_feature, (list, tuple)):
+ return len(select_feature)
+ else:
+ return 1
+
+ def get_feat(self, x):
+ if self.update_extract:
+ x = self.feature_extract([sample for sample in x])
+ else:
+ with torch.no_grad():
+ if self.feat_type == "fbank" or self.feat_type == "mfcc":
+ x = self.feature_extract(x) + 1e-6 # B x feat_dim x time_len
+ else:
+ x = self.feature_extract([sample for sample in x])
+
+ if self.feat_type == "fbank":
+ x = x.log()
+
+ if self.feat_type != "fbank" and self.feat_type != "mfcc":
+ x = x[self.feature_selection]
+ if isinstance(x, (list, tuple)):
+ x = torch.stack(x, dim=0)
+ else:
+ x = x.unsqueeze(0)
+ norm_weights = F.softmax(self.feature_weight, dim=-1).unsqueeze(-1).unsqueeze(-1).unsqueeze(-1)
+ x = (norm_weights * x).sum(dim=0)
+ x = torch.transpose(x, 1, 2) + 1e-6
+
+ x = self.instance_norm(x)
+ return x
+
+ def forward(self, x):
+ x = self.get_feat(x)
+
+ out1 = self.layer1(x)
+ out2 = self.layer2(out1)
+ out3 = self.layer3(out2)
+ out4 = self.layer4(out3)
+
+ out = torch.cat([out2, out3, out4], dim=1)
+ out = F.relu(self.conv(out))
+ out = self.bn(self.pooling(out))
+ out = self.linear(out)
+
+ return out
+
+
+def ECAPA_TDNN_SMALL(
+ feat_dim,
+ emb_dim=256,
+ feat_type="wavlm_large",
+ sr=16000,
+ feature_selection="hidden_states",
+ update_extract=False,
+ config_path=None,
+):
+ return ECAPA_TDNN(
+ feat_dim=feat_dim,
+ channels=512,
+ emb_dim=emb_dim,
+ feat_type=feat_type,
+ sr=sr,
+ feature_selection=feature_selection,
+ update_extract=update_extract,
+ config_path=config_path,
+ )
diff --git a/src/wavtts/eval/eval_infer_batch.py b/src/wavtts/eval/eval_infer_batch.py
new file mode 100644
index 0000000000000000000000000000000000000000..d94cf0509c1db0b54c9fb8e9e2d9fbf7600549b1
--- /dev/null
+++ b/src/wavtts/eval/eval_infer_batch.py
@@ -0,0 +1,349 @@
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import argparse
+import time
+from importlib.resources import files
+
+import torch
+import torchaudio
+from accelerate import Accelerator
+from cached_path import cached_path
+from hydra.utils import get_class
+from omegaconf import OmegaConf
+from tqdm import tqdm
+
+from wavtts.eval.utils_eval import (
+ get_inference_prompt,
+ get_librispeech_test_clean_metainfo,
+ get_seedtts_testset_metainfo,
+)
+from wavtts.infer.utils_infer import load_checkpoint
+from wavtts.model import CFM
+from wavtts.model.utils import get_tokenizer
+
+
+accelerator = Accelerator()
+device = f"cuda:{accelerator.process_index}"
+
+
+target_rms = 0.1 # 0.1, 0.12
+
+
+rel_path = str(files("wavtts").joinpath("../../"))
+DEFAULT_CKPT_FILE = "hf://worstchan/WavTTS/model_1200000.pt"
+DEFAULT_VOCAB_FILE = str(files("wavtts").joinpath("infer/examples/vocab.txt"))
+
+
+def main():
+ parser = argparse.ArgumentParser(description="batch inference")
+
+ parser.add_argument("-s", "--seed", default=None, type=int)
+ parser.add_argument("-n", "--expname", required=True)
+ parser.add_argument("-c", "--ckptstep", default=1250000, type=int)
+
+ parser.add_argument("-nfe", "--nfe_step", default=50, type=int)
+ parser.add_argument("-ss", "--swaysampling", default=-1, type=float)
+ parser.add_argument("--timestep_mapping", default="power", choices=["uniform", "sway_sampling", "power"])
+ parser.add_argument("--timestep_power", default=2.0, type=float)
+ parser.add_argument("--shift", default=3.0, type=float)
+
+ parser.add_argument("-t", "--testset", required=True)
+ parser.add_argument(
+ "-p",
+ "--librispeech_test_clean_path",
+ default=f"{rel_path}/data/LibriSpeech/test-clean",
+ type=str,
+ )
+ parser.add_argument(
+ "--ljspeech_inset_meta",
+ default=f"{rel_path}/data/ljspeech_inset_test_9s.lst",
+ type=str,
+ help="Metadata list for ljspeech_inset_test_9s. Format: ref_utt ref_dur ref_txt gen_utt gen_dur gen_txt.",
+ )
+ parser.add_argument(
+ "--ljspeech_wav_dir",
+ default=f"{rel_path}/data/ljspeech/LJSpeech-1.1/wavs",
+ type=str,
+ help="Directory containing original LJSpeech wavs. Only used when truth duration is enabled.",
+ )
+
+ parser.add_argument("--ckpt_path", default=DEFAULT_CKPT_FILE, type=str)
+ parser.add_argument(
+ "--vocab_file",
+ default=DEFAULT_VOCAB_FILE,
+ type=str,
+ help="Path to vocab.txt used to build the model tokenizer.",
+ )
+ parser.add_argument(
+ "--output_dir",
+ default=None,
+ type=str,
+ help="Optional directory to save generated wavs. Defaults to the standard results/... directory.",
+ )
+ parser.add_argument(
+ "--fixed_prompt_wav",
+ default=None,
+ type=str,
+ help="Use one fixed prompt wav for all samples instead of each test sample's prompt wav.",
+ )
+ parser.add_argument(
+ "--fixed_prompt_text",
+ default=None,
+ type=str,
+ help="Text corresponding to --fixed_prompt_wav. Required when --fixed_prompt_wav is set.",
+ )
+ parser.add_argument(
+ "--result_expname",
+ default=None,
+ type=str,
+ help="Optional result directory name override. Defaults to --expname.",
+ )
+ parser.add_argument("--cfg_strength", default=3.0, type=float)
+ parser.add_argument(
+ "--load_dtype",
+ default="fp32",
+ choices=["bf16", "fp16", "fp32"],
+ help="Model checkpoint load precision. Default fp32 for more stable weight loading.",
+ )
+ parser.add_argument(
+ "--infer_dtype",
+ default="bf16",
+ choices=["bf16", "fp16", "fp32"],
+ help="Inference precision: bf16/fp16 for autocast mixed precision, fp32 to disable autocast.",
+ )
+
+ args = parser.parse_args()
+
+ seed = args.seed
+ exp_name = args.expname
+ result_exp_name = args.result_expname or exp_name
+ ckpt_step = args.ckptstep
+
+ nfe_step = args.nfe_step
+ sway_sampling_coef = args.swaysampling
+ timestep_mapping = args.timestep_mapping
+ timestep_power = args.timestep_power
+ shift = args.shift
+
+ if timestep_mapping == "power" and timestep_power is None:
+ raise ValueError("--timestep_power must be provided when --timestep_mapping power is used")
+
+ testset = args.testset
+ load_dtype_name = args.load_dtype
+ infer_dtype_name = args.infer_dtype
+
+ infer_batch_size = 1 # max frames. 1 for ddp single inference (recommended)
+ cfg_strength = args.cfg_strength
+ speed = 1.0
+ use_truth_duration = False
+ no_ref_audio = False
+
+ amp_dtype_map = {
+ "bf16": torch.bfloat16,
+ "fp16": torch.float16,
+ }
+ autocast_dtype = amp_dtype_map.get(infer_dtype_name)
+
+ model_cfg = OmegaConf.load(str(files("wavtts").joinpath(f"configs/{exp_name}.yaml")))
+ model_cls = get_class(f"wavtts.model.{model_cfg.model.backbone}")
+ model_arc = model_cfg.model.arch
+
+ dataset_name = model_cfg.datasets.name
+ tokenizer = model_cfg.model.tokenizer
+
+ target_sample_rate = model_cfg.model.waveform.target_sample_rate
+ wav_frame_len = model_cfg.model.waveform.wav_frame_len
+
+ if testset == "ls_pc_test_clean":
+ metalst = rel_path + "/data/librispeech_pc_test_clean_cross_sentence.lst"
+ librispeech_test_clean_path = args.librispeech_test_clean_path
+ metainfo = get_librispeech_test_clean_metainfo(metalst, librispeech_test_clean_path)
+
+ elif testset == "seedtts_test_zh":
+ metalst = rel_path + "/data/seedtts_testset/zh/meta.lst"
+ metainfo = get_seedtts_testset_metainfo(metalst)
+
+ elif testset == "seedtts_test_zh_hard":
+ metalst = rel_path + "/data/seedtts_testset/zh/hardcase.lst"
+ metainfo = get_seedtts_testset_metainfo(metalst)
+
+ elif testset == "seedtts_test_en":
+ metalst = rel_path + "/data/seedtts_testset/en/meta.lst"
+ metainfo = get_seedtts_testset_metainfo(metalst)
+
+ elif testset == "ljspeech_inset_test_9s":
+ metalst = args.ljspeech_inset_meta
+ if not os.path.exists(metalst):
+ raise FileNotFoundError(f"LJSpeech inset metadata not found: {metalst}")
+
+ metainfo = []
+ with open(metalst, "r", encoding="utf-8") as f:
+ for line in f:
+ parts = line.rstrip("\n").split("\t")
+ if len(parts) < 6:
+ continue
+ ref_utt, _ref_dur, ref_txt, gen_utt, _gen_dur, gen_txt = parts[:6]
+ ref_wav = os.path.join(args.ljspeech_wav_dir, ref_utt + ".wav")
+ gen_wav = os.path.join(args.ljspeech_wav_dir, gen_utt + ".wav")
+ metainfo.append((gen_utt, ref_txt, ref_wav, " " + gen_txt, gen_wav))
+
+ else:
+ raise ValueError(f"Unknown testset: {testset}")
+
+ if (args.fixed_prompt_wav is None) != (args.fixed_prompt_text is None):
+ raise ValueError("--fixed_prompt_wav and --fixed_prompt_text must be set together")
+
+ if args.fixed_prompt_wav is not None:
+ if not os.path.exists(args.fixed_prompt_wav):
+ raise FileNotFoundError(f"Fixed prompt wav not found: {args.fixed_prompt_wav}")
+ fixed_prompt_wav = args.fixed_prompt_wav
+ fixed_prompt_text = args.fixed_prompt_text
+ metainfo = [
+ (utt, fixed_prompt_text, fixed_prompt_wav, gt_text, gt_wav)
+ for utt, _prompt_text, _prompt_wav, gt_text, gt_wav in metainfo
+ ]
+
+
+ # path to save genereted wavs
+ if args.output_dir is not None:
+ output_dir = args.output_dir
+ else:
+ output_dir = (
+ f"{rel_path}/"
+ f"results/{result_exp_name}/{ckpt_step}/{testset}/"
+ f"seed{seed}_nfe{nfe_step}_wav"
+ f"{'_uniform' if timestep_mapping == 'uniform' else ''}"
+ f"{f'_ss{sway_sampling_coef}' if timestep_mapping == 'sway_sampling' and sway_sampling_coef else ''}"
+ f"{f'_power{timestep_power}' if timestep_mapping == 'power' else ''}"
+ f"{f'_shift{shift}' if shift != 1.0 else ''}"
+ f"_cfg{cfg_strength}"
+ f"{'_gt-dur' if use_truth_duration else ''}"
+ f"{'_no-ref-audio' if no_ref_audio else ''}"
+ )
+
+ # -------------------------------------------------#
+ wav_frame_len = int(model_cfg.model.waveform.get("wav_frame_len", 160))
+
+ prompts_all = get_inference_prompt(
+ metainfo,
+ speed=speed,
+ tokenizer=tokenizer,
+ target_sample_rate=target_sample_rate,
+ target_rms=target_rms,
+ use_truth_duration=use_truth_duration,
+ infer_batch_size=infer_batch_size,
+ wav_frame_len=wav_frame_len,
+ )
+
+ # Tokenizer
+ if args.vocab_file:
+ vocab_char_map, vocab_size = get_tokenizer(args.vocab_file, "custom")
+ else:
+ vocab_char_map, vocab_size = get_tokenizer(dataset_name, tokenizer)
+
+ # waveform geometry
+ waveform_kwargs = model_cfg.model.waveform
+ if waveform_kwargs is None:
+ waveform_kwargs = dict(
+ wav_frame_len=wav_frame_len,
+ target_sample_rate=target_sample_rate,
+ )
+
+ # CFM kwargs
+ cfm_kwargs = getattr(model_cfg.model, "cfm", {}) or {}
+
+ # Model
+ model = CFM(
+ transformer=model_cls(**model_arc, text_num_embeds=vocab_size, wav_frame_len=wav_frame_len),
+ waveform_kwargs=waveform_kwargs,
+ odeint_kwargs=dict(
+ method="euler",
+ ),
+ vocab_char_map=vocab_char_map,
+ **cfm_kwargs,
+ ).to(device)
+
+ # ckpt_prefix = rel_path + f"/ckpts/{exp_name}/model_{ckpt_step}"
+ # if os.path.exists(ckpt_prefix + ".pt"):
+ # ckpt_path = ckpt_prefix + ".pt"
+ # elif os.path.exists(ckpt_prefix + ".safetensors"):
+ # ckpt_path = ckpt_prefix + ".safetensors"
+ # else:
+ # print("Loading from self-organized training checkpoints rather than released pretrained.")
+ # ckpt_prefix = rel_path + f"/{model_cfg.ckpts.save_dir}/model_{ckpt_step}"
+ # if os.path.exists(ckpt_prefix + ".pt"):
+ # ckpt_path = ckpt_prefix + ".pt"
+ # elif os.path.exists(ckpt_prefix + ".safetensors"):
+ # ckpt_path = ckpt_prefix + ".safetensors"
+ # else:
+ # raise ValueError("The checkpoint does not exist or cannot be found in given location.")
+ ckpt_path = args.ckpt_path or DEFAULT_CKPT_FILE
+ if ckpt_path.startswith(("hf://", "http://", "https://")):
+ ckpt_path = str(cached_path(ckpt_path))
+
+ load_dtype = amp_dtype_map.get(load_dtype_name, torch.float32)
+ model = load_checkpoint(model, ckpt_path, device, dtype=load_dtype, use_ema=True)
+
+ if not os.path.exists(output_dir) and accelerator.is_main_process:
+ os.makedirs(output_dir)
+
+ # start batch inference
+ accelerator.wait_for_everyone()
+ start = time.time()
+
+ with accelerator.split_between_processes(prompts_all) as prompts:
+ for prompt in tqdm(prompts, disable=not accelerator.is_local_main_process):
+ utts, ref_rms_list, ref_wavs, ref_wav_lens, total_wav_lens, final_text_list = prompt
+ ref_wavs = ref_wavs.to(device)
+ ref_wav_lens = torch.tensor(ref_wav_lens, dtype=torch.long).to(device)
+ total_wav_lens = torch.tensor(total_wav_lens, dtype=torch.long).to(device)
+
+ # Inference
+ with torch.inference_mode():
+ with torch.autocast("cuda", dtype=autocast_dtype, enabled=autocast_dtype is not None):
+ generated, _ = model.sample(
+ cond=ref_wavs,
+ text=final_text_list,
+ duration=total_wav_lens,
+ steps=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ use_epss=timestep_mapping == "sway_sampling",
+ no_ref_audio=no_ref_audio,
+ seed=seed,
+ )
+ # Final result
+ for i, gen in enumerate(generated):
+ start_idx = ref_wav_lens[i].item()
+ end_idx = total_wav_lens[i].item()
+ generated_wave = gen[start_idx:end_idx].cpu()
+
+ if ref_rms_list[i] < target_rms:
+ generated_wave = generated_wave * ref_rms_list[i] / target_rms
+
+ wave_to_save = generated_wave.to(torch.float32).cpu()
+
+ if wave_to_save.ndim == 1:
+ wave_to_save = wave_to_save.unsqueeze(0)
+ elif wave_to_save.ndim > 2:
+ wave_to_save = wave_to_save.squeeze()
+ if wave_to_save.ndim == 1:
+ wave_to_save = wave_to_save.unsqueeze(0)
+
+ torchaudio.save(f"{output_dir}/{utts[i]}.wav", wave_to_save, target_sample_rate)
+
+ accelerator.wait_for_everyone()
+ if accelerator.is_main_process:
+ timediff = time.time() - start
+ print(f"Done batch inference in {timediff / 60:.2f} minutes.")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/wavtts/eval/eval_infer_batch.sh b/src/wavtts/eval/eval_infer_batch.sh
new file mode 100644
index 0000000000000000000000000000000000000000..ceb69195884608437587c3286c2a6ff0e81d0f0b
--- /dev/null
+++ b/src/wavtts/eval/eval_infer_batch.sh
@@ -0,0 +1,201 @@
+#!/bin/bash
+set -e
+export PYTHONWARNINGS="ignore::UserWarning,ignore::FutureWarning"
+export MASTER_PORT=53721
+export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7"
+
+# Configuration parameters
+MODEL_NAME=WavTTS
+RESULT_MODEL_NAME="${MODEL_NAME}"
+SEEDS=(0)
+CKPTSTEPS=(1200000)
+TASKS=("seedtts_test_en" "seedtts_test_zh")
+GPUS="[0,1,2,3,4,5,6,7]"
+TRAIN_GPU_TAG="8gpus"
+CKPT_FILE="hf://worstchan/WavTTS/model_1200000.pt"
+WAVLM_CKPT_DIR=""
+LS_TEST_CLEAN_PATH="data/LibriSpeech/test-clean"
+
+cfg_strength=3.0
+nfe_step=50
+timestep_mapping="power" # power, sway_sampling, uniform
+swaysampling=-1
+timestep_power=2.0
+shift="3.0" # 1.0, 3.0
+
+# Parse arguments
+INFER_ONLY=true # true, false
+while [[ $# -gt 0 ]]; do
+ case $1 in
+ --full-eval)
+ INFER_ONLY=false
+ shift
+ ;;
+ --infer-only)
+ INFER_ONLY=true
+ shift
+ ;;
+ --result-model-name)
+ RESULT_MODEL_NAME="$2"
+ shift 2
+ ;;
+ --timestep-mapping)
+ timestep_mapping="$2"
+ shift 2
+ ;;
+ --timestep-power)
+ timestep_power="$2"
+ shift 2
+ ;;
+ --shift)
+ shift="$2"
+ shift 2
+ ;;
+ --train-gpu-tag)
+ TRAIN_GPU_TAG="$2"
+ shift 2
+ ;;
+ --wavlm-ckpt-dir)
+ WAVLM_CKPT_DIR="$2"
+ shift 2
+ ;;
+ --librispeech-test-clean-path)
+ LS_TEST_CLEAN_PATH="$2"
+ shift 2
+ ;;
+ *)
+ echo "======== Unknown parameter: $1"
+ exit 1
+ ;;
+ esac
+done
+
+echo "======== Starting WavTTS batch evaluation task..."
+echo "======== Result model name: ${RESULT_MODEL_NAME}"
+echo "======== Timestep mapping: ${timestep_mapping}"
+echo "======== Train GPU tag: ${TRAIN_GPU_TAG}"
+if [ -n "${WAVLM_CKPT_DIR}" ]; then
+ echo "======== WavLM checkpoint: ${WAVLM_CKPT_DIR}"
+fi
+RESULT_EXP_SUFFIX=""
+if [ "${TRAIN_GPU_TAG}" != "8gpus" ]; then
+ RESULT_EXP_SUFFIX="_${TRAIN_GPU_TAG}"
+fi
+RESULT_EXPNAME="${RESULT_MODEL_NAME}${RESULT_EXP_SUFFIX}"
+
+if [ "${timestep_mapping}" = "power" ]; then
+ echo "======== Timestep power: ${timestep_power}"
+fi
+if [ "${shift}" != "1.0" ]; then
+ echo "======== Shift: ${shift}"
+fi
+if [ "$INFER_ONLY" = true ]; then
+ echo "======== Mode: Execute infer tasks only"
+else
+ echo "======== Mode: Execute full pipeline (infer + eval)"
+ if [ -z "${WAVLM_CKPT_DIR}" ]; then
+ echo "======== WavLM checkpoint is required for SIM evaluation. Pass --wavlm-ckpt-dir ."
+ exit 1
+ fi
+fi
+
+
+# Function: Execute eval tasks
+execute_eval_tasks() {
+ local ckptstep=$1
+ local seed=$2
+ local task_name=$3
+
+ local gen_wav_dir="results/${RESULT_EXPNAME}/${ckptstep}/${task_name}/seed${seed}_nfe${nfe_step}_wav"
+ if [ "${timestep_mapping}" = "uniform" ]; then
+ gen_wav_dir+="_uniform"
+ fi
+ if [ "${timestep_mapping}" = "sway_sampling" ] && [ "${swaysampling}" != "0" ]; then
+ gen_wav_dir+="_ss${swaysampling}"
+ fi
+ if [ "${timestep_mapping}" = "power" ]; then
+ gen_wav_dir+="_power${timestep_power}"
+ fi
+ if [ "${shift}" != "1.0" ]; then
+ gen_wav_dir+="_shift${shift}"
+ fi
+ gen_wav_dir+="_cfg${cfg_strength}"
+
+ echo ">>>>>>>> Starting eval task: ckptstep=${ckptstep}, seed=${seed}, task=${task_name}, gen_wav_dir=${gen_wav_dir}"
+
+ local wavlm_ckpt_args=()
+ if [ -n "${WAVLM_CKPT_DIR}" ]; then
+ wavlm_ckpt_args=(--wavlm_ckpt_dir "${WAVLM_CKPT_DIR}")
+ fi
+
+ case $task_name in
+ "seedtts_test_zh")
+ python src/wavtts/eval/eval_seedtts_testset.py -e wer -l zh -g "$gen_wav_dir" -n "$GPUS"
+ python src/wavtts/eval/eval_seedtts_testset.py -e sim -l zh -g "$gen_wav_dir" -n "$GPUS" "${wavlm_ckpt_args[@]}"
+ python src/wavtts/eval/eval_utmos.py --audio_dir "$gen_wav_dir"
+ ;;
+ "seedtts_test_en")
+ python src/wavtts/eval/eval_seedtts_testset.py -e wer -l en -g "$gen_wav_dir" -n "$GPUS"
+ python src/wavtts/eval/eval_seedtts_testset.py -e sim -l en -g "$gen_wav_dir" -n "$GPUS" "${wavlm_ckpt_args[@]}"
+ python src/wavtts/eval/eval_utmos.py --audio_dir "$gen_wav_dir"
+ ;;
+ "ls_pc_test_clean")
+ python src/wavtts/eval/eval_librispeech_test_clean.py -e wer -g "$gen_wav_dir" -n "$GPUS" -p "$LS_TEST_CLEAN_PATH"
+ python src/wavtts/eval/eval_librispeech_test_clean.py -e sim -g "$gen_wav_dir" -n "$GPUS" -p "$LS_TEST_CLEAN_PATH" "${wavlm_ckpt_args[@]}"
+ python src/wavtts/eval/eval_utmos.py --audio_dir "$gen_wav_dir"
+ ;;
+ esac
+
+ echo ">>>>>>>> Completed eval task: ckptstep=${ckptstep}, seed=${seed}, task=${task_name}"
+}
+
+# Main execution loop
+for ckptstep in "${CKPTSTEPS[@]}"; do
+ CKPT_PATH="${CKPT_FILE}"
+
+ echo "======== Processing ckptstep: ${ckptstep}"
+ echo "======== Using checkpoint: ${CKPT_PATH}"
+
+ for seed in "${SEEDS[@]}"; do
+ echo "-------- Processing seed: ${seed}"
+
+ # Store eval task PIDs for current seed (if not infer-only mode)
+ if [ "$INFER_ONLY" = false ]; then
+ declare -a eval_pids
+ fi
+
+ # Execute each infer task sequentially
+ for task in "${TASKS[@]}"; do
+ echo ">>>>>>>> Executing infer task: accelerate launch src/wavtts/eval/eval_infer_batch.py -s ${seed} -n \"${MODEL_NAME}\" -t \"${task}\" -c ${ckptstep} --ckpt_path \"${CKPT_PATH}\" --result_expname \"${RESULT_EXPNAME}\" --cfg_strength ${cfg_strength} --nfe_step ${nfe_step} --swaysampling ${swaysampling} --timestep_mapping ${timestep_mapping} --timestep_power ${timestep_power} --shift ${shift} -p \"${LS_TEST_CLEAN_PATH}\""
+
+ # Execute infer task
+ accelerate launch --main_process_port ${MASTER_PORT} src/wavtts/eval/eval_infer_batch.py -s ${seed} -n "${MODEL_NAME}" -t "${task}" -c ${ckptstep} --ckpt_path "${CKPT_PATH}" --result_expname "${RESULT_EXPNAME}" --nfe_step ${nfe_step} --swaysampling ${swaysampling} --timestep_mapping ${timestep_mapping} --timestep_power ${timestep_power} --shift ${shift} --cfg_strength ${cfg_strength} -p "${LS_TEST_CLEAN_PATH}"
+
+ # If not infer-only mode, launch corresponding eval task
+ if [ "$INFER_ONLY" = false ]; then
+ # Launch corresponding eval task (background execution, non-blocking for next infer)
+ execute_eval_tasks $ckptstep $seed $task &
+ eval_pids+=($!)
+ fi
+ done
+
+ # If not infer-only mode, wait for all eval tasks of current seed to complete
+ if [ "$INFER_ONLY" = false ]; then
+ echo ">>>>>>>> All infer tasks for seed ${seed} completed, waiting for corresponding eval tasks to finish..."
+
+ for pid in "${eval_pids[@]}"; do
+ wait $pid
+ done
+
+ unset eval_pids # Clean up array
+ fi
+ echo "-------- All eval tasks for seed ${seed} completed"
+ done
+
+ echo "======== Completed ckptstep: ${ckptstep}"
+ echo
+done
+
+echo "======== All tasks completed!"
+
+# bash src/wavtts/eval/eval_infer_batch.sh
diff --git a/src/wavtts/eval/eval_infer_batch_example.sh b/src/wavtts/eval/eval_infer_batch_example.sh
new file mode 100644
index 0000000000000000000000000000000000000000..177cc1d9cb02c99a1ad22f635583941ac67d1b36
--- /dev/null
+++ b/src/wavtts/eval/eval_infer_batch_example.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# WavTTS batch inference examples.
+# Use an explicit checkpoint path because WavTTS configs no longer include legacy model fallbacks.
+
+CKPT_PATH="hf://worstchan/WavTTS/model_1200000.pt"
+MODEL_NAME=WavTTS
+GPU_NUMS=8
+WAVLM_CKPT_DIR=""
+
+# e.g. WavTTS, 50 NFE
+accelerate launch --num_processes "${GPU_NUMS}" src/wavtts/eval/eval_infer_batch.py -s 0 -n "${MODEL_NAME}" -t "seedtts_test_zh" -c 1200000 -nfe 50 --ckpt_path "${CKPT_PATH}"
+accelerate launch --num_processes "${GPU_NUMS}" src/wavtts/eval/eval_infer_batch.py -s 0 -n "${MODEL_NAME}" -t "seedtts_test_en" -c 1200000 -nfe 50 --ckpt_path "${CKPT_PATH}"
+accelerate launch --num_processes "${GPU_NUMS}" src/wavtts/eval/eval_infer_batch.py -s 0 -n "${MODEL_NAME}" -t "ls_pc_test_clean" -c 1200000 -nfe 50 -p data/LibriSpeech/test-clean --ckpt_path "${CKPT_PATH}"
+
+# e.g. evaluate WavTTS 50 NFE result on Seed-TTS test-zh
+GEN_WAV_DIR=results/WavTTS/1200000/seedtts_test_zh/seed0_nfe50_wav_power2.0_shift3.0_cfg3.0
+python src/wavtts/eval/eval_seedtts_testset.py -e wer -l zh --gen_wav_dir "${GEN_WAV_DIR}" --gpu_nums "${GPU_NUMS}"
+python src/wavtts/eval/eval_seedtts_testset.py -e sim -l zh --gen_wav_dir "${GEN_WAV_DIR}" --gpu_nums "${GPU_NUMS}" --wavlm_ckpt_dir "$WAVLM_CKPT_DIR"
+python src/wavtts/eval/eval_utmos.py --audio_dir "${GEN_WAV_DIR}"
diff --git a/src/wavtts/eval/eval_librispeech_test_clean.py b/src/wavtts/eval/eval_librispeech_test_clean.py
new file mode 100644
index 0000000000000000000000000000000000000000..5086f427f49621d227054feeb375cfe58f0683de
--- /dev/null
+++ b/src/wavtts/eval/eval_librispeech_test_clean.py
@@ -0,0 +1,119 @@
+# Evaluate with Librispeech test-clean, ~3s prompt to generate 4-10s audio (the way of valle/voicebox evaluation)
+
+import argparse
+import ast
+import json
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import multiprocessing as mp
+from importlib.resources import files
+
+import numpy as np
+
+from wavtts.eval.utils_eval import get_librispeech_test, run_asr_wer, run_sim
+
+
+rel_path = str(files("wavtts").joinpath("../../"))
+
+
+def get_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("-e", "--eval_task", type=str, default="wer", choices=["sim", "wer"])
+ parser.add_argument("-l", "--lang", type=str, default="en")
+ parser.add_argument("-g", "--gen_wav_dir", type=str, required=True)
+ parser.add_argument("-p", "--librispeech_test_clean_path", type=str, required=True)
+ parser.add_argument(
+ "-n", "--gpu_nums", type=str, default="8", help="Number of GPUs to use (e.g., 8) or GPU list (e.g., [0,1,2,3])"
+ )
+ parser.add_argument("-t", "--task", type=str, default="ls_pc_test_clean", choices=["ls_pc_test_clean"])
+ parser.add_argument(
+ "--wavlm_ckpt_dir",
+ type=str,
+ default="",
+ help="Path to wavlm_large_finetune.pth for SIM evaluation.",
+ )
+ parser.add_argument("--local", action="store_true", help="Use local custom checkpoint directory")
+ return parser.parse_args()
+
+
+def parse_gpu_nums(gpu_nums_str):
+ try:
+ if gpu_nums_str.startswith("[") and gpu_nums_str.endswith("]"):
+ gpu_list = ast.literal_eval(gpu_nums_str)
+ if isinstance(gpu_list, list):
+ return gpu_list
+ return list(range(int(gpu_nums_str)))
+ except (ValueError, SyntaxError):
+ raise argparse.ArgumentTypeError(
+ f"Invalid GPU specification: {gpu_nums_str}. Use a number (e.g., 8) or a list (e.g., [0,1,2,3])"
+ )
+
+
+def main():
+ args = get_args()
+ eval_task = args.eval_task
+ lang = args.lang
+ librispeech_test_clean_path = args.librispeech_test_clean_path # test-clean path
+ gen_wav_dir = args.gen_wav_dir
+
+ metalst = rel_path + "/data/librispeech_pc_test_clean_cross_sentence.lst"
+
+ gpus = parse_gpu_nums(args.gpu_nums)
+ test_set = get_librispeech_test(metalst, gen_wav_dir, gpus, librispeech_test_clean_path)
+
+ ## In LibriSpeech, some speakers utilized varying voice characteristics for different characters in the book,
+ ## leading to a low similarity for the ground truth in some cases.
+ # test_set = get_librispeech_test(metalst, gen_wav_dir, gpus, librispeech_test_clean_path, eval_ground_truth = True) # eval ground truth
+
+ wavlm_ckpt_dir = args.wavlm_ckpt_dir
+ if eval_task == "sim" and not wavlm_ckpt_dir:
+ raise ValueError(
+ "--wavlm_ckpt_dir is required for SIM evaluation. "
+ "Download wavlm_large_finetune.pth and pass its path."
+ )
+
+ local = args.local
+ if local: # use local custom checkpoint dir
+ asr_ckpt_dir = "../checkpoints/Systran/faster-whisper-large-v3"
+ else:
+ asr_ckpt_dir = "" # auto download to cache dir
+
+ # --------------------------------------------------------------------------
+
+ full_results = []
+ metrics = []
+
+ if eval_task == "wer":
+ with mp.Pool(processes=len(gpus)) as pool:
+ args = [(rank, lang, sub_test_set, asr_ckpt_dir) for (rank, sub_test_set) in test_set]
+ results = pool.map(run_asr_wer, args)
+ for r in results:
+ full_results.extend(r)
+ elif eval_task == "sim":
+ with mp.Pool(processes=len(gpus)) as pool:
+ args = [(rank, sub_test_set, wavlm_ckpt_dir) for (rank, sub_test_set) in test_set]
+ results = pool.map(run_sim, args)
+ for r in results:
+ full_results.extend(r)
+ else:
+ raise ValueError(f"Unknown metric type: {eval_task}")
+
+ result_path = f"{gen_wav_dir}/_{eval_task}_results.jsonl"
+ with open(result_path, "w") as f:
+ for line in full_results:
+ metrics.append(line[eval_task])
+ f.write(json.dumps(line, ensure_ascii=False) + "\n")
+ metric = round(np.mean(metrics), 5)
+ f.write(f"\n{eval_task.upper()}: {metric}\n")
+
+ print(f"\nTotal {len(metrics)} samples")
+ print(f"{eval_task.upper()}: {metric}")
+ print(f"{eval_task.upper()} results saved to {result_path}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/wavtts/eval/eval_seedtts.sh b/src/wavtts/eval/eval_seedtts.sh
new file mode 100644
index 0000000000000000000000000000000000000000..5150cda8db0334b8e70913afd163057150ac9faf
--- /dev/null
+++ b/src/wavtts/eval/eval_seedtts.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+set -e
+
+# Environment variables; adjust as needed.
+export PYTHONWARNINGS="ignore::UserWarning,ignore::FutureWarning"
+export OMP_NUM_THREADS=1
+
+eval_metric=("wer sim utmos")
+
+langs=("zh" "en")
+ckpt_steps=(1200000)
+seed=0
+nfe_step=50
+cfg_strength=3.0
+timestep_mapping="power"
+timestep_power=2.0
+shift="3.0"
+RESULTS_ROOT=./results/WavTTS
+GPUS="[0,1,2,3,4,5,6,7]"
+
+LOCAL=""
+WAVLM_CKPT_DIR=""
+
+gen_wav_subdir=seed${seed}_nfe${nfe_step}_wav
+if [[ "${timestep_mapping}" == "uniform" ]]; then
+ gen_wav_subdir+="_uniform"
+fi
+if [[ "${timestep_mapping}" == "sway_sampling" && "${swaysampling}" != "0" ]]; then
+ gen_wav_subdir+="_ss${swaysampling}"
+fi
+if [[ "${timestep_mapping}" == "power" ]]; then
+ gen_wav_subdir+="_power${timestep_power}"
+fi
+if [[ "${shift}" != "1.0" ]]; then
+ gen_wav_subdir+="_shift${shift}"
+fi
+gen_wav_subdir+="_cfg${cfg_strength}"
+
+
+for ckpt_step in "${ckpt_steps[@]}"; do
+ output_dir=${RESULTS_ROOT}/${ckpt_step}
+ echo "[INFO] processing ckpt_step=${ckpt_step}"
+
+ for lang in "${langs[@]}"; do
+ gen_wav_dir=${output_dir}/seedtts_test_${lang}/${gen_wav_subdir}
+ echo "[INFO] evaluating ${gen_wav_dir}"
+
+ if [[ ! -d "${gen_wav_dir}" ]]; then
+ echo "[ERROR] generated wav dir not found: ${gen_wav_dir}" >&2
+ exit 1
+ fi
+
+ if [[ " ${eval_metric[@]} " =~ " wer " ]]; then
+ python src/wavtts/eval/eval_seedtts_testset.py \
+ -e wer -l "$lang" -g "$gen_wav_dir" -n "$GPUS" $LOCAL
+ fi
+
+ if [[ " ${eval_metric[@]} " =~ " sim " ]]; then
+ python src/wavtts/eval/eval_seedtts_testset.py \
+ -e sim -l "$lang" -g "$gen_wav_dir" -n "$GPUS" $LOCAL --wavlm_ckpt_dir "$WAVLM_CKPT_DIR"
+ fi
+
+ if [[ " ${eval_metric[@]} " =~ " utmos " ]]; then
+ python src/wavtts/eval/eval_utmos.py \
+ --audio_dir "$gen_wav_dir"
+ fi
+ done
+done
+
+# bash src/wavtts/eval/eval_seedtts.sh
diff --git a/src/wavtts/eval/eval_seedtts_testset.py b/src/wavtts/eval/eval_seedtts_testset.py
new file mode 100644
index 0000000000000000000000000000000000000000..e163e3e7ea05be5ba9135810e4f281ca1b4f95c0
--- /dev/null
+++ b/src/wavtts/eval/eval_seedtts_testset.py
@@ -0,0 +1,120 @@
+# Evaluate with Seed-TTS testset
+
+import argparse
+import ast
+import json
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import multiprocessing as mp
+from importlib.resources import files
+
+import numpy as np
+
+from wavtts.eval.utils_eval import get_seed_tts_test, run_asr_wer, run_sim
+
+
+rel_path = str(files("wavtts").joinpath("../../"))
+
+
+def get_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("-e", "--eval_task", type=str, default="wer", choices=["sim", "wer"])
+ parser.add_argument("-l", "--lang", type=str, default="en", choices=["zh", "zh_hard", "en"])
+ parser.add_argument("-g", "--gen_wav_dir", type=str, required=True)
+ parser.add_argument(
+ "-n", "--gpu_nums", type=str, default="8", help="Number of GPUs to use (e.g., 8) or GPU list (e.g., [0,1,2,3])"
+ )
+ parser.add_argument(
+ "--wavlm_ckpt_dir",
+ type=str,
+ default="",
+ help="Path to wavlm_large_finetune.pth for SIM evaluation.",
+ )
+ parser.add_argument("--local", action="store_true", help="Use local custom checkpoint directory")
+ return parser.parse_args()
+
+
+def parse_gpu_nums(gpu_nums_str):
+ try:
+ if gpu_nums_str.startswith("[") and gpu_nums_str.endswith("]"):
+ gpu_list = ast.literal_eval(gpu_nums_str)
+ if isinstance(gpu_list, list):
+ return gpu_list
+ return list(range(int(gpu_nums_str)))
+ except (ValueError, SyntaxError):
+ raise argparse.ArgumentTypeError(
+ f"Invalid GPU specification: {gpu_nums_str}. Use a number (e.g., 8) or a list (e.g., [0,1,2,3])"
+ )
+
+
+def main():
+ args = get_args()
+ eval_task = args.eval_task
+ lang = args.lang
+ asr_lang = "zh" if lang == "zh_hard" else lang
+ gen_wav_dir = args.gen_wav_dir
+ if lang == "zh_hard":
+ metalst = rel_path + "/data/seedtts_testset/zh/hardcase.lst"
+ else:
+ metalst = rel_path + f"/data/seedtts_testset/{lang}/meta.lst" # seed-tts testset
+
+ # NOTE. paraformer-zh result will be slightly different according to the number of gpus, cuz batchsize is different
+ # zh 1.254 seems a result of 4 workers wer_seed_tts
+ gpus = parse_gpu_nums(args.gpu_nums)
+ test_set = get_seed_tts_test(metalst, gen_wav_dir, gpus)
+
+ wavlm_ckpt_dir = args.wavlm_ckpt_dir
+ if eval_task == "sim" and not wavlm_ckpt_dir:
+ raise ValueError(
+ "--wavlm_ckpt_dir is required for SIM evaluation. "
+ "Download wavlm_large_finetune.pth and pass its path."
+ )
+
+ local = args.local
+ if local: # use local custom checkpoint dir
+ if asr_lang == "zh":
+ asr_ckpt_dir = "../checkpoints/funasr" # paraformer-zh dir under funasr
+ elif asr_lang == "en":
+ asr_ckpt_dir = "../checkpoints/Systran/faster-whisper-large-v3"
+ else:
+ asr_ckpt_dir = "" # auto download to cache dir
+
+ # --------------------------------------------------------------------------
+
+ full_results = []
+ metrics = []
+
+ if eval_task == "wer":
+ with mp.Pool(processes=len(gpus)) as pool:
+ args = [(rank, asr_lang, sub_test_set, asr_ckpt_dir) for (rank, sub_test_set) in test_set]
+ results = pool.map(run_asr_wer, args)
+ for r in results:
+ full_results.extend(r)
+ elif eval_task == "sim":
+ with mp.Pool(processes=len(gpus)) as pool:
+ args = [(rank, sub_test_set, wavlm_ckpt_dir) for (rank, sub_test_set) in test_set]
+ results = pool.map(run_sim, args)
+ for r in results:
+ full_results.extend(r)
+ else:
+ raise ValueError(f"Unknown metric type: {eval_task}")
+
+ result_path = f"{gen_wav_dir}/_{eval_task}_results.jsonl"
+ with open(result_path, "w") as f:
+ for line in full_results:
+ metrics.append(line[eval_task])
+ f.write(json.dumps(line, ensure_ascii=False) + "\n")
+ metric = round(np.mean(metrics), 5)
+ f.write(f"\n{eval_task.upper()}: {metric}\n")
+
+ print(f"\nTotal {len(metrics)} samples")
+ print(f"{eval_task.upper()}: {metric}")
+ print(f"{eval_task.upper()} results saved to {result_path}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/wavtts/eval/eval_utmos.py b/src/wavtts/eval/eval_utmos.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6166e8ab073a6134b23936e15e440332991bab2
--- /dev/null
+++ b/src/wavtts/eval/eval_utmos.py
@@ -0,0 +1,42 @@
+import argparse
+import json
+from pathlib import Path
+
+import librosa
+import torch
+from tqdm import tqdm
+
+
+def main():
+ parser = argparse.ArgumentParser(description="UTMOS Evaluation")
+ parser.add_argument("--audio_dir", type=str, required=True, help="Audio file path.")
+ parser.add_argument("--ext", type=str, default="wav", help="Audio extension.")
+ args = parser.parse_args()
+
+ device = "cuda" if torch.cuda.is_available() else "xpu" if torch.xpu.is_available() else "cpu"
+
+ predictor = torch.hub.load("tarepan/SpeechMOS:v1.2.0", "utmos22_strong", trust_repo=True)
+ predictor = predictor.to(device)
+
+ audio_paths = list(Path(args.audio_dir).rglob(f"*.{args.ext}"))
+ utmos_score = 0
+
+ utmos_result_path = Path(args.audio_dir) / "_utmos_results.jsonl"
+ with open(utmos_result_path, "w", encoding="utf-8") as f:
+ for audio_path in tqdm(audio_paths, desc="Processing"):
+ wav, sr = librosa.load(audio_path, sr=None, mono=True)
+ wav_tensor = torch.from_numpy(wav).to(device).unsqueeze(0)
+ score = predictor(wav_tensor, sr)
+ line = {}
+ line["wav"], line["utmos"] = str(audio_path.stem), score.item()
+ utmos_score += score.item()
+ f.write(json.dumps(line, ensure_ascii=False) + "\n")
+ avg_score = utmos_score / len(audio_paths) if len(audio_paths) > 0 else 0
+ f.write(f"\nUTMOS: {avg_score:.4f}\n")
+
+ print(f"UTMOS: {avg_score:.4f}")
+ print(f"UTMOS results saved to {utmos_result_path}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/wavtts/eval/utils_eval.py b/src/wavtts/eval/utils_eval.py
new file mode 100644
index 0000000000000000000000000000000000000000..659654fb61c9d227a339d778b46ef7056e08aac7
--- /dev/null
+++ b/src/wavtts/eval/utils_eval.py
@@ -0,0 +1,422 @@
+import math
+import os
+import random
+import string
+from pathlib import Path
+
+import torch
+import torch.nn.functional as F
+import torchaudio
+from tqdm import tqdm
+
+from wavtts.eval.ecapa_tdnn import ECAPA_TDNN_SMALL
+from wavtts.model.utils import convert_char_to_pinyin
+
+
+# seedtts testset metainfo: utt, prompt_text, prompt_wav, gt_text, gt_wav
+def get_seedtts_testset_metainfo(metalst):
+ f = open(metalst)
+ lines = f.readlines()
+ f.close()
+ metainfo = []
+ for line in lines:
+ if len(line.strip().split("|")) == 5:
+ utt, prompt_text, prompt_wav, gt_text, gt_wav = line.strip().split("|")
+ elif len(line.strip().split("|")) == 4:
+ utt, prompt_text, prompt_wav, gt_text = line.strip().split("|")
+ gt_wav = os.path.join(os.path.dirname(metalst), "wavs", utt + ".wav")
+ if not os.path.isabs(prompt_wav):
+ prompt_wav = os.path.join(os.path.dirname(metalst), prompt_wav)
+ metainfo.append((utt, prompt_text, prompt_wav, gt_text, gt_wav))
+ return metainfo
+
+
+# librispeech test-clean metainfo: gen_utt, ref_txt, ref_wav, gen_txt, gen_wav
+def get_librispeech_test_clean_metainfo(metalst, librispeech_test_clean_path):
+ f = open(metalst)
+ lines = f.readlines()
+ f.close()
+ metainfo = []
+ for line in lines:
+ ref_utt, ref_dur, ref_txt, gen_utt, gen_dur, gen_txt = line.strip().split("\t")
+
+ # ref_txt = ref_txt[0] + ref_txt[1:].lower() + '.' # if use librispeech test-clean (no-pc)
+ ref_spk_id, ref_chaptr_id, _ = ref_utt.split("-")
+ ref_wav = os.path.join(librispeech_test_clean_path, ref_spk_id, ref_chaptr_id, ref_utt + ".flac")
+
+ # gen_txt = gen_txt[0] + gen_txt[1:].lower() + '.' # if use librispeech test-clean (no-pc)
+ gen_spk_id, gen_chaptr_id, _ = gen_utt.split("-")
+ gen_wav = os.path.join(librispeech_test_clean_path, gen_spk_id, gen_chaptr_id, gen_utt + ".flac")
+
+ metainfo.append((gen_utt, ref_txt, ref_wav, " " + gen_txt, gen_wav))
+
+ return metainfo
+
+
+def padded_wav_batch(wavs):
+ """
+ wavs: list[Tensor], each [1, T]
+ return: Tensor [B, 1, T_max]
+ """
+ assert len(wavs) > 0
+ max_len = max(x.shape[-1] for x in wavs)
+ out = wavs[0].new_zeros(len(wavs), 1, max_len)
+ for i, x in enumerate(wavs):
+ out[i, 0, : x.shape[-1]] = x[0]
+ return out.squeeze(1)
+
+
+# get prompts from metainfo containing: utt, prompt_text, prompt_wav, gt_text, gt_wav
+
+def get_inference_prompt(
+ metainfo,
+ speed=1.0,
+ tokenizer="pinyin",
+ polyphone=True,
+ target_sample_rate=24000,
+ target_rms=0.1,
+ use_truth_duration=False,
+ infer_batch_size=1,
+ num_buckets=200,
+ min_secs=3,
+ max_secs=40,
+ wav_frame_len=160,
+):
+ prompts_all = []
+
+ frame_len = wav_frame_len
+ min_tokens = min_secs * target_sample_rate
+ max_tokens = max_secs * target_sample_rate
+
+ batch_accum = [0] * num_buckets
+ utts, ref_rms_list, ref_feats, ref_feat_lens, total_feat_lens, final_text_list = (
+ [[] for _ in range(num_buckets)] for _ in range(6)
+ )
+
+
+ for utt, prompt_text, prompt_wav, gt_text, gt_wav in tqdm(metainfo, desc="Processing prompts..."):
+ # Audio
+ ref_audio, ref_sr = torchaudio.load(prompt_wav)
+ if ref_audio.shape[0] > 1:
+ ref_audio = ref_audio.mean(dim=0, keepdim=True)
+
+ ref_rms = torch.sqrt(torch.mean(torch.square(ref_audio)))
+ if ref_rms < target_rms:
+ ref_audio = ref_audio * target_rms / ref_rms
+
+ assert ref_audio.shape[-1] > 5000, f"Empty prompt wav: {prompt_wav}, or torchaudio backend issue."
+ if ref_sr != target_sample_rate:
+ resampler = torchaudio.transforms.Resample(ref_sr, target_sample_rate)
+ ref_audio = resampler(ref_audio)
+
+ # Text
+ if len(prompt_text[-1].encode("utf-8")) == 1:
+ prompt_text = prompt_text + " "
+ text = [prompt_text + gt_text]
+ if tokenizer == "pinyin":
+ text_list = convert_char_to_pinyin(text, polyphone=polyphone)
+ else:
+ text_list = text
+
+ ref_len_samples = ref_audio.shape[-1]
+ ref_full_frames = ref_len_samples // frame_len
+ ref_len_aligned = max(ref_full_frames * frame_len, frame_len)
+ ref_audio = ref_audio[..., :ref_len_aligned]
+
+ ref_feat = ref_audio # [1, T_aligned]
+ ref_feat_len = ref_len_aligned # prompt samples
+
+ if use_truth_duration:
+ gt_audio, gt_sr = torchaudio.load(gt_wav)
+ if gt_audio.shape[0] > 1:
+ gt_audio = torch.mean(gt_audio, dim=0, keepdim=True)
+ if gt_sr != target_sample_rate:
+ resampler = torchaudio.transforms.Resample(gt_sr, target_sample_rate)
+ gt_audio = resampler(gt_audio)
+
+ total_len = ref_feat_len + int(gt_audio.shape[-1] / speed)
+ else:
+ ref_text_len = len(prompt_text.encode("utf-8"))
+ gen_text_len = len(gt_text.encode("utf-8"))
+ total_len = ref_feat_len + int(ref_feat_len / ref_text_len * gen_text_len / speed)
+
+ # deal with batch
+ assert infer_batch_size > 0, "infer_batch_size should be greater than 0."
+
+ approx_secs = total_len // target_sample_rate
+
+ assert min_secs <= approx_secs <= max_secs, (
+ f"Audio {utt} has duration {approx_secs}s out of range [{min_secs}, {max_secs}]."
+ )
+
+ bucket_i = math.floor((total_len - min_tokens) / (max_tokens - min_tokens + 1) * num_buckets)
+
+ utts[bucket_i].append(utt)
+ ref_rms_list[bucket_i].append(ref_rms)
+ ref_feats[bucket_i].append(ref_feat)
+ ref_feat_lens[bucket_i].append(ref_feat_len)
+ total_feat_lens[bucket_i].append(total_len)
+ final_text_list[bucket_i].extend(text_list)
+
+ batch_accum[bucket_i] += total_len
+
+ if batch_accum[bucket_i] >= infer_batch_size:
+ # print(f"\n{len(ref_feats[bucket_i][0][0])}\n{ref_feat_len[bucket_i]}\n{total_feat_lens[bucket_i]}")
+ prompts_all.append(
+ (
+ utts[bucket_i],
+ ref_rms_list[bucket_i],
+ padded_wav_batch(ref_feats[bucket_i]),
+ ref_feat_lens[bucket_i],
+ total_feat_lens[bucket_i],
+ final_text_list[bucket_i],
+ )
+ )
+ batch_accum[bucket_i] = 0
+ (
+ utts[bucket_i],
+ ref_rms_list[bucket_i],
+ ref_feats[bucket_i],
+ ref_feat_lens[bucket_i],
+ total_feat_lens[bucket_i],
+ final_text_list[bucket_i],
+ ) = [], [], [], [], [], []
+
+ # add residual
+ for bucket_i, bucket_frames in enumerate(batch_accum):
+ if bucket_frames > 0:
+ prompts_all.append(
+ (
+ utts[bucket_i],
+ ref_rms_list[bucket_i],
+ padded_wav_batch(ref_feats[bucket_i]),
+ ref_feat_lens[bucket_i],
+ total_feat_lens[bucket_i],
+ final_text_list[bucket_i],
+ )
+ )
+ # not only leave easy work for last workers
+ random.seed(666)
+ random.shuffle(prompts_all)
+
+ return prompts_all
+
+
+# get wav_res_ref_text of seed-tts test metalst
+# https://github.com/BytedanceSpeech/seed-tts-eval
+
+
+def get_seed_tts_test(metalst, gen_wav_dir, gpus):
+ f = open(metalst)
+ lines = f.readlines()
+ f.close()
+
+ test_set_ = []
+ for line in tqdm(lines):
+ if len(line.strip().split("|")) == 5:
+ utt, prompt_text, prompt_wav, gt_text, gt_wav = line.strip().split("|")
+ elif len(line.strip().split("|")) == 4:
+ utt, prompt_text, prompt_wav, gt_text = line.strip().split("|")
+
+ if not os.path.exists(os.path.join(gen_wav_dir, utt + ".wav")):
+ continue
+ gen_wav = os.path.join(gen_wav_dir, utt + ".wav")
+ if not os.path.isabs(prompt_wav):
+ prompt_wav = os.path.join(os.path.dirname(metalst), prompt_wav)
+
+ test_set_.append((gen_wav, prompt_wav, gt_text))
+
+ num_jobs = len(gpus)
+ if num_jobs == 1:
+ return [(gpus[0], test_set_)]
+
+ wav_per_job = len(test_set_) // num_jobs + 1
+ test_set = []
+ for i in range(num_jobs):
+ test_set.append((gpus[i], test_set_[i * wav_per_job : (i + 1) * wav_per_job]))
+
+ return test_set
+
+
+# get librispeech test-clean cross sentence test
+
+
+def get_librispeech_test(metalst, gen_wav_dir, gpus, librispeech_test_clean_path, eval_ground_truth=False):
+ f = open(metalst)
+ lines = f.readlines()
+ f.close()
+
+ test_set_ = []
+ for line in tqdm(lines):
+ ref_utt, ref_dur, ref_txt, gen_utt, gen_dur, gen_txt = line.strip().split("\t")
+
+ if eval_ground_truth:
+ gen_spk_id, gen_chaptr_id, _ = gen_utt.split("-")
+ gen_wav = os.path.join(librispeech_test_clean_path, gen_spk_id, gen_chaptr_id, gen_utt + ".flac")
+ else:
+ if not os.path.exists(os.path.join(gen_wav_dir, gen_utt + ".wav")):
+ raise FileNotFoundError(f"Generated wav not found: {gen_utt}")
+ gen_wav = os.path.join(gen_wav_dir, gen_utt + ".wav")
+
+ ref_spk_id, ref_chaptr_id, _ = ref_utt.split("-")
+ ref_wav = os.path.join(librispeech_test_clean_path, ref_spk_id, ref_chaptr_id, ref_utt + ".flac")
+
+ test_set_.append((gen_wav, ref_wav, gen_txt))
+
+ num_jobs = len(gpus)
+ if num_jobs == 1:
+ return [(gpus[0], test_set_)]
+
+ wav_per_job = len(test_set_) // num_jobs + 1
+ test_set = []
+ for i in range(num_jobs):
+ test_set.append((gpus[i], test_set_[i * wav_per_job : (i + 1) * wav_per_job]))
+
+ return test_set
+
+# load asr model
+
+
+def load_asr_model(lang, ckpt_dir=""):
+ if lang == "zh":
+ from funasr import AutoModel
+
+ model = AutoModel(
+ model=os.path.join(ckpt_dir, "paraformer-zh"),
+ # vad_model = os.path.join(ckpt_dir, "fsmn-vad"),
+ # punc_model = os.path.join(ckpt_dir, "ct-punc"),
+ # spk_model = os.path.join(ckpt_dir, "cam++"),
+ disable_update=True,
+ ) # following seed-tts setting
+ elif lang == "en":
+ from faster_whisper import WhisperModel
+
+ model_size = "large-v3" if ckpt_dir == "" else ckpt_dir
+ model = WhisperModel(model_size, device="cuda", compute_type="float16")
+ return model
+
+
+# WER Evaluation, the way Seed-TTS does
+
+
+def run_asr_wer(args):
+ rank, lang, test_set, ckpt_dir = args
+
+ if lang == "zh":
+ import zhconv
+
+ torch.cuda.set_device(rank)
+ elif lang == "en":
+ os.environ["CUDA_VISIBLE_DEVICES"] = str(rank)
+ else:
+ raise NotImplementedError(
+ "lang support only 'zh' (funasr paraformer-zh), 'en' (faster-whisper-large-v3), for now."
+ )
+
+ asr_model = load_asr_model(lang, ckpt_dir=ckpt_dir)
+
+ from zhon.hanzi import punctuation
+
+ punctuation_all = punctuation + string.punctuation
+ wer_results = []
+
+ from jiwer import compute_measures
+
+ for gen_wav, prompt_wav, truth in tqdm(test_set):
+ if lang == "zh":
+ res = asr_model.generate(input=gen_wav, batch_size_s=300, disable_pbar=True)
+ hypo = res[0]["text"]
+ hypo = zhconv.convert(hypo, "zh-cn")
+ elif lang == "en":
+ segments, _ = asr_model.transcribe(gen_wav, beam_size=5, language="en")
+ hypo = ""
+ for segment in segments:
+ hypo = hypo + " " + segment.text
+
+ raw_truth = truth
+ raw_hypo = hypo
+
+ for x in punctuation_all:
+ truth = truth.replace(x, "")
+ hypo = hypo.replace(x, "")
+
+ truth = truth.replace(" ", " ")
+ hypo = hypo.replace(" ", " ")
+
+ if lang == "zh":
+ truth = " ".join([x for x in truth])
+ hypo = " ".join([x for x in hypo])
+ elif lang == "en":
+ truth = truth.lower()
+ hypo = hypo.lower()
+
+ measures = compute_measures(truth, hypo)
+ wer = measures["wer"]
+
+ # ref_list = truth.split(" ")
+ # subs = measures["substitutions"] / len(ref_list)
+ # dele = measures["deletions"] / len(ref_list)
+ # inse = measures["insertions"] / len(ref_list)
+
+ wer_results.append(
+ {
+ "wav": Path(gen_wav).stem,
+ "truth": raw_truth,
+ "hypo": raw_hypo,
+ "wer": wer,
+ }
+ )
+
+ return wer_results
+
+
+# SIM Evaluation
+
+
+def run_sim(args):
+ rank, test_set, ckpt_dir = args
+ device = f"cuda:{rank}"
+
+ model = ECAPA_TDNN_SMALL(feat_dim=1024, feat_type="wavlm_large", config_path=None)
+ state_dict = torch.load(ckpt_dir, weights_only=True, map_location=lambda storage, loc: storage)
+ model.load_state_dict(state_dict["model"], strict=False)
+
+ use_gpu = True if torch.cuda.is_available() else False
+ if use_gpu:
+ model = model.cuda(device)
+ model.eval()
+
+ sim_results = []
+ for gen_wav, prompt_wav, truth in tqdm(test_set):
+ wav1, sr1 = torchaudio.load(gen_wav)
+ wav2, sr2 = torchaudio.load(prompt_wav)
+
+ if use_gpu:
+ wav1 = wav1.cuda(device)
+ wav2 = wav2.cuda(device)
+
+ if sr1 != 16000:
+ resample1 = torchaudio.transforms.Resample(orig_freq=sr1, new_freq=16000)
+ if use_gpu:
+ resample1 = resample1.cuda(device)
+ wav1 = resample1(wav1)
+ if sr2 != 16000:
+ resample2 = torchaudio.transforms.Resample(orig_freq=sr2, new_freq=16000)
+ if use_gpu:
+ resample2 = resample2.cuda(device)
+ wav2 = resample2(wav2)
+
+ with torch.no_grad():
+ emb1 = model(wav1)
+ emb2 = model(wav2)
+
+ sim = F.cosine_similarity(emb1, emb2)[0].item()
+ # print(f"VSim score between two audios: {sim:.4f} (-1.0, 1.0).")
+ sim_results.append(
+ {
+ "wav": Path(gen_wav).stem,
+ "sim": sim,
+ }
+ )
+
+ return sim_results
diff --git a/src/wavtts/infer/README.md b/src/wavtts/infer/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..928e94b4261d4217a3c87dd117c9d406604c7108
--- /dev/null
+++ b/src/wavtts/infer/README.md
@@ -0,0 +1,87 @@
+# Inference
+
+WavTTS supports zero-shot TTS from a reference audio prompt via either command-line or script-based inference.
+
+> **💡 Tip for Reference Audio:**
+> For optimal results, use a short reference clip, preferably under 12 seconds. We also recommend leaving a brief silence at the end of the clip to avoid truncating the prompt mid-word.
+
+The pretrained checkpoint and matching vocabulary are available on [🤗 Hugging Face](https://huggingface.co/worstchan/WavTTS) and the checkpoint will be downloaded automatically when using the default configuration. To use a local checkpoint, specify its path with the `ckpt_file` parameter.
+
+
+## CLI Inference
+
+> **Note:** `wavtts_infer-cli` is an alias for `python src/wavtts/infer/infer_cli.py`. You can use either command interchangeably.
+
+CLI inference can be run either with direct arguments or with a TOML configuration file. Command-line arguments always override values defined in the TOML config.
+
+### A. Direct Arguments
+
+Run inference by passing the required arguments directly:
+
+```bash
+wavtts_infer-cli \
+ --model WavTTS \
+ --ref_audio "infer/examples/basic_ref_en.wav" \
+ --ref_text "Some call me nature, others call me mother nature." \
+ --gen_text "The text you want WavTTS to synthesize."
+```
+*(Optional: Use `--model_cfg` instead of `--model` to provide an explicit YAML model config path.)*
+
+### B. TOML Configuration
+
+For reproducible runs, we recommend storing inference settings in a `.toml` file. If no config is provided, `wavtts_infer-cli` uses the default example config at `src/wavtts/infer/examples/basic.toml`.
+
+```bash
+# Use the default example config
+wavtts_infer-cli -c src/wavtts/infer/examples/basic.toml
+
+# Use a custom config with optional argument overrides
+wavtts_infer-cli -c custom.toml --gen_text "Override text here."
+```
+
+**Example `custom.toml`:**
+```toml
+# Model settings
+model = "WavTTS"
+ckpt_file = "" # Leave empty to use the Hugging Face default
+vocab_file = "infer/examples/vocab.txt"
+
+# Prompt and generation
+ref_audio = "infer/examples/basic_ref_en.wav"
+ref_text = "Some call me nature, others call me mother nature."
+gen_text = "The text you want WavTTS to synthesize."
+
+# Output settings
+output_dir = "output"
+output_file = "infer_cli_basic.wav"
+remove_silence = false
+
+# Generation hyperparameters
+nfe_step = 50
+cfg_strength = 3.0
+timestep_mapping = "power"
+timestep_power = 2.0
+shift = 3.0
+speed = 1.0
+```
+
+## Script-based Inference
+
+For customized pipelines or evaluation, you can modify and run the provided bash scripts.
+
+### Single-sample Inference
+Edit the paths and text in `src/wavtts/infer/infer.sh`, then execute:
+
+```bash
+bash src/wavtts/infer/infer.sh
+```
+
+### Batch Inference
+For batch inference, configure the task and dataset paths in `src/wavtts/eval/eval_infer_batch.sh`, then run:
+
+```bash
+bash src/wavtts/eval/eval_infer_batch.sh --infer-only
+```
+
+> **💡 Tip:**
+> If you notice obvious background noise in the synthesized speech, try lowering the `shift` value to mitigate it (e.g., set `shift = 1.0`).
\ No newline at end of file
diff --git a/src/wavtts/infer/examples/basic.toml b/src/wavtts/infer/examples/basic.toml
new file mode 100644
index 0000000000000000000000000000000000000000..a79832ff28988430050dbdcb4d1be6419dec95d0
--- /dev/null
+++ b/src/wavtts/infer/examples/basic.toml
@@ -0,0 +1,23 @@
+# Model and checkpoint
+model = "WavTTS"
+ckpt_file = "" # Leave empty to download the default Hugging Face checkpoint.
+vocab_file = "infer/examples/vocab.txt"
+
+# Reference prompt and generation text
+ref_audio = "infer/examples/basic_ref_en.wav"
+ref_text = "Some call me nature, others call me mother nature."
+gen_text = "I don't really care what you call me. I've been a silent spectator, watching species evolve, empires rise and fall."
+gen_file = "" # If set, this file is used instead of gen_text.
+
+# Output
+output_dir = "output"
+output_file = "infer_cli_basic.wav"
+remove_silence = false
+
+# Sampling
+nfe_step = 50
+cfg_strength = 3.0
+timestep_mapping = "power"
+timestep_power = 2.0
+shift = 3.0
+speed = 1.0
diff --git a/src/wavtts/infer/examples/basic_ref_en.wav b/src/wavtts/infer/examples/basic_ref_en.wav
new file mode 100644
index 0000000000000000000000000000000000000000..4d3a82d888e538146a312153645219dc7be64cc6
--- /dev/null
+++ b/src/wavtts/infer/examples/basic_ref_en.wav
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b0e22048e72414fcc1e6b6342e47a774d748a195ed34e4a5b3fcf416707f2b71
+size 256018
diff --git a/src/wavtts/infer/examples/basic_ref_zh.wav b/src/wavtts/infer/examples/basic_ref_zh.wav
new file mode 100644
index 0000000000000000000000000000000000000000..e270bf125183f336c18caab369713785dcc1e681
--- /dev/null
+++ b/src/wavtts/infer/examples/basic_ref_zh.wav
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:96724a113240d1f82c6ded1334122f0176b96c9226ccd3c919e625bcfd2a3ede
+size 324558
diff --git a/src/wavtts/infer/examples/vocab.txt b/src/wavtts/infer/examples/vocab.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a3fa647dfb3cc697162f1f84907d2036677b6882
--- /dev/null
+++ b/src/wavtts/infer/examples/vocab.txt
@@ -0,0 +1,2556 @@
+
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+=
+>
+?
+@
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+[
+\
+]
+_
+a
+a1
+ai1
+ai2
+ai3
+ai4
+an1
+an3
+an4
+ang1
+ang2
+ang4
+ao1
+ao2
+ao3
+ao4
+b
+ba
+ba1
+ba2
+ba3
+ba4
+bai1
+bai2
+bai3
+bai4
+ban1
+ban2
+ban3
+ban4
+bang1
+bang2
+bang3
+bang4
+bao1
+bao2
+bao3
+bao4
+bei
+bei1
+bei2
+bei3
+bei4
+ben1
+ben2
+ben3
+ben4
+beng
+beng1
+beng2
+beng3
+beng4
+bi1
+bi2
+bi3
+bi4
+bian1
+bian2
+bian3
+bian4
+biao1
+biao2
+biao3
+bie1
+bie2
+bie3
+bie4
+bin1
+bin4
+bing1
+bing2
+bing3
+bing4
+bo
+bo1
+bo2
+bo3
+bo4
+bu
+bu2
+bu3
+bu4
+c
+ca1
+cai1
+cai2
+cai3
+cai4
+can1
+can2
+can3
+can4
+cang1
+cang2
+cao1
+cao2
+cao3
+ce4
+cen1
+cen2
+ceng1
+ceng2
+ceng4
+cha1
+cha2
+cha3
+cha4
+chai1
+chai2
+chan1
+chan2
+chan3
+chan4
+chang1
+chang2
+chang3
+chang4
+chao1
+chao2
+chao3
+che1
+che2
+che3
+che4
+chen1
+chen2
+chen3
+chen4
+cheng1
+cheng2
+cheng3
+cheng4
+chi1
+chi2
+chi3
+chi4
+chong1
+chong2
+chong3
+chong4
+chou1
+chou2
+chou3
+chou4
+chu1
+chu2
+chu3
+chu4
+chua1
+chuai1
+chuai2
+chuai3
+chuai4
+chuan1
+chuan2
+chuan3
+chuan4
+chuang1
+chuang2
+chuang3
+chuang4
+chui1
+chui2
+chun1
+chun2
+chun3
+chuo1
+chuo4
+ci1
+ci2
+ci3
+ci4
+cong1
+cong2
+cou4
+cu1
+cu4
+cuan1
+cuan2
+cuan4
+cui1
+cui3
+cui4
+cun1
+cun2
+cun4
+cuo1
+cuo2
+cuo4
+d
+da
+da1
+da2
+da3
+da4
+dai1
+dai2
+dai3
+dai4
+dan1
+dan2
+dan3
+dan4
+dang1
+dang2
+dang3
+dang4
+dao1
+dao2
+dao3
+dao4
+de
+de1
+de2
+dei3
+den4
+deng1
+deng2
+deng3
+deng4
+di
+di1
+di2
+di3
+di4
+dia3
+dian1
+dian2
+dian3
+dian4
+diao1
+diao3
+diao4
+die1
+die2
+die4
+ding1
+ding2
+ding3
+ding4
+diu1
+dong1
+dong3
+dong4
+dou1
+dou2
+dou3
+dou4
+du1
+du2
+du3
+du4
+duan1
+duan2
+duan3
+duan4
+dui1
+dui4
+dun1
+dun3
+dun4
+duo
+duo1
+duo2
+duo3
+duo4
+e
+e1
+e2
+e3
+e4
+ei2
+en1
+en4
+er
+er2
+er3
+er4
+f
+fa1
+fa2
+fa3
+fa4
+fan1
+fan2
+fan3
+fan4
+fang
+fang1
+fang2
+fang3
+fang4
+fei1
+fei2
+fei3
+fei4
+fen1
+fen2
+fen3
+fen4
+feng1
+feng2
+feng3
+feng4
+fo2
+fou2
+fou3
+fu
+fu1
+fu2
+fu3
+fu4
+g
+ga1
+ga2
+ga3
+ga4
+gai1
+gai2
+gai3
+gai4
+gan1
+gan2
+gan3
+gan4
+gang1
+gang2
+gang3
+gang4
+gao1
+gao2
+gao3
+gao4
+ge
+ge1
+ge2
+ge3
+ge4
+gei2
+gei3
+gen1
+gen2
+gen3
+gen4
+geng1
+geng3
+geng4
+gong1
+gong3
+gong4
+gou1
+gou2
+gou3
+gou4
+gu
+gu1
+gu2
+gu3
+gu4
+gua1
+gua2
+gua3
+gua4
+guai1
+guai2
+guai3
+guai4
+guan1
+guan2
+guan3
+guan4
+guang1
+guang2
+guang3
+guang4
+gui1
+gui2
+gui3
+gui4
+gun3
+gun4
+guo1
+guo2
+guo3
+guo4
+h
+ha1
+ha2
+ha3
+hai1
+hai2
+hai3
+hai4
+han1
+han2
+han3
+han4
+hang1
+hang2
+hang4
+hao1
+hao2
+hao3
+hao4
+he1
+he2
+he4
+hei1
+hen2
+hen3
+hen4
+heng1
+heng2
+heng4
+hong1
+hong2
+hong3
+hong4
+hou1
+hou2
+hou3
+hou4
+hu1
+hu2
+hu3
+hu4
+hua1
+hua2
+hua4
+huai2
+huai4
+huan1
+huan2
+huan3
+huan4
+huang1
+huang2
+huang3
+huang4
+hui1
+hui2
+hui3
+hui4
+hun1
+hun2
+hun4
+huo
+huo1
+huo2
+huo3
+huo4
+i
+j
+ji1
+ji2
+ji3
+ji4
+jia
+jia1
+jia2
+jia3
+jia4
+jian1
+jian2
+jian3
+jian4
+jiang1
+jiang2
+jiang3
+jiang4
+jiao1
+jiao2
+jiao3
+jiao4
+jie1
+jie2
+jie3
+jie4
+jin1
+jin2
+jin3
+jin4
+jing1
+jing2
+jing3
+jing4
+jiong3
+jiu1
+jiu2
+jiu3
+jiu4
+ju1
+ju2
+ju3
+ju4
+juan1
+juan2
+juan3
+juan4
+jue1
+jue2
+jue4
+jun1
+jun4
+k
+ka1
+ka2
+ka3
+kai1
+kai2
+kai3
+kai4
+kan1
+kan2
+kan3
+kan4
+kang1
+kang2
+kang4
+kao1
+kao2
+kao3
+kao4
+ke1
+ke2
+ke3
+ke4
+ken3
+keng1
+kong1
+kong3
+kong4
+kou1
+kou2
+kou3
+kou4
+ku1
+ku2
+ku3
+ku4
+kua1
+kua3
+kua4
+kuai3
+kuai4
+kuan1
+kuan3
+kuang1
+kuang2
+kuang4
+kui1
+kui2
+kui3
+kui4
+kun1
+kun3
+kun4
+kuo4
+l
+la
+la1
+la2
+la3
+la4
+lai2
+lai4
+lan2
+lan3
+lan4
+lang1
+lang2
+lang3
+lang4
+lao
+lao1
+lao2
+lao3
+lao4
+le
+le1
+le4
+lei
+lei1
+lei2
+lei3
+lei4
+leng1
+leng2
+leng3
+leng4
+li
+li1
+li2
+li3
+li4
+lia3
+lian2
+lian3
+lian4
+liang2
+liang3
+liang4
+liao1
+liao2
+liao3
+liao4
+lie1
+lie2
+lie3
+lie4
+lin1
+lin2
+lin3
+lin4
+ling2
+ling3
+ling4
+liu1
+liu2
+liu3
+liu4
+long1
+long2
+long3
+long4
+lou1
+lou2
+lou3
+lou4
+lu1
+lu2
+lu3
+lu4
+luan2
+luan3
+luan4
+lun1
+lun2
+lun4
+luo1
+luo2
+luo3
+luo4
+lv2
+lv3
+lv4
+lve4
+m
+ma
+ma1
+ma2
+ma3
+ma4
+mai2
+mai3
+mai4
+man1
+man2
+man3
+man4
+mang2
+mang3
+mao1
+mao2
+mao3
+mao4
+me
+mei2
+mei3
+mei4
+men
+men1
+men2
+men4
+meng
+meng1
+meng2
+meng3
+meng4
+mi1
+mi2
+mi3
+mi4
+mian2
+mian3
+mian4
+miao1
+miao2
+miao3
+miao4
+mie1
+mie4
+min2
+min3
+ming2
+ming3
+ming4
+miu4
+mo1
+mo2
+mo3
+mo4
+mou1
+mou2
+mou3
+mu2
+mu3
+mu4
+n
+n2
+na1
+na2
+na3
+na4
+nai
+nai3
+nai4
+nan1
+nan2
+nan3
+nan4
+nang1
+nang2
+nang3
+nao1
+nao2
+nao3
+nao4
+ne
+ne2
+ne4
+nei3
+nei4
+nen4
+neng2
+ni1
+ni2
+ni3
+ni4
+nian1
+nian2
+nian3
+nian4
+niang2
+niang4
+niao2
+niao3
+niao4
+nie1
+nie4
+nin2
+ning2
+ning3
+ning4
+niu1
+niu2
+niu3
+niu4
+nong2
+nong4
+nou4
+nu2
+nu3
+nu4
+nuan3
+nuo2
+nuo4
+nv2
+nv3
+nve4
+o
+o1
+o2
+ou1
+ou2
+ou3
+ou4
+p
+pa1
+pa2
+pa4
+pai1
+pai2
+pai3
+pai4
+pan1
+pan2
+pan4
+pang1
+pang2
+pang4
+pao1
+pao2
+pao3
+pao4
+pei1
+pei2
+pei4
+pen1
+pen2
+pen4
+peng1
+peng2
+peng3
+peng4
+pi1
+pi2
+pi3
+pi4
+pian1
+pian2
+pian4
+piao1
+piao2
+piao3
+piao4
+pie1
+pie2
+pie3
+pin1
+pin2
+pin3
+pin4
+ping1
+ping2
+po
+po1
+po2
+po3
+po4
+pou1
+pu1
+pu2
+pu3
+pu4
+q
+qi1
+qi2
+qi3
+qi4
+qia1
+qia3
+qia4
+qian1
+qian2
+qian3
+qian4
+qiang1
+qiang2
+qiang3
+qiang4
+qiao1
+qiao2
+qiao3
+qiao4
+qie1
+qie2
+qie3
+qie4
+qin1
+qin2
+qin3
+qin4
+qing1
+qing2
+qing3
+qing4
+qiong1
+qiong2
+qiu1
+qiu2
+qiu3
+qu1
+qu2
+qu3
+qu4
+quan1
+quan2
+quan3
+quan4
+que1
+que2
+que4
+qun2
+r
+ran2
+ran3
+rang
+rang1
+rang2
+rang3
+rang4
+rao2
+rao3
+rao4
+re2
+re3
+re4
+ren2
+ren3
+ren4
+reng1
+reng2
+ri4
+rong1
+rong2
+rong3
+rou2
+rou4
+ru2
+ru3
+ru4
+ruan2
+ruan3
+rui3
+rui4
+run4
+ruo4
+s
+sa1
+sa2
+sa3
+sa4
+sai1
+sai4
+san1
+san2
+san3
+san4
+sang1
+sang3
+sang4
+sao1
+sao2
+sao3
+sao4
+se4
+sen1
+seng1
+sha1
+sha2
+sha3
+sha4
+shai1
+shai2
+shai3
+shai4
+shan1
+shan3
+shan4
+shang
+shang1
+shang3
+shang4
+shao1
+shao2
+shao3
+shao4
+she1
+she2
+she3
+she4
+shei2
+shen1
+shen2
+shen3
+shen4
+sheng
+sheng1
+sheng2
+sheng3
+sheng4
+shi
+shi1
+shi2
+shi3
+shi4
+shou1
+shou2
+shou3
+shou4
+shu1
+shu2
+shu3
+shu4
+shua1
+shua2
+shua3
+shua4
+shuai1
+shuai3
+shuai4
+shuan1
+shuan4
+shuang1
+shuang3
+shui2
+shui3
+shui4
+shun3
+shun4
+shuo1
+shuo4
+si
+si1
+si2
+si3
+si4
+song1
+song3
+song4
+sou1
+sou3
+sou4
+su1
+su2
+su4
+suan1
+suan4
+sui1
+sui2
+sui3
+sui4
+sun1
+sun3
+suo
+suo1
+suo2
+suo3
+t
+ta1
+ta2
+ta3
+ta4
+tai1
+tai2
+tai4
+tan1
+tan2
+tan3
+tan4
+tang1
+tang2
+tang3
+tang4
+tao1
+tao2
+tao3
+tao4
+te4
+teng
+teng2
+ti1
+ti2
+ti3
+ti4
+tian1
+tian2
+tian3
+tiao1
+tiao2
+tiao3
+tiao4
+tie1
+tie2
+tie3
+tie4
+ting1
+ting2
+ting3
+tong1
+tong2
+tong3
+tong4
+tou
+tou1
+tou2
+tou4
+tu1
+tu2
+tu3
+tu4
+tuan1
+tuan2
+tui1
+tui2
+tui3
+tui4
+tun1
+tun2
+tun4
+tuo1
+tuo2
+tuo3
+tuo4
+u
+v
+w
+wa
+wa1
+wa2
+wa3
+wa4
+wai1
+wai3
+wai4
+wan1
+wan2
+wan3
+wan4
+wang1
+wang2
+wang3
+wang4
+wei1
+wei2
+wei3
+wei4
+wen1
+wen2
+wen3
+wen4
+weng1
+weng4
+wo1
+wo2
+wo3
+wo4
+wu1
+wu2
+wu3
+wu4
+x
+xi
+xi1
+xi2
+xi3
+xi4
+xia1
+xia2
+xia4
+xian1
+xian2
+xian3
+xian4
+xiang1
+xiang2
+xiang3
+xiang4
+xiao1
+xiao2
+xiao3
+xiao4
+xie1
+xie2
+xie3
+xie4
+xin1
+xin2
+xin4
+xing1
+xing2
+xing3
+xing4
+xiong1
+xiong2
+xiu1
+xiu3
+xiu4
+xu
+xu1
+xu2
+xu3
+xu4
+xuan1
+xuan2
+xuan3
+xuan4
+xue1
+xue2
+xue3
+xue4
+xun1
+xun2
+xun4
+y
+ya
+ya1
+ya2
+ya3
+ya4
+yan1
+yan2
+yan3
+yan4
+yang1
+yang2
+yang3
+yang4
+yao1
+yao2
+yao3
+yao4
+ye1
+ye2
+ye3
+ye4
+yi
+yi1
+yi2
+yi3
+yi4
+yin1
+yin2
+yin3
+yin4
+ying1
+ying2
+ying3
+ying4
+yo1
+yong1
+yong2
+yong3
+yong4
+you1
+you2
+you3
+you4
+yu1
+yu2
+yu3
+yu4
+yuan1
+yuan2
+yuan3
+yuan4
+yue1
+yue4
+yun1
+yun2
+yun3
+yun4
+z
+za1
+za2
+za3
+zai1
+zai3
+zai4
+zan1
+zan2
+zan3
+zan4
+zang1
+zang4
+zao1
+zao2
+zao3
+zao4
+ze2
+ze4
+zei2
+zen3
+zeng1
+zeng4
+zha1
+zha2
+zha3
+zha4
+zhai1
+zhai2
+zhai3
+zhai4
+zhan1
+zhan2
+zhan3
+zhan4
+zhang1
+zhang2
+zhang3
+zhang4
+zhao1
+zhao2
+zhao3
+zhao4
+zhe
+zhe1
+zhe2
+zhe3
+zhe4
+zhen1
+zhen2
+zhen3
+zhen4
+zheng1
+zheng2
+zheng3
+zheng4
+zhi1
+zhi2
+zhi3
+zhi4
+zhong1
+zhong2
+zhong3
+zhong4
+zhou1
+zhou2
+zhou3
+zhou4
+zhu1
+zhu2
+zhu3
+zhu4
+zhua1
+zhua3
+zhuai1
+zhuai3
+zhuai4
+zhuan1
+zhuan2
+zhuan3
+zhuan4
+zhuang1
+zhuang4
+zhui1
+zhui4
+zhun1
+zhun2
+zhun3
+zhuo1
+zhuo2
+zi
+zi1
+zi2
+zi3
+zi4
+zong1
+zong2
+zong3
+zong4
+zou1
+zou2
+zou3
+zou4
+zu1
+zu2
+zu3
+zuan1
+zuan3
+zuan4
+zui2
+zui3
+zui4
+zun1
+zuo
+zuo1
+zuo2
+zuo3
+zuo4
+{
+~
+¡
+¢
+£
+¥
+§
+¨
+©
+«
+®
+¯
+°
+±
+²
+³
+´
+µ
+·
+¹
+º
+»
+¼
+½
+¾
+¿
+À
+Á
+Â
+Ã
+Ä
+Å
+Æ
+Ç
+È
+É
+Ê
+Í
+Î
+Ñ
+Ó
+Ö
+×
+Ø
+Ú
+Ü
+Ý
+Þ
+ß
+à
+á
+â
+ã
+ä
+å
+æ
+ç
+è
+é
+ê
+ë
+ì
+í
+î
+ï
+ð
+ñ
+ò
+ó
+ô
+õ
+ö
+ø
+ù
+ú
+û
+ü
+ý
+Ā
+ā
+ă
+ą
+ć
+Č
+č
+Đ
+đ
+ē
+ė
+ę
+ě
+ĝ
+ğ
+ħ
+ī
+į
+İ
+ı
+Ł
+ł
+ń
+ņ
+ň
+ŋ
+Ō
+ō
+ő
+œ
+ř
+Ś
+ś
+Ş
+ş
+Š
+š
+Ť
+ť
+ũ
+ū
+ź
+Ż
+ż
+Ž
+ž
+ơ
+ư
+ǎ
+ǐ
+ǒ
+ǔ
+ǚ
+ș
+ț
+ɑ
+ɔ
+ɕ
+ə
+ɛ
+ɜ
+ɡ
+ɣ
+ɪ
+ɫ
+ɴ
+ɹ
+ɾ
+ʃ
+ʊ
+ʌ
+ʒ
+ʔ
+ʰ
+ʷ
+ʻ
+ʾ
+ʿ
+ˈ
+ː
+˙
+˜
+ˢ
+́
+̅
+Α
+Β
+Δ
+Ε
+Θ
+Κ
+Λ
+Μ
+Ξ
+Π
+Σ
+Τ
+Φ
+Χ
+Ψ
+Ω
+ά
+έ
+ή
+ί
+α
+β
+γ
+δ
+ε
+ζ
+η
+θ
+ι
+κ
+λ
+μ
+ν
+ξ
+ο
+π
+ρ
+ς
+σ
+τ
+υ
+φ
+χ
+ψ
+ω
+ϊ
+ό
+ύ
+ώ
+ϕ
+ϵ
+Ё
+А
+Б
+В
+Г
+Д
+Е
+Ж
+З
+И
+Й
+К
+Л
+М
+Н
+О
+П
+Р
+С
+Т
+У
+Ф
+Х
+Ц
+Ч
+Ш
+Щ
+Ы
+Ь
+Э
+Ю
+Я
+а
+б
+в
+г
+д
+е
+ж
+з
+и
+й
+к
+л
+м
+н
+о
+п
+р
+с
+т
+у
+ф
+х
+ц
+ч
+ш
+щ
+ъ
+ы
+ь
+э
+ю
+я
+ё
+і
+ְ
+ִ
+ֵ
+ֶ
+ַ
+ָ
+ֹ
+ּ
+־
+ׁ
+א
+ב
+ג
+ד
+ה
+ו
+ז
+ח
+ט
+י
+כ
+ל
+ם
+מ
+ן
+נ
+ס
+ע
+פ
+ק
+ר
+ש
+ת
+أ
+ب
+ة
+ت
+ج
+ح
+د
+ر
+ز
+س
+ص
+ط
+ع
+ق
+ك
+ل
+م
+ن
+ه
+و
+ي
+َ
+ُ
+ِ
+ْ
+ก
+ข
+ง
+จ
+ต
+ท
+น
+ป
+ย
+ร
+ว
+ส
+ห
+อ
+ฮ
+ั
+า
+ี
+ึ
+โ
+ใ
+ไ
+่
+้
+์
+ḍ
+Ḥ
+ḥ
+ṁ
+ṃ
+ṅ
+ṇ
+Ṛ
+ṛ
+Ṣ
+ṣ
+Ṭ
+ṭ
+ạ
+ả
+Ấ
+ấ
+ầ
+ậ
+ắ
+ằ
+ẻ
+ẽ
+ế
+ề
+ể
+ễ
+ệ
+ị
+ọ
+ỏ
+ố
+ồ
+ộ
+ớ
+ờ
+ở
+ụ
+ủ
+ứ
+ữ
+ἀ
+ἁ
+Ἀ
+ἐ
+ἔ
+ἰ
+ἱ
+ὀ
+ὁ
+ὐ
+ὲ
+ὸ
+ᾶ
+᾽
+ῆ
+ῇ
+ῶ
+
+‑
+‒
+–
+—
+―
+‖
+†
+‡
+•
+…
+‧
+
+′
+″
+⁄
+
+⁰
+⁴
+⁵
+⁶
+⁷
+⁸
+⁹
+₁
+₂
+₃
+€
+₱
+₹
+₽
+℃
+ℏ
+ℓ
+№
+ℝ
+™
+⅓
+⅔
+⅛
+→
+∂
+∈
+∑
+−
+∗
+√
+∞
+∫
+≈
+≠
+≡
+≤
+≥
+⋅
+⋯
+█
+♪
+⟨
+⟩
+、
+。
+《
+》
+「
+」
+【
+】
+あ
+う
+え
+お
+か
+が
+き
+ぎ
+く
+ぐ
+け
+げ
+こ
+ご
+さ
+し
+じ
+す
+ず
+せ
+ぜ
+そ
+ぞ
+た
+だ
+ち
+っ
+つ
+で
+と
+ど
+な
+に
+ね
+の
+は
+ば
+ひ
+ぶ
+へ
+べ
+ま
+み
+む
+め
+も
+ゃ
+や
+ゆ
+ょ
+よ
+ら
+り
+る
+れ
+ろ
+わ
+を
+ん
+ァ
+ア
+ィ
+イ
+ウ
+ェ
+エ
+オ
+カ
+ガ
+キ
+ク
+ケ
+ゲ
+コ
+ゴ
+サ
+ザ
+シ
+ジ
+ス
+ズ
+セ
+ゾ
+タ
+ダ
+チ
+ッ
+ツ
+テ
+デ
+ト
+ド
+ナ
+ニ
+ネ
+ノ
+バ
+パ
+ビ
+ピ
+フ
+プ
+ヘ
+ベ
+ペ
+ホ
+ボ
+ポ
+マ
+ミ
+ム
+メ
+モ
+ャ
+ヤ
+ュ
+ユ
+ョ
+ヨ
+ラ
+リ
+ル
+レ
+ロ
+ワ
+ン
+・
+ー
+ㄋ
+ㄍ
+ㄎ
+ㄏ
+ㄓ
+ㄕ
+ㄚ
+ㄜ
+ㄟ
+ㄤ
+ㄥ
+ㄧ
+ㄱ
+ㄴ
+ㄷ
+ㄹ
+ㅁ
+ㅂ
+ㅅ
+ㅈ
+ㅍ
+ㅎ
+ㅏ
+ㅓ
+ㅗ
+ㅜ
+ㅡ
+ㅣ
+㗎
+가
+각
+간
+갈
+감
+갑
+갓
+갔
+강
+같
+개
+거
+건
+걸
+겁
+것
+겉
+게
+겠
+겨
+결
+겼
+경
+계
+고
+곤
+골
+곱
+공
+과
+관
+광
+교
+구
+국
+굴
+귀
+귄
+그
+근
+글
+금
+기
+긴
+길
+까
+깍
+깔
+깜
+깨
+께
+꼬
+꼭
+꽃
+꾸
+꿔
+끔
+끗
+끝
+끼
+나
+난
+날
+남
+납
+내
+냐
+냥
+너
+넘
+넣
+네
+녁
+년
+녕
+노
+녹
+놀
+누
+눈
+느
+는
+늘
+니
+님
+닙
+다
+닥
+단
+달
+닭
+당
+대
+더
+덕
+던
+덥
+데
+도
+독
+동
+돼
+됐
+되
+된
+될
+두
+둑
+둥
+드
+들
+등
+디
+따
+딱
+딸
+땅
+때
+떤
+떨
+떻
+또
+똑
+뚱
+뛰
+뜻
+띠
+라
+락
+란
+람
+랍
+랑
+래
+랜
+러
+런
+럼
+렇
+레
+려
+력
+렵
+렸
+로
+록
+롬
+루
+르
+른
+를
+름
+릉
+리
+릴
+림
+마
+막
+만
+많
+말
+맑
+맙
+맛
+매
+머
+먹
+멍
+메
+면
+명
+몇
+모
+목
+몸
+못
+무
+문
+물
+뭐
+뭘
+미
+민
+밌
+밑
+바
+박
+밖
+반
+받
+발
+밤
+밥
+방
+배
+백
+밸
+뱀
+버
+번
+벌
+벚
+베
+벼
+벽
+별
+병
+보
+복
+본
+볼
+봐
+봤
+부
+분
+불
+비
+빔
+빛
+빠
+빨
+뼈
+뽀
+뿅
+쁘
+사
+산
+살
+삼
+샀
+상
+새
+색
+생
+서
+선
+설
+섭
+섰
+성
+세
+셔
+션
+셨
+소
+속
+손
+송
+수
+숙
+순
+술
+숫
+숭
+숲
+쉬
+쉽
+스
+슨
+습
+슷
+시
+식
+신
+실
+싫
+심
+십
+싶
+싸
+써
+쓰
+쓴
+씌
+씨
+씩
+씬
+아
+악
+안
+않
+알
+야
+약
+얀
+양
+얘
+어
+언
+얼
+엄
+업
+없
+었
+엉
+에
+여
+역
+연
+염
+엽
+영
+옆
+예
+옛
+오
+온
+올
+옷
+옹
+와
+왔
+왜
+요
+욕
+용
+우
+운
+울
+웃
+워
+원
+월
+웠
+위
+윙
+유
+육
+윤
+으
+은
+을
+음
+응
+의
+이
+익
+인
+일
+읽
+임
+입
+있
+자
+작
+잔
+잖
+잘
+잡
+잤
+장
+재
+저
+전
+점
+정
+제
+져
+졌
+조
+족
+좀
+종
+좋
+죠
+주
+준
+줄
+중
+줘
+즈
+즐
+즘
+지
+진
+집
+짜
+짝
+쩌
+쪼
+쪽
+쫌
+쭈
+쯔
+찌
+찍
+차
+착
+찾
+책
+처
+천
+철
+체
+쳐
+쳤
+초
+촌
+추
+출
+춤
+춥
+춰
+치
+친
+칠
+침
+칩
+칼
+커
+켓
+코
+콩
+쿠
+퀴
+크
+큰
+큽
+키
+킨
+타
+태
+터
+턴
+털
+테
+토
+통
+투
+트
+특
+튼
+틀
+티
+팀
+파
+팔
+패
+페
+펜
+펭
+평
+포
+폭
+표
+품
+풍
+프
+플
+피
+필
+하
+학
+한
+할
+함
+합
+항
+해
+햇
+했
+행
+허
+험
+형
+혜
+호
+혼
+홀
+화
+회
+획
+후
+휴
+흐
+흔
+희
+히
+힘
+ﷺ
+ﷻ
+!
+,
+?
+�
+𠮶
+𩠌
+𫚕
diff --git a/src/wavtts/infer/infer.sh b/src/wavtts/infer/infer.sh
new file mode 100644
index 0000000000000000000000000000000000000000..c310e454685dbafba9ad07b95a93dac133a61cd9
--- /dev/null
+++ b/src/wavtts/infer/infer.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Model Configuration
+MODEL_NAME="WavTTS"
+MODEL_CFG="src/wavtts/configs/WavTTS.yaml"
+
+# Zero-shot TTS Configuration
+VOCAB_FILE="infer/examples/vocab.txt"
+REF_AUDIO="infer/examples/basic_ref_en.wav"
+REF_TEXT="Some call me nature, others call me mother nature."
+GEN_TEXT="I don't really care what you call me. I've been a silent spectator, watching species evolve, empires rise and fall."
+
+# Output Configuration
+OUTPUT_DIR="output"
+OUTPUT_FILE="infer_cli_basic.wav"
+
+# Inference Configuration
+NFE_STEP="50"
+TIMESTEP_MAPPING="power"
+TIMESTEP_POWER="2.0"
+SHIFT="3.0"
+DEVICE="cuda"
+
+mkdir -p "${OUTPUT_DIR}"
+
+export PYTHONPATH="$(pwd)/src${PYTHONPATH:+:${PYTHONPATH}}"
+
+python src/wavtts/infer/infer_cli.py \
+ --model_cfg "${MODEL_CFG}" \
+ --ref_audio "${REF_AUDIO}" \
+ --ref_text "${REF_TEXT}" \
+ --gen_text "${GEN_TEXT}" \
+ --output_dir "${OUTPUT_DIR}" \
+ --output_file "${OUTPUT_FILE}" \
+ --vocab_file "${VOCAB_FILE}" \
+ --nfe_step "${NFE_STEP}" \
+ --timestep_mapping "${TIMESTEP_MAPPING}" \
+ --timestep_power "${TIMESTEP_POWER}" \
+ --shift "${SHIFT}" \
+ --device "${DEVICE}"
+
+# bash src/wavtts/infer/infer.sh
diff --git a/src/wavtts/infer/infer_cli.py b/src/wavtts/infer/infer_cli.py
new file mode 100644
index 0000000000000000000000000000000000000000..c07e0b3d1c65616321fbf35640b113e5f1e6efb4
--- /dev/null
+++ b/src/wavtts/infer/infer_cli.py
@@ -0,0 +1,383 @@
+import argparse
+import codecs
+import os
+import re
+from datetime import datetime
+from importlib.resources import files
+from pathlib import Path
+
+import numpy as np
+import soundfile as sf
+import tomli
+from cached_path import cached_path
+from hydra.utils import get_class
+from omegaconf import OmegaConf
+from unidecode import unidecode
+
+from wavtts.infer.utils_infer import (
+ cfg_strength,
+ cross_fade_duration,
+ device,
+ fix_duration,
+ infer_process,
+ load_model,
+ nfe_step,
+ preprocess_ref_audio_text,
+ remove_silence_for_generated_wav,
+ speed,
+ sway_sampling_coef,
+ target_rms,
+ shift,
+ timestep_mapping,
+ timestep_power,
+)
+
+
+DEFAULT_MODEL = "WavTTS"
+DEFAULT_CKPT_FILES = {
+ DEFAULT_MODEL: "hf://worstchan/WavTTS/model_1200000.pt",
+}
+
+
+parser = argparse.ArgumentParser(
+ prog="python3 infer-cli.py",
+ description="Commandline interface for WavTTS waveform inference.",
+ epilog="Specify options above to override one or more settings from config.",
+)
+parser.add_argument(
+ "-c",
+ "--config",
+ type=str,
+ default=os.path.join(files("wavtts").joinpath("infer/examples"), "basic.toml"),
+ help="The configuration file, default see infer/examples/basic.toml",
+)
+
+
+# Note. Not to provide default value here in order to read default from config file
+
+parser.add_argument(
+ "-m",
+ "--model",
+ type=str,
+ help="The model config name under src/wavtts/configs, used only when --model_cfg is not provided.",
+)
+parser.add_argument(
+ "-mc",
+ "--model_cfg",
+ type=str,
+ help="The path to WavTTS model config file .yaml",
+)
+parser.add_argument(
+ "-p",
+ "--ckpt_file",
+ type=str,
+ help="The path or cached_path URI to model checkpoint. Leave blank to use the default WavTTS checkpoint.",
+)
+parser.add_argument(
+ "-v",
+ "--vocab_file",
+ type=str,
+ help="The path to vocab file .txt, leave blank to use default",
+)
+parser.add_argument(
+ "-r",
+ "--ref_audio",
+ type=str,
+ help="The reference audio file.",
+)
+parser.add_argument(
+ "-s",
+ "--ref_text",
+ type=str,
+ help="The transcript/subtitle for the reference audio",
+)
+parser.add_argument(
+ "-t",
+ "--gen_text",
+ type=str,
+ help="The text to make model synthesize a speech",
+)
+parser.add_argument(
+ "-f",
+ "--gen_file",
+ type=str,
+ help="The file with text to generate, will ignore --gen_text",
+)
+parser.add_argument(
+ "-o",
+ "--output_dir",
+ type=str,
+ help="The path to output folder",
+)
+parser.add_argument(
+ "-w",
+ "--output_file",
+ type=str,
+ help="The name of output file",
+)
+parser.add_argument(
+ "--save_chunk",
+ action="store_true",
+ help="To save each audio chunks during inference",
+)
+parser.add_argument(
+ "--no_legacy_text",
+ action="store_false",
+ help="Not to use lossy ASCII transliterations of unicode text in saved file names.",
+)
+parser.add_argument(
+ "--remove_silence",
+ action="store_true",
+ help="To remove long silence found in ouput",
+)
+parser.add_argument(
+ "--target_rms",
+ type=float,
+ help=f"Target output speech loudness normalization value, default {target_rms}",
+)
+parser.add_argument(
+ "--cross_fade_duration",
+ type=float,
+ help=f"Duration of cross-fade between audio segments in seconds, default {cross_fade_duration}",
+)
+parser.add_argument(
+ "--nfe_step",
+ type=int,
+ help=f"The number of function evaluation (denoising steps), default {nfe_step}",
+)
+parser.add_argument(
+ "--cfg_strength",
+ type=float,
+ help=f"Classifier-free guidance strength, default {cfg_strength}",
+)
+parser.add_argument(
+ "--sway_sampling_coef",
+ type=float,
+ help=f"Sway Sampling coefficient, default {sway_sampling_coef}",
+)
+parser.add_argument(
+ "--timestep_mapping",
+ type=str,
+ choices=["uniform", "sway_sampling", "power"],
+ help=f"Timestep mapping strategy, default {timestep_mapping}",
+)
+parser.add_argument(
+ "--timestep_power",
+ type=float,
+ help=f"Power exponent when --timestep_mapping power is used, default {timestep_power}",
+)
+parser.add_argument(
+ "--shift",
+ type=float,
+ help=f"Timestep shift value, default {shift}",
+)
+parser.add_argument(
+ "--speed",
+ type=float,
+ help=f"The speed of the generated audio, default {speed}",
+)
+parser.add_argument(
+ "--fix_duration",
+ type=float,
+ help=f"Fix the total duration (ref and gen audios) in seconds, default {fix_duration}",
+)
+parser.add_argument(
+ "--device",
+ type=str,
+ help="Specify the device to run on",
+)
+args = parser.parse_args()
+
+
+# config file
+
+config = tomli.load(open(args.config, "rb"))
+
+
+# command-line interface parameters
+
+model = args.model or config.get("model", DEFAULT_MODEL)
+ckpt_file = args.ckpt_file or config.get("ckpt_file", "")
+vocab_file = args.vocab_file or config.get("vocab_file", "")
+
+ref_audio = args.ref_audio or config.get("ref_audio", "infer/examples/basic_ref_en.wav")
+ref_text = (
+ args.ref_text
+ if args.ref_text is not None
+ else config.get("ref_text", "Some call me nature, others call me mother nature.")
+)
+gen_text = args.gen_text or config.get("gen_text", "Here we generate something just for test.")
+gen_file = args.gen_file or config.get("gen_file", "")
+
+output_dir = args.output_dir or config.get("output_dir", "tests")
+output_file = args.output_file or config.get(
+ "output_file", f"infer_cli_{datetime.now().strftime(r'%Y%m%d_%H%M%S')}.wav"
+)
+
+save_chunk = args.save_chunk or config.get("save_chunk", False)
+use_legacy_text = args.no_legacy_text or config.get("no_legacy_text", False) # no_legacy_text is a store_false arg
+if save_chunk and use_legacy_text:
+ print(
+ "\nWarning to --save_chunk: lossy ASCII transliterations of unicode text for legacy (.wav) file names, --no_legacy_text to disable.\n"
+ )
+
+remove_silence = args.remove_silence or config.get("remove_silence", False)
+target_rms = args.target_rms or config.get("target_rms", target_rms)
+cross_fade_duration = args.cross_fade_duration or config.get("cross_fade_duration", cross_fade_duration)
+nfe_step = args.nfe_step or config.get("nfe_step", nfe_step)
+cfg_strength = args.cfg_strength or config.get("cfg_strength", cfg_strength)
+sway_sampling_coef = args.sway_sampling_coef or config.get("sway_sampling_coef", sway_sampling_coef)
+timestep_mapping = args.timestep_mapping or config.get("timestep_mapping", timestep_mapping)
+timestep_power = args.timestep_power if args.timestep_power is not None else config.get("timestep_power", timestep_power)
+shift = args.shift if args.shift is not None else config.get("shift", shift)
+if timestep_mapping == "power" and timestep_power is None:
+ raise ValueError("--timestep_power must be provided when --timestep_mapping power is used")
+speed = args.speed or config.get("speed", speed)
+fix_duration = args.fix_duration or config.get("fix_duration", fix_duration)
+device = args.device or config.get("device", device)
+
+
+# patches for pip pkg user
+if "infer/examples/" in ref_audio:
+ ref_audio = str(files("wavtts").joinpath(f"{ref_audio}"))
+if "infer/examples/" in vocab_file:
+ vocab_file = str(files("wavtts").joinpath(f"{vocab_file}"))
+if "infer/examples/" in gen_file:
+ gen_file = str(files("wavtts").joinpath(f"{gen_file}"))
+if "voices" in config:
+ for voice in config["voices"]:
+ voice_ref_audio = config["voices"][voice]["ref_audio"]
+ if "infer/examples/" in voice_ref_audio:
+ config["voices"][voice]["ref_audio"] = str(files("wavtts").joinpath(f"{voice_ref_audio}"))
+
+
+# ignore gen_text if gen_file provided
+
+if gen_file:
+ gen_text = codecs.open(gen_file, "r", "utf-8").read()
+
+
+# output path
+
+wave_path = Path(output_dir) / output_file
+# spectrogram_path = Path(output_dir) / "infer_cli_out.png"
+if save_chunk:
+ output_chunk_dir = os.path.join(output_dir, f"{Path(output_file).stem}_chunks")
+ if not os.path.exists(output_chunk_dir):
+ os.makedirs(output_chunk_dir)
+
+
+
+# load TTS model
+
+model_cfg = OmegaConf.load(
+ args.model_cfg or config.get("model_cfg", str(files("wavtts").joinpath(f"configs/{model}.yaml")))
+)
+model_cls = get_class(f"wavtts.model.{model_cfg.model.backbone}")
+model_arc = model_cfg.model.arch
+cfm_kwargs = getattr(model_cfg.model, "cfm", {}) or {}
+
+if not ckpt_file:
+ ckpt_file = DEFAULT_CKPT_FILES.get(model, DEFAULT_CKPT_FILES[DEFAULT_MODEL])
+
+if ckpt_file.startswith(("hf://", "http://", "https://")):
+ ckpt_file = str(cached_path(ckpt_file))
+
+print(f"Using config {model_cfg.model.name} with checkpoint {ckpt_file}...")
+ema_model = load_model(
+ model_cls,
+ model_arc,
+ ckpt_file,
+ vocab_file=vocab_file,
+ device=device,
+ cfm_kwargs=cfm_kwargs,
+ waveform_kwargs=model_cfg.model.waveform,
+)
+
+
+# inference process
+
+
+def main():
+ main_voice = {"ref_audio": ref_audio, "ref_text": ref_text}
+ if "voices" not in config:
+ voices = {"main": main_voice}
+ else:
+ voices = config["voices"]
+ voices["main"] = main_voice
+ for voice in voices:
+ print("Voice:", voice)
+ print("ref_audio ", voices[voice]["ref_audio"])
+ voices[voice]["ref_audio"], voices[voice]["ref_text"] = preprocess_ref_audio_text(
+ voices[voice]["ref_audio"], voices[voice]["ref_text"]
+ )
+ print("ref_audio_", voices[voice]["ref_audio"], "\n\n")
+
+ generated_audio_segments = []
+ reg1 = r"(?=\[\w+\])"
+ chunks = re.split(reg1, gen_text)
+ reg2 = r"\[(\w+)\]"
+ for text in chunks:
+ if not text.strip():
+ continue
+ match = re.match(reg2, text)
+ if match:
+ voice = match[1]
+ else:
+ print("No voice tag found, using main.")
+ voice = "main"
+ if voice not in voices:
+ print(f"Voice {voice} not found, using main.")
+ voice = "main"
+ text = re.sub(reg2, "", text)
+ ref_audio_ = voices[voice]["ref_audio"]
+ ref_text_ = voices[voice]["ref_text"]
+ local_speed = voices[voice].get("speed", speed)
+ gen_text_ = text.strip()
+ print(f"Voice: {voice}")
+ audio_segment, final_sample_rate, spectrogram = infer_process(
+ ref_audio_,
+ ref_text_,
+ gen_text_,
+ ema_model,
+ target_rms=target_rms,
+ cross_fade_duration=cross_fade_duration,
+ nfe_step=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ speed=local_speed,
+ fix_duration=fix_duration,
+ device=device,
+ )
+ generated_audio_segments.append(audio_segment)
+
+ if save_chunk:
+ if len(gen_text_) > 200:
+ gen_text_ = gen_text_[:200] + " ... "
+ if use_legacy_text:
+ gen_text_ = unidecode(gen_text_)
+ sf.write(
+ os.path.join(output_chunk_dir, f"{len(generated_audio_segments) - 1}_{gen_text_}.wav"),
+ audio_segment,
+ final_sample_rate,
+ )
+
+ if generated_audio_segments:
+ final_wave = np.concatenate(generated_audio_segments)
+
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
+ with open(wave_path, "wb") as f:
+ sf.write(f.name, final_wave, final_sample_rate)
+ # Remove silence
+ if remove_silence:
+ remove_silence_for_generated_wav(f.name)
+ print(f.name)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/wavtts/infer/utils_infer.py b/src/wavtts/infer/utils_infer.py
new file mode 100644
index 0000000000000000000000000000000000000000..18544963cfd8991be0920285d2af16b427548d22
--- /dev/null
+++ b/src/wavtts/infer/utils_infer.py
@@ -0,0 +1,598 @@
+# A unified script for inference process
+# Make adjustments inside functions, and consider both gradio and cli scripts if need to change func output format
+import os
+import sys
+
+from concurrent.futures import ThreadPoolExecutor
+
+
+os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" # for MPS device compatibility
+import hashlib
+import re
+import tempfile
+from importlib.resources import files
+
+import matplotlib
+
+
+matplotlib.use("Agg")
+
+import matplotlib.pylab as plt
+import numpy as np
+import torch
+import torchaudio
+import tqdm
+from pydub import AudioSegment, silence
+from transformers import pipeline
+
+from wavtts.model import CFM
+from wavtts.model.utils import convert_char_to_pinyin, get_tokenizer
+
+
+_ref_audio_cache = {}
+_ref_text_cache = {}
+
+device = (
+ "cuda"
+ if torch.cuda.is_available()
+ else "xpu"
+ if torch.xpu.is_available()
+ else "mps"
+ if torch.backends.mps.is_available()
+ else "cpu"
+)
+
+tempfile_kwargs = {"delete_on_close": False} if sys.version_info >= (3, 12) else {"delete": False}
+
+# -----------------------------------------
+
+target_sample_rate = 16000 # WavTTS waveform default
+use_bfloat16 = True # True, False
+wav_frame_len = 160
+target_rms = 0.1
+cross_fade_duration = 0.15
+ode_method = "euler" # fixed WavTTS inference ODE method
+nfe_step = 50
+cfg_strength = 3.0
+sway_sampling_coef = -1.0
+timestep_mapping = "power"
+timestep_power = 2.0
+shift = 3.0
+speed = 1.0
+fix_duration = None
+
+# -----------------------------------------
+
+
+# chunk text into smaller pieces
+
+
+def chunk_text(text, max_chars=135):
+ """
+ Splits the input text into chunks, each with a maximum number of characters.
+
+ Args:
+ text (str): The text to be split.
+ max_chars (int): The maximum number of characters per chunk.
+
+ Returns:
+ List[str]: A list of text chunks.
+ """
+ chunks = []
+ current_chunk = ""
+ # Split the text into sentences based on punctuation followed by whitespace
+ sentences = re.split(r"(?<=[;:,.!?])\s+|(?<=[;:,。!?])", text)
+
+ for sentence in sentences:
+ if len(current_chunk.encode("utf-8")) + len(sentence.encode("utf-8")) <= max_chars:
+ current_chunk += sentence + " " if sentence and len(sentence[-1].encode("utf-8")) == 1 else sentence
+ else:
+ if current_chunk:
+ chunks.append(current_chunk.strip())
+ current_chunk = sentence + " " if sentence and len(sentence[-1].encode("utf-8")) == 1 else sentence
+
+ if current_chunk:
+ chunks.append(current_chunk.strip())
+
+ return chunks
+
+
+
+# load asr pipeline
+
+asr_pipe = None
+
+
+def initialize_asr_pipeline(device: str = device, dtype=None):
+ if dtype is None:
+ dtype = (
+ torch.float16
+ if "cuda" in device
+ and torch.cuda.get_device_properties(device).major >= 7
+ and not torch.cuda.get_device_name().endswith("[ZLUDA]")
+ else torch.float32
+ )
+ global asr_pipe
+ asr_pipe = pipeline(
+ "automatic-speech-recognition",
+ model="openai/whisper-large-v3-turbo",
+ torch_dtype=dtype,
+ device=device,
+ )
+
+
+# transcribe
+
+
+def transcribe(ref_audio, language=None):
+ global asr_pipe
+ if asr_pipe is None:
+ initialize_asr_pipeline(device=device)
+ return asr_pipe(
+ ref_audio,
+ chunk_length_s=30,
+ batch_size=128,
+ generate_kwargs={"task": "transcribe", "language": language} if language else {"task": "transcribe"},
+ return_timestamps=False,
+ )["text"].strip()
+
+
+# load model checkpoint for inference
+
+
+def load_checkpoint(model, ckpt_path, device: str, dtype=None, use_ema=True):
+ if dtype is None:
+ dtype = (
+ torch.float16
+ if "cuda" in device
+ and torch.cuda.get_device_properties(device).major >= 7
+ and not torch.cuda.get_device_name().endswith("[ZLUDA]")
+ else torch.float32
+ )
+ model = model.to(dtype)
+
+ ckpt_type = ckpt_path.split(".")[-1]
+ if ckpt_type == "safetensors":
+ from safetensors.torch import load_file
+
+ checkpoint = load_file(ckpt_path, device=device)
+ else:
+ checkpoint = torch.load(ckpt_path, map_location=device, weights_only=True)
+
+ if use_ema:
+ if ckpt_type == "safetensors":
+ checkpoint = {"ema_model_state_dict": checkpoint}
+ checkpoint["model_state_dict"] = {
+ k.replace("ema_model.", ""): v
+ for k, v in checkpoint["ema_model_state_dict"].items()
+ if k not in ["initted", "step"]
+ }
+
+ model.load_state_dict(checkpoint["model_state_dict"])
+ else:
+ if ckpt_type == "safetensors":
+ checkpoint = {"model_state_dict": checkpoint}
+ model.load_state_dict(checkpoint["model_state_dict"])
+
+ del checkpoint
+ if "cuda" in str(device) and torch.cuda.is_available():
+ torch.cuda.empty_cache()
+
+ return model.to(device)
+
+
+# load model for inference
+
+
+def load_model(
+ model_cls,
+ model_cfg,
+ ckpt_path,
+ vocab_file="",
+ ode_method=ode_method,
+ use_ema=True,
+ device=device,
+ cfm_kwargs=None,
+ waveform_kwargs=None,
+):
+ if vocab_file == "":
+ vocab_file = str(files("wavtts").joinpath("infer/examples/vocab.txt"))
+ tokenizer = "custom"
+
+ print("\nvocab : ", vocab_file)
+ print("token : ", tokenizer)
+ print("model : ", ckpt_path, "\n")
+
+ if waveform_kwargs is None:
+ waveform_kwargs = dict(
+ wav_frame_len=wav_frame_len,
+ target_sample_rate=target_sample_rate,
+ )
+
+ vocab_char_map, vocab_size = get_tokenizer(vocab_file, tokenizer)
+ model = CFM(
+ transformer=model_cls(
+ **model_cfg,
+ text_num_embeds=vocab_size,
+ wav_frame_len=waveform_kwargs.get("wav_frame_len", wav_frame_len),
+ ),
+ waveform_kwargs=waveform_kwargs,
+ odeint_kwargs=dict(
+ method=ode_method,
+ ),
+ vocab_char_map=vocab_char_map,
+ **cfm_kwargs,
+ ).to(device)
+
+ # Keep inference-time audio geometry available even when CFM is wav-only and has no MelSpec module.
+ model.target_sample_rate = int(waveform_kwargs.get("target_sample_rate", target_sample_rate))
+
+ model = load_checkpoint(model, ckpt_path, device, dtype=None, use_ema=use_ema)
+
+ return model
+
+
+def remove_silence_edges(audio, silence_threshold=-42):
+ # Remove silence from the start
+ non_silent_start_idx = silence.detect_leading_silence(audio, silence_threshold=silence_threshold)
+ audio = audio[non_silent_start_idx:]
+
+ # Remove silence from the end
+ non_silent_end_duration = audio.duration_seconds
+ for ms in reversed(audio):
+ if ms.dBFS > silence_threshold:
+ break
+ non_silent_end_duration -= 0.001
+ trimmed_audio = audio[: int(non_silent_end_duration * 1000)]
+
+ return trimmed_audio
+
+
+# preprocess reference audio and text
+
+
+def preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=print):
+ show_info("Converting audio...")
+
+ # Compute a hash of the reference audio file
+ with open(ref_audio_orig, "rb") as audio_file:
+ audio_data = audio_file.read()
+ audio_hash = hashlib.md5(audio_data).hexdigest()
+
+ global _ref_audio_cache
+
+ if audio_hash in _ref_audio_cache:
+ show_info("Using cached preprocessed reference audio...")
+ ref_audio = _ref_audio_cache[audio_hash]
+
+ else: # first pass, do preprocess
+ with tempfile.NamedTemporaryFile(suffix=".wav", **tempfile_kwargs) as f:
+ temp_path = f.name
+
+ aseg = AudioSegment.from_file(ref_audio_orig)
+
+ # 1. try to find long silence for clipping
+ non_silent_segs = silence.split_on_silence(
+ aseg, min_silence_len=1000, silence_thresh=-50, keep_silence=1000, seek_step=10
+ )
+ non_silent_wave = AudioSegment.silent(duration=0)
+ for non_silent_seg in non_silent_segs:
+ if len(non_silent_wave) > 6000 and len(non_silent_wave + non_silent_seg) > 12000:
+ show_info("Audio is over 12s, clipping short. (1)")
+ break
+ non_silent_wave += non_silent_seg
+
+ # 2. try to find short silence for clipping if 1. failed
+ if len(non_silent_wave) > 12000:
+ non_silent_segs = silence.split_on_silence(
+ aseg, min_silence_len=100, silence_thresh=-40, keep_silence=1000, seek_step=10
+ )
+ non_silent_wave = AudioSegment.silent(duration=0)
+ for non_silent_seg in non_silent_segs:
+ if len(non_silent_wave) > 6000 and len(non_silent_wave + non_silent_seg) > 12000:
+ show_info("Audio is over 12s, clipping short. (2)")
+ break
+ non_silent_wave += non_silent_seg
+
+ aseg = non_silent_wave
+
+ # 3. if no proper silence found for clipping
+ if len(aseg) > 12000:
+ aseg = aseg[:12000]
+ show_info("Audio is over 12s, clipping short. (3)")
+
+ aseg = remove_silence_edges(aseg) + AudioSegment.silent(duration=50)
+ aseg.export(temp_path, format="wav")
+ ref_audio = temp_path
+
+ # Cache the processed reference audio
+ _ref_audio_cache[audio_hash] = ref_audio
+
+ if not ref_text.strip():
+ global _ref_text_cache
+ if audio_hash in _ref_text_cache:
+ # Use cached asr transcription
+ show_info("Using cached reference text...")
+ ref_text = _ref_text_cache[audio_hash]
+ else:
+ show_info("No reference text provided, transcribing reference audio...")
+ ref_text = transcribe(ref_audio)
+ # Cache the transcribed text (not caching custom ref_text, enabling users to do manual tweak)
+ _ref_text_cache[audio_hash] = ref_text
+ else:
+ show_info("Using custom reference text...")
+
+ # Ensure ref_text ends with a proper sentence-ending punctuation
+ if not ref_text.endswith(". ") and not ref_text.endswith("。"):
+ if ref_text.endswith("."):
+ ref_text += " "
+ else:
+ ref_text += ". "
+
+ print("\nref_text ", ref_text)
+
+ return ref_audio, ref_text
+
+
+# infer process: chunk text -> infer batches [i.e. infer_batch_process()]
+
+
+def infer_process(
+ ref_audio,
+ ref_text,
+ gen_text,
+ model_obj,
+ show_info=print,
+ progress=tqdm,
+ target_rms=target_rms,
+ cross_fade_duration=cross_fade_duration,
+ nfe_step=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ speed=speed,
+ fix_duration=fix_duration,
+ device=device,
+):
+ # Split the input text into batches
+ audio, sr = torchaudio.load(ref_audio)
+ max_chars = int(len(ref_text.encode("utf-8")) / (audio.shape[-1] / sr) * (22 - audio.shape[-1] / sr) * speed)
+ gen_text_batches = chunk_text(gen_text, max_chars=max_chars)
+ for i, gen_text in enumerate(gen_text_batches):
+ print(f"gen_text {i}", gen_text)
+ print("\n")
+
+ show_info(f"Generating audio in {len(gen_text_batches)} batches...")
+ return next(
+ infer_batch_process(
+ (audio, sr),
+ ref_text,
+ gen_text_batches,
+ model_obj,
+ progress=progress,
+ target_rms=target_rms,
+ cross_fade_duration=cross_fade_duration,
+ nfe_step=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ speed=speed,
+ fix_duration=fix_duration,
+ device=device,
+ )
+ )
+
+
+# infer batches
+
+
+def _model_audio_sample_rate(model_obj):
+ if hasattr(model_obj, "target_sample_rate"):
+ return int(model_obj.target_sample_rate)
+ return int(target_sample_rate)
+
+
+def _supports_cuda_autocast(device):
+ return use_bfloat16 and device is not None and "cuda" in str(device) and torch.cuda.is_available()
+
+
+def infer_batch_process(
+ ref_audio,
+ ref_text,
+ gen_text_batches,
+ model_obj,
+ progress=tqdm,
+ target_rms=0.1,
+ cross_fade_duration=0.15,
+ nfe_step=50,
+ cfg_strength=3.0,
+ sway_sampling_coef=-1,
+ timestep_mapping="power",
+ timestep_power=2.0,
+ shift=3.0,
+ speed=1,
+ fix_duration=None,
+ device=None,
+ streaming=False,
+ chunk_size=2048,
+):
+ audio, sr = ref_audio
+ if audio.shape[0] > 1:
+ audio = torch.mean(audio, dim=0, keepdim=True)
+
+ model_sample_rate = _model_audio_sample_rate(model_obj)
+
+ rms = torch.sqrt(torch.mean(torch.square(audio))).clamp_min(1e-8)
+ if rms < target_rms:
+ audio = audio * target_rms / rms
+
+ if sr != model_sample_rate:
+ resampler = torchaudio.transforms.Resample(sr, model_sample_rate)
+ audio = resampler(audio)
+
+ audio = audio.to(device)
+
+ frame_len = int(getattr(model_obj, "wav_frame_len", getattr(model_obj, "num_channels", 160)))
+ ref_len_samples = audio.shape[-1]
+ ref_full_frames = ref_len_samples // frame_len
+ ref_len_aligned = max(ref_full_frames * frame_len, frame_len)
+ if ref_len_aligned > ref_len_samples:
+ audio = torch.nn.functional.pad(audio, (0, ref_len_aligned - ref_len_samples), value=0.0)
+ else:
+ audio = audio[..., :ref_len_aligned]
+ ref_audio_len = ref_len_aligned
+
+ generated_waves = []
+
+ if len(ref_text[-1].encode("utf-8")) == 1:
+ ref_text = ref_text + " "
+
+ def process_batch(gen_text):
+ local_speed = speed
+ if len(gen_text.encode("utf-8")) < 10:
+ local_speed = 0.3
+
+ # Prepare the text
+ text_list = [ref_text + gen_text]
+ final_text_list = convert_char_to_pinyin(text_list)
+
+ if fix_duration is not None:
+ duration = int(fix_duration * model_sample_rate) # samples
+ else:
+ # Calculate duration
+ ref_text_len = len(ref_text.encode("utf-8"))
+ gen_text_len = len(gen_text.encode("utf-8"))
+ duration = ref_audio_len + int(ref_audio_len / ref_text_len * gen_text_len / local_speed)
+
+ # inference
+ with torch.inference_mode():
+ if _supports_cuda_autocast(device):
+ audio_bf16 = audio.to(torch.bfloat16)
+ with torch.autocast(device_type="cuda", dtype=torch.bfloat16):
+ generated, _ = model_obj.sample(
+ cond=audio_bf16,
+ text=final_text_list,
+ duration=duration,
+ steps=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ use_epss=timestep_mapping == "sway_sampling",
+ )
+ else:
+ generated, _ = model_obj.sample(
+ cond=audio,
+ text=final_text_list,
+ duration=duration,
+ steps=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ timestep_mapping=timestep_mapping,
+ timestep_power=timestep_power,
+ shift=shift,
+ use_epss=timestep_mapping == "sway_sampling",
+ )
+ del _
+
+ generated = generated.to(torch.float32) # [1, N_total]
+ cut = ref_audio_len
+ generated_wave = generated[0, cut:].contiguous()
+
+ if rms < target_rms:
+ generated_wave = generated_wave * rms / target_rms
+
+ generated_wave = generated_wave.cpu().numpy()
+
+ if streaming:
+ for j in range(0, len(generated_wave), chunk_size):
+ yield generated_wave[j : j + chunk_size], model_sample_rate
+ else:
+ yield generated_wave, None
+
+ if streaming:
+ for gen_text in progress.tqdm(gen_text_batches) if progress is not None else gen_text_batches:
+ for chunk in process_batch(gen_text):
+ yield chunk
+ else:
+ with ThreadPoolExecutor() as executor:
+ futures = [executor.submit(process_batch, gen_text) for gen_text in gen_text_batches]
+ for future in progress.tqdm(futures) if progress is not None else futures:
+ result = future.result()
+ if result:
+ generated_wave, _ = next(result)
+ generated_waves.append(generated_wave)
+
+ if generated_waves:
+ if cross_fade_duration <= 0:
+ # Simply concatenate
+ final_wave = np.concatenate(generated_waves)
+ else:
+ # Combine all generated waves with cross-fading
+ final_wave = generated_waves[0]
+ for i in range(1, len(generated_waves)):
+ prev_wave = final_wave
+ next_wave = generated_waves[i]
+
+ # Calculate cross-fade samples, ensuring it does not exceed wave lengths
+ cross_fade_samples = int(cross_fade_duration * model_sample_rate)
+ cross_fade_samples = min(cross_fade_samples, len(prev_wave), len(next_wave))
+
+ if cross_fade_samples <= 0:
+ # No overlap possible, concatenate
+ final_wave = np.concatenate([prev_wave, next_wave])
+ continue
+
+ # Overlapping parts
+ prev_overlap = prev_wave[-cross_fade_samples:]
+ next_overlap = next_wave[:cross_fade_samples]
+
+ # Fade out and fade in
+ fade_out = np.linspace(1, 0, cross_fade_samples)
+ fade_in = np.linspace(0, 1, cross_fade_samples)
+
+ # Cross-faded overlap
+ cross_faded_overlap = prev_overlap * fade_out + next_overlap * fade_in
+
+ # Combine
+ new_wave = np.concatenate(
+ [prev_wave[:-cross_fade_samples], cross_faded_overlap, next_wave[cross_fade_samples:]]
+ )
+
+ final_wave = new_wave
+
+ yield final_wave, model_sample_rate, None
+
+ else:
+ yield None, model_sample_rate, None
+
+
+# remove silence from generated wav
+
+
+def remove_silence_for_generated_wav(filename):
+ aseg = AudioSegment.from_file(filename)
+ non_silent_segs = silence.split_on_silence(
+ aseg, min_silence_len=1000, silence_thresh=-50, keep_silence=500, seek_step=10
+ )
+ non_silent_wave = AudioSegment.silent(duration=0)
+ for non_silent_seg in non_silent_segs:
+ non_silent_wave += non_silent_seg
+ aseg = non_silent_wave
+ aseg.export(filename, format="wav")
+
+
+# save spectrogram
+
+
+def save_spectrogram(spectrogram, path):
+ plt.figure(figsize=(12, 4))
+ plt.imshow(spectrogram, origin="lower", aspect="auto")
+ plt.colorbar()
+ plt.savefig(path)
+ plt.close()
diff --git a/src/wavtts/model/__init__.py b/src/wavtts/model/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..a371eb5c4c0fb5d0eed0f91ed57652d37065187f
--- /dev/null
+++ b/src/wavtts/model/__init__.py
@@ -0,0 +1,7 @@
+from wavtts.model.backbones.dit import DiT
+from wavtts.model.backbones.mmdit import MMDiT
+from wavtts.model.cfm import CFM
+from wavtts.model.trainer import Trainer
+
+
+__all__ = ["CFM", "DiT", "MMDiT", "Trainer"]
diff --git a/src/wavtts/model/backbones/dit.py b/src/wavtts/model/backbones/dit.py
new file mode 100644
index 0000000000000000000000000000000000000000..3861bf382641a6b583232ee485ca187a04e8a601
--- /dev/null
+++ b/src/wavtts/model/backbones/dit.py
@@ -0,0 +1,440 @@
+"""
+ein notation:
+b - batch
+n - sequence
+nt - text sequence
+nw - raw wave length
+d - dimension
+"""
+# ruff: noqa: F722 F821
+
+from __future__ import annotations
+
+import torch
+import torch.nn.functional as F
+from torch import nn
+from torch.nn.utils.rnn import pad_sequence
+from x_transformers.x_transformers import RotaryEmbedding
+
+from wavtts.model.modules import (
+ AdaLayerNorm_Final,
+ ConvNeXtV2Block,
+ ConvPositionEmbedding,
+ DiTBlock,
+ TimestepEmbedding,
+ precompute_freqs_cis,
+)
+
+
+# Text embedding
+
+
+class TextEmbedding(nn.Module):
+ def __init__(
+ self, text_num_embeds, text_dim, mask_padding=True, average_upsampling=False, conv_layers=0, conv_mult=2
+ ):
+ super().__init__()
+ self.text_embed = nn.Embedding(text_num_embeds + 1, text_dim) # use 0 as filler token
+
+ self.mask_padding = mask_padding # mask filler and batch padding tokens or not
+ self.average_upsampling = average_upsampling # zipvoice-style text late average upsampling (after text encoder)
+ if average_upsampling:
+ assert mask_padding, "text_embedding_average_upsampling requires text_mask_padding to be True"
+
+ if conv_layers > 0:
+ self.extra_modeling = True
+ self.precompute_max_pos = 8192 # 8192 waveform tokens is ~81.92s at 16k / wav_frame_len=160
+ self.register_buffer("freqs_cis", precompute_freqs_cis(text_dim, self.precompute_max_pos), persistent=False)
+ self.text_blocks = nn.Sequential(
+ *[ConvNeXtV2Block(text_dim, text_dim * conv_mult) for _ in range(conv_layers)]
+ )
+ else:
+ self.extra_modeling = False
+
+ def average_upsample_text_by_mask(self, text, text_mask):
+ batch, seq_len, text_dim = text.shape
+
+ text_lens = text_mask.sum(dim=1) # [batch]
+
+ upsampled_text = torch.zeros_like(text)
+
+ for i in range(batch):
+ valid_text_len = text_lens[i].item()
+
+ if valid_text_len == 0:
+ continue
+
+ valid_ind = torch.where(text_mask[i])[0]
+ valid_data = text[i, valid_ind, :] # [valid_text_len, text_dim]
+
+ base_repeat = seq_len // valid_text_len
+ remainder = seq_len % valid_text_len
+
+ indices = []
+ for j in range(valid_text_len):
+ repeat_count = base_repeat + (1 if j >= valid_text_len - remainder else 0)
+ indices.extend([j] * repeat_count)
+
+ indices = torch.tensor(indices[:seq_len], device=text.device, dtype=torch.long)
+ upsampled = valid_data[indices] # [seq_len, text_dim]
+
+ upsampled_text[i, :seq_len, :] = upsampled
+
+ return upsampled_text
+
+ def forward(self, text: int["b nt"], seq_len, drop_text=False):
+ text = text + 1 # use 0 as filler token. preprocess of batch pad -1, see list_str_to_idx()
+ text = text[:, :seq_len] # curtail if character tokens are more than waveform tokens
+ text = F.pad(text, (0, seq_len - text.shape[1]), value=0) # (opt.) if not self.average_upsampling:
+ if self.mask_padding:
+ text_mask = text == 0
+
+ if drop_text: # cfg for text
+ text = torch.zeros_like(text)
+
+ text = self.text_embed(text) # b n -> b n d
+
+ # possible extra modeling
+ if self.extra_modeling:
+ # sinus pos emb
+ text = text + self.freqs_cis[:seq_len, :]
+
+ # convnextv2 blocks
+ if self.mask_padding:
+ text = text.masked_fill(text_mask.unsqueeze(-1).expand(-1, -1, text.size(-1)), 0.0)
+ for block in self.text_blocks:
+ text = block(text)
+ text = text.masked_fill(text_mask.unsqueeze(-1).expand(-1, -1, text.size(-1)), 0.0)
+ else:
+ text = self.text_blocks(text)
+
+ if self.average_upsampling:
+ text = self.average_upsample_text_by_mask(text, ~text_mask)
+
+ return text
+
+
+# noised waveform and context mixing embedding
+
+
+class InputEmbedding(nn.Module):
+ def __init__(
+ self,
+ wav_frame_len,
+ text_dim,
+ out_dim,
+ use_audio_proj: bool = False,
+ audio_proj_dim: int | None = None,
+ audio_proj_hidden: int | None = None,
+ ):
+ super().__init__()
+
+ self.use_audio_proj = use_audio_proj
+
+ if not use_audio_proj:
+ self.proj = nn.Linear(wav_frame_len * 2 + text_dim, out_dim)
+ else:
+ audio_proj_dim = out_dim if audio_proj_dim is None else audio_proj_dim
+ audio_proj_hidden = audio_proj_dim if audio_proj_hidden is None else audio_proj_hidden
+ self.x_proj = nn.Sequential(
+ nn.Linear(wav_frame_len, audio_proj_hidden, bias=False),
+ nn.Linear(audio_proj_hidden, audio_proj_dim),
+ )
+ self.cond_proj = nn.Sequential(
+ nn.Linear(wav_frame_len, audio_proj_hidden, bias=False),
+ nn.Linear(audio_proj_hidden, audio_proj_dim),
+ )
+
+ self.fuse = nn.Linear(audio_proj_dim * 2 + text_dim, out_dim)
+ self.conv_pos_embed = ConvPositionEmbedding(dim=out_dim)
+
+ def forward(
+ self,
+ x: float["b n d"],
+ cond: float["b n d"],
+ text_embed: float["b n d"],
+ drop_audio_cond=False,
+ audio_mask: bool["b n"] | None = None,
+ ):
+ if drop_audio_cond:
+ cond = torch.zeros_like(cond)
+
+ if not self.use_audio_proj:
+ h = self.proj(torch.cat((x, cond, text_embed), dim=-1))
+ else:
+ x_h = self.x_proj(x)
+ c_h = self.cond_proj(cond)
+ h = self.fuse(torch.cat((x_h, c_h, text_embed), dim=-1))
+
+ h = self.conv_pos_embed(h, mask=audio_mask) + h
+ return h
+
+
+# Transformer backbone using DiT blocks
+
+
+class DiT(nn.Module):
+ def __init__(
+ self,
+ *,
+ dim,
+ depth=8,
+ heads=8,
+ dim_head=64,
+ dropout=0.1,
+ ff_mult=4,
+ wav_frame_len=160,
+ text_num_embeds=256,
+ text_dim=None,
+ text_mask_padding=True,
+ text_embedding_average_upsampling=False,
+ qk_norm=None,
+ conv_layers=0,
+ pe_attn_head=None,
+ attn_backend="torch", # "torch" | "flash_attn"
+ attn_mask_enabled=False,
+ long_skip_connection=False,
+ checkpoint_activations=False,
+ use_audio_proj: bool = False,
+ audio_proj_dim: int | None = None,
+ audio_proj_hidden: int | None = None,
+ ):
+ super().__init__()
+
+ self.time_embed = TimestepEmbedding(dim)
+ if text_dim is None:
+ text_dim = wav_frame_len
+ self.text_embed = TextEmbedding(
+ text_num_embeds,
+ text_dim,
+ mask_padding=text_mask_padding,
+ average_upsampling=text_embedding_average_upsampling,
+ conv_layers=conv_layers,
+ )
+ self.text_cond, self.text_uncond = None, None # text cache
+ self.input_embed = InputEmbedding(
+ wav_frame_len, text_dim, dim,
+ use_audio_proj=use_audio_proj,
+ audio_proj_dim=audio_proj_dim,
+ audio_proj_hidden=audio_proj_hidden,
+ )
+
+ self.rotary_embed = RotaryEmbedding(dim_head)
+
+ self.dim = dim
+ self.depth = depth
+
+ self.transformer_blocks = nn.ModuleList(
+ [
+ DiTBlock(
+ dim=dim,
+ heads=heads,
+ dim_head=dim_head,
+ ff_mult=ff_mult,
+ dropout=dropout,
+ qk_norm=qk_norm,
+ pe_attn_head=pe_attn_head,
+ attn_backend=attn_backend,
+ attn_mask_enabled=attn_mask_enabled,
+ )
+ for _ in range(depth)
+ ]
+ )
+ self.long_skip_connection = nn.Linear(dim * 2, dim, bias=False) if long_skip_connection else None
+
+ self.norm_out = AdaLayerNorm_Final(dim) # final modulation
+ self.proj_out_dim = wav_frame_len
+ self.proj_out = nn.Linear(dim, wav_frame_len)
+ self.proj_out_output_layer = self.proj_out
+
+ self.checkpoint_activations = checkpoint_activations
+
+ self.initialize_weights()
+
+ # raw waveform tokenization.
+ self.wav_frame_len = wav_frame_len
+
+ def initialize_weights(self):
+ # def _basic_init(module):
+ # if isinstance(module, nn.Linear):
+ # torch.nn.init.xavier_uniform_(module.weight)
+ # if module.bias is not None:
+ # nn.init.constant_(module.bias, 0)
+
+ # self.apply(_basic_init)
+
+ # # Initialize timestep embedding MLP:
+ # nn.init.normal_(self.t_embed.mlp[0].weight, std=0.02)
+ # nn.init.normal_(self.t_embed.mlp[2].weight, std=0.02)
+
+ # Zero-out AdaLN layers in DiT blocks:
+ for block in self.transformer_blocks:
+ nn.init.constant_(block.attn_norm.linear.weight, 0)
+ nn.init.constant_(block.attn_norm.linear.bias, 0)
+
+ # Zero-out output layers:
+ nn.init.constant_(self.norm_out.linear.weight, 0)
+ nn.init.constant_(self.norm_out.linear.bias, 0)
+ nn.init.constant_(self.proj_out_output_layer.weight, 0)
+ if self.proj_out_output_layer.bias is not None:
+ nn.init.constant_(self.proj_out_output_layer.bias, 0)
+
+ def set_wav_frame_len(self, wav_frame_len: int):
+ self.wav_frame_len = int(wav_frame_len)
+
+ if self.wav_frame_len != self.proj_out_dim:
+ raise ValueError(
+ f"wav_frame_len ({self.wav_frame_len}) must equal proj_out_dim ({self.proj_out_dim}) "
+ "for reshape wav front-end."
+ )
+
+ def _wav_to_tokens(
+ self,
+ wav: torch.Tensor,
+ mask: torch.Tensor | None = None,
+ lens: torch.Tensor | None = None,
+ ):
+ assert wav.ndim == 2, f"Expected [B, N] wav input, got {tuple(wav.shape)}"
+
+ bsz, num_samples = wav.shape
+ frame_len = self.wav_frame_len
+ pad_len = (frame_len - (num_samples % frame_len)) % frame_len
+
+ if pad_len > 0:
+ wav = F.pad(wav, (0, pad_len), value=0.0)
+ if mask is not None:
+ mask = F.pad(mask, (0, pad_len), value=False)
+
+ tokens = wav.view(bsz, -1, frame_len)
+
+ token_mask = None
+ if mask is not None:
+ token_mask = mask.view(bsz, -1, frame_len).any(dim=-1)
+
+ token_lens = None
+ if lens is not None:
+ token_lens = (lens.to(dtype=torch.long, device=wav.device) + frame_len - 1) // frame_len
+
+ return tokens, token_mask, token_lens
+
+ def _tokens_to_wav(self, tokens: torch.Tensor, target_num_samples: int):
+ wav = tokens.reshape(tokens.shape[0], -1)
+ return wav[:, :target_num_samples]
+
+ def ckpt_wrapper(self, module):
+ # https://github.com/chuanyangjin/fast-DiT/blob/main/models.py
+ def ckpt_forward(*inputs):
+ outputs = module(*inputs)
+ return outputs
+
+ return ckpt_forward
+
+ def get_input_embed(
+ self,
+ x, # b n d
+ cond, # b n d
+ text, # b nt
+ drop_audio_cond: bool = False,
+ drop_text: bool = False,
+ cache: bool = True,
+ audio_mask: bool["b n"] | None = None,
+ ):
+ if self.text_uncond is None or self.text_cond is None or not cache:
+ if audio_mask is None:
+ text_embed = self.text_embed(text, x.shape[1], drop_text=drop_text)
+ else:
+ batch = x.shape[0]
+ seq_lens = audio_mask.sum(dim=1) # Calculate the actual sequence length for each sample
+ text_embed_list = []
+ for i in range(batch):
+ text_embed_i = self.text_embed(
+ text[i].unsqueeze(0),
+ seq_len=seq_lens[i].item(),
+ drop_text=drop_text,
+ )
+ text_embed_list.append(text_embed_i[0])
+ text_embed = pad_sequence(text_embed_list, batch_first=True, padding_value=0)
+ if cache:
+ if drop_text:
+ self.text_uncond = text_embed
+ else:
+ self.text_cond = text_embed
+
+ if cache:
+ if drop_text:
+ text_embed = self.text_uncond
+ else:
+ text_embed = self.text_cond
+
+ x = self.input_embed(x, cond, text_embed, drop_audio_cond=drop_audio_cond, audio_mask=audio_mask)
+
+ return x
+
+ def clear_cache(self):
+ self.text_cond, self.text_uncond = None, None
+
+ def forward(
+ self,
+ x: float["b nw"], # noised waveform
+ cond: float["b nw"], # masked conditioning waveform
+ text: int["b nt"], # text
+ time: float["b"] | float[""], # time step
+ mask: bool["b n"] | bool["b nw"] | None = None,
+ drop_audio_cond: bool = False, # cfg for conditioning waveform
+ drop_text: bool = False, # cfg for text
+ cfg_infer: bool = False, # cfg inference, pack cond & uncond forward
+ cache: bool = False,
+ lens: int["b"] | None = None,
+ ):
+ if x.ndim != 2 or cond.ndim != 2:
+ raise ValueError(f"WavTTS DiT expects raw waveform x/cond [B, N], got {x.ndim}D and {cond.ndim}D.")
+
+ target_num_samples = x.shape[1]
+ x, token_mask, token_lens = self._wav_to_tokens(x, mask=mask, lens=lens)
+ cond, _, _ = self._wav_to_tokens(cond, mask=None, lens=None)
+ mask = token_mask
+ lens = token_lens
+
+ batch, seq_len = x.shape[0], x.shape[1]
+ if time.ndim == 0:
+ time = time.repeat(batch)
+
+ # t: conditioning time, text: text, x: noised waveform + conditioning waveform + text
+ t = self.time_embed(time)
+
+ if cfg_infer: # pack cond & uncond forward: b n d -> 2b n d
+ x_cond = self.get_input_embed(
+ x, cond, text, drop_audio_cond=False, drop_text=False, cache=cache, audio_mask=mask
+ )
+ x_uncond = self.get_input_embed(
+ x, cond, text, drop_audio_cond=True, drop_text=True, cache=cache, audio_mask=mask
+ )
+ x = torch.cat((x_cond, x_uncond), dim=0)
+ t = torch.cat((t, t), dim=0)
+ mask = torch.cat((mask, mask), dim=0) if mask is not None else None
+ else:
+ x = self.get_input_embed(
+ x, cond, text, drop_audio_cond=drop_audio_cond, drop_text=drop_text, cache=cache, audio_mask=mask
+ )
+
+ rope = self.rotary_embed.forward_from_seq_len(seq_len)
+
+ if self.long_skip_connection is not None:
+ residual = x
+
+ for i, block in enumerate(self.transformer_blocks):
+ if self.checkpoint_activations:
+ # https://pytorch.org/docs/stable/checkpoint.html#torch.utils.checkpoint.checkpoint
+ x = torch.utils.checkpoint.checkpoint(self.ckpt_wrapper(block), x, t, mask, rope, use_reentrant=False)
+ else:
+ x = block(x, t, mask=mask, rope=rope)
+
+ if self.long_skip_connection is not None:
+ x = self.long_skip_connection(torch.cat((x, residual), dim=-1))
+
+ x = self.norm_out(x, t)
+ output = self.proj_out(x)
+
+ output = self._tokens_to_wav(output, target_num_samples=target_num_samples)
+
+ return output, None, None
diff --git a/src/wavtts/model/backbones/mmdit.py b/src/wavtts/model/backbones/mmdit.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f5c51a3336bceb6f58f0feb7c499d3a96e5bc3e
--- /dev/null
+++ b/src/wavtts/model/backbones/mmdit.py
@@ -0,0 +1,213 @@
+"""
+ein notation:
+b - batch
+n - sequence
+nt - text sequence
+nw - raw wave length
+d - dimension
+"""
+# ruff: noqa: F722 F821
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+from x_transformers.x_transformers import RotaryEmbedding
+
+from wavtts.model.modules import (
+ AdaLayerNorm_Final,
+ ConvPositionEmbedding,
+ MMDiTBlock,
+ TimestepEmbedding,
+ get_pos_embed_indices,
+ precompute_freqs_cis,
+)
+
+
+# text embedding
+
+
+class TextEmbedding(nn.Module):
+ def __init__(self, out_dim, text_num_embeds, mask_padding=True):
+ super().__init__()
+ self.text_embed = nn.Embedding(text_num_embeds + 1, out_dim) # will use 0 as filler token
+
+ self.mask_padding = mask_padding # mask filler and batch padding tokens or not
+
+ self.precompute_max_pos = 1024
+ self.register_buffer("freqs_cis", precompute_freqs_cis(out_dim, self.precompute_max_pos), persistent=False)
+
+ def forward(self, text: int["b nt"], drop_text=False) -> int["b nt d"]:
+ text = text + 1 # use 0 as filler token. preprocess of batch pad -1, see list_str_to_idx()
+ if self.mask_padding:
+ text_mask = text == 0
+
+ if drop_text: # cfg for text
+ text = torch.zeros_like(text)
+
+ text = self.text_embed(text) # b nt -> b nt d
+
+ # sinus pos emb
+ batch_start = torch.zeros((text.shape[0],), dtype=torch.long)
+ batch_text_len = text.shape[1]
+ pos_idx = get_pos_embed_indices(batch_start, batch_text_len, max_pos=self.precompute_max_pos)
+ text_pos_embed = self.freqs_cis[pos_idx]
+
+ text = text + text_pos_embed
+
+ if self.mask_padding:
+ text = text.masked_fill(text_mask.unsqueeze(-1).expand(-1, -1, text.size(-1)), 0.0)
+
+ return text
+
+
+# noised input & masked cond audio embedding
+
+
+class AudioEmbedding(nn.Module):
+ def __init__(self, in_dim, out_dim):
+ super().__init__()
+ self.linear = nn.Linear(2 * in_dim, out_dim)
+ self.conv_pos_embed = ConvPositionEmbedding(out_dim)
+
+ def forward(self, x: float["b n d"], cond: float["b n d"], drop_audio_cond=False):
+ if drop_audio_cond:
+ cond = torch.zeros_like(cond)
+ x = torch.cat((x, cond), dim=-1)
+ x = self.linear(x)
+ x = self.conv_pos_embed(x) + x
+ return x
+
+
+# Transformer backbone using MM-DiT blocks
+
+
+class MMDiT(nn.Module):
+ def __init__(
+ self,
+ *,
+ dim,
+ depth=8,
+ heads=8,
+ dim_head=64,
+ dropout=0.1,
+ ff_mult=4,
+ wav_frame_len=100,
+ text_num_embeds=256,
+ text_mask_padding=True,
+ qk_norm=None,
+ ):
+ super().__init__()
+
+ self.time_embed = TimestepEmbedding(dim)
+ self.text_embed = TextEmbedding(dim, text_num_embeds, mask_padding=text_mask_padding)
+ self.text_cond, self.text_uncond = None, None # text cache
+ self.audio_embed = AudioEmbedding(wav_frame_len, dim)
+
+ self.rotary_embed = RotaryEmbedding(dim_head)
+
+ self.dim = dim
+ self.depth = depth
+
+ self.transformer_blocks = nn.ModuleList(
+ [
+ MMDiTBlock(
+ dim=dim,
+ heads=heads,
+ dim_head=dim_head,
+ dropout=dropout,
+ ff_mult=ff_mult,
+ context_pre_only=i == depth - 1,
+ qk_norm=qk_norm,
+ )
+ for i in range(depth)
+ ]
+ )
+ self.norm_out = AdaLayerNorm_Final(dim) # final modulation
+ self.proj_out = nn.Linear(dim, wav_frame_len)
+
+ self.initialize_weights()
+
+ def initialize_weights(self):
+ # Zero-out AdaLN layers in MMDiT blocks:
+ for block in self.transformer_blocks:
+ nn.init.constant_(block.attn_norm_x.linear.weight, 0)
+ nn.init.constant_(block.attn_norm_x.linear.bias, 0)
+ nn.init.constant_(block.attn_norm_c.linear.weight, 0)
+ nn.init.constant_(block.attn_norm_c.linear.bias, 0)
+
+ # Zero-out output layers:
+ nn.init.constant_(self.norm_out.linear.weight, 0)
+ nn.init.constant_(self.norm_out.linear.bias, 0)
+ nn.init.constant_(self.proj_out.weight, 0)
+ nn.init.constant_(self.proj_out.bias, 0)
+
+ def get_input_embed(
+ self,
+ x, # b n d
+ cond, # b n d
+ text, # b nt
+ drop_audio_cond: bool = False,
+ drop_text: bool = False,
+ cache: bool = True,
+ ):
+ if cache:
+ if drop_text:
+ if self.text_uncond is None:
+ self.text_uncond = self.text_embed(text, drop_text=True)
+ c = self.text_uncond
+ else:
+ if self.text_cond is None:
+ self.text_cond = self.text_embed(text, drop_text=False)
+ c = self.text_cond
+ else:
+ c = self.text_embed(text, drop_text=drop_text)
+ x = self.audio_embed(x, cond, drop_audio_cond=drop_audio_cond)
+
+ return x, c
+
+ def clear_cache(self):
+ self.text_cond, self.text_uncond = None, None
+
+ def forward(
+ self,
+ x: float["b n d"], # nosied input audio
+ cond: float["b n d"], # masked cond audio
+ text: int["b nt"], # text
+ time: float["b"] | float[""], # time step
+ mask: bool["b n"] | None = None,
+ drop_audio_cond: bool = False, # cfg for cond audio
+ drop_text: bool = False, # cfg for text
+ cfg_infer: bool = False, # cfg inference, pack cond & uncond forward
+ cache: bool = False,
+ ):
+ batch = x.shape[0]
+ if time.ndim == 0:
+ time = time.repeat(batch)
+
+ # t: conditioning (time), c: context (text + masked cond audio), x: noised input audio
+ t = self.time_embed(time)
+ if cfg_infer: # pack cond & uncond forward: b n d -> 2b n d
+ x_cond, c_cond = self.get_input_embed(x, cond, text, drop_audio_cond=False, drop_text=False, cache=cache)
+ x_uncond, c_uncond = self.get_input_embed(x, cond, text, drop_audio_cond=True, drop_text=True, cache=cache)
+ x = torch.cat((x_cond, x_uncond), dim=0)
+ c = torch.cat((c_cond, c_uncond), dim=0)
+ t = torch.cat((t, t), dim=0)
+ mask = torch.cat((mask, mask), dim=0) if mask is not None else None
+ else:
+ x, c = self.get_input_embed(
+ x, cond, text, drop_audio_cond=drop_audio_cond, drop_text=drop_text, cache=cache
+ )
+
+ seq_len = x.shape[1]
+ text_len = text.shape[1]
+ rope_audio = self.rotary_embed.forward_from_seq_len(seq_len)
+ rope_text = self.rotary_embed.forward_from_seq_len(text_len)
+
+ for block in self.transformer_blocks:
+ c, x = block(x, c, t, mask=mask, rope=rope_audio, c_rope=rope_text)
+
+ x = self.norm_out(x, t)
+ output = self.proj_out(x)
+
+ return output
diff --git a/src/wavtts/model/cfm.py b/src/wavtts/model/cfm.py
new file mode 100644
index 0000000000000000000000000000000000000000..095a4e5dc9d673bfe47994484368556b5deec0bd
--- /dev/null
+++ b/src/wavtts/model/cfm.py
@@ -0,0 +1,461 @@
+"""
+ein notation:
+b - batch
+n - sequence
+nt - text sequence
+nw - raw wave length
+d - dimension
+"""
+# ruff: noqa: F722 F821
+
+from __future__ import annotations
+
+from random import random
+import math
+
+import torch
+import torch.nn.functional as F
+from torch import nn
+from torch.nn.utils.rnn import pad_sequence
+from torchdiffeq import odeint
+
+from wavtts.model.modules import MelSpectrogramLoss
+from wavtts.model.utils import (
+ exists,
+ get_epss_timesteps,
+ lens_to_mask,
+ list_str_to_idx,
+ list_str_to_tensor,
+ mask_from_frac_lengths,
+)
+
+
+class CFM(nn.Module):
+ def __init__(
+ self,
+ transformer: nn.Module,
+ sigma=0.0,
+ odeint_kwargs: dict = dict(
+ # atol = 1e-5,
+ # rtol = 1e-5,
+ method="euler" # 'midpoint'
+ ),
+ audio_drop_prob=0.3,
+ cond_drop_prob=0.2,
+ joint_cond_drop_prob=0.0,
+ waveform_kwargs: dict = dict(),
+ frac_lengths_mask: tuple[float, float] = (0.7, 1.0),
+ vocab_char_map: dict[str:int] | None = None,
+ prediction: str = "flow", # "flow" | "x_pred"
+ loss_space: str = "flow", # "flow" | "v" | "x"
+ t_sampling: str = "uniform", # "uniform" | "logistic_normal"
+ P_mean: float = 0.0,
+ P_std: float = 1.0,
+ time_shift: float = 1.0,
+ t_eps: float = 1e-4,
+ use_aux_mel_loss: bool = False,
+ aux_mel_loss_weight: float = 0.0,
+ aux_mel_loss_masked: bool = True,
+ sample_rate: int = 16000,
+ latents_scale: float = 1.0,
+ ):
+ super().__init__()
+
+ self.frac_lengths_mask = frac_lengths_mask
+
+ # waveform geometry
+ waveform_kwargs = dict(waveform_kwargs)
+ self.wav_frame_len = int(waveform_kwargs.pop("wav_frame_len", 160))
+ self.num_channels = self.wav_frame_len
+
+ # classifier-free guidance
+ self.audio_drop_prob = audio_drop_prob
+ self.cond_drop_prob = cond_drop_prob
+ self.joint_cond_drop_prob = joint_cond_drop_prob
+
+ # transformer
+ self.transformer = transformer
+ self.dim = transformer.dim
+
+ if hasattr(self.transformer, "set_wav_frame_len"):
+ self.transformer.set_wav_frame_len(self.wav_frame_len)
+
+ # conditional flow related
+ self.sigma = sigma
+
+ # sampling related
+ self.odeint_kwargs = odeint_kwargs
+
+ # vocab map for tokenization
+ self.vocab_char_map = vocab_char_map
+
+ # enhanced flow model settings
+ self.prediction = prediction
+ self.loss_space = loss_space
+ self.t_sampling = t_sampling
+ self.P_mean = P_mean
+ self.P_std = P_std
+ self.time_shift = time_shift
+ self.t_eps = t_eps
+ self.latents_scale = latents_scale
+ self.target_sample_rate = sample_rate
+ # aux mel loss
+ self.use_aux_mel_loss = use_aux_mel_loss
+ self.aux_mel_loss_masked = aux_mel_loss_masked
+ if self.use_aux_mel_loss:
+ self.aux_mel_loss = MelSpectrogramLoss(
+ sample_rate=sample_rate,
+ n_mels=[5, 10, 20, 40, 80, 160, 320],
+ window_lengths=[32, 64, 128, 256, 512, 1024, 2048],
+ mel_fmin=[0, 0, 0, 0, 0, 0, 0],
+ mel_fmax=[None] * 7,
+ pow=1.0,
+ clamp_eps=1e-5,
+ weight=aux_mel_loss_weight,
+ )
+ else:
+ self.aux_mel_loss = None
+
+ self.mask_align_to = 1
+ alignments = []
+ if self.aux_mel_loss is not None and hasattr(self.aux_mel_loss, "mel_transforms"):
+ hop_lengths = [int(m.hop_length) for m in self.aux_mel_loss.mel_transforms]
+ if len(hop_lengths) > 0:
+ lcm_hop = hop_lengths[0]
+ for h in hop_lengths[1:]:
+ lcm_hop = math.lcm(lcm_hop, h)
+ alignments.append(lcm_hop)
+ if len(alignments) > 0:
+ lcm_align = alignments[0]
+ for a in alignments[1:]:
+ lcm_align = math.lcm(lcm_align, a)
+ self.mask_align_to = max(1, lcm_align)
+
+ @property
+ def device(self):
+ return next(self.parameters()).device
+
+ def _sample_time(self, batch: int, dtype, device):
+ if self.t_sampling == "uniform":
+ t = torch.rand((batch,), dtype=dtype, device=device)
+ elif self.t_sampling == "logistic_normal":
+ # JiT: t = sigmoid(N(P_mean, P_std))
+ z = torch.randn((batch,), device=device, dtype=dtype) * self.P_std + self.P_mean
+ t = torch.sigmoid(z)
+ else:
+ raise ValueError(f"Unknown t_sampling: {self.t_sampling}")
+
+ if self.time_shift != 1.0:
+ t = t / (t + self.time_shift * (1 - t))
+
+ return t
+
+ def _x_to_v(self, x_pred, z, t):
+ # v_pred = (x_pred - z) / (1 - t)
+ denom = (1.0 - t).clamp_min(self.t_eps)
+ while denom.ndim < z.ndim:
+ denom = denom.unsqueeze(-1)
+ return (x_pred - z) / denom
+
+ @torch.no_grad()
+ def sample(
+ self,
+ cond: float["b n d"] | float["b nw"],
+ text: int["b nt"] | list[str],
+ duration: int | int["b"],
+ *,
+ lens: int["b"] | None = None,
+ steps=32,
+ cfg_strength=1.0,
+ sway_sampling_coef=None,
+ timestep_mapping="sway_sampling",
+ timestep_power=None,
+ shift=1.0,
+ seed: int | None = None,
+ max_duration=4096,
+ use_epss=True,
+ no_ref_audio=False,
+ duplicate_test=False,
+ t_inter=0.1,
+ edit_mask=None,
+ ):
+ self.eval()
+ # raw wave
+ if cond.ndim != 2:
+ raise ValueError(f"WavTTS expects raw waveform conditioning [B, N], got {tuple(cond.shape)}")
+
+ cond = cond.to(next(self.parameters()).dtype)
+ cond = cond * self.latents_scale
+
+ batch, cond_seq_len, device = *cond.shape[:2], cond.device
+ if not exists(lens):
+ lens = torch.full((batch,), cond_seq_len, device=device, dtype=torch.long)
+
+ # text
+ if isinstance(text, list):
+ if exists(self.vocab_char_map):
+ text = list_str_to_idx(text, self.vocab_char_map).to(device)
+ else:
+ text = list_str_to_tensor(text).to(device)
+ assert text.shape[0] == batch
+
+ # duration
+ cond_mask = lens_to_mask(lens)
+ if edit_mask is not None:
+ cond_mask = cond_mask & edit_mask
+
+ if isinstance(duration, int):
+ duration = torch.full((batch,), duration, device=device, dtype=torch.long)
+
+ # keep legacy max_duration semantics for wav path: 4096 means 4096 frame-tokens.
+ max_duration_limit = max_duration * self.wav_frame_len
+ duration = torch.maximum(
+ torch.maximum((text != -1).sum(dim=-1), lens) + 1, duration
+ ) # duration at least text/audio prompt length plus one token, so something is generated
+ duration = duration.clamp(max=max_duration_limit)
+ max_duration = duration.amax()
+
+ # duplicate test corner for inner time step oberservation
+ if duplicate_test:
+ test_cond = F.pad(cond, (cond_seq_len, max_duration - 2 * cond_seq_len), value=0.0)
+
+ cond = F.pad(cond, (0, max_duration - cond_seq_len), value=0.0)
+ if no_ref_audio:
+ cond = torch.zeros_like(cond)
+
+ cond_mask = F.pad(cond_mask, (0, max_duration - cond_mask.shape[-1]), value=False)
+ step_cond = torch.where(cond_mask, cond, torch.zeros_like(cond))
+
+ if batch > 1:
+ mask = lens_to_mask(duration, length=max_duration)
+ else: # save memory and speed up, as single inference need no mask currently
+ mask = None
+
+ # neural ode
+
+ def fn(t, x):
+ # at each step, conditioning is fixed
+ # step_cond = torch.where(cond_mask, cond, torch.zeros_like(cond))
+ def to_v(pred_x_or_v):
+ if self.prediction == "flow":
+ return pred_x_or_v
+ else: # x_pred
+ return self._x_to_v(pred_x_or_v, x, t)
+
+ # predict flow (cond)
+ if cfg_strength < 1e-5:
+ pred, *_ = self.transformer(
+ x=x, cond=step_cond, text=text, time=t, mask=mask,
+ drop_audio_cond=False, drop_text=False, cache=True,
+ )
+ return to_v(pred)
+
+ # predict flow (cond and uncond), for classifier-free guidance
+ pred_cfg, *_ = self.transformer(
+ x=x, cond=step_cond, text=text, time=t, mask=mask,
+ cfg_infer=True, cache=True,
+ )
+ pred, null_pred = torch.chunk(pred_cfg, 2, dim=0)
+ v_cond = to_v(pred)
+ v_uncond = to_v(null_pred)
+
+ return v_cond + (v_cond - v_uncond) * cfg_strength
+
+ # noise input
+ # to make sure batch inference result is same with different batch size, and for sure single inference
+ # still some difference maybe due to convolutional layers
+ y0 = []
+ for dur in duration:
+ if exists(seed):
+ torch.manual_seed(seed)
+ y0.append(torch.randn(dur, device=self.device, dtype=step_cond.dtype))
+ y0 = pad_sequence(y0, padding_value=0, batch_first=True)
+
+ t_start = 0
+
+ # duplicate test corner for inner time step oberservation
+ if duplicate_test:
+ t_start = t_inter
+ y0 = (1 - t_start) * y0 + t_start * test_cond
+ steps = int(steps * (1 - t_start))
+
+ use_epss = use_epss and timestep_mapping == "sway_sampling"
+
+ if t_start == 0 and use_epss: # use Empirically Pruned Step Sampling for low NFE
+ t = get_epss_timesteps(steps, device=self.device, dtype=torch.float32)
+ else:
+ t = torch.linspace(t_start, 1, steps + 1, device=self.device, dtype=torch.float32)
+
+ if timestep_mapping == "uniform":
+ pass
+ elif timestep_mapping == "sway_sampling":
+ if sway_sampling_coef is not None:
+ t = t + sway_sampling_coef * (torch.cos(torch.pi / 2 * t) - 1 + t)
+ elif timestep_mapping == "power":
+ if timestep_power is None:
+ raise ValueError("timestep_power must be provided when timestep_mapping='power'")
+ t = t.pow(timestep_power)
+ else:
+ raise ValueError(f"Unknown timestep_mapping: {timestep_mapping}")
+
+ effective_shift = shift
+ if effective_shift != 1.0:
+ t = t / (t + effective_shift * (1 - t))
+
+ # WavTTS inference uses Euler ODE sampling.
+ odeint_kwargs = dict(self.odeint_kwargs)
+ odeint_kwargs["method"] = "euler"
+ trajectory = odeint(fn, y0, t, **odeint_kwargs)
+ self.transformer.clear_cache()
+
+ sampled = trajectory[-1]
+ out = sampled
+
+ out = out / self.latents_scale
+ cond_unscaled = cond / self.latents_scale
+ out = torch.where(cond_mask, cond_unscaled, out)
+
+ # ---- wav-only: trim to generated waveform duration ----
+ wav_list = []
+ for b in range(batch):
+ wav_list.append(out[b, : duration[b].item()])
+ out = pad_sequence(wav_list, batch_first=True, padding_value=0.0) # [B, N]
+
+ return out, trajectory
+
+ def forward(
+ self,
+ inp: float["b nw"], # raw waveform
+ text: int["b nt"] | list[str],
+ *,
+ lens: int["b"] | None = None,
+ noise_scheduler: str | None = None,
+ ):
+ # handle raw waveform
+ if inp.ndim != 2:
+ raise ValueError(f"WavTTS expects raw waveform input [B, N], got {tuple(inp.shape)}")
+
+ batch, seq_len, dtype, device, _σ1 = *inp.shape[:2], inp.dtype, self.device, self.sigma
+
+ # handle text as string
+ if isinstance(text, list):
+ if exists(self.vocab_char_map):
+ text = list_str_to_idx(text, self.vocab_char_map).to(device)
+ else:
+ text = list_str_to_tensor(text).to(device)
+ assert text.shape[0] == batch
+
+ # lens and mask
+ if not exists(lens): # if lens not acquired by trainer from collate_fn
+ lens = torch.full((batch,), seq_len, device=device)
+ mask = lens_to_mask(lens, length=seq_len)
+
+ # get a random span to mask out for training conditionally
+ frac_lengths = torch.zeros((batch,), device=self.device).float().uniform_(*self.frac_lengths_mask)
+ if self.mask_align_to > 1:
+ rand_span_mask = MelSpectrogramLoss._aligned_random_span_mask(
+ lengths=lens,
+ frac_lengths=frac_lengths,
+ align_to=self.mask_align_to,
+ max_length=seq_len,
+ )
+ else:
+ rand_span_mask = mask_from_frac_lengths(lens, frac_lengths)
+
+ if exists(mask):
+ rand_span_mask &= mask
+
+ # x1 is raw waveform
+ x1 = inp
+
+ x1 = x1 * self.latents_scale
+
+ # x0 is gaussian noise
+ x0 = torch.randn_like(x1)
+
+ # time step
+ time = self._sample_time(batch, dtype=dtype, device=self.device)
+
+ # sample xt (φ_t(x) in the paper)
+ t = time.unsqueeze(-1)
+ φ = (1 - t) * x0 + t * x1
+ flow = x1 - x0
+
+ # only predict what is within the random mask span for infilling
+ cond = torch.where(rand_span_mask, torch.zeros_like(x1), x1)
+
+ # transformer and cfg training with a drop rate
+ if self.joint_cond_drop_prob > 0.0:
+ joint_drop = random() < self.joint_cond_drop_prob
+ drop_audio_cond = joint_drop
+ drop_text = joint_drop
+ else:
+ drop_audio_cond = random() < self.audio_drop_prob # p_drop in voicebox paper
+ if random() < self.cond_drop_prob: # p_uncond in voicebox paper
+ drop_audio_cond = True
+ drop_text = True
+ else:
+ drop_text = False
+
+ # apply mask will use more memory; might adjust batchsize or batchsampler long sequence threshold
+ raw_pred, *_ = self.transformer(
+ x=φ, cond=cond, text=text, time=time,
+ drop_audio_cond=drop_audio_cond, drop_text=drop_text, mask=mask,
+ lens=lens,
+ )
+
+ # interpret prediction
+ if self.prediction == "flow":
+ v_pred = raw_pred
+ x_pred = φ + (1.0 - t) * v_pred
+ elif self.prediction == "x_pred":
+ x_pred = raw_pred
+ v_pred = self._x_to_v(x_pred, φ, time)
+ else:
+ raise ValueError(f"Unknown prediction: {self.prediction}")
+
+ # loss space
+ if self.loss_space == "flow":
+ loss = F.mse_loss(v_pred, flow, reduction="none")
+ elif self.loss_space == "v":
+ # v-loss (same target flow, but v_pred computed from x_pred) & use clamp_min
+ denom = (1.0 - time).clamp_min(self.t_eps)
+ while denom.ndim < φ.ndim:
+ denom = denom.unsqueeze(-1)
+ target = (x1 - φ) / denom
+ loss = F.mse_loss(v_pred, target, reduction="none")
+ elif self.loss_space == "x":
+ loss = F.mse_loss(x_pred, x1, reduction="none")
+ else:
+ raise ValueError(f"Unknown loss_space: {self.loss_space}")
+
+ loss = loss[rand_span_mask]
+ flow_loss = loss.mean()
+ total_loss = flow_loss
+
+ aux_mel_loss = torch.tensor(0.0, device=device)
+ if self.use_aux_mel_loss and self.aux_mel_loss is not None:
+ x1_flat_unscaled = x1 / self.latents_scale
+ x1_pred_flat_unscaled = x_pred / self.latents_scale
+
+ aux_mel_kwargs = {}
+ if self.aux_mel_loss_masked:
+ aux_mel_kwargs.update(
+ frame_mask=rand_span_mask,
+ frame_lengths=lens,
+ )
+
+ aux_mel_loss = self.aux_mel_loss(
+ x1_pred_flat_unscaled,
+ x1_flat_unscaled,
+ **aux_mel_kwargs,
+ )
+ total_loss = total_loss + aux_mel_loss
+
+ loss_dict = {
+ "total_loss": total_loss,
+ "flow_loss": flow_loss,
+ "aux_mel_loss": aux_mel_loss,
+ }
+
+ return total_loss, cond, v_pred, loss_dict
diff --git a/src/wavtts/model/dataset.py b/src/wavtts/model/dataset.py
new file mode 100644
index 0000000000000000000000000000000000000000..76bc069073b3bddc80276d477c5db908c59fdd2f
--- /dev/null
+++ b/src/wavtts/model/dataset.py
@@ -0,0 +1,229 @@
+import json
+from importlib.resources import files
+
+import torch
+import torch.nn.functional as F
+import torchaudio
+from datasets import Dataset as Dataset_
+from datasets import load_from_disk
+from torch.utils.data import Dataset, Sampler
+from tqdm import tqdm
+
+
+
+class CustomDataset(Dataset):
+ def __init__(
+ self,
+ custom_dataset: Dataset,
+ durations=None,
+ target_sample_rate=16_000,
+ wav_frame_len: int = 160,
+ **_,
+ ):
+ self.data = custom_dataset
+ self.durations = durations
+ self.target_sample_rate = target_sample_rate
+ self.wav_frame_len = wav_frame_len
+
+ self._resamplers = {}
+
+ def get_frame_len(self, index):
+ if (
+ self.durations is not None
+ ): # Please make sure the separately provided durations are correct, otherwise 99.99% OOM
+ return self.durations[index] * self.target_sample_rate / self.wav_frame_len
+ return self.data[index]["duration"] * self.target_sample_rate / self.wav_frame_len
+
+ def __len__(self):
+ return len(self.data)
+
+ def __getitem__(self, index):
+ while True:
+ row = self.data[index]
+ audio_path = row["audio_path"]
+ text = row["text"]
+ duration = row["duration"]
+
+ # filter by given length
+ if 0.3 <= duration <= 30:
+ break # valid
+
+ index = (index + 1) % len(self.data)
+
+ audio, source_sample_rate = torchaudio.load(audio_path)
+
+ # make sure mono input
+ if audio.shape[0] > 1:
+ audio = torch.mean(audio, dim=0, keepdim=True)
+
+ # resample if necessary
+ if source_sample_rate != self.target_sample_rate:
+ if source_sample_rate not in self._resamplers:
+ self._resamplers[source_sample_rate] = torchaudio.transforms.Resample(
+ source_sample_rate, self.target_sample_rate
+ )
+ audio = self._resamplers[source_sample_rate](audio)
+
+ return {
+ "wav": audio.squeeze(0),
+ "text": text,
+ }
+
+
+# Dynamic Batch Sampler
+class DynamicBatchSampler(Sampler[list[int]]):
+ """Extension of Sampler that will do the following:
+ 1. Change the batch size (essentially number of sequences)
+ in a batch to ensure that the total number of frames are less
+ than a certain threshold.
+ 2. Make sure the padding efficiency in the batch is high.
+ 3. Shuffle batches each epoch while maintaining reproducibility.
+ """
+
+ def __init__(
+ self, sampler: Sampler[int], frames_threshold: int, max_samples=0, random_seed=None, drop_residual: bool = False
+ ):
+ self.sampler = sampler
+ self.frames_threshold = frames_threshold
+ self.max_samples = max_samples
+ self.random_seed = random_seed
+ self.epoch = 0
+
+ indices, batches = [], []
+ data_source = self.sampler.data_source
+
+ for idx in tqdm(
+ self.sampler, desc="Sorting with sampler... if slow, check whether dataset is provided with duration"
+ ):
+ indices.append((idx, data_source.get_frame_len(idx)))
+ indices.sort(key=lambda elem: elem[1])
+
+ batch = []
+ batch_frames = 0
+ for idx, frame_len in tqdm(
+ indices, desc=f"Creating dynamic batches with {frames_threshold} audio frames per gpu"
+ ):
+ if batch_frames + frame_len <= self.frames_threshold and (max_samples == 0 or len(batch) < max_samples):
+ batch.append(idx)
+ batch_frames += frame_len
+ else:
+ if len(batch) > 0:
+ batches.append(batch)
+ if frame_len <= self.frames_threshold:
+ batch = [idx]
+ batch_frames = frame_len
+ else:
+ batch = []
+ batch_frames = 0
+
+ if not drop_residual and len(batch) > 0:
+ batches.append(batch)
+
+ del indices
+ self.batches = batches
+
+ # Ensure even batches with accelerate BatchSamplerShard cls under frame_per_batch setting
+ self.drop_last = True
+
+ def set_epoch(self, epoch: int) -> None:
+ """Sets the epoch for this sampler."""
+ self.epoch = epoch
+
+ def __iter__(self):
+ # Use both random_seed and epoch for deterministic but different shuffling per epoch
+ if self.random_seed is not None:
+ g = torch.Generator()
+ g.manual_seed(self.random_seed + self.epoch)
+ # Use PyTorch's random permutation for better reproducibility across PyTorch versions
+ indices = torch.randperm(len(self.batches), generator=g).tolist()
+ batches = [self.batches[i] for i in indices]
+ else:
+ batches = self.batches
+ return iter(batches)
+
+ def __len__(self):
+ return len(self.batches)
+
+
+# Load dataset
+
+
+def load_dataset(
+ dataset_name: str,
+ tokenizer: str = "pinyin",
+ dataset_type: str = "CustomDataset",
+ audio_type: str = "raw",
+ waveform_kwargs: dict = dict(),
+) -> CustomDataset:
+ """
+ WavTTS only supports raw waveform datasets.
+ dataset_type:
+ - "CustomDataset": use tokenizer name and default data path
+ - "CustomDatasetPath": pass the full path to a prepared dataset
+ """
+
+ print("Loading dataset ...")
+
+ if audio_type != "raw":
+ raise ValueError("WavTTS only supports raw waveform datasets; audio_type must be 'raw'.")
+
+ if dataset_type == "CustomDataset":
+ rel_data_path = str(files("wavtts").joinpath(f"../../data/{dataset_name}_{tokenizer}"))
+ try:
+ train_dataset = load_from_disk(f"{rel_data_path}/raw")
+ except: # noqa: E722
+ train_dataset = Dataset_.from_file(f"{rel_data_path}/raw.arrow")
+ with open(f"{rel_data_path}/duration.json", "r", encoding="utf-8") as f:
+ data_dict = json.load(f)
+ durations = data_dict["duration"]
+ train_dataset = CustomDataset(train_dataset, durations=durations, **waveform_kwargs)
+
+ elif dataset_type == "CustomDatasetPath":
+ try:
+ train_dataset = load_from_disk(f"{dataset_name}/raw")
+ except: # noqa: E722
+ train_dataset = Dataset_.from_file(f"{dataset_name}/raw.arrow")
+
+ with open(f"{dataset_name}/duration.json", "r", encoding="utf-8") as f:
+ data_dict = json.load(f)
+ durations = data_dict["duration"]
+ train_dataset = CustomDataset(train_dataset, durations=durations, **waveform_kwargs)
+
+ else:
+ raise ValueError(f"Unsupported dataset_type for WavTTS wav-only training: {dataset_type}")
+
+ return train_dataset
+
+
+# collation
+
+
+def collate_fn(batch):
+ text = [item["text"] for item in batch]
+ text_lengths = torch.LongTensor([len(item) for item in text])
+
+ wavs = [item["wav"] for item in batch]
+ has_wav = wavs[0] is not None
+ if has_wav:
+ wav_lengths = torch.LongTensor([w.shape[0] for w in wavs])
+ max_wav_len = wav_lengths.max().item()
+
+ padded_wavs = []
+ for w in wavs:
+ pad_len = max_wav_len - w.shape[0]
+ padded_wavs.append(
+ F.pad(w, (0, pad_len), value=0.0)
+ )
+
+ wavs = torch.stack(padded_wavs) # [B, T_wav]
+ else:
+ wavs = None
+ wav_lengths = None
+
+
+ return dict(
+ text=text,
+ text_lengths=text_lengths,
+ wav=wavs,
+ wav_lengths=wav_lengths,
+ )
diff --git a/src/wavtts/model/modules.py b/src/wavtts/model/modules.py
new file mode 100644
index 0000000000000000000000000000000000000000..442c65a39be9837912d09fcaae7a9b4f9add8db5
--- /dev/null
+++ b/src/wavtts/model/modules.py
@@ -0,0 +1,876 @@
+"""
+ein notation:
+b - batch
+n - sequence
+nt - text sequence
+nw - raw wave length
+d - dimension
+"""
+# ruff: noqa: F722 F821
+
+from __future__ import annotations
+
+import math
+from typing import Optional
+
+import torch
+import torch.nn.functional as F
+import torchaudio
+from torch import nn
+from x_transformers.x_transformers import apply_rotary_pos_emb
+from transformers import AutoModel, AutoFeatureExtractor
+
+from wavtts.model.utils import is_package_available, lens_to_mask
+
+
+# sinusoidal position embedding
+
+
+class SinusPositionEmbedding(nn.Module):
+ def __init__(self, dim):
+ super().__init__()
+ self.dim = dim
+
+ def forward(self, x, scale=1000):
+ device = x.device
+ half_dim = self.dim // 2
+ emb = math.log(10000) / (half_dim - 1)
+ emb = torch.exp(torch.arange(half_dim, device=device).float() * -emb)
+ emb = scale * x.unsqueeze(1) * emb.unsqueeze(0)
+ emb = torch.cat((emb.sin(), emb.cos()), dim=-1)
+ return emb
+
+
+# convolutional position embedding
+
+
+class ConvPositionEmbedding(nn.Module):
+ def __init__(self, dim, kernel_size=31, groups=16):
+ super().__init__()
+ assert kernel_size % 2 != 0
+ self.conv1d = nn.Sequential(
+ nn.Conv1d(dim, dim, kernel_size, groups=groups, padding=kernel_size // 2),
+ nn.Mish(),
+ nn.Conv1d(dim, dim, kernel_size, groups=groups, padding=kernel_size // 2),
+ nn.Mish(),
+ )
+ self.layer_need_mask_idx = [i for i, layer in enumerate(self.conv1d) if isinstance(layer, nn.Conv1d)]
+
+ def forward(self, x: float["b n d"], mask: bool["b n"] | None = None):
+ if mask is not None:
+ mask = mask.unsqueeze(1) # [B 1 N]
+ x = x.permute(0, 2, 1) # [B D N]
+
+ if mask is not None:
+ x = x.masked_fill(~mask, 0.0)
+ for i, block in enumerate(self.conv1d):
+ x = block(x)
+ if mask is not None and i in self.layer_need_mask_idx:
+ x = x.masked_fill(~mask, 0.0)
+
+ x = x.permute(0, 2, 1) # [B N D]
+
+ return x
+
+
+# rotary positional embedding related
+
+
+def precompute_freqs_cis(dim: int, end: int, theta: float = 10000.0, theta_rescale_factor=1.0):
+ # proposed by reddit user bloc97, to rescale rotary embeddings to longer sequence length without fine-tuning
+ # has some connection to NTK literature
+ # https://www.reddit.com/r/LocalLLaMA/comments/14lz7j5/ntkaware_scaled_rope_allows_llama_models_to_have/
+ # https://github.com/lucidrains/rotary-embedding-torch/blob/main/rotary_embedding_torch/rotary_embedding_torch.py
+ theta *= theta_rescale_factor ** (dim / (dim - 2))
+ freqs = 1.0 / (theta ** (torch.arange(0, dim, 2)[: (dim // 2)].float() / dim))
+ t = torch.arange(end, device=freqs.device) # type: ignore
+ freqs = torch.outer(t, freqs).float() # type: ignore
+ freqs_cos = torch.cos(freqs) # real part
+ freqs_sin = torch.sin(freqs) # imaginary part
+ return torch.cat([freqs_cos, freqs_sin], dim=-1)
+
+
+def get_pos_embed_indices(start, length, max_pos, scale=1.0):
+ # length = length if isinstance(length, int) else length.max()
+ scale = scale * torch.ones_like(start, dtype=torch.float32) # in case scale is a scalar
+ pos = (
+ start.unsqueeze(1)
+ + (torch.arange(length, device=start.device, dtype=torch.float32).unsqueeze(0) * scale.unsqueeze(1)).long()
+ )
+ # avoid extra long error.
+ pos = torch.where(pos < max_pos, pos, max_pos - 1)
+ return pos
+
+
+# Global Response Normalization layer (Instance Normalization ?)
+
+
+class GRN(nn.Module):
+ def __init__(self, dim):
+ super().__init__()
+ self.gamma = nn.Parameter(torch.zeros(1, 1, dim))
+ self.beta = nn.Parameter(torch.zeros(1, 1, dim))
+
+ def forward(self, x):
+ Gx = torch.norm(x, p=2, dim=1, keepdim=True)
+ Nx = Gx / (Gx.mean(dim=-1, keepdim=True) + 1e-6)
+ return self.gamma * (x * Nx) + self.beta + x
+
+
+# ConvNeXt-V2 Block https://github.com/facebookresearch/ConvNeXt-V2/blob/main/models/convnextv2.py
+# ref: https://github.com/bfs18/e2_tts/blob/main/rfwave/modules.py#L108
+
+
+class ConvNeXtV2Block(nn.Module):
+ def __init__(
+ self,
+ dim: int,
+ intermediate_dim: int,
+ dilation: int = 1,
+ ):
+ super().__init__()
+ padding = (dilation * (7 - 1)) // 2
+ self.dwconv = nn.Conv1d(
+ dim, dim, kernel_size=7, padding=padding, groups=dim, dilation=dilation
+ ) # depthwise conv
+ self.norm = nn.LayerNorm(dim, eps=1e-6)
+ self.pwconv1 = nn.Linear(dim, intermediate_dim) # pointwise/1x1 convs, implemented with linear layers
+ self.act = nn.GELU()
+ self.grn = GRN(intermediate_dim)
+ self.pwconv2 = nn.Linear(intermediate_dim, dim)
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ residual = x
+ x = x.transpose(1, 2) # b n d -> b d n
+ x = self.dwconv(x)
+ x = x.transpose(1, 2) # b d n -> b n d
+ x = self.norm(x)
+ x = self.pwconv1(x)
+ x = self.act(x)
+ x = self.grn(x)
+ x = self.pwconv2(x)
+ return residual + x
+
+
+# RMSNorm
+
+
+class RMSNorm(nn.Module):
+ def __init__(self, dim: int, eps: float):
+ super().__init__()
+ self.eps = eps
+ self.weight = nn.Parameter(torch.ones(dim))
+ self.native_rms_norm = float(torch.__version__[:3]) >= 2.4
+
+ def forward(self, x):
+ if self.native_rms_norm:
+ if self.weight.dtype in [torch.float16, torch.bfloat16]:
+ x = x.to(self.weight.dtype)
+ x = F.rms_norm(x, normalized_shape=(x.shape[-1],), weight=self.weight, eps=self.eps)
+ else:
+ variance = x.to(torch.float32).pow(2).mean(-1, keepdim=True)
+ x = x * torch.rsqrt(variance + self.eps)
+ if self.weight.dtype in [torch.float16, torch.bfloat16]:
+ x = x.to(self.weight.dtype)
+ x = x * self.weight
+
+ return x
+
+
+# AdaLayerNorm
+# return with modulated x for attn input, and params for later mlp modulation
+
+
+class AdaLayerNorm(nn.Module):
+ def __init__(self, dim):
+ super().__init__()
+
+ self.silu = nn.SiLU()
+ self.linear = nn.Linear(dim, dim * 6)
+
+ self.norm = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
+
+ def forward(self, x, emb=None):
+ emb = self.linear(self.silu(emb))
+ shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = torch.chunk(emb, 6, dim=1)
+
+ x = self.norm(x) * (1 + scale_msa[:, None]) + shift_msa[:, None]
+ return x, gate_msa, shift_mlp, scale_mlp, gate_mlp
+
+
+# AdaLayerNorm for final layer
+# return only with modulated x for attn input, cuz no more mlp modulation
+
+
+class AdaLayerNorm_Final(nn.Module):
+ def __init__(self, dim):
+ super().__init__()
+
+ self.silu = nn.SiLU()
+ self.linear = nn.Linear(dim, dim * 2)
+
+ self.norm = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
+
+ def forward(self, x, emb):
+ emb = self.linear(self.silu(emb))
+ scale, shift = torch.chunk(emb, 2, dim=1)
+
+ x = self.norm(x) * (1 + scale)[:, None, :] + shift[:, None, :]
+ return x
+
+
+# FeedForward
+
+
+class FeedForward(nn.Module):
+ def __init__(self, dim, dim_out=None, mult=4, dropout=0.0, approximate: str = "none"):
+ super().__init__()
+ inner_dim = int(dim * mult)
+ dim_out = dim_out if dim_out is not None else dim
+
+ activation = nn.GELU(approximate=approximate)
+ project_in = nn.Sequential(nn.Linear(dim, inner_dim), activation)
+ self.ff = nn.Sequential(project_in, nn.Dropout(dropout), nn.Linear(inner_dim, dim_out))
+
+ def forward(self, x):
+ return self.ff(x)
+
+
+# Attention with possible joint part
+# modified from diffusers/src/diffusers/models/attention_processor.py
+
+
+class Attention(nn.Module):
+ def __init__(
+ self,
+ processor: JointAttnProcessor | AttnProcessor,
+ dim: int,
+ heads: int = 8,
+ dim_head: int = 64,
+ dropout: float = 0.0,
+ context_dim: Optional[int] = None, # if not None -> joint attention
+ context_pre_only: bool = False,
+ qk_norm: Optional[str] = None,
+ ):
+ super().__init__()
+
+ if not hasattr(F, "scaled_dot_product_attention"):
+ raise ImportError("Attention equires PyTorch 2.0, to use it, please upgrade PyTorch to 2.0.")
+
+ self.processor = processor
+
+ self.dim = dim
+ self.heads = heads
+ self.inner_dim = dim_head * heads
+ self.dropout = dropout
+
+ self.context_dim = context_dim
+ self.context_pre_only = context_pre_only
+
+ self.to_q = nn.Linear(dim, self.inner_dim)
+ self.to_k = nn.Linear(dim, self.inner_dim)
+ self.to_v = nn.Linear(dim, self.inner_dim)
+
+ if qk_norm is None:
+ self.q_norm = None
+ self.k_norm = None
+ elif qk_norm == "rms_norm":
+ self.q_norm = RMSNorm(dim_head, eps=1e-6)
+ self.k_norm = RMSNorm(dim_head, eps=1e-6)
+ else:
+ raise ValueError(f"Unimplemented qk_norm: {qk_norm}")
+
+ if self.context_dim is not None:
+ self.to_q_c = nn.Linear(context_dim, self.inner_dim)
+ self.to_k_c = nn.Linear(context_dim, self.inner_dim)
+ self.to_v_c = nn.Linear(context_dim, self.inner_dim)
+ if qk_norm is None:
+ self.c_q_norm = None
+ self.c_k_norm = None
+ elif qk_norm == "rms_norm":
+ self.c_q_norm = RMSNorm(dim_head, eps=1e-6)
+ self.c_k_norm = RMSNorm(dim_head, eps=1e-6)
+
+ self.to_out = nn.ModuleList([])
+ self.to_out.append(nn.Linear(self.inner_dim, dim))
+ self.to_out.append(nn.Dropout(dropout))
+
+ if self.context_dim is not None and not self.context_pre_only:
+ self.to_out_c = nn.Linear(self.inner_dim, context_dim)
+
+ def forward(
+ self,
+ x: float["b n d"], # noised input x
+ c: float["b n d"] = None, # context c
+ mask: bool["b n"] | None = None,
+ rope=None, # rotary position embedding for x
+ c_rope=None, # rotary position embedding for c
+ ) -> torch.Tensor:
+ if c is not None:
+ return self.processor(self, x, c=c, mask=mask, rope=rope, c_rope=c_rope)
+ else:
+ return self.processor(self, x, mask=mask, rope=rope)
+
+
+# Attention processor
+
+if is_package_available("flash_attn"):
+ from flash_attn import flash_attn_func, flash_attn_varlen_func
+ from flash_attn.bert_padding import pad_input, unpad_input
+
+
+class AttnProcessor:
+ def __init__(
+ self,
+ pe_attn_head: int | None = None, # number of attention head to apply rope, None for all
+ attn_backend: str = "torch", # "torch" or "flash_attn"
+ attn_mask_enabled: bool = True,
+ ):
+ if attn_backend == "flash_attn":
+ assert is_package_available("flash_attn"), "Please install flash-attn first."
+
+ self.pe_attn_head = pe_attn_head
+ self.attn_backend = attn_backend
+ self.attn_mask_enabled = attn_mask_enabled
+
+ def __call__(
+ self,
+ attn: Attention,
+ x: float["b n d"], # noised input x
+ mask: bool["b n"] | None = None,
+ rope=None, # rotary position embedding
+ ) -> torch.FloatTensor:
+ batch_size = x.shape[0]
+
+ # `sample` projections
+ query = attn.to_q(x)
+ key = attn.to_k(x)
+ value = attn.to_v(x)
+
+ # attention
+ inner_dim = key.shape[-1]
+ head_dim = inner_dim // attn.heads
+ query = query.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ key = key.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ value = value.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+
+ # qk norm
+ if attn.q_norm is not None:
+ query = attn.q_norm(query)
+ if attn.k_norm is not None:
+ key = attn.k_norm(key)
+
+ # apply rotary position embedding
+ if rope is not None:
+ freqs, xpos_scale = rope
+ q_xpos_scale, k_xpos_scale = (xpos_scale, xpos_scale**-1.0) if xpos_scale is not None else (1.0, 1.0)
+
+ if self.pe_attn_head is not None:
+ pn = self.pe_attn_head
+ query[:, :pn, :, :] = apply_rotary_pos_emb(query[:, :pn, :, :], freqs, q_xpos_scale)
+ key[:, :pn, :, :] = apply_rotary_pos_emb(key[:, :pn, :, :], freqs, k_xpos_scale)
+ else:
+ query = apply_rotary_pos_emb(query, freqs, q_xpos_scale)
+ key = apply_rotary_pos_emb(key, freqs, k_xpos_scale)
+
+ if self.attn_backend == "torch":
+ # mask. e.g. inference got a batch with different target durations, mask out the padding
+ if self.attn_mask_enabled and mask is not None:
+ attn_mask = mask
+ attn_mask = attn_mask.unsqueeze(1).unsqueeze(1) # 'b n -> b 1 1 n'
+ attn_mask = attn_mask.expand(batch_size, attn.heads, query.shape[-2], key.shape[-2])
+ else:
+ attn_mask = None
+ x = F.scaled_dot_product_attention(query, key, value, attn_mask=attn_mask, dropout_p=0.0, is_causal=False)
+ x = x.transpose(1, 2).reshape(batch_size, -1, attn.heads * head_dim)
+
+ elif self.attn_backend == "flash_attn":
+ query = query.transpose(1, 2) # [b, h, n, d] -> [b, n, h, d]
+ key = key.transpose(1, 2)
+ value = value.transpose(1, 2)
+ if self.attn_mask_enabled and mask is not None:
+ query, indices, q_cu_seqlens, q_max_seqlen_in_batch, _ = unpad_input(query, mask)
+ key, _, k_cu_seqlens, k_max_seqlen_in_batch, _ = unpad_input(key, mask)
+ value, _, _, _, _ = unpad_input(value, mask)
+ x = flash_attn_varlen_func(
+ query,
+ key,
+ value,
+ q_cu_seqlens,
+ k_cu_seqlens,
+ q_max_seqlen_in_batch,
+ k_max_seqlen_in_batch,
+ )
+ x = pad_input(x, indices, batch_size, q_max_seqlen_in_batch)
+ x = x.reshape(batch_size, -1, attn.heads * head_dim)
+ else:
+ x = flash_attn_func(query, key, value, dropout_p=0.0, causal=False)
+ x = x.reshape(batch_size, -1, attn.heads * head_dim)
+
+ x = x.to(query.dtype)
+
+ # linear proj
+ x = attn.to_out[0](x)
+ # dropout
+ x = attn.to_out[1](x)
+
+ if mask is not None:
+ mask = mask.unsqueeze(-1)
+ x = x.masked_fill(~mask, 0.0)
+
+ return x
+
+
+# Joint Attention processor for MM-DiT
+# modified from diffusers/src/diffusers/models/attention_processor.py
+
+
+class JointAttnProcessor:
+ def __init__(self):
+ pass
+
+ def __call__(
+ self,
+ attn: Attention,
+ x: float["b n d"], # noised input x
+ c: float["b nt d"] = None, # context c, here text
+ mask: bool["b n"] | None = None,
+ rope=None, # rotary position embedding for x
+ c_rope=None, # rotary position embedding for c
+ ) -> torch.FloatTensor:
+ residual = x
+
+ batch_size = c.shape[0]
+
+ # `sample` projections
+ query = attn.to_q(x)
+ key = attn.to_k(x)
+ value = attn.to_v(x)
+
+ # `context` projections
+ c_query = attn.to_q_c(c)
+ c_key = attn.to_k_c(c)
+ c_value = attn.to_v_c(c)
+
+ # attention
+ inner_dim = key.shape[-1]
+ head_dim = inner_dim // attn.heads
+ query = query.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ key = key.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ value = value.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ c_query = c_query.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ c_key = c_key.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+ c_value = c_value.view(batch_size, -1, attn.heads, head_dim).transpose(1, 2)
+
+ # qk norm
+ if attn.q_norm is not None:
+ query = attn.q_norm(query)
+ if attn.k_norm is not None:
+ key = attn.k_norm(key)
+ if attn.c_q_norm is not None:
+ c_query = attn.c_q_norm(c_query)
+ if attn.c_k_norm is not None:
+ c_key = attn.c_k_norm(c_key)
+
+ # apply rope for context and noised input independently
+ if rope is not None:
+ freqs, xpos_scale = rope
+ q_xpos_scale, k_xpos_scale = (xpos_scale, xpos_scale**-1.0) if xpos_scale is not None else (1.0, 1.0)
+ query = apply_rotary_pos_emb(query, freqs, q_xpos_scale)
+ key = apply_rotary_pos_emb(key, freqs, k_xpos_scale)
+ if c_rope is not None:
+ freqs, xpos_scale = c_rope
+ q_xpos_scale, k_xpos_scale = (xpos_scale, xpos_scale**-1.0) if xpos_scale is not None else (1.0, 1.0)
+ c_query = apply_rotary_pos_emb(c_query, freqs, q_xpos_scale)
+ c_key = apply_rotary_pos_emb(c_key, freqs, k_xpos_scale)
+
+ # joint attention
+ query = torch.cat([query, c_query], dim=2)
+ key = torch.cat([key, c_key], dim=2)
+ value = torch.cat([value, c_value], dim=2)
+
+ # mask. e.g. inference got a batch with different target durations, mask out the padding
+ if mask is not None:
+ attn_mask = F.pad(mask, (0, c.shape[1]), value=True) # no mask for c (text)
+ attn_mask = attn_mask.unsqueeze(1).unsqueeze(1) # 'b n -> b 1 1 n'
+ attn_mask = attn_mask.expand(batch_size, attn.heads, query.shape[-2], key.shape[-2])
+ else:
+ attn_mask = None
+
+ x = F.scaled_dot_product_attention(query, key, value, attn_mask=attn_mask, dropout_p=0.0, is_causal=False)
+ x = x.transpose(1, 2).reshape(batch_size, -1, attn.heads * head_dim)
+ x = x.to(query.dtype)
+
+ # Split the attention outputs.
+ x, c = (
+ x[:, : residual.shape[1]],
+ x[:, residual.shape[1] :],
+ )
+
+ # linear proj
+ x = attn.to_out[0](x)
+ # dropout
+ x = attn.to_out[1](x)
+ if not attn.context_pre_only:
+ c = attn.to_out_c(c)
+
+ if mask is not None:
+ mask = mask.unsqueeze(-1)
+ x = x.masked_fill(~mask, 0.0)
+ # c = c.masked_fill(~mask, 0.) # no mask for c (text)
+
+ return x, c
+
+
+# DiT Block
+
+
+class DiTBlock(nn.Module):
+ def __init__(
+ self,
+ dim,
+ heads,
+ dim_head,
+ ff_mult=4,
+ dropout=0.1,
+ qk_norm=None,
+ pe_attn_head=None,
+ attn_backend="torch", # "torch" or "flash_attn"
+ attn_mask_enabled=True,
+ ):
+ super().__init__()
+
+ self.attn_norm = AdaLayerNorm(dim)
+ self.attn = Attention(
+ processor=AttnProcessor(
+ pe_attn_head=pe_attn_head,
+ attn_backend=attn_backend,
+ attn_mask_enabled=attn_mask_enabled,
+ ),
+ dim=dim,
+ heads=heads,
+ dim_head=dim_head,
+ dropout=dropout,
+ qk_norm=qk_norm,
+ )
+
+ self.ff_norm = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
+ self.ff = FeedForward(dim=dim, mult=ff_mult, dropout=dropout, approximate="tanh")
+
+ def forward(self, x, t, mask=None, rope=None): # x: noised input, t: time embedding
+ # pre-norm & modulation for attention input
+ norm, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.attn_norm(x, emb=t)
+
+ # attention
+ attn_output = self.attn(x=norm, mask=mask, rope=rope)
+
+ # process attention output for input x
+ x = x + gate_msa.unsqueeze(1) * attn_output
+
+ norm = self.ff_norm(x) * (1 + scale_mlp[:, None]) + shift_mlp[:, None]
+ ff_output = self.ff(norm)
+ x = x + gate_mlp.unsqueeze(1) * ff_output
+
+ return x
+
+
+# MMDiT Block https://arxiv.org/abs/2403.03206
+
+
+class MMDiTBlock(nn.Module):
+ r"""
+ modified from diffusers/src/diffusers/models/attention.py
+
+ notes.
+ _c: context related. text, cond, etc. (left part in sd3 fig2.b)
+ _x: noised input related. (right part)
+ context_pre_only: last layer only do prenorm + modulation cuz no more ffn
+ """
+
+ def __init__(
+ self, dim, heads, dim_head, ff_mult=4, dropout=0.1, context_dim=None, context_pre_only=False, qk_norm=None
+ ):
+ super().__init__()
+ if context_dim is None:
+ context_dim = dim
+ self.context_pre_only = context_pre_only
+
+ self.attn_norm_c = AdaLayerNorm_Final(context_dim) if context_pre_only else AdaLayerNorm(context_dim)
+ self.attn_norm_x = AdaLayerNorm(dim)
+ self.attn = Attention(
+ processor=JointAttnProcessor(),
+ dim=dim,
+ heads=heads,
+ dim_head=dim_head,
+ dropout=dropout,
+ context_dim=context_dim,
+ context_pre_only=context_pre_only,
+ qk_norm=qk_norm,
+ )
+
+ if not context_pre_only:
+ self.ff_norm_c = nn.LayerNorm(context_dim, elementwise_affine=False, eps=1e-6)
+ self.ff_c = FeedForward(dim=context_dim, mult=ff_mult, dropout=dropout, approximate="tanh")
+ else:
+ self.ff_norm_c = None
+ self.ff_c = None
+ self.ff_norm_x = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
+ self.ff_x = FeedForward(dim=dim, mult=ff_mult, dropout=dropout, approximate="tanh")
+
+ def forward(self, x, c, t, mask=None, rope=None, c_rope=None): # x: noised input, c: context, t: time embedding
+ # pre-norm & modulation for attention input
+ if self.context_pre_only:
+ norm_c = self.attn_norm_c(c, t)
+ else:
+ norm_c, c_gate_msa, c_shift_mlp, c_scale_mlp, c_gate_mlp = self.attn_norm_c(c, emb=t)
+ norm_x, x_gate_msa, x_shift_mlp, x_scale_mlp, x_gate_mlp = self.attn_norm_x(x, emb=t)
+
+ # attention
+ x_attn_output, c_attn_output = self.attn(x=norm_x, c=norm_c, mask=mask, rope=rope, c_rope=c_rope)
+
+ # process attention output for context c
+ if self.context_pre_only:
+ c = None
+ else: # if not last layer
+ c = c + c_gate_msa.unsqueeze(1) * c_attn_output
+
+ norm_c = self.ff_norm_c(c) * (1 + c_scale_mlp[:, None]) + c_shift_mlp[:, None]
+ c_ff_output = self.ff_c(norm_c)
+ c = c + c_gate_mlp.unsqueeze(1) * c_ff_output
+
+ # process attention output for input x
+ x = x + x_gate_msa.unsqueeze(1) * x_attn_output
+
+ norm_x = self.ff_norm_x(x) * (1 + x_scale_mlp[:, None]) + x_shift_mlp[:, None]
+ x_ff_output = self.ff_x(norm_x)
+ x = x + x_gate_mlp.unsqueeze(1) * x_ff_output
+
+ return c, x
+
+
+# time step conditioning embedding
+
+
+class TimestepEmbedding(nn.Module):
+ def __init__(self, dim, freq_embed_dim=256):
+ super().__init__()
+ self.time_embed = SinusPositionEmbedding(freq_embed_dim)
+ self.time_mlp = nn.Sequential(nn.Linear(freq_embed_dim, dim), nn.SiLU(), nn.Linear(dim, dim))
+
+ def forward(self, timestep: float["b"]):
+ time_hidden = self.time_embed(timestep)
+ time_hidden = time_hidden.to(timestep.dtype)
+ time = self.time_mlp(time_hidden) # b d
+ return time
+
+# auxiliary loss for mel spectrogram
+class MelSpectrogramLoss(nn.Module):
+ """
+ General PyTorch implementation of the Multi-Scale Mel Spectrogram Loss from DAC.
+ Reference: https://github.com/descriptinc/lyrebird-audiotools
+ """
+ def __init__(
+ self,
+ sample_rate: int = 24000,
+ n_mels: List[int] = [5, 10, 20, 40, 80, 160, 320],
+ window_lengths: List[int] = [32, 64, 128, 256, 512, 1024, 2048],
+ mel_fmin: List[float] = [0, 0, 0, 0, 0, 0, 0],
+ mel_fmax: List[Optional[float]] = [None, None, None, None, None, None, None],
+ pow: float = 1.0,
+ clamp_eps: float = 1e-5,
+ weight: float = 1.0,
+ ):
+ super().__init__()
+ self.sample_rate = sample_rate
+ self.weight = weight
+ self.pow = pow
+ self.clamp_eps = clamp_eps
+
+
+ assert len(n_mels) == len(window_lengths), "n_mels and window_lengths must have the same length"
+
+ self.mel_transforms = nn.ModuleList()
+
+ for i, (nm, wl) in enumerate(zip(n_mels, window_lengths)):
+ fmin = mel_fmin[i] if i < len(mel_fmin) else 0.0
+ fmax = mel_fmax[i] if i < len(mel_fmax) else None
+
+ # DAC default logic: hop_length = window_length // 4
+ hop_length = wl // 4
+
+ transform = torchaudio.transforms.MelSpectrogram(
+ sample_rate=sample_rate,
+ n_fft=wl, # using window_length as n_fft usually
+ win_length=wl,
+ hop_length=hop_length,
+ n_mels=nm,
+ f_min=fmin,
+ f_max=fmax,
+ power=1.0, # computing Magnitude Mel (power=1.0) initially
+ normalized=False,
+ center=True,
+ pad_mode="reflect"
+ )
+ self.mel_transforms.append(transform)
+
+ def forward(
+ self,
+ x_pred: torch.Tensor,
+ x_true: torch.Tensor,
+ frame_mask: torch.Tensor | None = None,
+ frame_lengths: torch.Tensor | None = None,
+ ):
+ """
+ Args:
+ x_pred: [B, T] or [B, 1, T] Estimated Waveform
+ x_true: [B, T] or [B, 1, T] Ground Truth Waveform
+ Returns:
+ Weighted scalar loss
+ """
+ # Ensure correct shape [B, T] for torchaudio, or [B, 1, T] is also fine but usually squeeze
+ if x_pred.ndim == 3 and x_pred.shape[1] == 1:
+ x_pred = x_pred.squeeze(1)
+ if x_true.ndim == 3 and x_true.shape[1] == 1:
+ x_true = x_true.squeeze(1)
+
+ total_loss = x_pred.new_tensor(0.0)
+
+ use_mask = frame_mask is not None
+ if use_mask:
+ span_starts, span_ends = self._get_span_bounds_from_mask(frame_mask, frame_lengths)
+ span_starts = span_starts.to(device=x_pred.device)
+ span_ends = span_ends.to(device=x_pred.device)
+
+ for mel_transform in self.mel_transforms:
+ x_mels = mel_transform(x_pred)
+ y_mels = mel_transform(x_true)
+
+ mel_mask = None
+ if use_mask:
+ hop = int(mel_transform.hop_length)
+ mel_t = x_mels.shape[-1]
+ mel_mask = torch.zeros(
+ (x_mels.shape[0], mel_t),
+ device=x_mels.device,
+ dtype=torch.bool,
+ )
+ for i in range(x_mels.shape[0]):
+ s = int(span_starts[i].item())
+ e = int(span_ends[i].item())
+ if e <= s:
+ continue
+ ms = s // hop
+ me = (e + hop - 1) // hop
+ ms = max(0, min(ms, mel_t))
+ me = max(0, min(me, mel_t))
+ if me > ms:
+ mel_mask[i, ms:me] = True
+
+ if not mel_mask.any():
+ continue
+
+ mel_mask = mel_mask.unsqueeze(1)
+
+ # Log Magnitude Loss
+ # Formula: L1( log10(x^pow + eps), log10(y^pow + eps) )
+ x_log = x_mels.clamp(min=self.clamp_eps).pow(self.pow).log10()
+ y_log = y_mels.clamp(min=self.clamp_eps).pow(self.pow).log10()
+
+ diff_full = (x_log - y_log).abs()
+
+ if mel_mask is None:
+ diff = diff_full.mean(dim=(1, 2))
+ else:
+ diff = []
+ for i in range(diff_full.shape[0]):
+ m = mel_mask[i]
+ if m.any():
+ diff.append(diff_full[i].masked_select(m).mean())
+ else:
+ diff.append(diff_full.new_tensor(0.0))
+ diff = torch.stack(diff, dim=0)
+
+ total_loss += diff.mean()
+
+ return total_loss * self.weight
+
+ @staticmethod
+ def _get_span_bounds_from_mask(mask: torch.Tensor, lengths: torch.Tensor | None = None) -> tuple[torch.Tensor, torch.Tensor]:
+ """Convert boolean frame mask [B, T] into per-sample [start, end) bounds.
+
+ This helper assumes one contiguous masked span per sample (matching current
+ random-span masking strategy). If a sample has no masked frame, start=end=0.
+ """
+ if mask.dtype != torch.bool:
+ mask = mask.bool()
+
+ bsz, t = mask.shape
+ device = mask.device
+
+ if lengths is None:
+ lengths = torch.full((bsz,), t, device=device, dtype=torch.long)
+ else:
+ lengths = lengths.to(device=device, dtype=torch.long)
+
+ starts = torch.zeros((bsz,), device=device, dtype=torch.long)
+ ends = torch.zeros((bsz,), device=device, dtype=torch.long)
+
+ for i in range(bsz):
+ li = int(lengths[i].item())
+ row = mask[i, :li]
+ idx = row.nonzero(as_tuple=False).squeeze(-1)
+ if idx.numel() == 0:
+ continue
+ starts[i] = idx[0]
+ ends[i] = idx[-1] + 1
+
+ return starts, ends
+
+ @staticmethod
+ def _aligned_random_span_mask(
+ lengths: torch.Tensor,
+ frac_lengths: torch.Tensor,
+ align_to: int,
+ max_length: int | None = None,
+ ) -> torch.Tensor:
+ """Sample one contiguous mask span per sample with boundary alignment.
+
+ Args:
+ lengths: [B] valid sequence lengths in model frames.
+ frac_lengths: [B] desired masked length fraction.
+ align_to: span start/end alignment in model frames.
+ max_length: optional mask width. If None, use lengths.max().
+ Returns:
+ bool mask with shape [B, max_length].
+ """
+ assert align_to >= 1
+ device = lengths.device
+ lengths = lengths.to(dtype=torch.long)
+ frac_lengths = frac_lengths.to(device=device, dtype=torch.float32)
+
+ max_len = int(lengths.max().item()) if max_length is None else int(max_length)
+ mask = torch.zeros((lengths.shape[0], max_len), device=device, dtype=torch.bool)
+
+ for i in range(lengths.shape[0]):
+ li = int(lengths[i].item())
+ if li <= 0:
+ continue
+
+ target = int((frac_lengths[i].item() * li))
+ target = max(1, min(target, li))
+
+ span_len = ((target + align_to - 1) // align_to) * align_to
+ span_len = min(span_len, li)
+
+ max_start = li - span_len
+ if max_start <= 0:
+ start = 0
+ else:
+ candidate = torch.randint(0, max_start + 1, (1,), device=device).item()
+ start = (candidate // align_to) * align_to
+ start = min(start, max_start)
+
+ end = start + span_len
+ mask[i, start:end] = True
+
+ return mask
diff --git a/src/wavtts/model/trainer.py b/src/wavtts/model/trainer.py
new file mode 100644
index 0000000000000000000000000000000000000000..b26164318fda0734aba2d098101c7c255ad04cf2
--- /dev/null
+++ b/src/wavtts/model/trainer.py
@@ -0,0 +1,487 @@
+from __future__ import annotations
+
+import gc
+import math
+import os
+
+import torch
+import torchaudio
+import wandb
+from accelerate import Accelerator
+from accelerate.utils import DistributedDataParallelKwargs
+from ema_pytorch import EMA
+from torch.optim import AdamW
+from torch.optim.lr_scheduler import LinearLR, SequentialLR
+from torch.utils.data import DataLoader, Dataset, SequentialSampler
+from tqdm import tqdm
+
+from wavtts.model import CFM
+from wavtts.model.dataset import DynamicBatchSampler, collate_fn
+from wavtts.model.utils import default, exists
+
+
+# trainer
+
+
+class Trainer:
+ @staticmethod
+ def _format_params_in_mb(count: int) -> str:
+ return f"{count / 1e6:,.3f}M / {count / 1e9:,.6f}B"
+
+ @staticmethod
+ def _count_model_params(model: torch.nn.Module) -> tuple[int, int, int]:
+ total = 0
+ trainable = 0
+ frozen = 0
+ for param in model.parameters():
+ numel = param.numel()
+ total += numel
+ if param.requires_grad:
+ trainable += numel
+ else:
+ frozen += numel
+ return total, trainable, frozen
+
+ def _print_model_param_summary(self, model: torch.nn.Module):
+ total, trainable, frozen = self._count_model_params(model)
+ trainable_ratio = (trainable / total * 100.0) if total > 0 else 0.0
+ frozen_ratio = (frozen / total * 100.0) if total > 0 else 0.0
+
+ table_width = 76
+ print("\n" + "=" * table_width)
+ print("Model Parameter Summary".center(table_width))
+ print("-" * table_width)
+ print(f"{'Type':<12}{'Count':>18}{'Scale (M / B)':>30}{'Ratio':>16}")
+ print("-" * table_width)
+ print(
+ f"{'Total':<12}{total:>18,}{self._format_params_in_mb(total):>30}{'100.00%':>16}"
+ )
+ print(
+ f"{'Trainable':<12}{trainable:>18,}{self._format_params_in_mb(trainable):>30}{f'{trainable_ratio:.2f}%':>16}"
+ )
+ print(
+ f"{'Frozen':<12}{frozen:>18,}{self._format_params_in_mb(frozen):>30}{f'{frozen_ratio:.2f}%':>16}"
+ )
+ print("=" * table_width)
+
+ def __init__(
+ self,
+ model: CFM,
+ epochs,
+ learning_rate,
+ num_warmup_updates=20000,
+ save_per_updates=1000,
+ keep_last_n_checkpoints: int = -1, # -1 to keep all, 0 to not save intermediate, > 0 to keep last N checkpoints
+ checkpoint_path=None,
+ batch_size_per_gpu=32,
+ batch_size_type: str = "sample",
+ max_samples=32,
+ grad_accumulation_steps=1,
+ max_grad_norm=1.0,
+ noise_scheduler: str | None = None,
+ duration_predictor: torch.nn.Module | None = None,
+ logger: str | None = "wandb", # "wandb" | "tensorboard" | None
+ wandb_project="test_wavtts",
+ wandb_run_name="test_run",
+ wandb_resume_id: str = None,
+ log_samples: bool = False,
+ last_per_updates=None,
+ accelerate_kwargs: dict = dict(),
+ ema_kwargs: dict = dict(),
+ bnb_optimizer: bool = False,
+ model_cfg_dict: dict = dict(), # training config
+ ):
+ ddp_kwargs = DistributedDataParallelKwargs(find_unused_parameters=True)
+
+ if logger == "wandb" and not wandb.api.api_key:
+ logger = None
+ self.log_samples = log_samples
+
+ self.accelerator = Accelerator(
+ log_with=logger if logger == "wandb" else None,
+ kwargs_handlers=[ddp_kwargs],
+ gradient_accumulation_steps=grad_accumulation_steps,
+ **accelerate_kwargs,
+ )
+
+ self.logger = logger
+ if self.logger == "wandb":
+ if exists(wandb_resume_id):
+ init_kwargs = {"wandb": {"resume": "allow", "name": wandb_run_name, "id": wandb_resume_id}}
+ else:
+ init_kwargs = {"wandb": {"resume": "allow", "name": wandb_run_name}}
+
+ if not model_cfg_dict:
+ model_cfg_dict = {
+ "epochs": epochs,
+ "learning_rate": learning_rate,
+ "num_warmup_updates": num_warmup_updates,
+ "batch_size_per_gpu": batch_size_per_gpu,
+ "batch_size_type": batch_size_type,
+ "max_samples": max_samples,
+ "grad_accumulation_steps": grad_accumulation_steps,
+ "max_grad_norm": max_grad_norm,
+ "noise_scheduler": noise_scheduler,
+ }
+ model_cfg_dict["gpus"] = self.accelerator.num_processes
+ self.accelerator.init_trackers(
+ project_name=wandb_project,
+ init_kwargs=init_kwargs,
+ config=model_cfg_dict,
+ )
+
+ elif self.logger == "tensorboard":
+ from torch.utils.tensorboard import SummaryWriter
+
+ self.writer = SummaryWriter(log_dir=f"runs/{wandb_run_name}")
+
+ self.model = model
+
+ if self.is_main:
+ self.ema_model = EMA(model, include_online_model=False, **ema_kwargs)
+ self.ema_model.to(self.accelerator.device)
+ self._print_model_param_summary(self.model)
+
+ print(f"Using logger: {logger}")
+ if grad_accumulation_steps > 1:
+ print(
+ "Gradient accumulation checkpointing with per_updates now, old logic per_steps used with before f992c4e"
+ )
+
+ self.epochs = epochs
+ self.num_warmup_updates = num_warmup_updates
+ self.save_per_updates = save_per_updates
+ self.keep_last_n_checkpoints = keep_last_n_checkpoints
+ self.last_per_updates = default(last_per_updates, save_per_updates)
+ self.checkpoint_path = default(checkpoint_path, "ckpts/test_wavtts")
+
+ self.batch_size_per_gpu = batch_size_per_gpu
+ self.batch_size_type = batch_size_type
+ self.max_samples = max_samples
+ self.grad_accumulation_steps = grad_accumulation_steps
+ self.max_grad_norm = max_grad_norm
+
+ self.noise_scheduler = noise_scheduler
+
+ self.duration_predictor = duration_predictor
+
+ if bnb_optimizer:
+ import bitsandbytes as bnb
+
+ self.optimizer = bnb.optim.AdamW8bit(model.parameters(), lr=learning_rate)
+ else:
+ self.optimizer = AdamW(model.parameters(), lr=learning_rate)
+ self.model, self.optimizer = self.accelerator.prepare(self.model, self.optimizer)
+
+ @property
+ def is_main(self):
+ return self.accelerator.is_main_process
+
+ def save_checkpoint(self, update, last=False):
+ self.accelerator.wait_for_everyone()
+ if self.is_main:
+ checkpoint = dict(
+ model_state_dict=self.accelerator.unwrap_model(self.model).state_dict(),
+ optimizer_state_dict=self.optimizer.state_dict(),
+ ema_model_state_dict=self.ema_model.state_dict(),
+ scheduler_state_dict=self.scheduler.state_dict(),
+ update=update,
+ )
+ if not os.path.exists(self.checkpoint_path):
+ os.makedirs(self.checkpoint_path)
+ if last:
+ self.accelerator.save(checkpoint, f"{self.checkpoint_path}/model_last.pt")
+ print(f"Saved last checkpoint at update {update}")
+ else:
+ if self.keep_last_n_checkpoints == 0:
+ return
+ self.accelerator.save(checkpoint, f"{self.checkpoint_path}/model_{update}.pt")
+ if self.keep_last_n_checkpoints > 0:
+ # Updated logic to exclude pretrained model from rotation
+ checkpoints = [
+ f
+ for f in os.listdir(self.checkpoint_path)
+ if f.startswith("model_")
+ and not f.startswith("pretrained_") # Exclude pretrained models
+ and f.endswith(".pt")
+ and f != "model_last.pt"
+ ]
+ checkpoints.sort(key=lambda x: int(x.split("_")[1].split(".")[0]))
+ while len(checkpoints) > self.keep_last_n_checkpoints:
+ oldest_checkpoint = checkpoints.pop(0)
+ os.remove(os.path.join(self.checkpoint_path, oldest_checkpoint))
+ print(f"Removed old checkpoint: {oldest_checkpoint}")
+
+ def load_checkpoint(self):
+ if (
+ not exists(self.checkpoint_path)
+ or not os.path.exists(self.checkpoint_path)
+ or not any(filename.endswith((".pt", ".safetensors")) for filename in os.listdir(self.checkpoint_path))
+ ):
+ return 0
+
+ self.accelerator.wait_for_everyone()
+ if "model_last.pt" in os.listdir(self.checkpoint_path):
+ latest_checkpoint = "model_last.pt"
+ else:
+ # Updated to consider pretrained models for loading but prioritize training checkpoints
+ all_checkpoints = [
+ f
+ for f in os.listdir(self.checkpoint_path)
+ if (f.startswith("model_") or f.startswith("pretrained_")) and f.endswith((".pt", ".safetensors"))
+ ]
+
+ # First try to find regular training checkpoints
+ training_checkpoints = [f for f in all_checkpoints if f.startswith("model_") and f != "model_last.pt"]
+ if training_checkpoints:
+ latest_checkpoint = sorted(
+ training_checkpoints,
+ key=lambda x: int("".join(filter(str.isdigit, x))),
+ )[-1]
+ else:
+ # If no training checkpoints, use pretrained model
+ latest_checkpoint = next(f for f in all_checkpoints if f.startswith("pretrained_"))
+
+ if latest_checkpoint.endswith(".safetensors"): # always a pretrained checkpoint
+ from safetensors.torch import load_file
+
+ checkpoint = load_file(f"{self.checkpoint_path}/{latest_checkpoint}", device="cpu")
+ checkpoint = {"ema_model_state_dict": checkpoint}
+ elif latest_checkpoint.endswith(".pt"):
+ # checkpoint = torch.load(f"{self.checkpoint_path}/{latest_checkpoint}", map_location=self.accelerator.device) # rather use accelerator.load_state ಥ_ಥ
+ checkpoint = torch.load(
+ f"{self.checkpoint_path}/{latest_checkpoint}", weights_only=True, map_location="cpu"
+ )
+
+ if self.is_main:
+ print("=" * 80)
+ print("Resume training: found checkpoint and loading state")
+ print(f"Checkpoint directory: {self.checkpoint_path}")
+ print(f"Checkpoint file: {latest_checkpoint}")
+ print("=" * 80)
+
+ if self.is_main:
+ self.ema_model.load_state_dict(checkpoint["ema_model_state_dict"])
+
+ if "update" in checkpoint or "step" in checkpoint:
+ # patch for backward compatibility, with before f992c4e
+ if "step" in checkpoint:
+ checkpoint["update"] = checkpoint["step"] // self.grad_accumulation_steps
+ if self.grad_accumulation_steps > 1 and self.is_main:
+ print(
+ "WavTTS WARNING: Loading checkpoint saved with per_steps logic (before f992c4e), will convert to per_updates according to grad_accumulation_steps setting, may have unexpected behaviour."
+ )
+ self.accelerator.unwrap_model(self.model).load_state_dict(checkpoint["model_state_dict"])
+ self.optimizer.load_state_dict(checkpoint["optimizer_state_dict"])
+ if self.scheduler:
+ self.scheduler.load_state_dict(checkpoint["scheduler_state_dict"])
+ update = checkpoint["update"]
+ if self.is_main:
+ print(f"Resume mode: full-state resume (model + optimizer + scheduler), update={update}")
+ else:
+ checkpoint["model_state_dict"] = {
+ k.replace("ema_model.", ""): v
+ for k, v in checkpoint["ema_model_state_dict"].items()
+ if k not in ["initted", "update", "step"]
+ }
+ self.accelerator.unwrap_model(self.model).load_state_dict(checkpoint["model_state_dict"])
+ update = 0
+ if self.is_main:
+ print("Resume mode: pretrained-weight init only, update=0")
+
+ del checkpoint
+ gc.collect()
+ return update
+
+ def train(self, train_dataset: Dataset, num_workers=16, resumable_with_seed: int = None):
+ if self.log_samples:
+ from wavtts.infer.utils_infer import cfg_strength, nfe_step, sway_sampling_coef
+
+ target_sample_rate = train_dataset.target_sample_rate
+ log_samples_path = f"{self.checkpoint_path}/samples"
+ os.makedirs(log_samples_path, exist_ok=True)
+
+ if exists(resumable_with_seed):
+ generator = torch.Generator()
+ generator.manual_seed(resumable_with_seed)
+ else:
+ generator = None
+
+ if self.batch_size_type == "sample":
+ train_dataloader = DataLoader(
+ train_dataset,
+ collate_fn=collate_fn,
+ num_workers=num_workers,
+ pin_memory=True,
+ persistent_workers=True,
+ batch_size=self.batch_size_per_gpu,
+ shuffle=True,
+ generator=generator,
+ )
+ elif self.batch_size_type == "frame":
+ self.accelerator.even_batches = False
+ sampler = SequentialSampler(train_dataset)
+ batch_sampler = DynamicBatchSampler(
+ sampler,
+ self.batch_size_per_gpu,
+ max_samples=self.max_samples,
+ random_seed=resumable_with_seed, # This enables reproducible shuffling
+ drop_residual=False,
+ )
+ train_dataloader = DataLoader(
+ train_dataset,
+ collate_fn=collate_fn,
+ num_workers=num_workers,
+ pin_memory=True,
+ persistent_workers=True,
+ batch_sampler=batch_sampler,
+ )
+ else:
+ raise ValueError(f"batch_size_type must be either 'sample' or 'frame', but received {self.batch_size_type}")
+
+ # accelerator.prepare() dispatches batches to devices;
+ # which means the length of dataloader calculated before, should consider the number of devices
+ warmup_updates = (
+ self.num_warmup_updates * self.accelerator.num_processes
+ ) # consider a fixed warmup steps while using accelerate multi-gpu ddp
+ # otherwise by default with split_batches=False, warmup steps change with num_processes
+ total_updates = math.ceil(len(train_dataloader) / self.grad_accumulation_steps) * self.epochs
+ decay_updates = total_updates - warmup_updates
+ warmup_scheduler = LinearLR(self.optimizer, start_factor=1e-8, end_factor=1.0, total_iters=warmup_updates)
+ decay_scheduler = LinearLR(self.optimizer, start_factor=1.0, end_factor=1e-8, total_iters=decay_updates)
+ self.scheduler = SequentialLR(
+ self.optimizer, schedulers=[warmup_scheduler, decay_scheduler], milestones=[warmup_updates]
+ )
+ train_dataloader, self.scheduler = self.accelerator.prepare(
+ train_dataloader, self.scheduler
+ ) # actual multi_gpu updates = single_gpu updates / gpu nums
+ start_update = self.load_checkpoint()
+ global_update = start_update
+
+ if exists(resumable_with_seed):
+ orig_epoch_step = len(train_dataloader)
+ start_step = start_update * self.grad_accumulation_steps
+ skipped_epoch = int(start_step // orig_epoch_step)
+ skipped_batch = start_step % orig_epoch_step
+ skipped_dataloader = self.accelerator.skip_first_batches(train_dataloader, num_batches=skipped_batch)
+ else:
+ skipped_epoch = 0
+
+ for epoch in range(skipped_epoch, self.epochs):
+ self.model.train()
+ if exists(resumable_with_seed) and epoch == skipped_epoch:
+ progress_bar_initial = math.ceil(skipped_batch / self.grad_accumulation_steps)
+ current_dataloader = skipped_dataloader
+ else:
+ progress_bar_initial = 0
+ current_dataloader = train_dataloader
+
+ # Set epoch for the batch sampler if it exists
+ if hasattr(train_dataloader, "batch_sampler") and hasattr(train_dataloader.batch_sampler, "set_epoch"):
+ train_dataloader.batch_sampler.set_epoch(epoch)
+
+ progress_bar = tqdm(
+ range(math.ceil(len(train_dataloader) / self.grad_accumulation_steps)),
+ desc=f"Epoch {epoch + 1}/{self.epochs}",
+ unit="update",
+ disable=not self.accelerator.is_local_main_process,
+ initial=progress_bar_initial,
+ )
+
+ for batch in current_dataloader:
+ with self.accelerator.accumulate(self.model):
+ text_inputs = batch["text"]
+ wav = batch["wav"]
+ wav_lengths = batch["wav_lengths"]
+ text_lengths = batch["text_lengths"]
+
+ # TODO. add duration predictor training
+ if self.duration_predictor is not None and self.accelerator.is_local_main_process:
+ dur_loss = self.duration_predictor(wav, lens=batch.get("durations"))
+ self.accelerator.log({"duration loss": dur_loss.item()}, step=global_update)
+
+ loss, cond, pred, loss_dict = self.model(
+ wav, text=text_inputs, lens=wav_lengths, noise_scheduler=self.noise_scheduler,
+ )
+ self.accelerator.backward(loss)
+
+ if self.max_grad_norm > 0 and self.accelerator.sync_gradients:
+ self.accelerator.clip_grad_norm_(self.model.parameters(), self.max_grad_norm)
+
+ self.optimizer.step()
+ self.scheduler.step()
+ self.optimizer.zero_grad()
+
+ if self.accelerator.sync_gradients:
+ if self.is_main:
+ self.ema_model.update()
+
+ global_update += 1
+ progress_bar.update(1)
+ progress_bar.set_postfix(
+ update=str(global_update),
+ aux_mel_loss=loss_dict["aux_mel_loss"].item(),
+ flow_loss=loss_dict["flow_loss"].item(),
+ loss=loss.item()
+ )
+
+ if self.accelerator.is_local_main_process:
+ self.accelerator.log(
+ {"loss": loss.item(), "lr": self.scheduler.get_last_lr()[0]}, step=global_update
+ )
+
+ if loss_dict["flow_loss"] is not None:
+ self.accelerator.log({"flow_loss": loss_dict["flow_loss"].item()}, step=global_update)
+ if loss_dict["aux_mel_loss"] is not None:
+ self.accelerator.log({"aux_mel_loss": loss_dict["aux_mel_loss"].item()}, step=global_update)
+
+ if self.logger == "tensorboard":
+ self.writer.add_scalar("loss", loss.item(), global_update)
+ self.writer.add_scalar("lr", self.scheduler.get_last_lr()[0], global_update)
+ if loss_dict["flow_loss"] is not None:
+ self.writer.add_scalar("flow_loss", loss_dict["flow_loss"].item(), global_update)
+ if loss_dict["aux_mel_loss"] is not None:
+ self.writer.add_scalar("aux_mel_loss", loss_dict["aux_mel_loss"].item(), global_update)
+
+ if global_update % self.last_per_updates == 0 and self.accelerator.sync_gradients:
+ self.save_checkpoint(global_update, last=True)
+
+ if global_update % self.save_per_updates == 0 and self.accelerator.sync_gradients:
+ self.save_checkpoint(global_update)
+
+ if self.log_samples and self.accelerator.is_local_main_process:
+ unwrap = self.accelerator.unwrap_model(self.model)
+
+ infer_text = [
+ text_inputs[0] + ([" "] if isinstance(text_inputs[0], list) else " ") + text_inputs[0]
+ ]
+
+ with torch.inference_mode():
+ ref_wav_len = wav_lengths[0].item()
+ ref_wav = wav[0][:ref_wav_len].unsqueeze(0).to(self.accelerator.device) # [1, N]
+
+ generated, _ = unwrap.sample(
+ cond=ref_wav, # [1, N]
+ text=infer_text,
+ duration=ref_wav_len * 2,
+ steps=nfe_step,
+ cfg_strength=cfg_strength,
+ sway_sampling_coef=sway_sampling_coef,
+ )
+ generated = generated.to(torch.float32).cpu() # [1, N_total]
+
+ cut = ref_wav_len
+ gen_audio = generated[:, cut:] # [1, N_gen]
+ ref_audio = ref_wav.cpu() # [1, N_ref]
+
+ torchaudio.save(
+ f"{log_samples_path}/update_{global_update}_gen.wav", gen_audio, target_sample_rate
+ )
+ torchaudio.save(
+ f"{log_samples_path}/update_{global_update}_ref.wav", ref_audio, target_sample_rate
+ )
+ self.model.train()
+
+ self.save_checkpoint(global_update, last=True)
+
+ self.accelerator.end_training()
diff --git a/src/wavtts/model/utils.py b/src/wavtts/model/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..f69e6e1542cb6af4b2663ea463bc7bd341881996
--- /dev/null
+++ b/src/wavtts/model/utils.py
@@ -0,0 +1,221 @@
+# ruff: noqa: F722 F821
+
+from __future__ import annotations
+
+import os
+import random
+from collections import defaultdict
+from importlib.resources import files
+
+import rjieba
+import torch
+from pypinyin import Style, lazy_pinyin
+from torch.nn.utils.rnn import pad_sequence
+
+
+# seed everything
+
+
+def seed_everything(seed=0):
+ random.seed(seed)
+ os.environ["PYTHONHASHSEED"] = str(seed)
+ torch.manual_seed(seed)
+ torch.cuda.manual_seed(seed)
+ torch.cuda.manual_seed_all(seed)
+ torch.backends.cudnn.deterministic = True
+ torch.backends.cudnn.benchmark = False
+
+
+# helpers
+
+
+def exists(v):
+ return v is not None
+
+
+def default(v, d):
+ return v if exists(v) else d
+
+
+def is_package_available(package_name: str) -> bool:
+ try:
+ import importlib
+
+ package_exists = importlib.util.find_spec(package_name) is not None
+ return package_exists
+ except Exception:
+ return False
+
+
+# tensor helpers
+
+
+def lens_to_mask(t: int["b"], length: int | None = None) -> bool["b n"]:
+ if not exists(length):
+ length = t.amax()
+
+ seq = torch.arange(length, device=t.device)
+ return seq[None, :] < t[:, None]
+
+
+def mask_from_start_end_indices(seq_len: int["b"], start: int["b"], end: int["b"]):
+ max_seq_len = seq_len.max().item()
+ seq = torch.arange(max_seq_len, device=start.device).long()
+ start_mask = seq[None, :] >= start[:, None]
+ end_mask = seq[None, :] < end[:, None]
+ return start_mask & end_mask
+
+
+def mask_from_frac_lengths(seq_len: int["b"], frac_lengths: float["b"]):
+ lengths = (frac_lengths * seq_len).long()
+ max_start = seq_len - lengths
+
+ rand = torch.rand_like(frac_lengths)
+ start = (max_start * rand).long().clamp(min=0)
+ end = start + lengths
+
+ return mask_from_start_end_indices(seq_len, start, end)
+
+
+def maybe_masked_mean(t: float["b n d"], mask: bool["b n"] = None) -> float["b d"]:
+ if not exists(mask):
+ return t.mean(dim=1)
+
+ t = torch.where(mask[:, :, None], t, torch.tensor(0.0, device=t.device))
+ num = t.sum(dim=1)
+ den = mask.float().sum(dim=1)
+
+ return num / den.clamp(min=1.0)
+
+
+# simple utf-8 tokenizer, since paper went character based
+def list_str_to_tensor(text: list[str], padding_value=-1) -> int["b nt"]:
+ list_tensors = [torch.tensor([*bytes(t, "UTF-8")]) for t in text] # ByT5 style
+ text = pad_sequence(list_tensors, padding_value=padding_value, batch_first=True)
+ return text
+
+
+# char tokenizer, based on custom dataset's extracted .txt file
+def list_str_to_idx(
+ text: list[str] | list[list[str]],
+ vocab_char_map: dict[str, int], # {char: idx}
+ padding_value=-1,
+) -> int["b nt"]:
+ list_idx_tensors = [torch.tensor([vocab_char_map.get(c, 0) for c in t]) for t in text] # pinyin or char style
+ text = pad_sequence(list_idx_tensors, padding_value=padding_value, batch_first=True)
+ return text
+
+
+# Get tokenizer
+
+
+def get_tokenizer(dataset_name, tokenizer: str = "pinyin"):
+ """
+ tokenizer - "pinyin" do g2p for only chinese characters, need .txt vocab_file
+ - "char" for char-wise tokenizer, need .txt vocab_file
+ - "byte" for utf-8 tokenizer
+ - "custom" if you're directly passing in a path to the vocab.txt you want to use
+ vocab_size - if use "pinyin", all available pinyin types, common alphabets (also those with accent) and symbols
+ - if use "char", derived from unfiltered character & symbol counts of custom dataset
+ - if use "byte", set to 256 (unicode byte range)
+ """
+ if tokenizer in ["pinyin", "char"]:
+ tokenizer_path = os.path.join(files("wavtts").joinpath("../../data"), f"{dataset_name}_{tokenizer}/vocab.txt")
+ with open(tokenizer_path, "r", encoding="utf-8") as f:
+ vocab_char_map = {}
+ for i, char in enumerate(f):
+ vocab_char_map[char[:-1]] = i
+ vocab_size = len(vocab_char_map)
+ assert vocab_char_map[" "] == 0, "make sure space is of idx 0 in vocab.txt, cuz 0 is used for unknown char"
+
+ elif tokenizer == "byte":
+ vocab_char_map = None
+ vocab_size = 256
+
+ elif tokenizer == "custom":
+ with open(dataset_name, "r", encoding="utf-8") as f:
+ vocab_char_map = {}
+ for i, char in enumerate(f):
+ vocab_char_map[char[:-1]] = i
+ vocab_size = len(vocab_char_map)
+
+ return vocab_char_map, vocab_size
+
+
+# convert char to pinyin
+
+
+def convert_char_to_pinyin(text_list, polyphone=True):
+ final_text_list = []
+ custom_trans = str.maketrans(
+ {";": ",", "“": '"', "”": '"', "‘": "'", "’": "'"}
+ ) # add custom trans here, to address oov
+
+ def is_chinese(c):
+ return (
+ "\u3100" <= c <= "\u9fff" # common chinese characters
+ )
+
+ for text in text_list:
+ char_list = []
+ text = text.translate(custom_trans)
+ for seg in rjieba.cut(text):
+ seg_byte_len = len(bytes(seg, "UTF-8"))
+ if seg_byte_len == len(seg): # if pure alphabets and symbols
+ if char_list and seg_byte_len > 1 and char_list[-1] not in " :'\"":
+ char_list.append(" ")
+ char_list.extend(seg)
+ elif polyphone and seg_byte_len == 3 * len(seg): # if pure east asian characters
+ seg_ = lazy_pinyin(seg, style=Style.TONE3, tone_sandhi=True)
+ for i, c in enumerate(seg):
+ if is_chinese(c):
+ char_list.append(" ")
+ char_list.append(seg_[i])
+ else: # if mixed characters, alphabets and symbols
+ for c in seg:
+ if ord(c) < 256:
+ char_list.extend(c)
+ elif is_chinese(c):
+ char_list.append(" ")
+ char_list.extend(lazy_pinyin(c, style=Style.TONE3, tone_sandhi=True))
+ else:
+ char_list.append(c)
+ final_text_list.append(char_list)
+
+ return final_text_list
+
+
+# filter func for dirty data with many repetitions
+
+
+def repetition_found(text, length=2, tolerance=10):
+ pattern_count = defaultdict(int)
+ for i in range(len(text) - length + 1):
+ pattern = text[i : i + length]
+ pattern_count[pattern] += 1
+ for pattern, count in pattern_count.items():
+ if count > tolerance:
+ return True
+ return False
+
+
+# get the empirically pruned step for sampling
+
+
+def get_epss_timesteps(n, device, dtype):
+ dt = 1 / 32
+ predefined_timesteps = {
+ 5: [0, 2, 4, 8, 16, 32],
+ 6: [0, 2, 4, 6, 8, 16, 32],
+ 7: [0, 2, 4, 6, 8, 16, 24, 32],
+ 10: [0, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32],
+ 12: [0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32],
+ 16: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32],
+ }
+ t = predefined_timesteps.get(n, [])
+ if not t:
+ return torch.linspace(0, 1, n + 1, device=device, dtype=dtype)
+ return dt * torch.tensor(t, device=device, dtype=dtype)
+
+def masked_mean(x, mask):
+ return (x * mask).sum() / mask.sum()
diff --git a/src/wavtts/scripts/count_max_epoch.py b/src/wavtts/scripts/count_max_epoch.py
new file mode 100644
index 0000000000000000000000000000000000000000..60c1812abd7f44231123fe7501f4d49e026abd95
--- /dev/null
+++ b/src/wavtts/scripts/count_max_epoch.py
@@ -0,0 +1,33 @@
+"""ADAPTIVE BATCH SIZE"""
+
+print("Adaptive batch size: using grouping batch sampler, frames_per_gpu fixed fed in")
+print(" -> least padding, gather wavs with accumulated frames in a batch\n")
+
+# data
+total_hours = 95282
+wav_frame_len = 160
+target_sample_rate = 16000
+
+# target
+wanted_max_updates = 1200000
+
+# train params
+gpus = 8
+frames_per_gpu = 38400 # 8 * 38400 = 307200
+grad_accum = 1
+
+# intermediate
+mini_batch_frames = frames_per_gpu * grad_accum * gpus
+mini_batch_hours = mini_batch_frames * wav_frame_len / target_sample_rate / 3600
+updates_per_epoch = total_hours / mini_batch_hours
+# steps_per_epoch = updates_per_epoch * grad_accum
+
+# result
+epochs = wanted_max_updates / updates_per_epoch
+print(f"epochs should be set to: {epochs:.0f} ({epochs / grad_accum:.1f} x gd_acum {grad_accum})")
+print(f"progress_bar should show approx. 0/{updates_per_epoch:.0f} updates")
+# print(f" or approx. 0/{steps_per_epoch:.0f} steps")
+
+# others
+print(f"total {total_hours:.0f} hours")
+print(f"mini-batch of {mini_batch_frames:.0f} frames, {mini_batch_hours:.2f} hours per mini-batch")
diff --git a/src/wavtts/scripts/count_max_epoch_precise.py b/src/wavtts/scripts/count_max_epoch_precise.py
new file mode 100644
index 0000000000000000000000000000000000000000..f954e2877cabdcc93170c34bfa04d85d5f8bbe0a
--- /dev/null
+++ b/src/wavtts/scripts/count_max_epoch_precise.py
@@ -0,0 +1,32 @@
+import math
+
+from torch.utils.data import SequentialSampler
+
+from wavtts.model.dataset import DynamicBatchSampler, load_dataset
+
+
+train_dataset = load_dataset("Emilia_ZH_EN", "pinyin")
+sampler = SequentialSampler(train_dataset)
+
+gpus = 8
+batch_size_per_gpu = 38400
+max_samples_per_gpu = 64
+max_updates = 1250000
+
+batch_sampler = DynamicBatchSampler(
+ sampler,
+ batch_size_per_gpu,
+ max_samples=max_samples_per_gpu,
+ random_seed=666,
+ drop_residual=False,
+)
+
+print(
+ f"One epoch has {len(batch_sampler) / gpus} updates if gpus={gpus}, with "
+ f"batch_size_per_gpu={batch_size_per_gpu} (frames) & "
+ f"max_samples_per_gpu={max_samples_per_gpu}."
+)
+print(
+ f"If gpus={gpus}, for max_updates={max_updates} "
+ f"should set epoch={math.ceil(max_updates / len(batch_sampler) * gpus)}."
+)
diff --git a/src/wavtts/scripts/count_params_gflops.py b/src/wavtts/scripts/count_params_gflops.py
new file mode 100644
index 0000000000000000000000000000000000000000..0cf2dadd972bdc39efdf375edd94a2ba64401eb3
--- /dev/null
+++ b/src/wavtts/scripts/count_params_gflops.py
@@ -0,0 +1,36 @@
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import thop
+import torch
+
+from wavtts.model import CFM, DiT
+
+
+""" ~155M """
+# transformer = DiT(dim = 768, depth = 18, heads = 12, ff_mult = 2)
+# transformer = DiT(dim = 768, depth = 18, heads = 12, ff_mult = 2, text_dim = 512, conv_layers = 4)
+# transformer = DiT(dim = 768, depth = 18, heads = 12, ff_mult = 2, text_dim = 512, conv_layers = 4, long_skip_connection = True)
+# transformer = MMDiT(dim = 512, depth = 16, heads = 16, ff_mult = 2)
+
+""" ~335M """
+# FLOPs: 622.1 G, Params: 333.2 M
+# FLOPs: 363.4 G, Params: 335.8 M
+transformer = DiT(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)
+
+
+model = CFM(transformer=transformer)
+target_sample_rate = 16000
+wav_frame_len = 160
+duration = 20
+frame_length = int(duration * target_sample_rate / wav_frame_len)
+text_length = 150
+
+flops, params = thop.profile(
+ model, inputs=(torch.randn(1, frame_length, wav_frame_len), torch.zeros(1, text_length, dtype=torch.long))
+)
+print(f"FLOPs: {flops / 1e9} G")
+print(f"Params: {params / 1e6} M")
diff --git a/src/wavtts/train/README.md b/src/wavtts/train/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..73b75658a26c5f78b9ec3dd5b5d00326bd5c018e
--- /dev/null
+++ b/src/wavtts/train/README.md
@@ -0,0 +1,95 @@
+# Training
+
+> **💡 Note:** The training pipeline is consistent with [F5-TTS](https://github.com/SWivid/F5-TTS). If you encounter any issues during data preparation or training, we highly recommend checking the original F5-TTS repository's documentation and issue tracker first.
+
+## 0. Prerequisites
+
+Ensure FFmpeg is installed on your system. You can verify your installation by running:
+
+```bash
+ffmpeg -version
+```
+
+*(If FFmpeg is not found, please install it using your system's package manager, or ensure you have an alternative audio backend available.)*
+
+## 1. Prepare Dataset
+
+We provide example data processing scripts for several open-source datasets. You can adapt these scripts for your own data or customize the `Dataset` class in `src/wavtts/model/dataset.py`.
+
+### A. Pre-built Dataset Scripts
+Before running these scripts, please download the corresponding dataset and update the data paths within the script.
+
+```bash
+# Prepare the Emilia dataset (Primary dataset for WavTTS)
+python src/wavtts/train/datasets/prepare_emilia.py
+
+# Prepare the Wenetspeech4TTS dataset
+python src/wavtts/train/datasets/prepare_wenetspeech4tts.py
+
+# Prepare the LibriTTS dataset
+python src/wavtts/train/datasets/prepare_libritts.py
+
+# Prepare the LJSpeech dataset
+python src/wavtts/train/datasets/prepare_ljspeech.py
+```
+
+### B. Custom Dataset via Metadata (CSV)
+
+If you are using a custom dataset, you can format it with a `metadata.csv` file. For detailed guidance, see [this discussion thread (#57)](https://github.com/SWivid/F5-TTS/discussions/57#discussioncomment-10959029).
+
+```bash
+python src/wavtts/train/datasets/prepare_csv_wavs.py
+```
+
+## 2. Training & Fine-Tuning
+
+Once your dataset is ready, you can launch the training process using Hugging Face Accelerate.
+
+### A. Training from Scratch / Pre-training
+
+```bash
+# 1. Setup accelerate config (e.g., multi-GPU DDP, mixed precision)
+# This generates a config file at ~/.cache/huggingface/accelerate/default_config.yaml
+accelerate config
+
+# 2. Launch training
+# YAML configuration files are located under the src/wavtts/configs/ directory.
+accelerate launch src/wavtts/train/train.py --config-name WavTTS.yaml
+
+# Example with inline overrides:
+accelerate launch --mixed_precision=bf16 src/wavtts/train/train.py \
+ --config-name WavTTS.yaml \
+ ++datasets.batch_size_per_gpu=19200
+```
+
+### B. Fine-Tuning
+For community best practices on fine-tuning, please refer to the [Finetuning Discussion Board (#57)](https://github.com/SWivid/F5-TTS/discussions/57).
+
+The `use_ema = True` might be harmful for early-stage fine-tuned checkpoints. Because the model undergoes very few updates initially, the EMA weights remain heavily dominated by the pre-trained weights, masking your fine-tuning progress. Try turning it off by setting `load_model(..., use_ema=False)` during inference to see if it yields better results.
+
+*(Optional: If you use TensorBoard for logging, ensure it is installed via `pip install tensorboard`.)*
+
+
+## 3. Logging with Weights & Biases (W&B)
+
+By default, the training script does **not** log metrics to W&B unless you are authenticated. A local `wandb/` directory will be created in the path where you run the training script.
+
+To enable W&B logging, choose one of the following methods:
+
+**Method 1: Interactive Login**
+Log in via the CLI (Learn more [here](https://docs.wandb.ai/ref/cli/wandb-login)):
+```bash
+wandb login
+```
+
+**Method 2: Environment Variable**
+Get your API key from [https://wandb.ai/authorize](https://wandb.ai/authorize) and export it:
+```bash
+export WANDB_API_KEY=""
+```
+
+**Method 3: Offline Mode**
+If your training server lacks internet access and you want to log metrics locally for later syncing:
+```bash
+export WANDB_MODE=offline
+```
diff --git a/src/wavtts/train/datasets/prepare_csv_wavs.py b/src/wavtts/train/datasets/prepare_csv_wavs.py
new file mode 100644
index 0000000000000000000000000000000000000000..d95dac59bdb975b55c118422813ff6034b60aa95
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_csv_wavs.py
@@ -0,0 +1,283 @@
+import concurrent.futures
+import multiprocessing
+import os
+import shutil
+import signal
+import subprocess # For invoking ffprobe
+import sys
+from contextlib import contextmanager
+
+
+sys.path.append(os.getcwd())
+
+import argparse
+import csv
+import json
+from importlib.resources import files
+from pathlib import Path
+
+import torchaudio
+from datasets.arrow_writer import ArrowWriter
+from tqdm import tqdm
+
+from wavtts.model.utils import convert_char_to_pinyin
+
+
+PRETRAINED_VOCAB_PATH = files("wavtts").joinpath("../../data/Emilia_ZH_EN_pinyin/vocab.txt")
+
+
+def is_csv_wavs_format(input_dataset_dir):
+ fpath = Path(input_dataset_dir)
+ metadata = fpath / "metadata.csv"
+ wavs = fpath / "wavs"
+ return metadata.exists() and metadata.is_file() and wavs.exists() and wavs.is_dir()
+
+
+# Configuration constants
+BATCH_SIZE = 100 # Batch size for text conversion
+MAX_WORKERS = max(1, multiprocessing.cpu_count() - 1) # Leave one CPU free
+THREAD_NAME_PREFIX = "AudioProcessor"
+CHUNK_SIZE = 100 # Number of files to process per worker batch
+
+executor = None # Global executor for cleanup
+
+
+@contextmanager
+def graceful_exit():
+ """Context manager for graceful shutdown on signals"""
+
+ def signal_handler(signum, frame):
+ print("\nReceived signal to terminate. Cleaning up...")
+ if executor is not None:
+ print("Shutting down executor...")
+ executor.shutdown(wait=False, cancel_futures=True)
+ sys.exit(1)
+
+ # Set up signal handlers
+ signal.signal(signal.SIGINT, signal_handler)
+ signal.signal(signal.SIGTERM, signal_handler)
+
+ try:
+ yield
+ finally:
+ if executor is not None:
+ executor.shutdown(wait=False)
+
+
+def process_audio_file(audio_path, text, polyphone):
+ """Process a single audio file by checking its existence and extracting duration."""
+ if not Path(audio_path).exists():
+ print(f"audio {audio_path} not found, skipping")
+ return None
+ try:
+ audio_duration = get_audio_duration(audio_path)
+ if audio_duration <= 0:
+ raise ValueError(f"Duration {audio_duration} is non-positive.")
+ return (audio_path, text, audio_duration)
+ except Exception as e:
+ print(f"Warning: Failed to process {audio_path} due to error: {e}. Skipping corrupt file.")
+ return None
+
+
+def batch_convert_texts(texts, polyphone, batch_size=BATCH_SIZE):
+ """Convert a list of texts to pinyin in batches."""
+ converted_texts = []
+ for i in range(0, len(texts), batch_size):
+ batch = texts[i : i + batch_size]
+ converted_batch = convert_char_to_pinyin(batch, polyphone=polyphone)
+ converted_texts.extend(converted_batch)
+ return converted_texts
+
+
+def prepare_csv_wavs_dir(input_dir, num_workers=None):
+ global executor
+ assert is_csv_wavs_format(input_dir), f"not csv_wavs format: {input_dir}"
+ input_dir = Path(input_dir)
+ metadata_path = input_dir / "metadata.csv"
+ audio_path_text_pairs = read_audio_text_pairs(metadata_path.as_posix())
+
+ polyphone = True
+ total_files = len(audio_path_text_pairs)
+
+ # Use provided worker count or calculate optimal number
+ worker_count = num_workers if num_workers is not None else min(MAX_WORKERS, total_files)
+ print(f"\nProcessing {total_files} audio files using {worker_count} workers...")
+
+ with graceful_exit():
+ # Initialize thread pool with optimized settings
+ with concurrent.futures.ThreadPoolExecutor(
+ max_workers=worker_count, thread_name_prefix=THREAD_NAME_PREFIX
+ ) as exec:
+ executor = exec
+ results = []
+
+ # Process files in chunks for better efficiency
+ for i in range(0, len(audio_path_text_pairs), CHUNK_SIZE):
+ chunk = audio_path_text_pairs[i : i + CHUNK_SIZE]
+ # Submit futures in order
+ chunk_futures = [executor.submit(process_audio_file, pair[0], pair[1], polyphone) for pair in chunk]
+
+ # Iterate over futures in the original submission order to preserve ordering
+ for future in tqdm(
+ chunk_futures,
+ total=len(chunk),
+ desc=f"Processing chunk {i // CHUNK_SIZE + 1}/{(total_files + CHUNK_SIZE - 1) // CHUNK_SIZE}",
+ ):
+ try:
+ result = future.result()
+ if result is not None:
+ results.append(result)
+ except Exception as e:
+ print(f"Error processing file: {e}")
+
+ executor = None
+
+ # Filter out failed results
+ processed = [res for res in results if res is not None]
+ if not processed:
+ raise RuntimeError("No valid audio files were processed!")
+
+ # Batch process text conversion
+ raw_texts = [item[1] for item in processed]
+ converted_texts = batch_convert_texts(raw_texts, polyphone, batch_size=BATCH_SIZE)
+
+ # Prepare final results
+ sub_result = []
+ durations = []
+ vocab_set = set()
+
+ for (audio_path, _, duration), conv_text in zip(processed, converted_texts):
+ sub_result.append({"audio_path": audio_path, "text": conv_text, "duration": duration})
+ durations.append(duration)
+ vocab_set.update(list(conv_text))
+
+ return sub_result, durations, vocab_set
+
+
+def get_audio_duration(audio_path, timeout=5):
+ """
+ Get the duration of an audio file in seconds using ffmpeg's ffprobe.
+ Falls back to torchaudio.load() if ffprobe fails.
+ """
+ try:
+ cmd = [
+ "ffprobe",
+ "-v",
+ "error",
+ "-show_entries",
+ "format=duration",
+ "-of",
+ "default=noprint_wrappers=1:nokey=1",
+ audio_path,
+ ]
+ result = subprocess.run(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True, timeout=timeout
+ )
+ duration_str = result.stdout.strip()
+ if duration_str:
+ return float(duration_str)
+ raise ValueError("Empty duration string from ffprobe.")
+ except (subprocess.TimeoutExpired, subprocess.SubprocessError, ValueError) as e:
+ print(f"Warning: ffprobe failed for {audio_path} with error: {e}. Falling back to torchaudio.")
+ try:
+ audio, sample_rate = torchaudio.load(audio_path)
+ return audio.shape[1] / sample_rate
+ except Exception as e:
+ raise RuntimeError(f"Both ffprobe and torchaudio failed for {audio_path}: {e}")
+
+
+def read_audio_text_pairs(csv_file_path):
+ audio_text_pairs = []
+
+ parent = Path(csv_file_path).parent
+ with open(csv_file_path, mode="r", newline="", encoding="utf-8-sig") as csvfile:
+ reader = csv.reader(csvfile, delimiter="|")
+ next(reader) # Skip the header row
+ for row in reader:
+ if len(row) >= 2:
+ audio_file = row[0].strip() # First column: audio file path
+ text = row[1].strip() # Second column: text
+ audio_file_path = parent / audio_file
+ audio_text_pairs.append((audio_file_path.as_posix(), text))
+
+ return audio_text_pairs
+
+
+def save_prepped_dataset(out_dir, result, duration_list, text_vocab_set, is_finetune):
+ out_dir = Path(out_dir)
+ out_dir.mkdir(exist_ok=True, parents=True)
+ print(f"\nSaving to {out_dir} ...")
+
+ raw_arrow_path = out_dir / "raw.arrow"
+ with ArrowWriter(path=raw_arrow_path.as_posix()) as writer:
+ for line in tqdm(result, desc="Writing to raw.arrow ..."):
+ writer.write(line)
+ writer.finalize()
+
+ # Save durations to JSON
+ dur_json_path = out_dir / "duration.json"
+ with open(dur_json_path.as_posix(), "w", encoding="utf-8") as f:
+ json.dump({"duration": duration_list}, f, ensure_ascii=False)
+
+ # Handle vocab file - write only once based on finetune flag
+ voca_out_path = out_dir / "vocab.txt"
+ if is_finetune:
+ file_vocab_finetune = PRETRAINED_VOCAB_PATH.as_posix()
+ shutil.copy2(file_vocab_finetune, voca_out_path)
+ else:
+ with open(voca_out_path.as_posix(), "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+
+ dataset_name = out_dir.stem
+ print(f"\nFor {dataset_name}, sample count: {len(result)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}")
+ print(f"For {dataset_name}, total {sum(duration_list) / 3600:.2f} hours")
+
+
+def prepare_and_save_set(inp_dir, out_dir, is_finetune: bool = True, num_workers: int = None):
+ if is_finetune:
+ assert PRETRAINED_VOCAB_PATH.exists(), f"pretrained vocab.txt not found: {PRETRAINED_VOCAB_PATH}"
+ sub_result, durations, vocab_set = prepare_csv_wavs_dir(inp_dir, num_workers=num_workers)
+ save_prepped_dataset(out_dir, sub_result, durations, vocab_set, is_finetune)
+
+
+def cli():
+ try:
+ # Before processing, check if ffprobe is available.
+ if shutil.which("ffprobe") is None:
+ print(
+ "Warning: ffprobe is not available. Duration extraction will rely on torchaudio (which may be slower)."
+ )
+
+ # Usage examples in help text
+ parser = argparse.ArgumentParser(
+ description="Prepare and save dataset.",
+ epilog="""
+Examples:
+ # For fine-tuning (default):
+ python prepare_csv_wavs.py /input/dataset/path /output/dataset/path
+
+ # For pre-training:
+ python prepare_csv_wavs.py /input/dataset/path /output/dataset/path --pretrain
+
+ # With custom worker count:
+ python prepare_csv_wavs.py /input/dataset/path /output/dataset/path --workers 4
+ """,
+ )
+ parser.add_argument("inp_dir", type=str, help="Input directory containing the data.")
+ parser.add_argument("out_dir", type=str, help="Output directory to save the prepared data.")
+ parser.add_argument("--pretrain", action="store_true", help="Enable for new pretrain, otherwise is a fine-tune")
+ parser.add_argument("--workers", type=int, help=f"Number of worker threads (default: {MAX_WORKERS})")
+ args = parser.parse_args()
+
+ prepare_and_save_set(args.inp_dir, args.out_dir, is_finetune=not args.pretrain, num_workers=args.workers)
+ except KeyboardInterrupt:
+ print("\nOperation cancelled by user. Cleaning up...")
+ if executor is not None:
+ executor.shutdown(wait=False, cancel_futures=True)
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ cli()
diff --git a/src/wavtts/train/datasets/prepare_emilia.py b/src/wavtts/train/datasets/prepare_emilia.py
new file mode 100644
index 0000000000000000000000000000000000000000..b089ea01c57d682817bccee2771f327fc65ada2d
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_emilia.py
@@ -0,0 +1,260 @@
+# Emilia Dataset: https://huggingface.co/datasets/amphion/Emilia-Dataset/tree/fc71e07
+# if use updated new version, i.e. WebDataset, feel free to modify / draft your own script
+
+# generate audio text map for Emilia ZH & EN
+# evaluate for vocab size
+
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import json
+from concurrent.futures import ProcessPoolExecutor
+from importlib.resources import files
+from pathlib import Path
+
+from datasets.arrow_writer import ArrowWriter
+from tqdm import tqdm
+
+from wavtts.model.utils import convert_char_to_pinyin, repetition_found
+
+
+out_zh = {
+ "ZH_B00041_S06226",
+ "ZH_B00042_S09204",
+ "ZH_B00065_S09430",
+ "ZH_B00065_S09431",
+ "ZH_B00066_S09327",
+ "ZH_B00066_S09328",
+}
+zh_filters = ["い", "て"]
+# seems synthesized audios, or heavily code-switched
+out_en = {
+ "EN_B00013_S00913",
+ "EN_B00042_S00120",
+ "EN_B00055_S04111",
+ "EN_B00061_S00693",
+ "EN_B00061_S01494",
+ "EN_B00061_S03375",
+ "EN_B00059_S00092",
+ "EN_B00111_S04300",
+ "EN_B00100_S03759",
+ "EN_B00087_S03811",
+ "EN_B00059_S00950",
+ "EN_B00089_S00946",
+ "EN_B00078_S05127",
+ "EN_B00070_S04089",
+ "EN_B00074_S09659",
+ "EN_B00061_S06983",
+ "EN_B00061_S07060",
+ "EN_B00059_S08397",
+ "EN_B00082_S06192",
+ "EN_B00091_S01238",
+ "EN_B00089_S07349",
+ "EN_B00070_S04343",
+ "EN_B00061_S02400",
+ "EN_B00076_S01262",
+ "EN_B00068_S06467",
+ "EN_B00076_S02943",
+ "EN_B00064_S05954",
+ "EN_B00061_S05386",
+ "EN_B00066_S06544",
+ "EN_B00076_S06944",
+ "EN_B00072_S08620",
+ "EN_B00076_S07135",
+ "EN_B00076_S09127",
+ "EN_B00065_S00497",
+ "EN_B00059_S06227",
+ "EN_B00063_S02859",
+ "EN_B00075_S01547",
+ "EN_B00061_S08286",
+ "EN_B00079_S02901",
+ "EN_B00092_S03643",
+ "EN_B00096_S08653",
+ "EN_B00063_S04297",
+ "EN_B00063_S04614",
+ "EN_B00079_S04698",
+ "EN_B00104_S01666",
+ "EN_B00061_S09504",
+ "EN_B00061_S09694",
+ "EN_B00065_S05444",
+ "EN_B00063_S06860",
+ "EN_B00065_S05725",
+ "EN_B00069_S07628",
+ "EN_B00083_S03875",
+ "EN_B00071_S07665",
+ "EN_B00071_S07665",
+ "EN_B00062_S04187",
+ "EN_B00065_S09873",
+ "EN_B00065_S09922",
+ "EN_B00084_S02463",
+ "EN_B00067_S05066",
+ "EN_B00106_S08060",
+ "EN_B00073_S06399",
+ "EN_B00073_S09236",
+ "EN_B00087_S00432",
+ "EN_B00085_S05618",
+ "EN_B00064_S01262",
+ "EN_B00072_S01739",
+ "EN_B00059_S03913",
+ "EN_B00069_S04036",
+ "EN_B00067_S05623",
+ "EN_B00060_S05389",
+ "EN_B00060_S07290",
+ "EN_B00062_S08995",
+}
+en_filters = ["ا", "い", "て"]
+
+
+def _iter_metadata_objs(audio_dir: Path):
+ """
+ Support both Emilia legacy layout (one shard-level .jsonl) and
+ per-utterance json layout (many *.json under each shard directory).
+ """
+ audio_jsonl = audio_dir.with_suffix(".jsonl")
+ if audio_jsonl.exists():
+ with open(audio_jsonl, "r", encoding="utf-8") as f:
+ for line in f:
+ line = line.strip()
+ if line:
+ yield json.loads(line)
+ return
+
+ for meta_json in sorted(audio_dir.glob("*.json")):
+ with open(meta_json, "r", encoding="utf-8") as f:
+ yield json.load(f)
+
+
+def _resolve_audio_path(audio_dir: Path, wav_rel: str) -> Path:
+ wav_rel_path = Path(wav_rel)
+ candidates = [
+ audio_dir.parent / wav_rel_path, # legacy: lang_root / obj["wav"]
+ audio_dir / wav_rel_path, # shard / relative/path
+ audio_dir / wav_rel_path.name, # shard / basename (your current layout)
+ ]
+ for p in candidates:
+ if p.exists():
+ return p
+ return candidates[-1]
+
+
+def deal_with_audio_dir(audio_dir):
+ sub_result, durations = [], []
+ vocab_set = set()
+ bad_case_zh = 0
+ bad_case_en = 0
+ for obj in tqdm(_iter_metadata_objs(audio_dir), desc=f"{audio_dir.name}"):
+ text = obj["text"]
+ if obj["language"] == "zh":
+ if obj["wav"].split("/")[1] in out_zh or any(f in text for f in zh_filters) or repetition_found(text):
+ bad_case_zh += 1
+ continue
+ else:
+ text = text.translate(
+ str.maketrans({",": ",", "!": "!", "?": "?"})
+ ) # not "。" cuz much code-switched
+ if obj["language"] == "en":
+ if (
+ obj["wav"].split("/")[1] in out_en
+ or any(f in text for f in en_filters)
+ or repetition_found(text, length=4)
+ ):
+ bad_case_en += 1
+ continue
+ if tokenizer == "pinyin":
+ text = convert_char_to_pinyin([text], polyphone=polyphone)[0]
+ duration = obj["duration"]
+ audio_path = _resolve_audio_path(audio_dir, obj["wav"])
+ sub_result.append({"audio_path": str(audio_path), "text": text, "duration": duration})
+ durations.append(duration)
+ vocab_set.update(list(text))
+ return sub_result, durations, vocab_set, bad_case_zh, bad_case_en
+
+
+def main():
+ assert tokenizer in ["pinyin", "char"]
+ result = []
+ duration_list = []
+ text_vocab_set = set()
+ total_bad_case_zh = 0
+ total_bad_case_en = 0
+
+ # process raw data
+ executor = ProcessPoolExecutor(max_workers=max_workers)
+ futures = []
+ for lang in langs:
+ dataset_path = Path(os.path.join(dataset_dir, lang))
+ [
+ futures.append(executor.submit(deal_with_audio_dir, audio_dir))
+ for audio_dir in dataset_path.iterdir()
+ if audio_dir.is_dir()
+ ]
+ for futures in tqdm(futures, total=len(futures)):
+ sub_result, durations, vocab_set, bad_case_zh, bad_case_en = futures.result()
+ result.extend(sub_result)
+ duration_list.extend(durations)
+ text_vocab_set.update(vocab_set)
+ total_bad_case_zh += bad_case_zh
+ total_bad_case_en += bad_case_en
+ executor.shutdown()
+
+ # save preprocessed dataset to disk
+ if not os.path.exists(f"{save_dir}"):
+ os.makedirs(f"{save_dir}")
+ print(f"\nSaving to {save_dir} ...")
+
+ # dataset = Dataset.from_dict({"audio_path": audio_path_list, "text": text_list, "duration": duration_list}) # oom
+ # dataset.save_to_disk(f"{save_dir}/raw", max_shard_size="2GB")
+ with ArrowWriter(path=f"{save_dir}/raw.arrow") as writer:
+ for line in tqdm(result, desc="Writing to raw.arrow ..."):
+ writer.write(line)
+ writer.finalize()
+
+ # dup a json separately saving duration in case for DynamicBatchSampler ease
+ with open(f"{save_dir}/duration.json", "w", encoding="utf-8") as f:
+ json.dump({"duration": duration_list}, f, ensure_ascii=False)
+
+ # vocab map, i.e. tokenizer
+ # add alphabets and symbols (optional, if plan to ft on de/fr etc.)
+ # if tokenizer == "pinyin":
+ # text_vocab_set.update([chr(i) for i in range(32, 127)] + [chr(i) for i in range(192, 256)])
+ with open(f"{save_dir}/vocab.txt", "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+
+ print(f"\nFor {dataset_name}, sample count: {len(result)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}")
+ print(f"For {dataset_name}, total {sum(duration_list) / 3600:.2f} hours")
+ if "ZH" in langs:
+ print(f"Bad zh transcription case: {total_bad_case_zh}")
+ if "EN" in langs:
+ print(f"Bad en transcription case: {total_bad_case_en}\n")
+
+
+if __name__ == "__main__":
+ max_workers = 32
+
+ tokenizer = "pinyin" # "pinyin" | "char"
+ polyphone = True
+
+ langs = ["ZH", "EN"]
+ dataset_dir = "/path/to/emilia"
+ dataset_name = f"Emilia_{'_'.join(langs)}_{tokenizer}"
+ save_dir = str(files("wavtts").joinpath("../../")) + f"/data/{dataset_name}"
+ print(f"\nPrepare for {dataset_name}, will save to {save_dir}\n")
+
+ main()
+
+ # Emilia ZH & EN
+ # samples count 37837916 (after removal)
+ # pinyin vocab size 2543 (polyphone)
+ # total duration 95281.87 (hours)
+ # bad zh asr cnt 230435 (samples)
+ # bad eh asr cnt 37217 (samples)
+
+ # vocab size may be slightly different due to rjieba tokenizer and pypinyin (e.g. way of polyphoneme)
+ # please be careful if using pretrained model, make sure the vocab.txt is same
+
+# python src/wavtts/train/datasets/prepare_emilia.py
diff --git a/src/wavtts/train/datasets/prepare_emilia_v2.py b/src/wavtts/train/datasets/prepare_emilia_v2.py
new file mode 100644
index 0000000000000000000000000000000000000000..16517d8073d20f6a75020cd0dfb61d93cc236b9e
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_emilia_v2.py
@@ -0,0 +1,94 @@
+# put in src/wavtts/train/datasets/prepare_emilia_v2.py
+# prepares Emilia dataset with the new format w/ Emilia-YODAS
+
+import json
+import os
+from concurrent.futures import ProcessPoolExecutor
+from importlib.resources import files
+from pathlib import Path
+
+from datasets.arrow_writer import ArrowWriter
+from tqdm import tqdm
+
+from wavtts.model.utils import repetition_found
+
+
+# Define filters for exclusion
+out_en = set()
+en_filters = ["ا", "い", "て"]
+
+
+def process_audio_directory(audio_dir):
+ sub_result, durations, vocab_set = [], [], set()
+ bad_case_en = 0
+
+ for file in audio_dir.iterdir():
+ if file.suffix == ".json":
+ with open(file, "r") as f:
+ obj = json.load(f)
+ text = obj["text"]
+ if any(f in text for f in en_filters) or repetition_found(text, length=4):
+ bad_case_en += 1
+ continue
+
+ duration = obj["duration"]
+ audio_file = file.with_suffix(".mp3")
+ if audio_file.exists():
+ sub_result.append({"audio_path": str(audio_file), "text": text, "duration": duration})
+ durations.append(duration)
+ vocab_set.update(list(text))
+
+ return sub_result, durations, vocab_set, bad_case_en
+
+
+def main():
+ assert tokenizer in ["pinyin", "char"]
+ result, duration_list, text_vocab_set = [], [], set()
+ total_bad_case_en = 0
+
+ executor = ProcessPoolExecutor(max_workers=max_workers)
+ futures = []
+ dataset_path = Path(dataset_dir)
+ for sub_dir in dataset_path.iterdir():
+ if sub_dir.is_dir():
+ futures.append(executor.submit(process_audio_directory, sub_dir))
+
+ for future in tqdm(futures, total=len(futures)):
+ sub_result, durations, vocab_set, bad_case_en = future.result()
+ result.extend(sub_result)
+ duration_list.extend(durations)
+ text_vocab_set.update(vocab_set)
+ total_bad_case_en += bad_case_en
+
+ executor.shutdown()
+
+ if not os.path.exists(f"{save_dir}"):
+ os.makedirs(f"{save_dir}")
+
+ with ArrowWriter(path=f"{save_dir}/raw.arrow") as writer:
+ for line in tqdm(result, desc="Writing to raw.arrow ..."):
+ writer.write(line)
+ writer.finalize()
+
+ with open(f"{save_dir}/duration.json", "w", encoding="utf-8") as f:
+ json.dump({"duration": duration_list}, f, ensure_ascii=False)
+
+ with open(f"{save_dir}/vocab.txt", "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+
+ print(f"For {dataset_name}, sample count: {len(result)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}")
+ print(f"For {dataset_name}, total {sum(duration_list) / 3600:.2f} hours")
+ print(f"Bad en transcription case: {total_bad_case_en}\n")
+
+
+if __name__ == "__main__":
+ max_workers = 32
+ tokenizer = "char"
+ dataset_dir = "/path/to/Emilia-YODAS/EN"
+ dataset_name = f"Emilia_EN_{tokenizer}"
+ save_dir = str(files("wavtts").joinpath("../../")) + f"/data/{dataset_name}"
+
+ print(f"Prepare for {dataset_name}, will save to {save_dir}\n")
+ main()
diff --git a/src/wavtts/train/datasets/prepare_libritts.py b/src/wavtts/train/datasets/prepare_libritts.py
new file mode 100644
index 0000000000000000000000000000000000000000..75ad04610c71553d76ffb07cd561fdec70b99ec3
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_libritts.py
@@ -0,0 +1,95 @@
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import json
+from concurrent.futures import ProcessPoolExecutor
+from importlib.resources import files
+from pathlib import Path
+
+import soundfile as sf
+from datasets.arrow_writer import ArrowWriter
+from tqdm import tqdm
+
+
+def deal_with_audio_dir(audio_dir):
+ sub_result, durations = [], []
+ vocab_set = set()
+ audio_lists = list(audio_dir.rglob("*.wav"))
+
+ for line in audio_lists:
+ text_path = line.with_suffix(".normalized.txt")
+ text = open(text_path, "r").read().strip()
+ duration = sf.info(str(line)).duration
+ if duration < 0.4 or duration > 30:
+ continue
+ sub_result.append({"audio_path": str(line), "text": text, "duration": duration})
+ durations.append(duration)
+ vocab_set.update(list(text))
+ return sub_result, durations, vocab_set
+
+
+def main():
+ result = []
+ duration_list = []
+ text_vocab_set = set()
+
+ # process raw data
+ executor = ProcessPoolExecutor(max_workers=max_workers)
+ futures = []
+
+ for subset in tqdm(SUB_SET):
+ dataset_path = Path(os.path.join(dataset_dir, subset))
+ [
+ futures.append(executor.submit(deal_with_audio_dir, audio_dir))
+ for audio_dir in dataset_path.iterdir()
+ if audio_dir.is_dir()
+ ]
+ for future in tqdm(futures, total=len(futures)):
+ sub_result, durations, vocab_set = future.result()
+ result.extend(sub_result)
+ duration_list.extend(durations)
+ text_vocab_set.update(vocab_set)
+ executor.shutdown()
+
+ # save preprocessed dataset to disk
+ if not os.path.exists(f"{save_dir}"):
+ os.makedirs(f"{save_dir}")
+ print(f"\nSaving to {save_dir} ...")
+
+ with ArrowWriter(path=f"{save_dir}/raw.arrow") as writer:
+ for line in tqdm(result, desc="Writing to raw.arrow ..."):
+ writer.write(line)
+ writer.finalize()
+
+ # dup a json separately saving duration in case for DynamicBatchSampler ease
+ with open(f"{save_dir}/duration.json", "w", encoding="utf-8") as f:
+ json.dump({"duration": duration_list}, f, ensure_ascii=False)
+
+ # vocab map, i.e. tokenizer
+ with open(f"{save_dir}/vocab.txt", "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+
+ print(f"\nFor {dataset_name}, sample count: {len(result)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}")
+ print(f"For {dataset_name}, total {sum(duration_list) / 3600:.2f} hours")
+
+
+if __name__ == "__main__":
+ max_workers = 36
+
+ tokenizer = "char" # "pinyin" | "char"
+
+ SUB_SET = ["train-clean-100", "train-clean-360", "train-other-500"]
+ dataset_dir = "/path/to/LibriTTS"
+ dataset_name = f"LibriTTS_{'_'.join(SUB_SET)}_{tokenizer}".replace("train-clean-", "").replace("train-other-", "")
+ save_dir = str(files("wavtts").joinpath("../../")) + f"/data/{dataset_name}"
+ print(f"\nPrepare for {dataset_name}, will save to {save_dir}\n")
+ main()
+
+ # For LibriTTS_100_360_500_char, sample count: 354218
+ # For LibriTTS_100_360_500_char, vocab size is: 78
+ # For LibriTTS_100_360_500_char, total 554.09 hours
diff --git a/src/wavtts/train/datasets/prepare_ljspeech.py b/src/wavtts/train/datasets/prepare_ljspeech.py
new file mode 100644
index 0000000000000000000000000000000000000000..06512a699229202443f9872e162243d4fc64dcc0
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_ljspeech.py
@@ -0,0 +1,68 @@
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import json
+from importlib.resources import files
+from pathlib import Path
+
+import soundfile as sf
+from datasets.arrow_writer import ArrowWriter
+from tqdm import tqdm
+
+
+def main():
+ result = []
+ duration_list = []
+ text_vocab_set = set()
+
+ with open(meta_info, "r") as f:
+ lines = f.readlines()
+ for line in tqdm(lines):
+ uttr, text, norm_text = line.split("|")
+ norm_text = norm_text.strip()
+ wav_path = Path(dataset_dir) / "wavs" / f"{uttr}.wav"
+ duration = sf.info(wav_path).duration
+ if duration < 0.4 or duration > 30:
+ continue
+ result.append({"audio_path": str(wav_path), "text": norm_text, "duration": duration})
+ duration_list.append(duration)
+ text_vocab_set.update(list(norm_text))
+
+ # save preprocessed dataset to disk
+ if not os.path.exists(f"{save_dir}"):
+ os.makedirs(f"{save_dir}")
+ print(f"\nSaving to {save_dir} ...")
+
+ with ArrowWriter(path=f"{save_dir}/raw.arrow") as writer:
+ for line in tqdm(result, desc="Writing to raw.arrow ..."):
+ writer.write(line)
+ writer.finalize()
+
+ # dup a json separately saving duration in case for DynamicBatchSampler ease
+ with open(f"{save_dir}/duration.json", "w", encoding="utf-8") as f:
+ json.dump({"duration": duration_list}, f, ensure_ascii=False)
+
+ # vocab map, i.e. tokenizer
+ # add alphabets and symbols (optional, if plan to ft on de/fr etc.)
+ with open(f"{save_dir}/vocab.txt", "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+
+ print(f"\nFor {dataset_name}, sample count: {len(result)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}")
+ print(f"For {dataset_name}, total {sum(duration_list) / 3600:.2f} hours")
+
+
+if __name__ == "__main__":
+ tokenizer = "char" # "pinyin" | "char"
+
+ dataset_dir = "/LJSpeech-1.1"
+ dataset_name = f"LJSpeech_{tokenizer}"
+ meta_info = os.path.join(dataset_dir, "metadata.csv")
+ save_dir = str(files("wavtts").joinpath("../../")) + f"/data/{dataset_name}"
+ print(f"\nPrepare for {dataset_name}, will save to {save_dir}\n")
+
+ main()
diff --git a/src/wavtts/train/datasets/prepare_wenetspeech4tts.py b/src/wavtts/train/datasets/prepare_wenetspeech4tts.py
new file mode 100644
index 0000000000000000000000000000000000000000..d2413634303d91f592ff3a8c2d44e54532b533ad
--- /dev/null
+++ b/src/wavtts/train/datasets/prepare_wenetspeech4tts.py
@@ -0,0 +1,126 @@
+# generate audio text map for WenetSpeech4TTS
+# evaluate for vocab size
+
+import os
+import sys
+
+
+sys.path.append(os.getcwd())
+
+import json
+from concurrent.futures import ProcessPoolExecutor
+from importlib.resources import files
+
+import torchaudio
+from datasets import Dataset
+from tqdm import tqdm
+
+from wavtts.model.utils import convert_char_to_pinyin
+
+
+def deal_with_sub_path_files(dataset_path, sub_path):
+ print(f"Dealing with: {sub_path}")
+
+ text_dir = os.path.join(dataset_path, sub_path, "txts")
+ audio_dir = os.path.join(dataset_path, sub_path, "wavs")
+ text_files = os.listdir(text_dir)
+
+ audio_paths, texts, durations = [], [], []
+ for text_file in tqdm(text_files):
+ with open(os.path.join(text_dir, text_file), "r", encoding="utf-8") as file:
+ first_line = file.readline().split("\t")
+ audio_nm = first_line[0]
+ audio_path = os.path.join(audio_dir, audio_nm + ".wav")
+ text = first_line[1].strip()
+
+ audio_paths.append(audio_path)
+
+ if tokenizer == "pinyin":
+ texts.extend(convert_char_to_pinyin([text], polyphone=polyphone))
+ elif tokenizer == "char":
+ texts.append(text)
+
+ audio, sample_rate = torchaudio.load(audio_path)
+ durations.append(audio.shape[-1] / sample_rate)
+
+ return audio_paths, texts, durations
+
+
+def main():
+ assert tokenizer in ["pinyin", "char"]
+
+ audio_path_list, text_list, duration_list = [], [], []
+
+ executor = ProcessPoolExecutor(max_workers=max_workers)
+ futures = []
+ for dataset_path in dataset_paths:
+ sub_items = os.listdir(dataset_path)
+ sub_paths = [item for item in sub_items if os.path.isdir(os.path.join(dataset_path, item))]
+ for sub_path in sub_paths:
+ futures.append(executor.submit(deal_with_sub_path_files, dataset_path, sub_path))
+ for future in tqdm(futures, total=len(futures)):
+ audio_paths, texts, durations = future.result()
+ audio_path_list.extend(audio_paths)
+ text_list.extend(texts)
+ duration_list.extend(durations)
+ executor.shutdown()
+
+ if not os.path.exists("data"):
+ os.makedirs("data")
+
+ print(f"\nSaving to {save_dir} ...")
+ dataset = Dataset.from_dict({"audio_path": audio_path_list, "text": text_list, "duration": duration_list})
+ dataset.save_to_disk(f"{save_dir}/raw", max_shard_size="2GB") # arrow format
+
+ with open(f"{save_dir}/duration.json", "w", encoding="utf-8") as f:
+ json.dump(
+ {"duration": duration_list}, f, ensure_ascii=False
+ ) # dup a json separately saving duration in case for DynamicBatchSampler ease
+
+ print("\nEvaluating vocab size (all characters and symbols / all phonemes) ...")
+ text_vocab_set = set()
+ for text in tqdm(text_list):
+ text_vocab_set.update(list(text))
+
+ # add alphabets and symbols (optional, if plan to ft on de/fr etc.)
+ if tokenizer == "pinyin":
+ text_vocab_set.update([chr(i) for i in range(32, 127)] + [chr(i) for i in range(192, 256)])
+
+ with open(f"{save_dir}/vocab.txt", "w") as f:
+ for vocab in sorted(text_vocab_set):
+ f.write(vocab + "\n")
+ print(f"\nFor {dataset_name}, sample count: {len(text_list)}")
+ print(f"For {dataset_name}, vocab size is: {len(text_vocab_set)}\n")
+
+
+if __name__ == "__main__":
+ max_workers = 32
+
+ tokenizer = "pinyin" # "pinyin" | "char"
+ polyphone = True
+ dataset_choice = 1 # 1: Premium, 2: Standard, 3: Basic
+
+ dataset_name = (
+ ["WenetSpeech4TTS_Premium", "WenetSpeech4TTS_Standard", "WenetSpeech4TTS_Basic"][dataset_choice - 1]
+ + "_"
+ + tokenizer
+ )
+ dataset_paths = [
+ "/WenetSpeech4TTS/Basic",
+ "/WenetSpeech4TTS/Standard",
+ "/WenetSpeech4TTS/Premium",
+ ][-dataset_choice:]
+ save_dir = str(files("wavtts").joinpath("../../")) + f"/data/{dataset_name}"
+ print(f"\nChoose Dataset: {dataset_name}, will save to {save_dir}\n")
+
+ main()
+
+ # Results (if adding alphabets with accents and symbols):
+ # WenetSpeech4TTS Basic Standard Premium
+ # samples count 3932473 1941220 407494
+ # pinyin vocab size 1349 1348 1344 (no polyphone)
+ # - - 1459 (polyphone)
+ # char vocab size 5264 5219 5042
+
+ # vocab size may be slightly different due to rjieba tokenizer and pypinyin (e.g. way of polyphoneme)
+ # please be careful if using pretrained model, make sure the vocab.txt is same
diff --git a/src/wavtts/train/run_main_train.sh b/src/wavtts/train/run_main_train.sh
new file mode 100644
index 0000000000000000000000000000000000000000..8d5f85cd819e2b2c59e71b58eb89895e6c6dfba4
--- /dev/null
+++ b/src/wavtts/train/run_main_train.sh
@@ -0,0 +1,53 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Main public training launcher for the current WavTTS training baseline.
+
+CONFIG_NAME="WavTTS"
+DATASET_NAME="emilia"
+NUM_PROCESSES="8"
+NUM_MACHINES="1"
+MIXED_PRECISION="bf16"
+BATCH_SIZE_PER_GPU="19200"
+NUM_WORKERS="16"
+MASTER_PORT="49500"
+OUTPUT_ROOT="./exp/nar_wav_tts"
+
+export OMP_NUM_THREADS=1
+export MKL_NUM_THREADS=1
+export NCCL_DEBUG=WARN
+# export WANDB_API_KEY=""
+
+EXP_NAME="${CONFIG_NAME}-${DATASET_NAME}-${NUM_PROCESSES}gpus-${BATCH_SIZE_PER_GPU}sample_per_gpu-${MIXED_PRECISION}"
+OUTDIR="${OUTPUT_ROOT}/${DATASET_NAME}/${EXP_NAME}"
+LOG_DIR="${OUTDIR}/logs"
+mkdir -p "${LOG_DIR}"
+LOG_FILE="${LOG_DIR}/train_$(date +%Y%m%d_%H%M%S).log"
+
+exec > >(tee -a "${LOG_FILE}") 2>&1
+
+echo "Log file: ${LOG_FILE}"
+echo "Config: ${CONFIG_NAME}"
+echo "Dataset: ${DATASET_NAME}"
+echo "Exp Name: ${EXP_NAME}"
+echo "Output dir: ${OUTDIR}"
+echo "Master port: ${MASTER_PORT}"
+
+export PYTHONPATH="$(pwd)/src${PYTHONPATH:+:${PYTHONPATH}}"
+
+accelerate launch \
+ --main_process_port "${MASTER_PORT}" \
+ --num_processes "${NUM_PROCESSES}" \
+ --num_machines "${NUM_MACHINES}" \
+ --mixed_precision "${MIXED_PRECISION}" \
+ --dynamo_backend no \
+ src/wavtts/train/train.py \
+ --config-name "${CONFIG_NAME}.yaml" \
+ ++hydra.run.dir="${OUTDIR}" \
+ ++ckpts.save_dir="${OUTDIR}/ckpts" \
+ ++ckpts.exp_name="${EXP_NAME}" \
+ ++datasets.batch_size_per_gpu="${BATCH_SIZE_PER_GPU}" \
+ ++datasets.num_workers="${NUM_WORKERS}"
+
+
+# bash src/wavtts/train/run_main_train.sh
\ No newline at end of file
diff --git a/src/wavtts/train/train.py b/src/wavtts/train/train.py
new file mode 100644
index 0000000000000000000000000000000000000000..36f244433ff8be0d262e7a493e4b2441568e1c2c
--- /dev/null
+++ b/src/wavtts/train/train.py
@@ -0,0 +1,81 @@
+# training script.
+
+import os
+from importlib.resources import files
+
+import hydra
+from omegaconf import OmegaConf
+
+from wavtts.model import CFM, Trainer
+from wavtts.model.dataset import load_dataset
+from wavtts.model.utils import get_tokenizer
+
+
+os.chdir(str(files("wavtts").joinpath("../.."))) # change working directory to root of project (local editable)
+
+
+@hydra.main(version_base="1.3", config_path=str(files("wavtts").joinpath("configs")), config_name=None)
+def main(model_cfg):
+ model_cls = hydra.utils.get_class(f"wavtts.model.{model_cfg.model.backbone}")
+ model_arc = model_cfg.model.arch
+ tokenizer = model_cfg.model.tokenizer
+ cfm_kwargs = getattr(model_cfg.model, "cfm", {}) or {}
+
+ exp_name = model_cfg.ckpts.exp_name
+ wandb_resume_id = None
+
+ # set text tokenizer
+ if tokenizer != "custom":
+ tokenizer_path = model_cfg.datasets.name
+ else:
+ tokenizer_path = model_cfg.model.tokenizer_path
+ vocab_char_map, vocab_size = get_tokenizer(tokenizer_path, tokenizer)
+
+ # set model
+ model = CFM(
+ transformer=model_cls(**model_arc, text_num_embeds=vocab_size, wav_frame_len=model_cfg.model.waveform.wav_frame_len),
+ waveform_kwargs=model_cfg.model.waveform,
+ vocab_char_map=vocab_char_map,
+ **cfm_kwargs,
+ )
+
+ save_dir = model_cfg.ckpts.save_dir
+ if os.path.isabs(save_dir):
+ checkpoint_path = save_dir
+ else:
+ checkpoint_path = str(files("wavtts").joinpath(f"../../{save_dir}"))
+
+ # init trainer
+ trainer = Trainer(
+ model,
+ epochs=model_cfg.optim.epochs,
+ learning_rate=model_cfg.optim.learning_rate,
+ num_warmup_updates=model_cfg.optim.num_warmup_updates,
+ save_per_updates=model_cfg.ckpts.save_per_updates,
+ keep_last_n_checkpoints=model_cfg.ckpts.keep_last_n_checkpoints,
+ checkpoint_path=checkpoint_path,
+ batch_size_per_gpu=model_cfg.datasets.batch_size_per_gpu,
+ batch_size_type=model_cfg.datasets.batch_size_type,
+ max_samples=model_cfg.datasets.max_samples,
+ grad_accumulation_steps=model_cfg.optim.grad_accumulation_steps,
+ max_grad_norm=model_cfg.optim.max_grad_norm,
+ logger=model_cfg.ckpts.logger,
+ wandb_project="WavTTS",
+ wandb_run_name=exp_name,
+ wandb_resume_id=wandb_resume_id,
+ last_per_updates=model_cfg.ckpts.last_per_updates,
+ log_samples=model_cfg.ckpts.log_samples,
+ bnb_optimizer=model_cfg.optim.bnb_optimizer,
+ model_cfg_dict=OmegaConf.to_container(model_cfg, resolve=True),
+ )
+
+ train_dataset = load_dataset(model_cfg.datasets.name, tokenizer, waveform_kwargs=model_cfg.model.waveform)
+ trainer.train(
+ train_dataset,
+ num_workers=model_cfg.datasets.num_workers,
+ resumable_with_seed=666, # seed for shuffling dataset
+ )
+
+
+if __name__ == "__main__":
+ main()