diff --git a/CosyVoice-ttsfrd/.gitattributes b/CosyVoice-ttsfrd/.gitattributes
new file mode 100644
index 0000000000000000000000000000000000000000..1dbb4737b5e0e401b89046781871dc33b162d8ad
--- /dev/null
+++ b/CosyVoice-ttsfrd/.gitattributes
@@ -0,0 +1,39 @@
+*.7z filter=lfs diff=lfs merge=lfs -text
+*.arrow filter=lfs diff=lfs merge=lfs -text
+*.bin filter=lfs diff=lfs merge=lfs -text
+*.bin.* filter=lfs diff=lfs merge=lfs -text
+*.bz2 filter=lfs diff=lfs merge=lfs -text
+*.ftz filter=lfs diff=lfs merge=lfs -text
+*.gz filter=lfs diff=lfs merge=lfs -text
+*.h5 filter=lfs diff=lfs merge=lfs -text
+*.joblib filter=lfs diff=lfs merge=lfs -text
+*.lfs.* filter=lfs diff=lfs merge=lfs -text
+*.model filter=lfs diff=lfs merge=lfs -text
+*.msgpack filter=lfs diff=lfs merge=lfs -text
+*.onnx filter=lfs diff=lfs merge=lfs -text
+*.ot filter=lfs diff=lfs merge=lfs -text
+*.parquet filter=lfs diff=lfs merge=lfs -text
+*.pb filter=lfs diff=lfs merge=lfs -text
+*.pt filter=lfs diff=lfs merge=lfs -text
+*.pth filter=lfs diff=lfs merge=lfs -text
+*.rar filter=lfs diff=lfs merge=lfs -text
+saved_model/**/* filter=lfs diff=lfs merge=lfs -text
+*.tar.* filter=lfs diff=lfs merge=lfs -text
+*.tflite filter=lfs diff=lfs merge=lfs -text
+*.tgz filter=lfs diff=lfs merge=lfs -text
+*.xz filter=lfs diff=lfs merge=lfs -text
+*.zip filter=lfs diff=lfs merge=lfs -text
+*.zstandard filter=lfs diff=lfs merge=lfs -text
+*.tfevents* filter=lfs diff=lfs merge=lfs -text
+*.db* filter=lfs diff=lfs merge=lfs -text
+*.ark* filter=lfs diff=lfs merge=lfs -text
+**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
+**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
+**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
+*.safetensors filter=lfs diff=lfs merge=lfs -text
+*.ckpt filter=lfs diff=lfs merge=lfs -text
+*.gguf* filter=lfs diff=lfs merge=lfs -text
+*.ggml filter=lfs diff=lfs merge=lfs -text
+*.llamafile* filter=lfs diff=lfs merge=lfs -text
+resource.zip filter=lfs diff=lfs merge=lfs -text
+resource.tar filter=lfs diff=lfs merge=lfs -text
diff --git a/CosyVoice-ttsfrd/README.md b/CosyVoice-ttsfrd/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d5fc9ea7817d09b5dcd2f93a00c8e06065c9737c
--- /dev/null
+++ b/CosyVoice-ttsfrd/README.md
@@ -0,0 +1,227 @@
+[](https://github.com/Akshay090/svg-banners)
+
+## 👉🏻 CosyVoice 👈🏻
+**CosyVoice 2.0**: [Demos](https://funaudiollm.github.io/cosyvoice2/); [Paper](https://arxiv.org/abs/2412.10117); [Modelscope](https://www.modelscope.cn/studios/iic/CosyVoice2-0.5B); [HuggingFace](https://huggingface.co/spaces/FunAudioLLM/CosyVoice2-0.5B)
+
+**CosyVoice 1.0**: [Demos](https://fun-audio-llm.github.io); [Paper](https://funaudiollm.github.io/pdf/CosyVoice_v1.pdf); [Modelscope](https://www.modelscope.cn/studios/iic/CosyVoice-300M)
+
+## Highlight🔥
+
+**CosyVoice 2.0** has been released! Compared to version 1.0, the new version offers more accurate, more stable, faster, and better speech generation capabilities.
+### Multilingual
+- **Supported Language**: Chinese, English, Japanese, Korean, Chinese dialects (Cantonese, Sichuanese, Shanghainese, Tianjinese, Wuhanese, etc.)
+- **Crosslingual & Mixlingual**:Support zero-shot voice cloning for cross-lingual and code-switching scenarios.
+### Ultra-Low Latency
+- **Bidirectional Streaming Support**: CosyVoice 2.0 integrates offline and streaming modeling technologies.
+- **Rapid First Packet Synthesis**: Achieves latency as low as 150ms while maintaining high-quality audio output.
+### High Accuracy
+- **Improved Pronunciation**: Reduces pronunciation errors by 30% to 50% compared to CosyVoice 1.0.
+- **Benchmark Achievements**: Attains the lowest character error rate on the hard test set of the Seed-TTS evaluation set.
+### Strong Stability
+- **Consistency in Timbre**: Ensures reliable voice consistency for zero-shot and cross-language speech synthesis.
+- **Cross-language Synthesis**: Marked improvements compared to version 1.0.
+### Natural Experience
+- **Enhanced Prosody and Sound Quality**: Improved alignment of synthesized audio, raising MOS evaluation scores from 5.4 to 5.53.
+- **Emotional and Dialectal Flexibility**: Now supports more granular emotional controls and accent adjustments.
+
+## Roadmap
+
+- [x] 2024/12
+
+ - [x] 25hz cosyvoice 2.0 released
+
+- [x] 2024/09
+
+ - [x] 25hz cosyvoice base model
+ - [x] 25hz cosyvoice voice conversion model
+
+- [x] 2024/08
+
+ - [x] Repetition Aware Sampling(RAS) inference for llm stability
+ - [x] Streaming inference mode support, including kv cache and sdpa for rtf optimization
+
+- [x] 2024/07
+
+ - [x] Flow matching training support
+ - [x] WeTextProcessing support when ttsfrd is not available
+ - [x] Fastapi server and client
+
+
+## Install
+
+**Clone and install**
+
+- Clone the repo
+``` sh
+git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
+# If you failed to clone submodule due to network failures, please run following command until success
+cd CosyVoice
+git submodule update --init --recursive
+```
+
+- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html
+- Create Conda env:
+
+``` sh
+conda create -n cosyvoice python=3.10
+conda activate cosyvoice
+# pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platform.
+conda install -y -c conda-forge pynini==2.1.5
+pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
+
+# If you encounter sox compatibility issues
+# ubuntu
+sudo apt-get install sox libsox-dev
+# centos
+sudo yum install sox sox-devel
+```
+
+**Model download**
+
+We strongly recommend that you download our pretrained `CosyVoice2-0.5B` `CosyVoice-300M` `CosyVoice-300M-SFT` `CosyVoice-300M-Instruct` model and `CosyVoice-ttsfrd` resource.
+
+``` python
+# SDK模型下载
+from modelscope import snapshot_download
+snapshot_download('iic/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
+snapshot_download('iic/CosyVoice-300M', local_dir='pretrained_models/CosyVoice-300M')
+snapshot_download('iic/CosyVoice-300M-25Hz', local_dir='pretrained_models/CosyVoice-300M-25Hz')
+snapshot_download('iic/CosyVoice-300M-SFT', local_dir='pretrained_models/CosyVoice-300M-SFT')
+snapshot_download('iic/CosyVoice-300M-Instruct', local_dir='pretrained_models/CosyVoice-300M-Instruct')
+snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
+```
+
+``` sh
+# git模型下载,请确保已安装git lfs
+mkdir -p pretrained_models
+git clone https://www.modelscope.cn/iic/CosyVoice2-0.5B.git pretrained_models/CosyVoice2-0.5B
+git clone https://www.modelscope.cn/iic/CosyVoice-300M.git pretrained_models/CosyVoice-300M
+git clone https://www.modelscope.cn/iic/CosyVoice-300M-25Hz.git pretrained_models/CosyVoice-300M-25Hz
+git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git pretrained_models/CosyVoice-300M-SFT
+git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git pretrained_models/CosyVoice-300M-Instruct
+git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git pretrained_models/CosyVoice-ttsfrd
+```
+
+Optionally, you can unzip `ttsfrd` resouce and install `ttsfrd` package for better text normalization performance.
+
+Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use WeTextProcessing by default.
+
+``` sh
+cd pretrained_models/CosyVoice-ttsfrd/
+unzip resource.zip -d .
+pip install ttsfrd_dependency-0.1-py3-none-any.whl
+pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl
+```
+
+**Basic Usage**
+
+We strongly recommend using `CosyVoice2-0.5B` for better performance.
+Follow code below for detailed usage of each model.
+
+``` python
+import sys
+sys.path.append('third_party/Matcha-TTS')
+from cosyvoice.cli.cosyvoice import CosyVoice, CosyVoice2
+from cosyvoice.utils.file_utils import load_wav
+import torchaudio
+```
+
+**CosyVoice2 Usage**
+```python
+cosyvoice = CosyVoice2('pretrained_models/CosyVoice2-0.5B', load_jit=False, load_trt=False, fp16=False)
+
+# NOTE if you want to reproduce the results on https://funaudiollm.github.io/cosyvoice2, please add text_frontend=False during inference
+# zero_shot usage
+prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
+for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
+ torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+
+# fine grained control, for supported control, check cosyvoice/tokenizer/tokenizer.py#L248
+for i, j in enumerate(cosyvoice.inference_cross_lingual('在他讲述那个荒诞故事的过程中,他突然[laughter]停下来,因为他自己也被逗笑了[laughter]。', prompt_speech_16k, stream=False)):
+ torchaudio.save('fine_grained_control_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+
+# instruct usage
+for i, j in enumerate(cosyvoice.inference_instruct2('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '用四川话说这句话', prompt_speech_16k, stream=False)):
+ torchaudio.save('instruct_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+```
+
+**CosyVoice Usage**
+```python
+cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-SFT', load_jit=False, load_trt=False, fp16=False)
+# sft usage
+print(cosyvoice.list_available_spks())
+# change stream=True for chunk stream inference
+for i, j in enumerate(cosyvoice.inference_sft('你好,我是通义生成式语音大模型,请问有什么可以帮您的吗?', '中文女', stream=False)):
+ torchaudio.save('sft_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+
+cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M') # or change to pretrained_models/CosyVoice-300M-25Hz for 25Hz inference
+# zero_shot usage, <|zh|><|en|><|jp|><|yue|><|ko|> for Chinese/English/Japanese/Cantonese/Korean
+prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
+for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
+ torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+# cross_lingual usage
+prompt_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
+for i, j in enumerate(cosyvoice.inference_cross_lingual('<|en|>And then later on, fully acquiring that company. So keeping management in line, interest in line with the asset that\'s coming into the family is a reason why sometimes we don\'t buy the whole thing.', prompt_speech_16k, stream=False)):
+ torchaudio.save('cross_lingual_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+# vc usage
+prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
+source_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
+for i, j in enumerate(cosyvoice.inference_vc(source_speech_16k, prompt_speech_16k, stream=False)):
+ torchaudio.save('vc_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+
+cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-Instruct')
+# instruct usage, support [laughter][breath]
+for i, j in enumerate(cosyvoice.inference_instruct('在面对挑战时,他展现了非凡的勇气与智慧。', '中文男', 'Theo \'Crimson\', is a fiery, passionate rebel leader. Fights with fervor for justice, but struggles with impulsiveness.', stream=False)):
+ torchaudio.save('instruct_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
+```
+
+**Start web demo**
+
+You can use our web demo page to get familiar with CosyVoice quickly.
+
+Please see the demo website for details.
+
+``` python
+# change iic/CosyVoice-300M-SFT for sft inference, or iic/CosyVoice-300M-Instruct for instruct inference
+python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M
+```
+
+**Advanced Usage**
+
+For advanced user, we have provided train and inference scripts in `examples/libritts/cosyvoice/run.sh`.
+
+**Build for deployment**
+
+Optionally, if you want service deployment,
+you can run following steps.
+
+``` sh
+cd runtime/python
+docker build -t cosyvoice:v1.0 .
+# change iic/CosyVoice-300M to iic/CosyVoice-300M-Instruct if you want to use instruct inference
+# for grpc usage
+docker run -d --runtime=nvidia -p 50000:50000 cosyvoice:v1.0 /bin/bash -c "cd /opt/CosyVoice/CosyVoice/runtime/python/grpc && python3 server.py --port 50000 --max_conc 4 --model_dir iic/CosyVoice-300M && sleep infinity"
+cd grpc && python3 client.py --port 50000 --mode
+# for fastapi usage
+docker run -d --runtime=nvidia -p 50000:50000 cosyvoice:v1.0 /bin/bash -c "cd /opt/CosyVoice/CosyVoice/runtime/python/fastapi && python3 server.py --port 50000 --model_dir iic/CosyVoice-300M && sleep infinity"
+cd fastapi && python3 client.py --port 50000 --mode
+```
+
+## Discussion & Communication
+
+You can directly discuss on [Github Issues](https://github.com/FunAudioLLM/CosyVoice/issues).
+
+You can also scan the QR code to join our official Dingding chat group.
+
+
+
+## Acknowledge
+
+1. We borrowed a lot of code from [FunASR](https://github.com/modelscope/FunASR).
+2. We borrowed a lot of code from [FunCodec](https://github.com/modelscope/FunCodec).
+3. We borrowed a lot of code from [Matcha-TTS](https://github.com/shivammehta25/Matcha-TTS).
+4. We borrowed a lot of code from [AcademiCodec](https://github.com/yangdongchao/AcademiCodec).
+5. We borrowed a lot of code from [WeNet](https://github.com/wenet-e2e/wenet).
+
+## Disclaimer
+The content provided above is for academic purposes only and is intended to demonstrate technical capabilities. Some examples are sourced from the internet. If any content infringes on your rights, please contact us to request its removal.
diff --git a/CosyVoice-ttsfrd/asset/dingding.png b/CosyVoice-ttsfrd/asset/dingding.png
new file mode 100644
index 0000000000000000000000000000000000000000..9a644005c7b38fd64597c1eadfc6c708973e9a94
Binary files /dev/null and b/CosyVoice-ttsfrd/asset/dingding.png differ
diff --git a/CosyVoice-ttsfrd/configuration.json b/CosyVoice-ttsfrd/configuration.json
new file mode 100644
index 0000000000000000000000000000000000000000..5e812fae901c12933ac69ebf3eb79d0eb49bbab4
--- /dev/null
+++ b/CosyVoice-ttsfrd/configuration.json
@@ -0,0 +1 @@
+{"framework":"Pytorch","task":"text-to-speech"}
\ No newline at end of file
diff --git a/CosyVoice-ttsfrd/resource/festival/Sable.v0_2.dtd b/CosyVoice-ttsfrd/resource/festival/Sable.v0_2.dtd
new file mode 100644
index 0000000000000000000000000000000000000000..63e7f23a91b57ce4693799d3e09c424a120080cc
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/Sable.v0_2.dtd
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%ISOlat1;
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/Singing.v0_1.dtd b/CosyVoice-ttsfrd/resource/festival/Singing.v0_1.dtd
new file mode 100644
index 0000000000000000000000000000000000000000..b0dd8a8881a8a6599c8a4d751122718d11c9d1a0
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/Singing.v0_1.dtd
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%ISOlat1;
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/VCLocalRules b/CosyVoice-ttsfrd/resource/festival/VCLocalRules
new file mode 100644
index 0000000000000000000000000000000000000000..45bb8323297d9003a27f6f3853d8f2fd47604a10
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/VCLocalRules
@@ -0,0 +1,8 @@
+SIOD = siod.scm web.scm cstr.scm fringe.scm
+
+.copy_from_est: $(SIOD)
+
+$(SIOD) :
+ @echo 'Copy $@ from EST/lib/siod'
+ -del $@
+ copy $(EST)\lib\siod\$@ $@
\ No newline at end of file
diff --git a/CosyVoice-ttsfrd/resource/festival/apml.scm b/CosyVoice-ttsfrd/resource/festival/apml.scm
new file mode 100644
index 0000000000000000000000000000000000000000..85a46868c0f45e882f3c16862fb22d6405759f5d
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/apml.scm
@@ -0,0 +1,551 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 2002 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Rob Clark
+;;; Date: July 2002
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; Sets up the current voice to synthesise from APML.
+;;
+;;
+
+(require 'apml_f2bf0lr)
+(require 'apml_kaldurtreeZ)
+
+;; Default pitch settings (if unspecified in current voice.)
+
+(defvar apml_default_pitch_mean 170 )
+(defvar apml_default_pitch_standard_deviation 34 )
+
+;; apml sythesis wrappers.
+
+(define (apml_client_synth apml)
+ "(apml_client_synth apml)
+Synthesise apml and return waveform(s) to client."
+ (utt.send.wave.client (apml_synth apml)))
+
+(define (apml_synth apml)
+"(apml_synth xml)
+Synthesis an apml string."
+(let ((tmpfile (make_tmp_filename))
+ utt)
+ (string_to_file tmpfile apml)
+ (set! utt (apml_file_synth tmpfile))
+ (delete-file tmpfile)
+ utt))
+
+(define (apml_file_synth filename)
+ "(apml_file_synth filename)
+Synthesis an apml file."
+ (let ((utt (Utterance Tokens nil)))
+ (utt.load utt filename)
+ (utt.synth utt)))
+
+(define (string_to_file file s)
+"(string_to_file file string)
+ Write string to file."
+(let ((fd))
+ (set! fd (fopen file "wb"))
+ (format fd "%s" s)
+ (fclose fd)))
+
+
+;;;
+;;; Phrasing.
+;;;
+
+;; phrasing CART.
+;
+; It has been decided that by default, only punctuation should affect
+; phrasing (and subsequently pauses)
+;
+(set! apml_phrase_tree
+ '
+ ((lisp_apml_punc in ("?" "." ":")) ; big punctuation
+ ((BB))
+ ((lisp_apml_punc in ("'" "\"" "," ";")) ; else little punctuation
+ ((B))
+ ((lisp_apml_last_word is 1)
+ ((BB)) ; need a BB at the end!
+ ((NB)))))) ; else nothing
+
+;; feature functions for phrasing
+(define (apml_punc word)
+ (item.feat (item.relation.parent word 'Token) 'punc))
+
+(define (apml_last_word word)
+ (if (item.next word)
+ "0" "1"))
+
+
+;;;
+;;; Pauses
+;;;
+
+;; feature functions for pauses
+(define (apml_is_pause word)
+ (if (item.relation (item.relation.parent word 'Token) 'Pause)
+ t
+ nil))
+
+(define (apml_pause word)
+ (if (item.relation word 'Pause)
+ (item.feat (item.relation.parent (item.relation.parent word 'Token) 'Pause) "sec")
+ 0))
+
+(define (Apml_Pauses utt)
+ "(Pauses UTT)
+Predict pause insertion for apml."
+ (let ((words (utt.relation.items utt 'Word)) lastword tpname)
+ (if words
+ (begin
+ (insert_initial_pause utt) ;; always have a start pause
+ (set! lastword (car (last words)))
+ (mapcar
+ (lambda (w)
+ (let ((pbreak (item.feat w "pbreak"))
+ (emph (item.feat w "R:Token.parent.EMPH")))
+ (cond
+ ((apml_is_pause w)
+ (insert_pause utt w))
+ ((or (string-equal "B" pbreak)
+ (string-equal "BB" pbreak))
+ (insert_pause utt w))
+ ((equal? w lastword)
+ (insert_pause utt w)))))
+ words)
+ ;; The embarassing bit. Remove any words labelled as punc or fpunc
+ (mapcar
+ (lambda (w)
+ (let ((pos (item.feat w "pos")))
+ (if (or (string-equal "punc" pos)
+ (string-equal "fpunc" pos))
+ (let ((pbreak (item.feat w "pbreak"))
+ (wp (item.relation w 'Phrase)))
+ (if (and (string-matches pbreak "BB?")
+ (item.relation.prev w 'Word))
+ (item.set_feat
+ (item.relation.prev w 'Word) "pbreak" pbreak))
+ (item.relation.remove w 'Word)
+ ;; can't refer to w as we've just deleted it
+ (item.relation.remove wp 'Phrase)))))
+ words)))
+ utt))
+
+
+
+;;;
+;;; Intonation.
+;;;
+
+;; Accent prediction (well transfer really).
+;;
+;; We treat L+H* L-H% on a single syllable as a special case.
+
+(set! apml_accent_cart
+ '
+ ((lisp_apml_accent is "Hstar")
+ ((H*))
+ ((lisp_apml_accent is "Lstar")
+ ((L*))
+ ((lisp_apml_LHLH is "LHLH")
+ ((L+H*L-H%))
+ ((lisp_apml_accent is "LplusHstar")
+ ((L+H*))
+ ((lisp_apml_accent is "LstarplusH")
+ ((L*+H))
+ ((NONE))))))))
+
+(set! apml_boundary_cart
+ '
+ ((lisp_apml_boundary is "LL")
+ ((L-L%))
+ ((lisp_apml_LHLH is "LHLH")
+ ((NONE)) ; this is dealt with by the accent feature
+ ((lisp_apml_boundary is "LH")
+ ((L-H%))
+ ((lisp_apml_boundary is "HH")
+ ((H-H%))
+ ((lisp_apml_boundary is "HL")
+ ((H-L%))
+ ((NONE))))))))
+
+;; feature functions.
+(define (apml_accent syl)
+ (let ((token (item.relation.parent (item.relation.parent syl 'SylStructure) 'Token)))
+ (if (and (eq (item.feat syl 'stress) 1)
+ (item.relation.parent token 'Emphasis))
+ (item.feat (item.relation.parent token 'Emphasis) 'x-pitchaccent)
+ 0)))
+
+(define (apml_boundary syl)
+ (let ((token (item.relation.parent (item.relation.parent syl 'SylStructure) 'Token)))
+ (if (and (> (item.feat syl 'syl_break) 0)
+ (item.relation.parent token 'Boundary))
+ (item.feat (item.relation.parent token 'Boundary) 'type)
+ 0)))
+
+(define (apml_LHLH syl)
+ (let ((accent (apml_accent syl))
+ (boundary (apml_boundary syl)))
+ (if (and (string-equal accent "LplusHstar")
+ (string-equal boundary "LH"))
+ "LHLH"
+ 0)))
+
+
+(define (apml_seg_is_LHLH_vowel seg)
+ (if (and (string-equal (apml_LHLH (item.relation.parent seg 'SylStructure))
+ "LHLH")
+ (string-equal (item.feat seg 'ph_vc) "+"))
+ "LHLH"
+ 0))
+
+
+;;;; feature functions:
+
+(define (apml_tgtype syl)
+ (let ((l (apml_boundl (item.relation.parent syl 'SylStructure)))
+ (r (apml_boundr (item.relation.parent syl 'SylStructure))))
+ (if (eq (item.feat syl 'accented) 0)
+ 0 ; this is a quirk related to the way the models were trained
+ (cond
+ ((eq l 0)
+ 1)
+ ((eq r 1)
+ 3)
+ (t 2)))))
+
+
+(define (apml_iecount syl)
+ (if (eq (item.feat syl 'accented) 0)
+ 0 ; this is a quirk related to the way the models were trained
+ (+ (item.feat syl 'asyl_in) 1)))
+
+;; suport functions.
+(define (apml_boundl word)
+"(apml_boundl word)
+Number of boundaries in this performative to the left of this word."
+ (let ((w (item.prev word))
+ (c 0))
+ (while (and w (apml_same_p w word))
+ (if (item.relation.parent (item.relation.parent w 'Token) 'Boundary)
+ (set! c (+ c 1)))
+ (set! w (item.prev w)))
+ c))
+
+(define (apml_boundr word)
+"(apml_boundr word)
+Number of boundaries in this performative to the right of this word."
+ (let ((w word)
+ (c 0))
+ (while (and w (apml_same_p w word))
+ (if (item.relation.parent (item.relation.parent w 'Token) 'Boundary)
+ (set! c (+ c 1)))
+ (set! w (item.next w)))
+ c))
+
+(define (apml_same_p w1 w2)
+"(apml_same_p w1 w2)
+ Are these two words in the same performative?"
+(let ((p1 (item.relation.parent (item.relation.parent w1 'Token) 'SemStructure))
+ (p2 (item.relation.parent (item.relation.parent w1 'Token) 'SemStructure)))
+ (if (and (item.parent p1) (item.parent p2)) ; not true if theme/rheme omitted.
+ (equal? (item.parent p1) (item.parent p2))
+ (equal? p1 p2))))
+
+;;;
+;;; segment timings
+;;;
+
+(define (apml_seg_times utt)
+ "(apml_seg_times utt)
+Output the segment timings for an apml utterance."
+ (let ((segs (utt.relation.items utt 'Segment)))
+ (mapcar
+ (lambda (x)
+ (format t "%s %s\n" (item.name x) (item.feat x 'end)))
+ segs)
+ t))
+
+;;;
+;;; Additional functions for f0model.
+;;;
+
+
+(define (find_hstar_left syl)
+"(find_hstar_left syl)
+If the closest accent or boundary to the left is H* return how many syllables away it is. Returns 0 if nearest accent is not H*"
+(let ((count 0))
+ ;; if this syllable has a pitch event
+ (if (or (not (string-equal (item.feat syl 'tobi_accent) "NONE"))
+ (not (string-equal (item.feat syl 'tobi_endtone) "NONE")))
+ 0)
+ (while (and syl
+ (string-equal (item.feat syl 'tobi_accent) "NONE")
+ (string-equal (item.feat syl 'tobi_endtone) "NONE"))
+ (set! count (+ count 1))
+ (set! syl (item.prev syl)))
+ (cond
+ ;; run out of syllables before finding accent
+ ((null syl)
+ 0)
+ ((string-equal (item.feat syl 'tobi_accent) "H*")
+ count)
+ (t 0))))
+
+(define (find_ll_right syl)
+"(find_ll_right syl)
+If the closest accent or boundary to the right is L-L% return how many syllables away it is. Returns 0 if nearest is not L-L%."
+(let ((count 0))
+ ;; if this syllable has a pitch event
+ (if (or (not (string-equal (item.feat syl 'tobi_accent) "NONE"))
+ (not (string-equal (item.feat syl 'tobi_endtone) "NONE")))
+ 0)
+ (while (and syl
+ (string-equal (item.feat syl 'tobi_accent) "NONE")
+ (string-equal (item.feat syl 'tobi_endtone) "NONE"))
+ (set! count (+ count 1))
+ (set! syl (item.next syl)))
+ (cond
+ ;; run out of syllables before finding boundary
+ ((null syl)
+ 0)
+ ((string-equal (item.feat syl 'tobi_endtone) "L-L%")
+ count)
+ (t 0))))
+
+(define (l_spread syl)
+"(l_spread syl)
+Proportion of pitch lowering required due to L- spreading backwards."
+(let ((l (find_hstar_left syl))
+ (r (find_ll_right syl)))
+ (cond
+ ((or (eq l 0)
+ (eq r 0))
+ 0)
+ (t
+ (/ r (- (+ l r) 1))))))
+
+
+;;;
+;;; Debuging and other useful stuff.
+;;;
+
+
+
+(define (apml_print_semstruct utt)
+"(apml_print_semstruct utt)
+Pretty print APML semantic structure."
+ (let ((i (utt.relation.first utt 'SemStructure)))
+ (while (not (null i))
+ (apml_pss_item 0 i)
+ (apml_pss_daughters 1 (item.daughters i))
+ (set! i (item.next i)))))
+
+(define (apml_pss_daughters depth list)
+ (mapcar
+ (lambda (x)
+ (apml_pss_item depth x)
+ (apml_pss_daughters (+ depth 1) (item.daughters x))
+ )
+ list))
+
+
+(define (apml_pss_item depth item)
+ (let ((c 0))
+ (while (< c depth)
+ (format t " ")
+ (set! c (+ c 1)))
+ (format t "%s\n" (item.name item))))
+
+
+(define (apml_print_words utt)
+"(apml_print_words utt)
+ Pretty print APML words with associated accents."
+ (mapcar
+ (lambda (x)
+ (format t "%s (" (item.name x))
+ (apml_pww_accent x)
+ (apml_pww_boundary x)
+ (apml_pww_pause x)
+ (format t ")\n"))
+ (utt.relation.items utt 'Word))
+ t)
+
+(define (apml_pww_accent item)
+ (let ((p (item.relation.parent (item.relation.parent item 'Token) 'Emphasis)))
+ (if p (apml_ppw_list (item.features p)))))
+
+(define (apml_pww_boundary item)
+ (let ((p (item.relation.parent (item.relation.parent item 'Token) 'Boundary)))
+ (if p (apml_ppw_list (item.features p)))))
+
+(define (apml_pww_pause item)
+ (let ((p (item.relation.parent (item.relation.parent item 'Token) 'Pause)))
+ (if p (apml_ppw_list (item.features p)))))
+
+(define (apml_ppw_list l)
+ (mapcar
+ (lambda (x)
+ (format t " %s" x))
+ (flatten l)))
+
+
+(define (apml_print_sylstructure utt filename)
+"(apml_print_sylstructure utt filename)
+Pretty print APML syllable structure. Filename t for stdout"
+ (let (fd)
+ (if (not (eq? filename t))
+ (set! fd (fopen filename "wb"))
+ (set! fd t))
+ (mapcar
+ (lambda (x)
+ (format fd "%s\n" (item.name x))
+ (apml_psyl fd x))
+ (utt.relation.items utt 'Word))
+ t))
+
+(define (apml_psyl fd word)
+ (mapcar
+ (lambda (x)
+ (apml_psegs fd x)
+ (if (eq (item.feat x 'stress) 1)
+ (format fd " (1)"))
+ (if (item.relation.daughter1 x 'Intonation)
+ (begin
+ (let ((ie (item.relation.daughter1 x 'Intonation)))
+ (format fd " [")
+ (while ie
+ (format fd "%s" (item.name ie))
+ (set! ie (item.next ie))
+ (if ie (format t " ")))
+ (format fd "]"))))
+ (format fd "\n"))
+ (item.daughters (item.relation word 'SylStructure))))
+
+(define (apml_psegs fd syl)
+ (let ((segs (item.daughters syl)))
+ (format fd " ")
+ (while segs
+ (format fd "%s" (item.name (car segs)))
+ (if (cdr segs)
+ (format fd "."))
+ (set! segs (cdr segs)))))
+
+
+(define (apml_get_lr_params)
+ (let ((m 0)
+ (s 0))
+ (if (or (equal? (Parameter.get 'Int_Target_Method) Int_Targets_LR)
+ (equal? (Parameter.get 'Int_Target_Method) Int_Targets_5_LR))
+ (begin
+ (set! m (car (cdr (car int_lr_params))))
+ (set! s (car (cdr (car (cdr int_lr_params))))))
+ (begin
+ (set! m apml_default_pitch_mean)
+ (set! s apml_default_pitch_standard_deviation)))
+ (list m s)))
+
+
+
+
+(define (apml_initialise)
+ "(apml_initialise)
+Set up the current voice for apml use."
+ (if (not (string-matches current-voice ".*multisyn.*")) ; nothing if multisyn
+ (cond
+ ((or (string-equal (Parameter.get 'Language) "americanenglish")
+ (string-equal (Parameter.get 'Language) "britishenglish"))
+ (begin
+ (format t "Initialising APML for English.\n")
+ ;; Phrasing.
+ (Parameter.set 'Phrase_Method 'cart_tree)
+ (set! phrase_cart_tree apml_phrase_tree)
+ ;; Pauses.
+ ;;(set! duration_cart_tree apml_kal_duration_cart_tree)
+ ;;(set! duration_ph_info apml_kal_durs)
+ ;;(Parameter.set 'Pause_Method Apml_Pauses)
+ ;; Lexicon.
+ ;;;; We now assume the lexicon you have already set is suitable,
+ ;;;; You probably want to ensure this is "apmlcmu" or "unilex"
+ ;;(if (not (member_string "apmlcmu" (lex.list)))
+ ;; (load (path-append lexdir "apmlcmu/apmlcmulex.scm")))
+ ;;(lex.select "apmlcmu")
+ ;; Add other lex entries here:
+ ;;(lex.add.entry '("minerals" nil (((m ih n) 1) ((er) 0) ((ax l z) 0))))
+ ;;(lex.add.entry '("fibre" nil (((f ay b) 1) ((er) 0))))
+ ;;(lex.add.entry '("dont" v (((d ow n t) 1))))
+ ;;(lex.add.entry '("pectoris" nil (((p eh k) 2) ((t ao r) 1) ((ih s) 0))))
+ ;;(lex.add.entry '("sideeffects" nil (((s ay d) 1) ((ax f) 0) ((eh k t s) 2))))
+
+ ;; Intonation events.
+ (set! int_accent_cart_tree apml_accent_cart)
+ (set! int_tone_cart_tree apml_boundary_cart)
+ (Parameter.set 'Int_Method Intonation_Tree)
+ ;; Intonation f0 contour.
+ (set! f0_lr_start apml_f2b_f0_lr_start)
+ (set! f0_lr_left apml_f2b_f0_lr_left)
+ (set! f0_lr_mid apml_f2b_f0_lr_mid)
+ (set! f0_lr_right apml_f2b_f0_lr_right)
+ (set! f0_lr_end apml_f2b_f0_lr_end)
+ (set! int_lr_params
+ (list (list 'target_f0_mean (car (apml_get_lr_params)))
+ (list 'target_f0_std (car (cdr (apml_get_lr_params))))
+ (list 'model_f0_mean 170)
+ (list 'model_f0_std 40)))
+ (Parameter.set 'Int_Target_Method Int_Targets_5_LR)
+ nil))
+ ((string-equal (Parameter.get 'Language) "italian")
+ (begin
+ (format t "Initialising APML for Italian.\n")
+ ;; Phrasing.
+ (Parameter.set 'Phrase_Method 'cart_tree)
+ (set! phrase_cart_tree apml_phrase_tree)
+ ;; Intonation events.
+ (set! int_accent_cart_tree apml_accent_cart)
+ (set! int_tone_cart_tree apml_boundary_cart)
+ (Parameter.set 'Int_Method Intonation_Tree)
+ ;; Intonation f0 contour.
+ (set! f0_lr_start apml_f2b_f0_lr_start)
+ (set! f0_lr_mid apml_f2b_f0_lr_mid)
+ (set! f0_lr_end apml_f2b_f0_lr_end)
+ (set! int_lr_params
+ (list (list 'target_f0_mean (car (apml_get_lr_params)))
+ (list 'target_f0_std (car (cdr (apml_get_lr_params))))
+ (list 'model_f0_mean 170)
+ (list 'model_f0_std 34)))
+ (Parameter.set 'Int_Target_Method Int_Targets_LR)
+ nil))
+ (t nil))))
+
+(provide 'apml)
diff --git a/CosyVoice-ttsfrd/resource/festival/apml_f2bf0lr.scm b/CosyVoice-ttsfrd/resource/festival/apml_f2bf0lr.scm
new file mode 100644
index 0000000000000000000000000000000000000000..3d312a8ff8d7d20eba6b043d12cd3c880d7b66ee
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/apml_f2bf0lr.scm
@@ -0,0 +1,530 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 2002 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Rob Clark
+;;; Date: July 2002
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; APML.f0 trees.
+;;
+;;
+
+(set! apml_f2b_f0_lr_start
+'(
+( Intercept 163.9871 )
+( pp.lisp_apml_tgtype -3.1750 (1) )
+( p.lisp_apml_tgtype 5.0332 (1) )
+( lisp_apml_tgtype 0.0000 (1) )
+( n.lisp_apml_tgtype 17.7799 (1) )
+( nn.lisp_apml_tgtype 13.6845 (1) )
+( pp.lisp_apml_tgtype 0.0000 (2) )
+( p.lisp_apml_tgtype 0.0000 (2) )
+( lisp_apml_tgtype 0.0000 (2) )
+( n.lisp_apml_tgtype 0.0000 (2) )
+( nn.lisp_apml_tgtype 0.0000 (2) )
+( pp.lisp_apml_tgtype 0.0000 (3) )
+( p.lisp_apml_tgtype 0.0000 (3) )
+( lisp_apml_tgtype -9.7245 (3) )
+( n.lisp_apml_tgtype 0.0000 (3) )
+( nn.lisp_apml_tgtype -2.4009 (3) )
+( pp.lisp_apml_iecount 0.0000 )
+( p.lisp_apml_iecount -0.4484 )
+( lisp_apml_iecount 0.0000 )
+( n.lisp_apml_iecount -2.0165 )
+( nn.lisp_apml_iecount 0.0000 )
+( pp.tobi_accent 0.0000 (H*) )
+( p.tobi_accent 11.1239 (H*) )
+( tobi_accent 21.5164 (H*) )
+( n.tobi_accent -2.5990 (H*) )
+( nn.tobi_accent -6.5307 (H*) )
+( pp.tobi_accent 0.0000 (L*) )
+( p.tobi_accent -10.0000 (L*) )
+( tobi_accent -5.0000 (L*) )
+( n.tobi_accent -10.6798 (L*) )
+( nn.tobi_accent -5.6561 (L*) )
+( pp.tobi_accent 5.3577 (L*+H) )
+( p.tobi_accent 60.0000 (L*+H) )
+( tobi_accent -5.0000 (L*+H) )
+( n.tobi_accent 0.0000 (L*+H) )
+( nn.tobi_accent 0.0000 (L*+H) )
+( pp.tobi_accent 0.0000 (L+H*) )
+( p.tobi_accent 11.1200 (L+H*) )
+( tobi_accent 21.5200 (L+H*) )
+( n.tobi_accent -2.6000 (L+H*) )
+( nn.tobi_accent -6.5300 (L+H*) )
+( pp.tobi_endtone 0.0000 (L-L%) )
+( p.tobi_endtone -0.6164 (L-L%) )
+( tobi_endtone -50 (L-L%) )
+( n.tobi_endtone -10.8729 (L-L%) )
+( nn.tobi_endtone -7.6522 (L-L%) )
+( pp.tobi_endtone 0.7583 (L-H%) )
+( p.tobi_endtone 0.0000 (L-H%) )
+( tobi_endtone -20.0000 (L-H%) )
+( n.tobi_endtone -11.8935 (L-H%) )
+( nn.tobi_endtone -7.2012 (L-H%) )
+( pp.tobi_endtone 0.0000 (H-L%) )
+( p.tobi_endtone 0.0000 (H-L%) )
+( tobi_endtone 4.0790 (H-L%) )
+( n.tobi_endtone -19.3463 (H-L%) )
+( nn.tobi_endtone -29.3615 (H-L%) )
+( pp.tobi_endtone 0.0000 (H-H%) )
+( p.tobi_endtone 0.0000 (H-H%) )
+( tobi_endtone 0.0000 (H-H%) )
+( n.tobi_endtone 0.0000 (H-H%) )
+( nn.tobi_endtone 0.0000 (H-H%) )
+( pp.tobi_endtone 0.0000 (L-) )
+( p.tobi_endtone -15.1702 (L-) )
+( tobi_endtone 0.0000 (L-) )
+( n.tobi_endtone -14.5562 (L-) )
+( nn.tobi_endtone 0.0000 (L-) )
+( pp.tobi_endtone -13.5046 (H-) )
+( p.tobi_endtone 0.0000 (H-) )
+( tobi_endtone 6.3377 (H-) )
+( n.tobi_endtone -6.8631 (H-) )
+( nn.tobi_endtone 0.0000 (H-) )
+( p.tobi_accent 60.0000 (L+H*L-H%) )
+( tobi_accent -60.0000 (L+H*L-H%) )
+( n.tobi_accent 0.0000 (L+H*L-H%) )
+( pp.syl_break 0.0000 )
+( p.syl_break 0.0000 )
+( syl_break 0.6417 )
+( n.syl_break 1.3532 )
+( nn.syl_break 1.0724 )
+( pp.stress 0.0000 )
+( p.stress -0.6193 )
+( stress 2.4121 )
+( n.stress 0.0000 )
+( nn.stress 2.5478 )
+( syl_in -1.4373 )
+( syl_out 0.4181 )
+( ssyl_in 0.0000 )
+( ssyl_out 0.6125 )
+( asyl_in 0.0000 )
+( asyl_out 0.9906 )
+( last_accent 0.0000 )
+( next_accent -0.3700 )
+( sub_phrases 0.0000 )
+( lisp_l_spread -60.0000 )
+))
+
+(set! apml_f2b_f0_lr_left
+'(
+( Intercept 162.1173 )
+( pp.lisp_apml_tgtype -1.5875 (1) )
+( p.lisp_apml_tgtype 4.8101 (1) )
+( lisp_apml_tgtype 12.8265 (1) )
+( n.lisp_apml_tgtype 16.3027 (1) )
+( nn.lisp_apml_tgtype 13.3225 (1) )
+( pp.lisp_apml_tgtype 0.0000 (2) )
+( p.lisp_apml_tgtype 1.7434 (2) )
+( lisp_apml_tgtype 6.7783 (2) )
+( n.lisp_apml_tgtype 0.6679 (2) )
+( nn.lisp_apml_tgtype 0.0000 (2) )
+( pp.lisp_apml_tgtype 1.6494 (3) )
+( p.lisp_apml_tgtype 1.2861 (3) )
+( lisp_apml_tgtype -2.0724 (3) )
+( n.lisp_apml_tgtype 0.0000 (3) )
+( nn.lisp_apml_tgtype -1.2004 (3) )
+( pp.lisp_apml_iecount 0.0000 )
+( p.lisp_apml_iecount -0.5857 )
+( lisp_apml_iecount 0.0000 )
+( n.lisp_apml_iecount -2.3543 )
+( nn.lisp_apml_iecount 0.0000 )
+( pp.tobi_accent 0.0000 (H*) )
+( p.tobi_accent 8.5867 (H*) )
+( tobi_accent 21.2169 (H*) )
+( n.tobi_accent -1.2995 (H*) )
+( nn.tobi_accent -6.5056 (H*) )
+( pp.tobi_accent 0.0000 (L*) )
+( p.tobi_accent -7.5000 (L*) )
+( tobi_accent -25.0000 (L*) )
+( n.tobi_accent -8.3939 (L*) )
+( nn.tobi_accent -4.5688 (L*) )
+( pp.tobi_accent 2.6789 (L*+H) )
+( p.tobi_accent 45.0000 (L*+H) )
+( tobi_accent -17.5000 (L*+H) )
+( n.tobi_accent -1.3600 (L*+H) )
+( nn.tobi_accent 0.0000 (L*+H) )
+( pp.tobi_accent 0.0000 (L+H*) )
+( p.tobi_accent 8.5850 (L+H*) )
+( tobi_accent 21.2200 (L+H*) )
+( n.tobi_accent -1.3000 (L+H*) )
+( nn.tobi_accent -6.5050 (L+H*) )
+( pp.tobi_endtone 1.8117 (L-L%) )
+( p.tobi_endtone -0.1681 (L-L%) )
+( tobi_endtone -70 (L-L%) )
+( n.tobi_endtone -8.9334 (L-L%) )
+( nn.tobi_endtone -8.4034 (L-L%) )
+( pp.tobi_endtone 1.2099 (L-H%) )
+( p.tobi_endtone 1.1220 (L-H%) )
+( tobi_endtone -10.0000 (L-H%) )
+( n.tobi_endtone -5.9467 (L-H%) )
+( nn.tobi_endtone -6.9072 (L-H%) )
+( pp.tobi_endtone 0.0000 (H-L%) )
+( p.tobi_endtone 0.0000 (H-L%) )
+( tobi_endtone 2.0395 (H-L%) )
+( n.tobi_endtone -12.3940 (H-L%) )
+( nn.tobi_endtone -24.2593 (H-L%) )
+( pp.tobi_endtone 0.0000 (H-H%) )
+( p.tobi_endtone 0.0000 (H-H%) )
+( tobi_endtone 0.0000 (H-H%) )
+( n.tobi_endtone 0.0000 (H-H%) )
+( nn.tobi_endtone 16.1076 (H-H%) )
+( pp.tobi_endtone -1.8913 (L-) )
+( p.tobi_endtone -15.5650 (L-) )
+( tobi_endtone -18.3620 (L-) )
+( n.tobi_endtone -9.8322 (L-) )
+( nn.tobi_endtone -1.8182 (L-) )
+( pp.tobi_endtone -13.4429 (H-) )
+( p.tobi_endtone 0.0000 (H-) )
+( tobi_endtone 1.9053 (H-) )
+( n.tobi_endtone -3.4315 (H-) )
+( nn.tobi_endtone 0.0000 (H-) )
+( p.tobi_accent 0.0000 (L+H*L-H%) )
+( tobi_accent 10.0000 (L+H*L-H%) )
+( n.tobi_accent 0.0000 (L+H*L-H%) )
+( pp.syl_break 0.3501 )
+( p.syl_break -0.8121 )
+( syl_break 0.3209 )
+( n.syl_break 0.7486 )
+( nn.syl_break 0.8182 )
+( pp.stress -0.9778 )
+( p.stress -0.3096 )
+( stress 2.7752 )
+( n.stress 0.9976 )
+( nn.stress 2.7343 )
+( syl_in -1.9845 )
+( syl_out 0.7142 )
+( ssyl_in 1.0376 )
+( ssyl_out 0.3062 )
+( asyl_in 0.0000 )
+( asyl_out 0.4953 )
+( last_accent 0.0000 )
+( next_accent 0.1084 )
+( sub_phrases 0.0000 )
+( lisp_l_spread -60.0000 )
+))
+
+(set! apml_f2b_f0_lr_mid
+'(
+( Intercept 160.2474 )
+( pp.lisp_apml_tgtype 0.0000 (1) )
+( p.lisp_apml_tgtype 4.5869 (1) )
+( lisp_apml_tgtype 25.6530 (1) )
+( n.lisp_apml_tgtype 14.8255 (1) )
+( nn.lisp_apml_tgtype 12.9605 (1) )
+( pp.lisp_apml_tgtype 0.0000 (2) )
+( p.lisp_apml_tgtype 3.4867 (2) )
+( lisp_apml_tgtype 13.5566 (2) )
+( n.lisp_apml_tgtype 1.3359 (2) )
+( nn.lisp_apml_tgtype 0.0000 (2) )
+( pp.lisp_apml_tgtype 3.2989 (3) )
+( p.lisp_apml_tgtype 2.5723 (3) )
+( lisp_apml_tgtype 5.5798 (3) )
+( n.lisp_apml_tgtype 0.0000 (3) )
+( nn.lisp_apml_tgtype 0.0000 (3) )
+( pp.lisp_apml_iecount 0.0000 )
+( p.lisp_apml_iecount -0.7231 )
+( lisp_apml_iecount 0.0000 )
+( n.lisp_apml_iecount -2.6922 )
+( nn.lisp_apml_iecount 0.0000 )
+( pp.tobi_accent 0.0000 (H*) )
+( p.tobi_accent 6.0496 (H*) )
+( tobi_accent 20.9174 (H*) )
+( n.tobi_accent 0.0000 (H*) )
+( nn.tobi_accent -6.4804 (H*) )
+( pp.tobi_accent 0.0000 (L*) )
+( p.tobi_accent -5.0000 (L*) )
+( tobi_accent -45.0000 (L*) )
+( n.tobi_accent -6.1079 (L*) )
+( nn.tobi_accent -3.4815 (L*) )
+( pp.tobi_accent 0.0000 (L*+H) )
+( p.tobi_accent 30.0000 (L*+H) )
+( tobi_accent -30.0000 (L*+H) )
+( n.tobi_accent -2.7200 (L*+H) )
+( nn.tobi_accent 0.0000 (L*+H) )
+( pp.tobi_accent 0.0000 (L+H*) )
+( p.tobi_accent 6.0500 (L+H*) )
+( tobi_accent 20.9200 (L+H*) )
+( n.tobi_accent 0.0000 (L+H*) )
+( nn.tobi_accent -6.4800 (L+H*) )
+( pp.tobi_endtone 3.6235 (L-L%) )
+( p.tobi_endtone 0.2801 (L-L%) )
+( tobi_endtone -80 (L-L%) )
+( n.tobi_endtone -6.9938 (L-L%) )
+( nn.tobi_endtone -9.1546 (L-L%) )
+( pp.tobi_endtone 1.6616 (L-H%) )
+( p.tobi_endtone 2.2441 (L-H%) )
+( tobi_endtone 0.0000 (L-H%) )
+( n.tobi_endtone 0.0000 (L-H%) )
+( nn.tobi_endtone -6.6132 (L-H%) )
+( pp.tobi_endtone 0.0000 (H-L%) )
+( p.tobi_endtone 0.0000 (H-L%) )
+( tobi_endtone 0.0000 (H-L%) )
+( n.tobi_endtone -5.4416 (H-L%) )
+( nn.tobi_endtone -19.1570 (H-L%) )
+( pp.tobi_endtone 0.0000 (H-H%) )
+( p.tobi_endtone 0.0000 (H-H%) )
+( tobi_endtone 0.0000 (H-H%) )
+( n.tobi_endtone 0.0000 (H-H%) )
+( nn.tobi_endtone 32.2151 (H-H%) )
+( pp.tobi_endtone -3.7825 (L-) )
+( p.tobi_endtone -15.9598 (L-) )
+( tobi_endtone -36.7241 (L-) )
+( n.tobi_endtone -5.1082 (L-) )
+( nn.tobi_endtone -3.6363 (L-) )
+( pp.tobi_endtone -13.3813 (H-) )
+( p.tobi_endtone 0.0000 (H-) )
+( tobi_endtone -2.5270 (H-) )
+( n.tobi_endtone 0.0000 (H-) )
+( nn.tobi_endtone 0.0000 (H-) )
+( p.tobi_accent 0.0000 (L+H*L-H%) )
+( tobi_accent 40.0000 (L+H*L-H%) )
+( n.tobi_accent 0.0000 (L+H*L-H%) )
+( pp.syl_break 0.7003 )
+( p.syl_break -1.6241 )
+( syl_break 0.0000 )
+( n.syl_break 0.1439 )
+( nn.syl_break 0.5640 )
+( pp.stress -1.9556 )
+( p.stress 0.0000 )
+( stress 3.1383 )
+( n.stress 1.9952 )
+( nn.stress 2.9208 )
+( syl_in -2.5317 )
+( syl_out 1.0103 )
+( ssyl_in 2.0751 )
+( ssyl_out 0.0000 )
+( asyl_in 0.0000 )
+( asyl_out 0.0000 )
+( last_accent 0.0000 )
+( next_accent 0.5869 )
+( sub_phrases 0.0000 )
+( lisp_l_spread -60.0000 )
+))
+
+(set! apml_f2b_f0_lr_right
+'(
+( Intercept 162.6687 )
+( pp.lisp_apml_tgtype -4.0459 (1) )
+( p.lisp_apml_tgtype 3.0601 (1) )
+( lisp_apml_tgtype 27.8166 (1) )
+( n.lisp_apml_tgtype 7.4127 (1) )
+( nn.lisp_apml_tgtype 11.3458 (1) )
+( pp.lisp_apml_tgtype -3.8091 (2) )
+( p.lisp_apml_tgtype 1.7434 (2) )
+( lisp_apml_tgtype 17.1672 (2) )
+( n.lisp_apml_tgtype 0.6679 (2) )
+( nn.lisp_apml_tgtype 0.0000 (2) )
+( pp.lisp_apml_tgtype 1.6494 (3) )
+( p.lisp_apml_tgtype 1.2861 (3) )
+( lisp_apml_tgtype 9.5674 (3) )
+( n.lisp_apml_tgtype -3.1085 (3) )
+( nn.lisp_apml_tgtype 0.0000 (3) )
+( pp.lisp_apml_iecount 0.0000 )
+( p.lisp_apml_iecount -0.7829 )
+( lisp_apml_iecount -0.5447 )
+( n.lisp_apml_iecount -1.3461 )
+( nn.lisp_apml_iecount -0.7178 )
+( pp.tobi_accent 0.7904 (H*) )
+( p.tobi_accent 3.0248 (H*) )
+( tobi_accent 14.1116 (H*) )
+( n.tobi_accent 0.0000 (H*) )
+( nn.tobi_accent -3.2402 (H*) )
+( pp.tobi_accent 0.0000 (L*) )
+( p.tobi_accent -2.5000 (L*) )
+( tobi_accent -32.5000 (L*) )
+( n.tobi_accent -3.0539 (L*) )
+( nn.tobi_accent -1.7408 (L*) )
+( pp.tobi_accent 0.0000 (L*+H) )
+( p.tobi_accent 17.5000 (L*+H) )
+( tobi_accent -9.0000 (L*+H) )
+( n.tobi_accent -2.8025 (L*+H) )
+( nn.tobi_accent -0.5455 (L*+H) )
+( pp.tobi_accent 0.7900 (L+H*) )
+( p.tobi_accent 3.0250 (L+H*) )
+( tobi_accent 14.1150 (L+H*) )
+( n.tobi_accent 0.0000 (L+H*) )
+( nn.tobi_accent -3.2400 (L+H*) )
+( pp.tobi_endtone 5.7534 (L-L%) )
+( p.tobi_endtone 0.1401 (L-L%) )
+( tobi_endtone -65 (L-L%) )
+( n.tobi_endtone -11.1795 (L-L%) )
+( nn.tobi_endtone -7.8158 (L-L%) )
+( pp.tobi_endtone 4.4276 (L-H%) )
+( p.tobi_endtone 1.1220 (L-H%) )
+( tobi_endtone 20.0000 (L-H%) )
+( n.tobi_endtone -6.8995 (L-H%) )
+( nn.tobi_endtone -6.1219 (L-H%) )
+( pp.tobi_endtone 2.4327 (H-L%) )
+( p.tobi_endtone 0.0000 (H-L%) )
+( tobi_endtone -7.5781 (H-L%) )
+( n.tobi_endtone -2.7208 (H-L%) )
+( nn.tobi_endtone -14.4838 (H-L%) )
+( pp.tobi_endtone 0.0000 (H-H%) )
+( p.tobi_endtone 0.0000 (H-H%) )
+( tobi_endtone 0.0000 (H-H%) )
+( n.tobi_endtone 0.0000 (H-H%) )
+( nn.tobi_endtone 16.1076 (H-H%) )
+( pp.tobi_endtone -1.8913 (L-) )
+( p.tobi_endtone -15.5651 (L-) )
+( tobi_endtone -40.2021 (L-) )
+( n.tobi_endtone -2.5541 (L-) )
+( nn.tobi_endtone -2.2224 (L-) )
+( pp.tobi_endtone -6.6906 (H-) )
+( p.tobi_endtone -3.5483 (H-) )
+( tobi_endtone -1.2635 (H-) )
+( n.tobi_endtone 0.0000 (H-) )
+( nn.tobi_endtone 0.0000 (H-) )
+( p.tobi_accent 0.0000 (L+H*L-H%) )
+( tobi_accent -40.0000 (L+H*L-H%) )
+( n.tobi_accent 0.0000 (L+H*L-H%) )
+( pp.syl_break 0.3501 )
+( p.syl_break -1.0003 )
+( syl_break -1.5536 )
+( n.syl_break 0.0720 )
+( nn.syl_break 0.5989 )
+( pp.stress -0.9778 )
+( p.stress -0.8046 )
+( stress 1.2124 )
+( n.stress 3.9715 )
+( nn.stress 2.3914 )
+( syl_in -2.3468 )
+( syl_out 0.9792 )
+( ssyl_in 2.0463 )
+( ssyl_out 0.0000 )
+( asyl_in -0.1460 )
+( asyl_out 0.0000 )
+( last_accent -1.0992 )
+( next_accent 0.2935 )
+( sub_phrases 0.0000 )
+( lisp_l_spread -60.0000 )
+))
+
+(set! apml_f2b_f0_lr_end
+'(
+( Intercept 165.0901 )
+( pp.lisp_apml_tgtype -8.0918 (1) )
+( p.lisp_apml_tgtype 1.5332 (1) )
+( lisp_apml_tgtype 29.9802 (1) )
+( n.lisp_apml_tgtype 0.0000 (1) )
+( nn.lisp_apml_tgtype 9.7312 (1) )
+( pp.lisp_apml_tgtype -7.6181 (2) )
+( p.lisp_apml_tgtype 0.0000 (2) )
+( lisp_apml_tgtype 20.7778 (2) )
+( n.lisp_apml_tgtype 0.0000 (2) )
+( nn.lisp_apml_tgtype 0.0000 (2) )
+( pp.lisp_apml_tgtype 0.0000 (3) )
+( p.lisp_apml_tgtype 0.0000 (3) )
+( lisp_apml_tgtype 13.5550 (3) )
+( n.lisp_apml_tgtype -6.2170 (3) )
+( nn.lisp_apml_tgtype 0.0000 (3) )
+( pp.lisp_apml_iecount 0.0000 )
+( p.lisp_apml_iecount -0.8428 )
+( lisp_apml_iecount -1.0894 )
+( n.lisp_apml_iecount 0.0000 )
+( nn.lisp_apml_iecount -1.4355 )
+( pp.tobi_accent 1.5807 (H*) )
+( p.tobi_accent 0.0000 (H*) )
+( tobi_accent 7.3057 (H*) )
+( n.tobi_accent 0.0000 (H*) )
+( nn.tobi_accent 0.0000 (H*) )
+( pp.tobi_accent 0.0000 (L*) )
+( p.tobi_accent 0.0000 (L*) )
+( tobi_accent -20.0000 (L*) )
+( n.tobi_accent 0.0000 (L*) )
+( nn.tobi_accent 0.0000 (L*) )
+( pp.tobi_accent 0.0000 (L*+H) )
+( p.tobi_accent 5.0000 (L*+H) )
+( tobi_accent 12.0000 (L*+H) )
+( n.tobi_accent -2.8850 (L*+H) )
+( nn.tobi_accent -1.0910 (L*+H) )
+( pp.tobi_accent 1.5800 (L+H*) )
+( p.tobi_accent 0.0000 (L+H*) )
+( tobi_accent 7.3100 (L+H*) )
+( n.tobi_accent 0.0000 (L+H*) )
+( nn.tobi_accent 0.0000 (L+H*) )
+( pp.tobi_endtone 7.8833 (L-L%) )
+( p.tobi_endtone 0.0000 (L-L%) )
+( tobi_endtone -80 (L-L%) )
+( n.tobi_endtone -35 (L-L%) )
+( nn.tobi_endtone -6.4769 (L-L%) )
+( pp.tobi_endtone 7.1936 (L-H%) )
+( p.tobi_endtone 0.0000 (L-H%) )
+( tobi_endtone 40.0000 (L-H%) )
+( n.tobi_endtone -13.7990 (L-H%) )
+( nn.tobi_endtone -5.6305 (L-H%) )
+( pp.tobi_endtone 4.8654 (H-L%) )
+( p.tobi_endtone 0.0000 (H-L%) )
+( tobi_endtone -15.1561 (H-L%) )
+( n.tobi_endtone 0.0000 (H-L%) )
+( nn.tobi_endtone -9.8107 (H-L%) )
+( pp.tobi_endtone 0.0000 (H-H%) )
+( p.tobi_endtone 0.0000 (H-H%) )
+( tobi_endtone 0.0000 (H-H%) )
+( n.tobi_endtone 0.0000 (H-H%) )
+( nn.tobi_endtone 0.0000 (H-H%) )
+( pp.tobi_endtone 0.0000 (L-) )
+( p.tobi_endtone -15.1705 (L-) )
+( tobi_endtone -43.6801 (L-) )
+( n.tobi_endtone 0.0000 (L-) )
+( nn.tobi_endtone -0.8085 (L-) )
+( pp.tobi_endtone 0.0000 (H-) )
+( p.tobi_endtone -7.0967 (H-) )
+( tobi_endtone 0.0000 (H-) )
+( n.tobi_endtone 0.0000 (H-) )
+( nn.tobi_endtone 0.0000 (H-) )
+( p.tobi_accent 0.0000 (L+H*L-H%) )
+( tobi_accent 60.0000 (L+H*L-H%) )
+( n.tobi_accent -60.0000 (L+H*L-H%) )
+( pp.syl_break 0.0000 )
+( p.syl_break -0.3765 )
+( syl_break -3.1072 )
+( n.syl_break 0.0000 )
+( nn.syl_break 0.6338 )
+( pp.stress 0.0000 )
+( p.stress -1.6093 )
+( stress -0.7136 )
+( n.stress 5.9479 )
+( nn.stress 1.8619 )
+( syl_in -2.1619 )
+( syl_out 0.9481 )
+( ssyl_in 2.0175 )
+( ssyl_out 0.0000 )
+( asyl_in -0.2919 )
+( asyl_out 0.0000 )
+( last_accent -2.1984 )
+( next_accent 0.0000 )
+( sub_phrases 0.0000 )
+( lisp_l_spread -60.0000 )
+))
+
diff --git a/CosyVoice-ttsfrd/resource/festival/apml_kaldurtreeZ.scm b/CosyVoice-ttsfrd/resource/festival/apml_kaldurtreeZ.scm
new file mode 100644
index 0000000000000000000000000000000000000000..5a3d44e3e80ad6998d8506f825186ba1f8c15d2d
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/apml_kaldurtreeZ.scm
@@ -0,0 +1,996 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; A tree to predict zcore durations build from f2b
+;;; doesn't use actual phonemes so it can have better generalizations
+;;;
+;;; Basically copied from ked
+;;;
+
+(set! apml_kal_durs
+'(
+ (uh 0.067 0.025)
+ (hh 0.061 0.028)
+ (ao 0.138 0.046)
+ (hv 0.053 0.020)
+ (v 0.051 0.019)
+ (ih 0.058 0.023)
+ (el 0.111 0.043)
+ (ey 0.132 0.042)
+ (em 0.080 0.033)
+ (jh 0.094 0.024)
+ (w 0.054 0.023)
+ (uw 0.107 0.044)
+ (ae 0.120 0.036)
+ (en 0.117 0.056)
+ (k 0.089 0.034)
+ (y 0.048 0.025)
+ (axr 0.147 0.035)
+; (l 0.056 0.026)
+ (l 0.066 0.026)
+ (ng 0.064 0.024)
+ (zh 0.071 0.030)
+ (z 0.079 0.034)
+ (brth 0.246 0.046)
+ (m 0.069 0.028)
+ (iy 0.097 0.041)
+ (n 0.059 0.025)
+ (ah 0.087 0.031)
+ (er 0.086 0.010)
+ (b 0.069 0.024)
+ (pau 0.200 0.1)
+ (aw 0.166 0.053)
+ (p 0.088 0.030)
+ (ch 0.115 0.025)
+ (ow 0.134 0.039)
+ (dh 0.031 0.016)
+ (nx 0.049 0.100)
+ (d 0.048 0.021)
+ (ax 0.046 0.024)
+ (h# 0.060 0.083)
+ (r 0.053 0.031)
+ (eh 0.095 0.036)
+ (ay 0.137 0.047)
+ (oy 0.183 0.050)
+ (f 0.095 0.033)
+ (sh 0.108 0.031)
+ (s 0.102 0.037)
+ (g 0.064 0.021)
+ (dx 0.031 0.016)
+ (th 0.093 0.050)
+ (aa 0.094 0.037)
+ (t 0.070 0.020)
+)
+)
+
+(set! apml_kal_duration_cart_tree
+'
+((name is pau)
+ ((emph_sil is +)
+ ((0.0 -0.5))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.2)
+ ((0.0 0.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.4)
+ ((0.0 2.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.6)
+ ((0.0 4.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.8)
+ ((0.0 6.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 1.0)
+ ((0.0 8.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 1.5)
+ ((0.0 13.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 2.0)
+ ((0.0 18.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 2.5)
+ ((0.0 23.0))
+ ((p.R:SylStructure.parent.parent.lisp_apml_pause = 3.0)
+ ((0.0 28.0))
+ ((p.R:SylStructure.parent.parent.pbreak is BB)
+ ((0.0 2.0))
+ ((0.0 0.0)))))))))))))
+ ((R:SylStructure.parent.accented is 0)
+ ((n.ph_ctype is 0)
+ ((p.ph_vlng is 0)
+ ((R:SylStructure.parent.syl_codasize < 1.5)
+ ((p.ph_ctype is n)
+ ((ph_ctype is f)
+ ((0.559208 -0.783163))
+ ((1.05215 -0.222704)))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((0.589948 0.764459))
+ ((R:SylStructure.parent.asyl_in < 0.7)
+ ((1.06385 0.567944))
+ ((0.691943 0.0530272))))
+ ((ph_vlng is l)
+ ((pp.ph_vfront is 1)
+ ((1.06991 0.766486))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((0.69665 0.279248))
+ ((0.670353 0.0567774))))
+ ((p.ph_ctype is s)
+ ((seg_onsetcoda is coda)
+ ((0.828638 -0.038356))
+ ((ph_ctype is f)
+ ((0.7631 -0.545853))
+ ((0.49329 -0.765994))))
+ ((R:SylStructure.parent.parent.gpos is det)
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((R:SylStructure.parent.sub_phrases < 1)
+ ((0.811686 0.160195))
+ ((0.799015 0.713958)))
+ ((0.731599 -0.215472)))
+ ((ph_ctype is r)
+ ((0.673487 0.092772))
+ ((R:SylStructure.parent.asyl_in < 1)
+ ((0.745273 0.00132813))
+ ((0.75457 -0.334898)))))))))
+ ((pos_in_syl < 0.5)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.902446 -0.041618))
+ ((R:SylStructure.parent.sub_phrases < 2.3)
+ ((0.900629 0.262952))
+ ((1.18474 0.594794))))
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.position_type is mid)
+ ((0.512323 -0.760444))
+ ((R:SylStructure.parent.syl_out < 6.8)
+ ((pp.ph_vlng is a)
+ ((0.640575 -0.450449))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.sub_phrases < 1.3)
+ ((0.862876 -0.296956))
+ ((R:SylStructure.parent.syl_out < 2.4)
+ ((0.803215 0.0422868))
+ ((0.877856 -0.154465))))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((R:SylStructure.parent.syl_out < 1.2)
+ ((0.567081 -0.264199))
+ ((0.598043 -0.541738)))
+ ((0.676843 -0.166623)))))
+ ((0.691678 -0.57173))))
+ ((R:SylStructure.parent.parent.gpos is cc)
+ ((1.15995 0.313289))
+ ((pp.ph_vfront is 1)
+ ((0.555993 0.0695819))
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((0.721635 -0.367088))
+ ((0.71919 -0.194887)))
+ ((0.547052 -0.0637491)))))))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((0.650007 -0.333421))
+ ((0.846301 -0.165383)))
+ ((0.527756 -0.516332)))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_ctype is s)
+ ((0.504414 -0.779112))
+ ((0.812498 -0.337611)))
+ ((pos_in_syl < 1.4)
+ ((0.513041 -0.745807))
+ ((p.ph_ctype is s)
+ ((0.350582 -1.04907))
+ ((0.362 -0.914974))))))))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.position_type is initial)
+ ((pos_in_syl < 1.2)
+ ((0.580485 0.172658))
+ ((0.630973 -0.101423)))
+ ((0.577937 -0.360092)))
+ ((R:SylStructure.parent.syl_out < 2.9)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.896092 0.764189))
+ ((R:SylStructure.parent.sub_phrases < 3.6)
+ ((ph_ctype is s)
+ ((0.877362 0.555132))
+ ((0.604511 0.369882)))
+ ((0.799982 0.666966))))
+ ((seg_onsetcoda is coda)
+ ((p.ph_vlng is a)
+ ((R:SylStructure.parent.last_accent < 0.4)
+ ((0.800736 0.240634))
+ ((0.720606 0.486176)))
+ ((1.18173 0.573811)))
+ ((0.607147 0.194468))))
+ ((ph_ctype is r)
+ ((0.88377 0.499383))
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((0.62798 0.0737318))
+ ((0.787334 0.331014)))
+ ((ph_ctype is s)
+ ((0.808368 0.0929299))
+ ((0.527948 -0.0443271))))
+ ((seg_coda_fric is 0)
+ ((p.ph_vlng is a)
+ ((0.679745 0.517681))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((0.759979 0.128316))
+ ((0.775233 0.361383))))
+ ((R:SylStructure.parent.last_accent < 1.3)
+ ((0.696255 0.054136))
+ ((0.632425 0.246742))))))))
+ ((pos_in_syl < 0.3)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.847602 0.621547))
+ ((ph_ctype is s)
+ ((0.880645 0.501679))
+ ((R:SylStructure.parent.sub_phrases < 3.3)
+ ((R:SylStructure.parent.sub_phrases < 0.3)
+ ((0.901014 -0.042049))
+ ((0.657493 0.183226)))
+ ((0.680126 0.284799)))))
+ ((ph_ctype is s)
+ ((p.ph_vlng is s)
+ ((0.670033 -0.820934))
+ ((0.863306 -0.348735)))
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((0.656966 -0.40092))
+ ((0.530966 -0.639366)))
+ ((seg_coda_fric is 0)
+ ((1.04153 0.364857))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.syl_out < 3.4)
+ ((0.81503 -0.00768613))
+ ((0.602665 -0.197753)))
+ ((0.601844 -0.394632)))))))))
+ ((n.ph_ctype is f)
+ ((pos_in_syl < 1.5)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((pos_in_syl < 0.1)
+ ((1.63863 0.938841))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.897722 -0.0796637))
+ ((nn.ph_vheight is 0)
+ ((0.781081 0.480026))
+ ((0.779711 0.127175)))))
+ ((ph_ctype is r)
+ ((p.ph_ctype is s)
+ ((0.581329 -0.708767))
+ ((0.564366 -0.236212)))
+ ((ph_vlng is a)
+ ((p.ph_ctype is r)
+ ((0.70992 -0.273389))
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((0.764696 0.0581338))
+ ((nn.ph_vheight is 0)
+ ((0.977737 0.721904))
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((pp.ph_vfront is 0)
+ ((0.586708 0.0161206))
+ ((0.619949 0.227372)))
+ ((0.707285 0.445569))))))
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.syl_break is 1)
+ ((nn.ph_vfront is 2)
+ ((0.430295 -0.120097))
+ ((0.741371 0.219042)))
+ ((0.587492 0.321245)))
+ ((p.ph_ctype is n)
+ ((0.871586 0.134075))
+ ((p.ph_ctype is r)
+ ((0.490751 -0.466418))
+ ((R:SylStructure.parent.syl_codasize < 1.3)
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((p.ph_ctype is s)
+ ((0.407452 -0.425925))
+ ((0.644771 -0.542809)))
+ ((0.688772 -0.201899)))
+ ((ph_vheight is 1)
+ ((nn.ph_vheight is 0)
+ ((0.692018 0.209018))
+ ((0.751345 -0.178136)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((R:SylStructure.parent.asyl_in < 1.5)
+ ((0.599633 -0.235593))
+ ((0.60042 0.126118)))
+ ((p.ph_vlng is a)
+ ((0.7148 -0.174812))
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((0.761296 -0.231509))
+ ((0.813081 -0.536405)))))))))))))
+ ((ph_ctype is n)
+ ((0.898844 0.163343))
+ ((p.ph_vlng is s)
+ ((seg_coda_fric is 0)
+ ((0.752921 -0.45528))
+ ((0.890079 -0.0998025)))
+ ((ph_ctype is f)
+ ((0.729376 -0.930547))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((0.745052 -0.634119))
+ ((0.521502 -0.760176)))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((0.766575 -0.121355))
+ ((0.795616 -0.557509))))))))
+ ((p.ph_vlng is 0)
+ ((p.ph_ctype is r)
+ ((ph_vlng is 0)
+ ((0.733659 -0.402734))
+ ((R:SylStructure.parent.sub_phrases < 1.5)
+ ((ph_vlng is s)
+ ((0.326176 -0.988478))
+ ((n.ph_ctype is s)
+ ((0.276471 -0.802536))
+ ((0.438283 -0.900628))))
+ ((nn.ph_vheight is 0)
+ ((ph_vheight is 2)
+ ((0.521 -0.768992))
+ ((0.615436 -0.574918)))
+ ((ph_vheight is 1)
+ ((0.387376 -0.756359))
+ ((pos_in_syl < 0.3)
+ ((0.417235 -0.808937))
+ ((0.384043 -0.93315)))))))
+ ((ph_vlng is a)
+ ((ph_ctype is 0)
+ ((n.ph_ctype is s)
+ ((p.ph_ctype is f)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.415908 -0.428493))
+ ((pos_in_syl < 0.1)
+ ((0.790441 0.0211071))
+ ((0.452465 -0.254485))))
+ ((p.ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.582447 -0.389966))
+ ((0.757648 0.185781)))
+ ((R:SylStructure.parent.sub_phrases < 1.4)
+ ((0.628965 0.422551))
+ ((0.713613 0.145576)))))
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((pp.ph_vfront is 1)
+ ((0.412363 -0.62319))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((0.729259 -0.317324))
+ ((0.441633 -0.591051))))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((0.457728 -0.405607))
+ ((0.532411 -0.313148)))
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((1.14175 0.159416))
+ ((0.616396 -0.254651)))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.264181 -0.799896))
+ ((0.439801 -0.551309)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.552027 -0.707084))
+ ((0.585661 -0.901874))))
+ ((ph_ctype is s)
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((pp.ph_vfront is 1)
+ ((0.607449 0.196466))
+ ((0.599662 0.00382414)))
+ ((0.64109 -0.12859)))
+ ((pp.ph_vfront is 1)
+ ((0.720484 -0.219339))
+ ((0.688707 -0.516734))))
+ ((ph_vlng is s)
+ ((n.ph_ctype is s)
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.position_type is single)
+ ((0.659206 0.159445))
+ ((R:SylStructure.parent.parent.word_numsyls < 3.5)
+ ((R:SylStructure.parent.sub_phrases < 2)
+ ((0.447186 -0.419103))
+ ((0.631822 -0.0928561)))
+ ((0.451623 -0.576116))))
+ ((ph_vheight is 3)
+ ((0.578626 -0.64583))
+ ((0.56636 -0.4665))))
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((0.771516 -0.217292))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.688571 -0.304382))
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((n.ph_ctype is n)
+ ((0.556085 -0.572203))
+ ((0.820173 -0.240338)))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.2)
+ ((0.595398 -0.588171))
+ ((0.524737 -0.95797))))
+ ((R:SylStructure.parent.sub_phrases < 3.9)
+ ((0.371492 -0.959427))
+ ((0.440479 -0.845747)))))))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((p.ph_ctype is f)
+ ((0.524088 -0.482247))
+ ((nn.ph_vheight is 1)
+ ((0.587666 -0.632362))
+ ((ph_vlng is l)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.513286 -0.713117))
+ ((0.604613 -0.924308)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((0.577997 -0.891342))
+ ((0.659804 -1.15252))))))
+ ((pp.ph_vlng is s)
+ ((ph_ctype is f)
+ ((0.813383 -0.599624))
+ ((0.984027 -0.0771909)))
+ ((p.ph_ctype is f)
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((0.313572 -1.03242))
+ ((0.525854 -0.542799)))
+ ((R:SylStructure.parent.syl_out < 2.8)
+ ((0.613007 -0.423979))
+ ((0.570258 -0.766379))))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((R:SylStructure.parent.parent.gpos is to)
+ ((0.364585 -0.792895))
+ ((ph_vlng is l)
+ ((0.69143 -0.276816))
+ ((0.65673 -0.523721))))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.682096 -0.488102))
+ ((0.406364 -0.731758)))
+ ((0.584694 -0.822229)))))))))))
+ ((n.ph_ctype is r)
+ ((R:SylStructure.parent.position_type is initial)
+ ((p.ph_vlng is a)
+ ((0.797058 1.02334))
+ ((ph_ctype is s)
+ ((1.0548 0.536277))
+ ((0.817253 0.138201))))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((R:SylStructure.parent.syl_out < 3.3)
+ ((0.884574 -0.23471))
+ ((0.772063 -0.525292)))
+ ((nn.ph_vfront is 1)
+ ((1.25254 0.417485))
+ ((0.955557 -0.0781996)))))
+ ((pp.ph_vfront is 0)
+ ((ph_ctype is f)
+ ((n.ph_ctype is s)
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((0.583506 -0.56941))
+ ((0.525949 -0.289362)))
+ ((0.749316 -0.0921038)))
+ ((p.ph_vlng is s)
+ ((0.734234 0.139463))
+ ((0.680119 -0.0708717))))
+ ((ph_vlng is s)
+ ((ph_vheight is 1)
+ ((0.908712 -0.618971))
+ ((0.55344 -0.840495)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.838715 0.00913392))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((ph_vheight is 2)
+ ((0.555513 -0.512523))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.758711 0.121704))
+ ((0.737555 -0.25637))))
+ ((R:SylStructure.parent.syl_out < 3.1)
+ ((n.ph_ctype is s)
+ ((0.611756 -0.474522))
+ ((1.05437 -0.247206)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.567761 -0.597866))
+ ((0.785599 -0.407765)))
+ ((0.575598 -0.741256))))))
+ ((ph_ctype is s)
+ ((n.ph_ctype is s)
+ ((0.661069 -1.08426))
+ ((0.783184 -0.39789)))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 2.6)
+ ((0.511323 -0.666011))
+ ((0.691878 -0.499492)))
+ ((ph_ctype is r)
+ ((0.482131 -0.253186))
+ ((0.852955 -0.372832))))))
+ ((0.854447 -0.0936489)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.685939 -0.249982))
+ ((R:SylStructure.parent.syl_out < 3.2)
+ ((0.989843 0.18086))
+ ((0.686805 -0.0402908)))))))))
+ ((R:SylStructure.parent.syl_out < 2.4)
+ ((R:SylStructure.parent.syl_out < 0.2)
+ ((seg_onsetcoda is coda)
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 4)
+ ((pp.ph_vlng is 0)
+ ((0.959737 1.63203))
+ ((1.20714 0.994933)))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((0.864809 0.214457))
+ ((0.874278 0.730381)))
+ ((pp.ph_vfront is 0)
+ ((seg_coda_fric is 0)
+ ((1.20844 -0.336221))
+ ((1.01357 0.468302)))
+ ((0.658106 -0.799121)))))
+ ((n.ph_ctype is f)
+ ((ph_ctype is f)
+ ((1.26332 0.0300613))
+ ((ph_vlng is d)
+ ((1.02719 1.1649))
+ ((ph_ctype is 0)
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((1.14048 2.2668))
+ ((ph_vheight is 1)
+ ((1.15528 1.50375))
+ ((1.42406 2.07927))))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((0.955892 1.10243))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.32682 1.8432))
+ ((1.27582 1.59853)))))))
+ ((n.ph_ctype is 0)
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.45399 1.12927))
+ ((1.05543 0.442376)))
+ ((R:SylStructure.parent.syl_break is 4)
+ ((R:SylStructure.parent.position_type is final)
+ ((ph_ctype is f)
+ ((1.46434 1.76508))
+ ((0.978055 0.7486)))
+ ((1.2395 2.30826)))
+ ((ph_ctype is 0)
+ ((0.935325 1.69917))
+ ((nn.ph_vfront is 1)
+ ((1.20456 1.31128))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((nn.ph_vheight is 0)
+ ((1.16907 0.212421))
+ ((0.952091 0.653094)))
+ ((p.ph_ctype is 0)
+ ((1.05502 1.25802))
+ ((0.818731 0.777568))))))))
+ ((ph_ctype is f)
+ ((p.ph_ctype is 0)
+ ((1.03918 0.163941))
+ ((0.737545 -0.167063)))
+ ((R:SylStructure.parent.position_type is final)
+ ((n.ph_ctype is n)
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((R:SylStructure.parent.sub_phrases < 2.8)
+ ((0.826207 -0.000859005))
+ ((0.871119 0.273433)))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((1.17405 1.05694))
+ ((0.858394 0.244916))))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((p.ph_ctype is 0)
+ ((1.14092 1.21187))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.02653 0.59865))
+ ((0.94248 1.1634))))
+ ((seg_coda_fric is 0)
+ ((1.07441 0.292935))
+ ((1.15736 0.92574)))))
+ ((ph_vlng is s)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.34638 1.23484))
+ ((0.951514 2.02008)))
+ ((ph_ctype is 0)
+ ((p.ph_ctype is r)
+ ((0.806106 0.697089))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.10891 0.992197))
+ ((1.04657 1.51093))))
+ ((1.18165 0.520952)))))))))
+ ((p.ph_vlng is 0)
+ ((pos_in_syl < 0.7)
+ ((R:SylStructure.parent.position_type is final)
+ ((ph_ctype is r)
+ ((0.966357 0.185827))
+ ((ph_ctype is s)
+ ((0.647163 0.0332298))
+ ((0.692972 -0.534917))))
+ ((ph_ctype is s)
+ ((0.881521 0.575107))
+ ((p.ph_ctype is f)
+ ((0.8223 -0.111275))
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((0.969188 0.09447))
+ ((0.894438 0.381947))))))
+ ((p.ph_ctype is f)
+ ((0.479748 -0.490108))
+ ((0.813125 -0.201268))))
+ ((ph_ctype is s)
+ ((0.908566 1.20397))
+ ((R:SylStructure.parent.last_accent < 1.2)
+ ((0.88078 0.636568))
+ ((0.978087 1.07763))))))
+ ((pos_in_syl < 1.3)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((pos_in_syl < 0.1)
+ ((R:SylStructure.parent.position_type is initial)
+ ((p.ph_ctype is n)
+ ((0.801651 -0.0163359))
+ ((ph_ctype is s)
+ ((n.ph_ctype is r)
+ ((0.893307 1.07253))
+ ((p.ph_vlng is 0)
+ ((0.92651 0.525806))
+ ((0.652444 0.952792))))
+ ((p.ph_vlng is 0)
+ ((seg_onsetcoda is coda)
+ ((0.820151 0.469117))
+ ((p.ph_ctype is f)
+ ((0.747972 -0.0716448))
+ ((ph_ctype is f)
+ ((0.770882 0.457137))
+ ((0.840905 0.102492)))))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.667824 0.697337))
+ ((0.737967 0.375114))))))
+ ((ph_vheight is 1)
+ ((0.624353 0.410671))
+ ((R:SylStructure.parent.asyl_in < 0.8)
+ ((0.647905 -0.331055))
+ ((p.ph_ctype is s)
+ ((0.629039 -0.240616))
+ ((0.749277 -0.0191273))))))
+ ((ph_vheight is 3)
+ ((p.ph_ctype is s)
+ ((0.626922 0.556537))
+ ((0.789357 0.153892)))
+ ((seg_onsetcoda is coda)
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.parent.word_numsyls < 3.4)
+ ((0.744714 0.123242))
+ ((0.742039 0.295753)))
+ ((seg_coda_fric is 0)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((ph_vheight is 1)
+ ((0.549715 -0.341018))
+ ((0.573641 -0.00893114)))
+ ((nn.ph_vfront is 2)
+ ((0.67099 -0.744625))
+ ((0.664438 -0.302803))))
+ ((p.ph_vlng is 0)
+ ((0.630028 0.113815))
+ ((0.632794 -0.128733)))))
+ ((ph_ctype is r)
+ ((0.367169 -0.854509))
+ ((0.94334 -0.216179))))))
+ ((n.ph_ctype is f)
+ ((ph_vlng is 0)
+ ((1.3089 0.46195))
+ ((R:SylStructure.parent.syl_codasize < 1.3)
+ ((1.07673 0.657169))
+ ((pp.ph_vlng is 0)
+ ((0.972319 1.08222))
+ ((1.00038 1.46257)))))
+ ((p.ph_vlng is l)
+ ((1.03617 0.785204))
+ ((p.ph_vlng is a)
+ ((R:SylStructure.parent.position_type is final)
+ ((1.00681 0.321168))
+ ((0.928115 0.950834)))
+ ((ph_vlng is 0)
+ ((pos_in_syl < 0.1)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.863682 -0.167374))
+ ((nn.ph_vheight is 0)
+ ((p.ph_ctype is f)
+ ((0.773591 -0.00374425))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.951802 0.228448))
+ ((1.02282 0.504252))))
+ ((1.09721 0.736476))))
+ ((R:SylStructure.parent.position_type is final)
+ ((1.04302 0.0590974))
+ ((0.589208 -0.431535))))
+ ((n.ph_ctype is 0)
+ ((1.27879 1.00642))
+ ((ph_vlng is s)
+ ((R:SylStructure.parent.asyl_in < 1.4)
+ ((0.935787 0.481652))
+ ((0.9887 0.749861)))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.921307 0.0696307))
+ ((0.83675 0.552212)))
+ ((0.810076 -0.0479225))))))))))
+ ((ph_ctype is s)
+ ((n.ph_ctype is s)
+ ((0.706959 -1.0609))
+ ((p.ph_ctype is n)
+ ((0.850614 -0.59933))
+ ((n.ph_ctype is r)
+ ((0.665947 0.00698725))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.762889 -0.0649044))
+ ((0.723956 -0.248899)))
+ ((R:SylStructure.parent.sub_phrases < 1.4)
+ ((0.632957 -0.601987))
+ ((0.889114 -0.302401)))))))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.865267 0.164636))
+ ((0.581827 -0.0989051)))
+ ((nn.ph_vfront is 2)
+ ((0.684459 -0.316836))
+ ((0.778854 -0.0961191))))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((p.ph_ctype is s)
+ ((0.837964 -0.429437))
+ ((0.875304 -0.0652743)))
+ ((0.611071 -0.635089))))
+ ((p.ph_ctype is r)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.762012 0.0139361))
+ ((0.567983 -0.454845)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((ph_ctype is l)
+ ((1.18845 0.809091))
+ ((R:SylStructure.parent.position_type is initial)
+ ((ph_ctype is n)
+ ((0.773548 -0.277092))
+ ((1.01586 0.281001)))
+ ((p.ph_ctype is 0)
+ ((1.06831 0.699145))
+ ((0.924189 0.241873)))))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((ph_ctype is n)
+ ((0.592321 -0.470784))
+ ((0.778688 -0.072112)))
+ ((n.ph_ctype is s)
+ ((1.08848 0.0733489))
+ ((1.25674 0.608371))))))))))
+ ((pos_in_syl < 0.7)
+ ((p.ph_vlng is 0)
+ ((R:SylStructure.parent.position_type is mid)
+ ((ph_ctype is 0)
+ ((ph_vheight is 2)
+ ((0.456225 -0.293282))
+ ((0.561529 -0.0816115)))
+ ((0.6537 -0.504024)))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((1.31586 0.98395))
+ ((R:SylStructure.parent.position_type is single)
+ ((0.816869 0.634789))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((1.05578 0.479029))
+ ((R:SylStructure.parent.asyl_in < 0.4)
+ ((1.11813 0.143214))
+ ((0.87178 0.406834))))))
+ ((n.ph_ctype is n)
+ ((R:SylStructure.parent.last_accent < 0.6)
+ ((0.838154 -0.415599))
+ ((0.924024 0.110288)))
+ ((seg_onsetcoda is coda)
+ ((nn.ph_vfront is 2)
+ ((0.670096 0.0314187))
+ ((n.ph_ctype is f)
+ ((1.00363 0.693893))
+ ((R:SylStructure.parent.syl_out < 6)
+ ((0.772363 0.215675))
+ ((0.920313 0.574068)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.673837 -0.458142))
+ ((R:SylStructure.parent.sub_phrases < 2.8)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.894817 0.304628))
+ ((ph_ctype is n)
+ ((0.787302 -0.23094))
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((1.12278 0.326954))
+ ((0.802236 -0.100616)))
+ ((0.791255 -0.0919132)))
+ ((0.95233 0.219053)))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((ph_ctype is f)
+ ((1.0616 0.216118))
+ ((0.703216 -0.00834086)))
+ ((ph_ctype is f)
+ ((1.22277 0.761763))
+ ((0.904811 0.332721))))))))))
+ ((ph_vheight is 0)
+ ((p.ph_vlng is s)
+ ((0.873379 0.217178))
+ ((n.ph_ctype is r)
+ ((0.723915 1.29451))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 4)
+ ((seg_coda_fric is 0)
+ ((p.ph_vlng is l)
+ ((0.849154 0.945261))
+ ((0.633261 0.687498)))
+ ((0.728546 0.403076)))
+ ((0.850962 1.00255)))
+ ((0.957999 1.09113)))
+ ((0.85771 0.209045)))))
+ ((ph_vheight is 2)
+ ((0.803401 -0.0544067))
+ ((0.681353 0.256045)))))
+ ((n.ph_ctype is f)
+ ((ph_ctype is s)
+ ((p.ph_vlng is 0)
+ ((0.479307 -0.9673))
+ ((0.700477 -0.351397)))
+ ((ph_ctype is f)
+ ((0.73467 -0.6233))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_ctype is s)
+ ((0.56282 0.266234))
+ ((p.ph_ctype is r)
+ ((0.446203 -0.302281))
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((ph_ctype is 0)
+ ((0.572016 -0.0102436))
+ ((0.497358 -0.274514)))
+ ((0.545477 0.0482177)))))
+ ((ph_vlng is s)
+ ((0.805269 0.888495))
+ ((ph_ctype is n)
+ ((0.869854 0.653018))
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((0.735031 0.0612886))
+ ((0.771859 0.346637))))))))
+ ((R:SylStructure.parent.syl_codasize < 1.4)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.743458 0.0411808))
+ ((1.13068 0.613305)))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((1.11481 0.175467))
+ ((0.937893 -0.276407)))
+ ((0.74264 -0.550878))))
+ ((pos_in_syl < 3.4)
+ ((seg_onsetcoda is coda)
+ ((ph_ctype is r)
+ ((n.ph_ctype is s)
+ ((0.714319 -0.240328))
+ ((p.ph_ctype is 0)
+ ((0.976987 0.330352))
+ ((1.1781 -0.0816682))))
+ ((ph_ctype is l)
+ ((n.ph_ctype is 0)
+ ((1.39137 0.383533))
+ ((0.725585 -0.324515)))
+ ((ph_vheight is 3)
+ ((ph_vlng is d)
+ ((0.802626 -0.62487))
+ ((n.ph_ctype is r)
+ ((0.661091 -0.513869))
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((0.482285 0.207874))
+ ((0.401601 -0.0204711)))
+ ((0.733755 0.397372)))))
+ ((n.ph_ctype is r)
+ ((p.ph_ctype is 0)
+ ((pos_in_syl < 1.2)
+ ((0.666325 0.271734))
+ ((nn.ph_vheight is 0)
+ ((0.642401 -0.261466))
+ ((0.783684 -0.00956571))))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.692225 -0.381895))
+ ((0.741921 -0.0898767))))
+ ((nn.ph_vfront is 2)
+ ((ph_ctype is s)
+ ((0.697527 -1.12626))
+ ((n.ph_ctype is s)
+ ((ph_vlng is 0)
+ ((R:SylStructure.parent.sub_phrases < 2.4)
+ ((0.498719 -0.906926))
+ ((0.635342 -0.625651)))
+ ((0.45886 -0.385089)))
+ ((0.848596 -0.359702))))
+ ((p.ph_vlng is a)
+ ((p.ph_ctype is 0)
+ ((0.947278 0.216904))
+ ((0.637933 -0.394349)))
+ ((p.ph_ctype is r)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((0.529903 -0.860573))
+ ((0.581378 -0.510488)))
+ ((ph_vlng is 0)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_vlng is d)
+ ((0.768363 0.0108428))
+ ((ph_ctype is s)
+ ((0.835756 -0.035054))
+ ((ph_ctype is f)
+ ((p.ph_vlng is s)
+ ((0.602016 -0.179727))
+ ((0.640126 -0.297341)))
+ ((0.674628 -0.542602)))))
+ ((ph_ctype is s)
+ ((0.662261 -0.60496))
+ ((0.662088 -0.432058))))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((0.582448 -0.389079))
+ ((ph_ctype is s)
+ ((0.60413 -0.73564))
+ ((0.567153 -0.605444)))))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.761115 -0.827377))
+ ((ph_ctype is n)
+ ((0.855183 -0.275338))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((0.788288 -0.802801))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((0.686134 -0.371234))
+ ((0.840184 -0.772883)))))))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((n.ph_ctype is n)
+ ((0.423592 -0.655006))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((0.595269 -0.303751))
+ ((0.478433 -0.456882))))
+ ((0.688133 -0.133182)))
+ ((seg_onset_stop is 0)
+ ((1.27464 0.114442))
+ ((0.406837 -0.167545))))))))))))
+ ((ph_ctype is r)
+ ((0.462874 -0.87695))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.645442 -0.640572))
+ ((0.673717 -0.321322)))))
+ ((0.61008 -0.925472))))))))
+;; RMSE 0.8085 Correlation is 0.5899 Mean (abs) Error 0.6024 (0.5393)
+
+
+))
+
+(provide 'apml_kaldurtreeZ)
diff --git a/CosyVoice-ttsfrd/resource/festival/cart_aux.scm b/CosyVoice-ttsfrd/resource/festival/cart_aux.scm
new file mode 100644
index 0000000000000000000000000000000000000000..b641a3aad7dadcb6e0b04e7bc8b96bd0d625d274
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/cart_aux.scm
@@ -0,0 +1,200 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996-2011 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Some functions for manipulating decision trees
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (cart_prune_tree_thresh tree threshold default)
+"(prune_cart_tree_thresh TREE THRESHOLD DEFAULT)
+Prune the classification tree TREE so that all tail nodes with
+a prediction probabality less than THRESHOLD and changed to return
+DEFAULT instead. This may be used when different mistakes have actually
+different penalites hence some control of the defaults need to be
+controlled."
+ (cond
+ ((cdr tree) ;; a question
+ (list
+ (car tree)
+ (cart_prune_tree_thresh (car (cdr tree)) threshold default)
+ (cart_prune_tree_thresh (car (cdr (cdr tree))) threshold default)))
+ ((< (cart_class_probability (car tree)) threshold)
+ (list (list (list threshold default) default)))
+ (t ;; leave asis
+ tree)))
+
+(define (cart_class_probability class)
+ "(cart_class_probability CLASS)
+Returns the probability of the best class in the cart leaf node CLASS.
+If CLASS simple has a value and now probabilities the probabilities
+it assume to be 1.0."
+ (let ((val 0.0))
+ (set! val (assoc (car (last class)) class))
+ (if val
+ (car (cdr val))
+ 1.0)))
+
+(define (cart_class_prune_merge tree)
+ "(cart_class_prune_merge tree)
+Prune all sub trees which are pure. That is they all predict the
+same class. This can happen when some other pruning technique
+as modified a sub-tree now making it pure."
+ (let ((pure (cart_tree_pure tree)))
+ (cond
+ (pure pure)
+ ((cdr tree);; a question
+ (list
+ (car tree)
+ (cart_class_prune_merge (car (cdr tree)))
+ (cart_class_prune_merge (car (cdr (cdr tree))))))
+ (t;; a leaf leave asis
+ tree))))
+
+(define (cart_tree_pure tree)
+ "(cart_tree_pure tree)
+Returns a probability density function if all nodes in this tree
+predict the same class and nil otherwise"
+ (cond
+ ((cdr tree)
+ (let ((left (cart_tree_pure (car (cdr tree))))
+ (right (cart_tree_pure (car (cdr (cdr tree))))))
+ (cond
+ ((not left) nil)
+ ((not right) nil)
+ ((equal? (car (last left)) (car (last right)))
+ left)
+ (t
+ nil))))
+ (t ;; its a leaf, so of couse its pure
+ tree)))
+
+(define (cart_simplify_tree tree map)
+ "(cart_simplify_tree TREE)
+Simplify a CART tree by reducing probability density functions to
+simple single clasifications (no probabilities). This removes valuable
+information from the tree but makes them smaller easier to read by humans
+and faster to read by machines. Also the classes may be mapped by the assoc
+list in map. The bright ones amongst you will note this could be
+better and merge 'is' operators into 'in' operators in some situations
+especially if you are ignoring actual probability distributions."
+ (cond
+ ((cdr tree)
+ (list
+ (car tree)
+ (cart_simplify_tree (car (cdr tree)) map)
+ (cart_simplify_tree (car (cdr (cdr tree))) map)))
+ (t
+ (let ((class (car (last (car tree)))))
+ (if (assoc class map)
+ (list (cdr (assoc class map)))
+ (list (last (car tree))))))))
+
+(define (cart_simplify_tree2 tree)
+ "(cart_simplify_tree2 TREE)
+Simplify a CART tree by reducing probability density functions to
+only non-zero probabilities."
+ (cond
+ ((cdr tree)
+ (list
+ (car tree)
+ (cart_simplify_tree2 (car (cdr tree)))
+ (cart_simplify_tree2 (car (cdr (cdr tree))))))
+ (t
+ (list
+ (cart_remove_zero_probs (car tree))))))
+
+(define (cart_remove_zero_probs pdf)
+ "(cart_remove_zero_probs pdf)
+Removes zero probability classes in pdf, last in list
+is best in class (as from cart leaf node)."
+ (cond
+ ((null (cdr pdf)) pdf)
+ ((equal? 0 (car (cdr (car pdf))))
+ (cart_remove_zero_probs (cdr pdf)))
+ (t
+ (cons
+ (car pdf)
+ (cart_remove_zero_probs (cdr pdf))))))
+
+(define (cart_interpret_debug i tree)
+ "(cart_interpret_debug i tree)
+In comparing output between different implementations (flite vs festival)
+This prints out the details as it interprets the tree."
+ (cond
+ ((cdr tree) ;; question
+ (format t "%s %s %s\n" (car (car tree)) (upcase (cadr (car tree)))
+ (car (cddr (car tree))))
+ (set! a (item.feat i (car (car tree))))
+ (format t "%s\n" a)
+ (cond
+ ((string-equal "is" (cadr (car tree)))
+ (if (string-equal a (car (cddr (car tree))))
+ (begin
+ (format t " YES\n")
+ (cart_interpret_debug i (car (cdr tree))))
+ (begin
+ (format t " NO\n")
+ (cart_interpret_debug i (car (cddr tree))))))
+ ((string-equal "<" (cadr (car tree)))
+ (if (< (parse-number a) (parse-number (car (cddr (car tree)))))
+ (begin
+ (format t " YES\n")
+ (cart_interpret_debug i (car (cdr tree))))
+ (begin
+ (format t " NO\n")
+ (cart_interpret_debug i (car (cddr tree))))))
+ (t
+ (format t "unknown q type %l\n" (car tree)))))
+ (t ;; leaf
+ (car tree)
+ )))
+
+;;;
+;;; Prediction tree for OLS trees
+;;; applies OLS coefficients from appropriate leaf of tree
+;;;
+(define (ols_tree_predict i tree)
+ ;; Surprisingly simple function does the necessary work
+ (let ((p (wagon i tree)))
+ (apply
+ +
+ (cons
+ (cadr (car (car p))) ;; Intercept
+ (mapcar
+ (lambda (fp)
+ ;; get feature value and multiple by coefficent
+ (* (parse-number (item.feat i (car fp))) (cadr fp)))
+ (cdr (car p)))))))
+
+(provide 'cart_aux)
+
diff --git a/CosyVoice-ttsfrd/resource/festival/clunits.scm b/CosyVoice-ttsfrd/resource/festival/clunits.scm
new file mode 100644
index 0000000000000000000000000000000000000000..9ad181ad2894225abb35bf82c2cb52602200d7b2
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/clunits.scm
@@ -0,0 +1,287 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Carnegie Mellon University and ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1998-2001 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE ;;
+;;; CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO ;;
+;;; THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ;;
+;;; AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE ;;
+;;; MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, ;;
+;;; INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ;;
+;;; RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ;;
+;;; OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;;
+;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Cluster Unit selection support (Black and Taylor Eurospeech '97)
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Run-time support, selection and synthesis and some debugging functions
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require_module 'clunits)
+
+(defvar cluster_synth_pre_hooks nil)
+(defvar cluster_synth_post_hooks nil)
+
+(defvar clunits_time time) ;; some old voices might use this
+
+(defSynthType Cluster
+ (apply_hooks cluster_synth_pre_hooks utt)
+ (Clunits_Select utt)
+ (Clunits_Get_Units utt)
+ (Clunits_Join_Units utt)
+ (apply_hooks cluster_synth_post_hooks utt)
+ utt
+)
+
+(define (Clunits_Join_Units utt)
+ "(Clunits_Join_Units utt)
+Join the preselected and gotten units into a waveform."
+ (let ((join_method (get_param 'join_method clunits_params 'simple)))
+ ;; Choice of function to put them together
+ (cond
+ ((string-equal join_method 'windowed)
+ (Clunits_Windowed_Wave utt)
+ (clunits::fix_segs_durs utt))
+ ((string-equal join_method 'smoothedjoin)
+ (Clunits_SmoothedJoin_Wave utt)
+ (clunits::fix_segs_durs utt))
+ ((string-equal join_method 'none)
+ t)
+ ((string-equal join_method 'modified_lpc)
+ (defvar UniSyn_module_hooks nil)
+ (Param.def "unisyn.window_name" "hanning")
+ (Param.def "unisyn.window_factor" 1.0)
+ (Parameter.def 'us_sigpr 'lpc)
+ (mapcar
+ (lambda (u s)
+ (item.set_feat s "source_end" (item.feat u "end")))
+ (utt.relation.items utt 'Unit)
+ (utt.relation.items utt 'Segment))
+ (us_unit_concat utt)
+ (if (not (member 'f0 (utt.relationnames utt)))
+ (targets_to_f0 utt))
+ (if (utt.relation.last utt 'Segment)
+ (set! pm_end (+ (item.feat (utt.relation.last utt 'Segment) "end")
+ 0.02))
+ (set! pm_end 0.02))
+ (us_f0_to_pitchmarks utt 'f0 'TargetCoef pm_end)
+ (us_mapping utt 'segment_single)
+ (us_generate_wave utt (Parameter.get 'us_sigpr)
+ 'analysis_period))
+ ((string-equal join_method 'smoothed_lpc)
+; (format t "smoothed_lpc\n")
+ (defvar UniSyn_module_hooks nil)
+ (Param.def "unisyn.window_name" "hanning")
+ (Param.def "unisyn.window_factor" 1.0)
+ (Parameter.def 'us_sigpr 'lpc)
+ (mapcar
+ (lambda (u s)
+ (item.set_feat s "source_end" (item.feat u "end"))
+ (item.set_feat s "unit_duration"
+ (- (item.feat u "seg_end") (item.feat u "seg_start")))
+ )
+ (utt.relation.items utt 'Unit)
+ (utt.relation.items utt 'Segment))
+ (us_unit_concat utt)
+ (mapcar
+ (lambda (u s)
+ (item.set_feat s "num_frames" (item.feat u "num_frames")))
+ (utt.relation.items utt 'Unit)
+ (utt.relation.items utt 'Segment))
+ (if (not (member 'f0 (utt.relationnames utt)))
+ (targets_to_f0 utt))
+ (if (utt.relation.last utt 'Segment)
+ (set! pm_end (+ (item.feat (utt.relation.last utt 'Segment) "end")
+ 0.02))
+ (set! pm_end 0.02))
+ (us_f0_to_pitchmarks utt 'f0 'TargetCoef pm_end)
+ (cl_mapping utt clunits_params)
+ (us_generate_wave utt (Parameter.get 'us_sigpr)
+ 'analysis_period))
+ (t
+ (Clunits_Simple_Wave utt)))
+ utt
+ )
+)
+
+(define (clunits::units_selected utt filename)
+ "(clunits::units_selected utt filename)
+Output selected unitsfile indexes for each unit in the given utterance.
+Results saved in given file name, or stdout if filename is \"-\"."
+ (let ((fd (if (string-equal filename "-")
+ t
+ (fopen filename "w")))
+ (end 0)
+ (sample_rate
+ (cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
+ (format fd "#\n")
+ (mapcar
+ (lambda (s)
+ (let ((dur (/ (- (item.feat s "samp_end")
+ (item.feat s "samp_start"))
+ sample_rate))
+ (start (/ (item.feat s "samp_start") sample_rate)))
+ (set! end (+ end dur))
+ (format fd "%f 125 %s ; %s %10s %f %f %f\n"
+ end
+ (string-before (item.name s) "_")
+ (item.name s)
+ (item.feat s "fileid")
+ (item.feat s "unit_start")
+ (item.feat s "unit_middle")
+ (item.feat s "unit_end"))
+ ))
+ (utt.relation.items utt 'Unit))
+ (if (not (string-equal filename "-"))
+ (fclose fd))
+ t))
+
+(define (clunits::units_segs utt filename)
+ "(clunits::units_segs utt filename)
+Svaes the unit selections (alone) for display."
+ (let ((fd (if (string-equal filename "-")
+ t
+ (fopen filename "w")))
+ (end 0)
+ (sample_rate
+ (cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
+ (format fd "#\n")
+ (mapcar
+ (lambda (s)
+ (let ((dur (/ (- (item.feat s "samp_end")
+ (item.feat s "samp_start"))
+ sample_rate))
+ (start (/ (item.feat s "samp_start") sample_rate)))
+ (set! end (+ end dur))
+ (format fd "%f 125 %s \n"
+ end
+ (string-before (item.name s) "_")
+; (item.name s)
+ )
+ ))
+ (utt.relation.items utt 'Unit))
+ (if (not (string-equal filename "-"))
+ (fclose fd))
+ t))
+
+(define (clunits::fix_segs_durs utt)
+ "(clunits::fix_segs_durs utt)
+Takes the actual unit times and places then back on the segs."
+ (let ((end 0)
+ (sample_rate
+ (cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
+ (mapcar
+ (lambda (u s)
+ (let ((dur (/ (- (item.feat u "samp_end")
+ (item.feat u "samp_start"))
+ sample_rate))
+ (seg_start (/ (- (item.feat u "samp_seg_start")
+ (item.feat u "samp_start"))
+ sample_rate)))
+ (if (item.prev s)
+ (item.set_feat (item.prev s) "end"
+ (+ (item.feat s "p.end") seg_start)))
+ (set! end (+ end dur))
+ (item.set_feat s "end" end)))
+ (utt.relation.items utt 'Unit)
+ (utt.relation.items utt 'Segment)
+ )
+ utt))
+
+(define (clunits::display utt)
+ "(clunits::display utt)
+Display utterance with emulabel. Note this saves files in
+scratch/wav/ and scratch/lab/."
+ (let ((id "cl01"))
+ (utt.save.wave utt (format nil "scratch/wav/%s.wav" id))
+ (utt.save.segs utt (format nil "scratch/lab/%s.lab" id))
+ (system "cd scratch; emulabel ../etc/emu_lab cl01 &")
+ t))
+
+; (define (clunits::debug_resynth_units utt)
+; "(clunits::debug_resynth_units utt)
+; Check each of the units in utt against the related label
+; files and re-synth with any given new boundaries. Note this is
+; will only work if the segment still overlaps with its original and
+; also note that with a rebuild of the clunits db a complete different
+; set of units may be selected for this utterance."
+; (let ()
+; (mapcar
+; (lambda (unit)
+; (clunits::check_unit_boundaries unit))
+; (utt.relation.items utt 'Unit))
+; ;; This can't be done like this ...
+; (Clunits_Get_Units utt) ;; get unit signal/track stuff
+; (Clunits_Join_Units utt) ;; make a complete waveform
+; (apply_hooks cluster_synth_post_hooks utt)
+; utt)
+; )
+
+(define (clunits::join_parameters utt)
+ "(clunits::join_parameters utt)
+Join selected paremeters (rather than the signal), used in F0 and
+Articulatory selection."
+ (let ((params nil)
+ (num_channels 0)
+ (num_frames 0 ))
+
+ (mapcar
+ (lambda (unit)
+ (set! num_frames
+ (+ num_frames
+ (track.num_frames (item.feat unit "coefs"))))
+ (set! num_channels (track.num_channels (item.feat unit "coefs")))
+ (format t "coounting %d %d\n" num_frames num_channels)
+ )
+ (utt.relation.items utt 'Unit))
+
+ (set! params (track.resize nil 0 num_channels))
+
+ (mapcar
+ (lambda (unit)
+ (set! frames 0)
+ (format t "inserting \n")
+ (format t "%l %l %l %l %l\n"
+ params (track.num_frames params)
+ (item.feat unit "coefs") 0
+ (track.num_frames (item.feat unit "coefs")))
+ (track.insert
+ params (track.num_frames params)
+ (item.feat unit "coefs") 0
+ (track.num_frames (item.feat unit "coefs")))
+ )
+ (utt.relation.items utt 'Unit))
+
+ (utt.relation.create utt "AllCoefs")
+ (set! coefs_item (utt.relation.append utt "AllCoefs"))
+ (item.set_feat coefs_item "name" "AllCoefs")
+ (item.set_feat coefs_item "AllCoefs" params)
+
+ utt
+))
+
+
+(provide 'clunits)
diff --git a/CosyVoice-ttsfrd/resource/festival/cmusphinx2_phones.scm b/CosyVoice-ttsfrd/resource/festival/cmusphinx2_phones.scm
new file mode 100644
index 0000000000000000000000000000000000000000..49c6597e557c0e2d8315a1fb594c67e9a16c4eb7
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/cmusphinx2_phones.scm
@@ -0,0 +1,119 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;;
+;;; Carnegie Mellon University ;;;
+;;; and Alan W Black and Kevin Lenzo ;;;
+;;; Copyright (c) 1998-2000 ;;;
+;;; All Rights Reserved. ;;;
+;;; ;;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;;
+;;; this software and its documentation without restriction, including ;;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;;
+;;; the following conditions: ;;;
+;;; 1. The code must retain the above copyright notice, this list of ;;;
+;;; conditions and the following disclaimer. ;;;
+;;; 2. Any modifications must be clearly marked as such. ;;;
+;;; 3. Original authors' names are not deleted. ;;;
+;;; 4. The authors' names are not used to endorse or promote products ;;;
+;;; derived from this software without specific prior written ;;;
+;;; permission. ;;;
+;;; ;;;
+;;; CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ;;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;;
+;;; SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ;;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;;
+;;; THIS SOFTWARE. ;;;
+;;; ;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; A definition of the cmusphinx2 phone set used in the BU RADIO FM
+;;; corpus, some people call this the darpa set. This one
+;;; has the closures removed
+;;;
+
+(defPhoneSet
+ cmusphinx2
+ ;;; Phone Features
+ (;; vowel or consonant
+ (vc + -)
+ ;; vowel length: short long dipthong schwa
+ (vlng s l d a 0)
+ ;; vowel height: high mid low
+ (vheight 1 2 3 0)
+ ;; vowel frontness: front mid back
+ (vfront 1 2 3 0)
+ ;; lip rounding
+ (vrnd + - 0)
+ ;; consonant type: stop fricative affricate nasal lateral approximant
+ (ctype s f a n l r 0)
+ ;; place of articulation: labial alveolar palatal labio-dental
+ ;; dental velar glottal
+ (cplace l a p b d v g 0)
+ ;; consonant voicing
+ (cvox + - 0)
+ )
+ ;; Phone set members
+ (
+
+ ;; Note these features were set by awb so they are wrong !!!
+
+; phone vc vl vh vf vr ct cp cv
+ (AA + l 3 3 - 0 0 0) ;; father
+ (AE + s 3 1 - 0 0 0) ;; fat
+ (AH + s 2 2 - 0 0 0) ;; but
+ (AO + l 3 3 + 0 0 0) ;; lawn
+ (AW + d 3 2 - 0 0 0) ;; how
+ (AX + a 2 2 - 0 0 0) ;; about
+ (AXR + a 2 2 - r a +)
+ (AY + d 3 2 - 0 0 0) ;; hide
+ (B - 0 0 0 0 s l +)
+ (CH - 0 0 0 0 a p -)
+ (D - 0 0 0 0 s a +)
+ (DH - 0 0 0 0 f d +)
+ (DX - 0 0 0 0 s a +)
+ (EH + s 2 1 - 0 0 0) ;; get
+ (ER + a 2 2 - r 0 0)
+ (EY + d 2 1 - 0 0 0) ;; gate
+ (F - 0 0 0 0 f b -)
+ (G - 0 0 0 0 s v +)
+ (HH - 0 0 0 0 f g -)
+ (IH + s 1 1 - 0 0 0) ;; bit
+ (IY + l 1 1 - 0 0 0) ;; beet
+ (JH - 0 0 0 0 a p +)
+ (K - 0 0 0 0 s v -)
+ (L - 0 0 0 0 l a +)
+ (M - 0 0 0 0 n l +)
+ (N - 0 0 0 0 n a +)
+ (NG - 0 0 0 0 n v +)
+ (OW + d 2 3 + 0 0 0) ;; lone
+ (OY + d 2 3 + 0 0 0) ;; toy
+ (P - 0 0 0 0 s l -)
+ (R - 0 0 0 0 r a +)
+ (S - 0 0 0 0 f a -)
+ (SH - 0 0 0 0 f p -)
+ (T - 0 0 0 0 s a -)
+ (TH - 0 0 0 0 f d -)
+ (UH + s 1 3 + 0 0 0) ;; full
+ (UW + l 1 3 + 0 0 0) ;; fool
+ (V - 0 0 0 0 f b +)
+ (W - 0 0 0 0 r l +)
+ (Y - 0 0 0 0 r p +)
+ (Z - 0 0 0 0 f a +)
+ (ZH - 0 0 0 0 f p +)
+ (SIL - 0 0 0 0 0 0 -) ; added
+ )
+)
+
+(PhoneSet.silences '(SIL))
+
+(provide 'cmusphinx2_phones)
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/cslush.scm b/CosyVoice-ttsfrd/resource/festival/cslush.scm
new file mode 100644
index 0000000000000000000000000000000000000000..6864917d6cc81b9c1620eb5738881f168cddd974
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/cslush.scm
@@ -0,0 +1,79 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Functions specific to using Festival in cslush part of the OGI toolkit
+;;; The OGI toolkit is a complete dialog building system with speech
+;;; recognition and synthesis (Festival) it is available for free for
+;;; research purposes from
+;;; http://www.cse.ogi.edu/CSLU/toolkit/toolkit.html
+;;;
+;;; Note this cslush interface requires you to compile festival
+;;; with tcl (7.6)
+;;;
+;;; The functions replace the C++ level functions Jacques H. de Villiers
+;;; from CSLU wrote for the previous version
+;;;
+
+(if (not (member 'tcl *modules*))
+ (error "cslush: can't load cslush, TCL not supported in this installation of Festival."))
+
+(define (cslush.getwave utt)
+"(cslush.getwave UTT)
+Extract wave memory info, pass this to wave import in CSLUsh."
+ (format nil "%s %s %s"
+ (utt.wave.info utt 'data_addr)
+ (utt.wave.info utt 'num_samples)
+ (utt.wave.info utt 'sample_rate)))
+
+(define (cslush.getphone utt)
+"(cslush.getphone UTT)
+Return segment names a single string of phones, for use to pass to
+TCL."
+ (let ((phones ""))
+ (mapcar
+ (lambda (s)
+ (if (string-equal phones "")
+ (set! phones (format nil "%s" (utt.streamitem.feat utt s 'name)))
+ (set! phones (format nil "%s %s"
+ phones (utt.streamitem.feat utt s 'name)))))
+ (utt.stream utt 'Segment))
+ phones))
+
+(define (cslush TCLCOMMAND)
+"(cslush TCLCOMMAND)
+Pass TCLCOMMAND to TCL interpreter, returns what TCL returns as a
+string."
+ (tcl_eval TCLCOMMAND))
+
+
+(provide 'cslush)
diff --git a/CosyVoice-ttsfrd/resource/festival/cstr.scm b/CosyVoice-ttsfrd/resource/festival/cstr.scm
new file mode 100644
index 0000000000000000000000000000000000000000..ffc01d876fb30bf9973fdd854a8ff1e1b689b4cf
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/cstr.scm
@@ -0,0 +1,121 @@
+
+
+
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
+ ;;;
+ ;;; The master copy of this file is in ../../speech_tools/lib/siod/cstr.scm
+ ;;; and is copied here at build time.
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+
+
+
+
+
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; CSTR siod extensions.
+
+;(defvar Parameter nil
+; "Parameter
+; An assoc-list of parameters and values for various parts of the speech
+; synthesis system. This is used by the functions Parameter.set
+; Parameter.def and Parameter.get as well as internal C++ functions.")
+
+(defvar Param (feats.make)
+ "Param
+ A feature set for arbitrary parameters for modules.")
+
+(define (Param.set name val)
+"(Param.set NAME VAL)
+ Set parameter NAME to VAL (deleting any previous setting)"
+ (feats.set Param name val))
+
+(define (Parameter.set name val)
+"(Parameter.set NAME VAL)
+ Set parameter NAME to VAL (deleting any previous setting). This is
+ an old function and you should use Param.set instead."
+ (Param.set name val)
+ val
+ )
+
+(define (Parameter.def name val)
+"(Parameter.def NAME VAL)
+ Set parameter NAME to VAL if not already set. This is an OLD function
+ you shold use Param.def instead."
+ (Param.def name val)
+ )
+
+(define (Param.def name val)
+"(Param.def NAME VAL)
+ Set parameter NAME to VAL if not already set"
+ (if (not (feats.present Param name))
+ (feats.set Param name val)))
+
+(define (Parameter.get name)
+"(Parameter.get NAME)
+ Get parameter NAME's value (nil if unset). This is an OLD function
+ and may not exist in later versions (or change functionality). This
+ function (unlike Param.get) may return sylbols (rather than strings
+ if the val doesn't contain whitespace (to allow older functions to
+ still work."
+ (let ((val (Param.get name)))
+ (if (and (eq? 'string (typeof val))
+ (not (string-matches val ".*[ \t\r\n].*")))
+ (intern val)
+ val))
+ )
+
+(define (Param.get name)
+"(Param.get NAME)
+ Get parameter NAME's value (nil if unset)"
+ (feats.get Param name))
+
+(define (get_param name params default)
+ "(get_param name params default)
+Get named parameters in params returning default if its not present."
+ (let ((pair (assoc name params)))
+ (if pair
+ (car (cdr pair))
+ default)))
+
+(provide 'cstr)
diff --git a/CosyVoice-ttsfrd/resource/festival/darpa_phones.scm b/CosyVoice-ttsfrd/resource/festival/darpa_phones.scm
new file mode 100644
index 0000000000000000000000000000000000000000..184c8bfdd614e26d83c5c95f15ce6eaf65c49bb5
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/darpa_phones.scm
@@ -0,0 +1,115 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1999 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Alan W Black
+;;; Date: April 1999
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; (yet another) darpa definition
+;;;
+
+(require 'phoneset)
+
+(set! darpa_fs (cadr
+(defPhoneSet
+ darpa
+ (Features
+ (vowel (syllabic + -)
+ (length long short diphthong schwa)
+ (height high mid low)
+ (front front mid back)
+ (round + -))
+ (consonant
+ (syllabic + -)
+ (manner stop affricate fricative approximant nasal)
+ (place alveolar dental labial palatal velar)
+ (voicing + -))
+ (silence
+ (syllabic -)))
+ (Phones
+ ;; type syl length height front round
+ (aa vowel + long low back -)
+ (ae vowel + short low front -)
+ (ah vowel + short mid mid -)
+ (ao vowel + long low front +)
+ (aw vowel + diphthong low mid -)
+ (ax vowel + schwa mid mid -)
+ (axr vowel + schwa mid mid -)
+ (ay vowel + diphthong low mid -)
+ (eh vowel + short mid front -)
+ (ey vowel + diphthong mid front -)
+ (ih vowel + short high front -)
+ (iy vowel + long high front -)
+ (ow vowel + diphthong mid back +)
+ (oy vowel + diphthong mid back +)
+ (uh vowel + short high back +)
+ (uw vowel + long high back +)
+ ;; type syl manner place voicing
+ (b consonant - stop labial +)
+ (ch consonant - affricate alveolar -)
+ (d consonant - stop alveolar +)
+ (dh consonant - fricative dental +)
+ (dx consonant - stop alveolar +)
+ (el consonant + approximant alveolar +)
+ (em consonant + nasal labial +)
+ (en consonant + stop alveolar +)
+ (er consonant + approximant alveolar +)
+ (f consonant - fricative labial -)
+ (g consonant - stop velar +)
+ (hh consonant - fricative velar -)
+ (jh consonant - affricate alveolar +)
+ (k consonant - stop velar -)
+ (l consonant - approximant alveolar +)
+ (m consonant - nasal labial +)
+ (n consonant - nasal alveolar +)
+ (nx consonant - nasal alveolar +)
+ (ng consonant - nasal velar +)
+ (p consonant - stop labial -)
+ (r consonant - approximant alveolar +)
+ (s consonant - fricative alveolar -)
+ (sh consonant - fricative palatal -)
+ (t consonant - stop alveolar -)
+ (th consonant - fricative dental -)
+ (v consonant - fricative labial +)
+ (w consonant - approximant velar +)
+ (y consonant - approximant palatal +)
+ (z consonant - fricative alveolar +)
+ (zh consonant - fricative palatal +)
+ (pau silence -)
+; (sil silence -)
+ ))))
+
+(provide 'darpa_phones)
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/dicts/cmu/COPYING b/CosyVoice-ttsfrd/resource/festival/dicts/cmu/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..6129d1e55ac895cd3104d6ac7d61798e499f87c6
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/dicts/cmu/COPYING
@@ -0,0 +1,35 @@
+
+This directory contains an American English Lexicon and letter to
+sournd rules based on CMUDICT 0.4. This distribution falls under
+the following copyright. CMUDICT falls under a simialr free licence
+that has no commercial restrictions.
+
+ Centre for Speech Technology Research
+ University of Edinburgh, UK
+ Copyright (c) 1996,1997
+ All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to use and distribute
+ this software and its documentation without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of this work, and to
+ permit persons to whom this work is furnished to do so, subject to
+ the following conditions:
+ 1. The code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+ 2. Any modifications must be clearly marked as such.
+ 3. Original authors' names are not deleted.
+ 4. The authors' names are not used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK
+ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
+ SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ THIS SOFTWARE.
+
diff --git a/CosyVoice-ttsfrd/resource/festival/dicts/cmu/allowables.scm b/CosyVoice-ttsfrd/resource/festival/dicts/cmu/allowables.scm
new file mode 100644
index 0000000000000000000000000000000000000000..dbed159810339e7d31c1002f12222f13884166a5
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/dicts/cmu/allowables.scm
@@ -0,0 +1,102 @@
+(require 'lts_build)
+(set! allowables
+ '((a _epsilon_ aa aa1 aa0
+ ax ax1 ax0
+ eh eh1 eh0
+ ah ah1 ah0
+ ae ae1 ae0
+ ey ey1 ey0
+ ay ay1 ay0
+ er er1 er0
+ y-ax0 y-ah1 y-ah0
+ aw aw1 aw0
+ ao ao1 ao0
+ ih ih1 ih0
+ w-ax0 w-ah1 w-ah0
+ ow ow1 ow0
+ w-ey w-ey1 ey0
+ iy iy1 iy0)
+ (b _epsilon_ b p )
+ (c _epsilon_ k ch s sh t-s )
+ (d _epsilon_ d t jh)
+ (e _epsilon_ ih ih1 ih0
+ ax ax1 ax0
+ iy iy1 iy0
+ er er1 er0
+ ax ah1 ah0
+ eh eh1 eh0
+ ey ey1 ey0
+ uw uw1 uw0
+ ay ay1 ay0
+ ow ow1 ow0
+ y-uw y-uw1 y-uw0
+ oy oy1 oy0
+ aa aa1 aa0)
+ (f _epsilon_ f )
+ (g _epsilon_ g jh zh k f)
+ (h _epsilon_ hh )
+ (i _epsilon_ iy iy1 iy0
+ ax ax1 ax0
+ ih ih1 ih0
+ ah ah1 ah0
+ ax ah1 ah0
+ ay ay1 ay0
+ y
+ aa aa1 aa0
+ ae ae1 ae0
+ w-ax0 w-ah1 w-ah0
+ eh eh1 eh0
+ er er0 er1 )
+ (j _epsilon_ jh y hh zh)
+ (k _epsilon_ k )
+ (l _epsilon_ l ax-l y ax0-l)
+ (m _epsilon_ m ax-m m-ax0 ax0-m m-ax0
+ m-ae m-ae1 m-ae0
+ m-ih m-ih0 )
+ (n _epsilon_ n ng n-y)
+ (o _epsilon_ ax ax0 ah1 ah0
+ ao ao1 ao0
+ ow ow1 ow0
+ uw uw1 uw0
+ er er1 er0
+ aa aa1 aa0
+ aw aw1 aw0
+ oy oy1 oy0
+ uh uh1 uh0
+ w
+ w-ax0 w-ah1 w-ah0
+ aa aa1 aa0
+ ih ih1 ih0
+ ae ae1 ae0)
+ (p _epsilon_ p f)
+ (q _epsilon_ k )
+ (r _epsilon_ r er1 er er0 )
+ (s _epsilon_ s sh z zh ch)
+ (t _epsilon_ t th sh ch dh d s zh)
+ (u _epsilon_
+ ax ax0
+ ah ah1 ah0
+ uw uw1 uw0
+ er er1 er0
+ uh uh1 uh0
+ y-uw y-uw1 y-uw0
+ ax-w ah1-w ah0-w
+ y-er y-er1 y-er0
+ y-ax y-ax0 y-ah1 y-ah0
+ w
+ ih ih1 ih0
+ ao ao1 ao0
+ eh eh1 eh0
+ y-uh y-uh1 y-uh0 )
+ (v _epsilon_ v f)
+ (w _epsilon_ w v f)
+ (x _epsilon_ k-s g-z ng-z k-sh z g-zh zh)
+ (y _epsilon_
+ iy iy1 iy0
+ ih ih1 ih0
+ ay ay1 ay0
+ y
+ ax ax0 ah1 ah0)
+ (z _epsilon_ z t-s zh s)
+ (# #)))
+
diff --git a/CosyVoice-ttsfrd/resource/festival/display.scm b/CosyVoice-ttsfrd/resource/festival/display.scm
new file mode 100644
index 0000000000000000000000000000000000000000..b190c05186bdb0181db4201493cb1e217227ec5c
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/display.scm
@@ -0,0 +1,69 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Alan W Black
+;;; Date: December 1996
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; An xwaves display function for utterances
+;;;
+;;; Requires Xwaves to be running, saves labels etc and sends
+;;; messages to Xwaves to display the utterance.
+;;;
+;;; This can be a model for other display functions.
+;;;
+
+(define (display utt)
+"(display utt)
+Display an utterance's waveform, F0 and segment labels in Xwaves.
+Xwaves must be running on the current machine, with a labeller for
+this to work."
+ (let ((tmpname (make_tmp_filename)))
+ (utt.save.wave utt (string-append tmpname ".wav"))
+ (utt.save.segs utt (string-append tmpname ".lab"))
+ (utt.save.f0 utt (string-append tmpname ".f0"))
+ (system (format nil "send_xwaves make file %s name %s height 150"
+ (string-append tmpname ".f0") tmpname))
+ (system (format nil "send_xwaves make name %s file %s height 200"
+ tmpname (string-append tmpname ".wav")))
+ (system (format nil "send_xwaves send make file %s name %s color 125"
+ (string-append tmpname ".lab") tmpname))
+ (system (format nil "send_xwaves send activate name %s fields 1"
+ tmpname))
+ (system (format nil "send_xwaves %s align file %s"
+ tmpname (string-append tmpname ".wav"))))
+ )
+
+(provide 'display)
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/duration.scm b/CosyVoice-ttsfrd/resource/festival/duration.scm
new file mode 100644
index 0000000000000000000000000000000000000000..7e074d76367bf08325c2064474abe7038c3bfb5d
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/duration.scm
@@ -0,0 +1,196 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Basic Duration module which will call appropriate duration
+;;; (C++) modules based on set parameter
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; These modules should predict intonation events/labels
+;;; based on information in the phrase and word streams
+
+(define (Duration utt)
+"(Duration utt)
+Predict segmental durations using Duration_Method defined in Parameters.
+Four methods are currently available: averages, Klatt rules, CART tree
+based, and fixed duration."
+ (let ((rval (apply_method 'Duration_Method utt)))
+ (cond
+ (rval rval) ;; new style
+ ;; 1.1.1 voices still use other names
+ ((eq 'Averages (Parameter.get 'Duration_Method))
+ (Duration_Averages utt))
+ ((eq 'Klatt (Parameter.get 'Duration_Method))
+ (Duration_Klatt utt))
+ ((eq 'Tree_ZScores (Parameter.get 'Duration_Method))
+ (Duration_Tree_ZScores utt))
+ ((eq 'Tree (Parameter.get 'Duration_Method))
+ (Duration_Tree utt))
+ (t
+ (Duration_Default utt)))))
+
+(define (Duration_LogZScores utt)
+"(Duration_LogZScores utt)
+Predicts duration to segments using the CART tree in duration_logzscore_tree
+and duration_logzscore_tree_silence which produces a zscore of the log
+duration. The variable duration_logzscore_ph_info contains (log) means
+and std for each phone in the set."
+ (let ((silence (car (car (cdr (assoc 'silences (PhoneSet.description))))))
+ ldurinfo)
+ (mapcar
+ (lambda (s)
+ (if (string-equal silence (item.name s))
+ (set! ldurinfo
+ (wagon s duration_logzscore_tree_silence))
+ (set! ldurinfo
+ (wagon s duration_logzscore_tree)))
+ (set! dur (exp (duration_unzscore
+ (item.name s)
+ (car (last ldurinfo))
+ duration_logzscore_ph_info)))
+ (set! dur (* dur (duration_find_stretch s)))
+ (item.set_feat
+ s "end" (+ dur (item.feat s "start_segment"))))
+ (utt.relation.items utt 'Segment))
+ utt))
+
+(define (duration_unzscore phname zscore table)
+"(duration_unzscore phname zscore table)
+Look up phname in table and convert xscore back to absolute domain."
+ (let ((phinfo (assoc phname table))
+ mean std)
+ (if phinfo
+ (begin
+ (set! mean (car (cdr phinfo)))
+ (set! std (car (cdr (cdr phinfo)))))
+ (begin
+ (format t "Duration: unzscore no info for %s\n" phname)
+ (set! mean 0.100)
+ (set! std 0.25)))
+ (+ mean (* zscore std))))
+
+(define (duration_find_stretch seg)
+"(duration_find_stretch utt seg)
+Find any relavant duration stretch."
+ (let ((global (Parameter.get 'Duration_Stretch))
+ (local (item.feat
+ seg "R:SylStructure.parent.parent.R:Token.parent.dur_stretch")))
+ (if (or (not global)
+ (equal? global 0.0))
+ (set! global 1.0))
+ (if (string-equal local 0.0)
+ (set! local 1.0))
+ (* global local)))
+
+;; These provide lisp level functions, some of which have
+;; been converted in C++ (in festival/src/modules/base/ff.cc)
+(define (onset_has_ctype seg type)
+ ;; "1" if onset contains ctype
+ (let ((syl (item.relation.parent seg 'SylStructure)))
+ (if (not syl)
+ "0" ;; a silence
+ (let ((segs (item.relation.daughters syl 'SylStructure))
+ (v "0"))
+ (while (and segs
+ (not (string-equal
+ "+"
+ (item.feat (car segs) "ph_vc"))))
+ (if (string-equal
+ type
+ (item.feat (car segs) "ph_ctype"))
+ (set! v "1"))
+ (set! segs (cdr segs)))
+ v))))
+
+(define (coda_has_ctype seg type)
+ ;; "1" if coda contains ctype
+ (let ((syl (item.relation.parent seg 'SylStructure)))
+ (if (not syl)
+ "0" ;; a silence
+ (let ((segs (reverse (item.relation.daughters
+ syl 'SylStructure)))
+ (v "0"))
+ (while (and segs
+ (not (string-equal
+ "+"
+ (item.feat (car segs) "ph_vc"))))
+ (if (string-equal
+ type
+ (item.feat (car segs) "ph_ctype"))
+ (set! v "1"))
+ (set! segs (cdr segs)))
+ v))))
+
+(define (onset_stop seg)
+ (onset_has_ctype seg "s"))
+(define (onset_fric seg)
+ (onset_has_ctype seg "f"))
+(define (onset_nasal seg)
+ (onset_has_ctype seg "n"))
+(define (onset_glide seg)
+ (let ((l (onset_has_ctype seg "l")))
+ (if (string-equal l "0")
+ (onset_has_ctype seg "r")
+ "1")))
+(define (coda_stop seg)
+ (coda_has_ctype seg "s"))
+(define (coda_fric seg)
+ (coda_has_ctype seg "f"))
+(define (coda_nasal seg)
+ (coda_has_ctype seg "n"))
+(define (coda_glide seg)
+ (let ((l (coda_has_ctype seg "l")))
+ (if (string-equal l "0")
+ (coda_has_ctype seg "r")
+ "1")))
+
+(define (Unisyn_Duration utt)
+ "(UniSyn_Duration utt)
+predicts Segment durations is some speficied way but holds the
+result in a way necessary for other Unisyn code."
+ (let ((end 0))
+ (mapcar
+ (lambda (s)
+ (item.get_utt s)
+ (let ((dur (wagon_predict s duration_cart_tree)))
+ (set! dur (* (Parameter.get 'Duration_Stretch) dur))
+ (set! end (+ dur end))
+ (item.set_feat s "target_dur" dur)
+ (item.set_function s "start" "unisyn_start")
+ (item.set_feat s "end" end)
+ (item.set_feat s "dur" dur)
+ ))
+ (utt.relation.items utt 'Segment))
+ utt))
+
+(provide 'duration)
diff --git a/CosyVoice-ttsfrd/resource/festival/email-mode.scm b/CosyVoice-ttsfrd/resource/festival/email-mode.scm
new file mode 100644
index 0000000000000000000000000000000000000000..4f8450f5b8ddfc41694304b6697c064fb3566f22
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/email-mode.scm
@@ -0,0 +1,89 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; An example tts text mode for reading email messages, this includes
+;;; support for extracting the interesting headers from the message
+;;; and for dealing with quoted text. Its all very primitive and
+;;; will easily be confused but its here just as an example
+;;;
+
+(define (email_init_func)
+ "(email_init_func)
+Called on starting email text mode."
+ (voice_rab_diphone)
+ (set! email_previous_t2w_func token_to_words)
+ (set! english_token_to_words email_token_to_words)
+ (set! token_to_words english_token_to_words)
+ (set! email_in_quote nil))
+
+(define (email_exit_func)
+ "(email_exit_func)
+Called on exit email text mode."
+ (set! english_token_to_words email_previous_t2w_func)
+ (set! token_to_words english_token_to_words))
+
+(define (email_token_to_words token name)
+ "(email_token_to_words utt token name)
+Email spcific token to word rules."
+ (cond
+ ((string-matches name "<.*@.*>")
+ (append
+ (email_previous_t2w_func token
+ (string-after (string-before name "@") "<"))
+ (cons
+ "at"
+ (email_previous_t2w_func token
+ (string-before (string-after name "@") ">")))))
+ ((and (string-matches name ">")
+ (string-matches (item.feat token "whitespace")
+ "[ \t\n]*\n *"))
+ (voice_cmu_us_awb_cg)
+ nil ;; return nothing to say
+ )
+ (t ;; for all other cases
+ (if (string-matches (item.feat token "whitespace")
+ ".*\n[ \n]*")
+ (voice_rab_diphone))
+ (email_previous_t2w_func token name))))
+
+(set! tts_text_modes
+ (cons
+ (list
+ 'email ;; mode name
+ (list ;; email mode params
+ (list 'init_func email_init_func)
+ (list 'exit_func email_exit_func)
+ '(filter "email_filter")))
+ tts_text_modes))
+
+(provide 'email-mode)
diff --git a/CosyVoice-ttsfrd/resource/festival/engmorph.scm b/CosyVoice-ttsfrd/resource/festival/engmorph.scm
new file mode 100644
index 0000000000000000000000000000000000000000..46b7c427dcdc9f9571d0d32d62bc8fd35c7105a7
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/engmorph.scm
@@ -0,0 +1,151 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Alan W Black
+;;; Date: December 1997
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; THIS IS EXPERIMENTAL AND DOES *NOT* WORK
+;;;
+;;; Koskenniemi-style context rewrite rules for English Morphographemics
+;;; Basically splits words into their (potential) morphemes.
+;;;
+;;; Based (roughly) on the rules in "Computational Morphology"
+;;; Ritchie et al. MIT Press 1992.
+;;;
+;;; This is not a Scheme file and can't be loaded and evaluated
+;;; It is designed for use with the wfst tools in the speech tools
+;;; e.g. wfst_build -type kk -o engmorph.wfst -detmin engmorph.scm
+;;;
+
+(KKrules
+ engmorph
+ (Alphabets
+ ;; Input Alphabet
+ (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 #)
+ ;; Output Alphabet
+ (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 + #)
+ )
+ (Sets
+ (LET 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)
+ )
+ (Rules
+ ;; The basic rules
+ ( a => nil --- nil)
+ ( b => nil --- nil)
+ ( c => nil --- nil)
+ ( d => nil --- nil)
+ ( e => nil --- nil)
+ ( f => nil --- nil)
+ ( g => nil --- nil)
+ ( h => nil --- nil)
+ ( i => nil --- nil)
+ ( j => nil --- nil)
+ ( k => nil --- nil)
+ ( l => nil --- nil)
+ ( m => nil --- nil)
+ ( n => nil --- nil)
+ ( o => nil --- nil)
+ ( p => nil --- nil)
+ ( q => nil --- nil)
+ ( r => nil --- nil)
+ ( s => nil --- nil)
+ ( t => nil --- nil)
+ ( u => nil --- nil)
+ ( v => nil --- nil)
+ ( w => nil --- nil)
+ ( x => nil --- nil)
+ ( y => nil --- nil)
+ ( z => nil --- nil)
+ ( # => nil --- nil)
+; ( _epsilon_/+ => (or LET _epsilon_/e ) --- (LET))
+ ( _epsilon_/+ => (or LET _epsilon_/e) --- nil)
+
+ ;; The rules that do interesting things
+
+ ;; Epenthesis
+ ;; churches -> church+s
+ ;; boxes -> box+s
+ (e/+ <=> (or (s h) (or s x z) (i/y) (c h))
+ ---
+ (s))
+ ;; Gemination
+ (b/+ <=> ( (or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) b )
+ ---
+ ((or a e i o u)))
+ (d/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) d )
+ ---
+ ((or a e i o u)))
+ (f/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) f )
+ ---
+ ((or a e i o u)))
+ (g/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) g )
+ ---
+ ((or a e i o u)))
+ (m/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) m )
+ ---
+ ((or a e i o u)))
+ (p/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) p )
+ ---
+ ((or a e i o u)))
+ (s/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) s )
+ ---
+ ((or a e i o u)))
+ (t/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) t )
+ ---
+ ((or a e i o u)))
+ (z/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) z )
+ ---
+ ((or a e i o u)))
+ (n/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) n )
+ ---
+ ((or a e i o u)))
+ (l/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) l )
+ ---
+ ((or a e i o u)))
+ (r/+ <=> ((or b c d f g h j k l m n p q r s t v w z) (or a e i o u y) r )
+ ---
+ ((or a e i o u)))
+ ;; tries->try+s
+ ( i/y <=> ((or b c d f g h j k l m n p q r s t v w x z))
+ ---
+ ((or ( e/+ s )
+ ( _epsilon_/+ (or a d e f h i l m n o p s w y)))))
+ ;; Elision
+ ;; moved -> move+ed
+ (_epsilon_/e <=>
+ ((or a e i o u ) (or b c d f g j k l m n p q r s t v x z))
+ ---
+ ( _epsilon_/+ (or a e i o u )))
+
+ )
+)
diff --git a/CosyVoice-ttsfrd/resource/festival/engmorphsyn.scm b/CosyVoice-ttsfrd/resource/festival/engmorphsyn.scm
new file mode 100644
index 0000000000000000000000000000000000000000..d6e237f1cb8e45f4ab897409f05bd259646b26fd
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/engmorphsyn.scm
@@ -0,0 +1,170 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Author: Alan W Black
+;;; Date: December 1997
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; THIS IS EXPERIMENTAL AND DOES *NOT* WORK
+;;;
+;;;
+;;; An English morpho-syntax finite-state grammar
+;;; This is used for morphological decomposition of unknown words
+;;; specifically (only) words that are not found in the lexicon.
+;;; This idea is that when an unknown word is found an attempt is made
+;;; to see if it contains any well known morphological inflections or
+;;; derivations, if so a better use of LTS can be made on the root, of
+;;; none are found this
+;;;
+;;;
+;;; Based on "Analysis of Unknown Words through Morphological
+;;; Decomposition", Black, van de Plassche, Willians, European ACL 91.
+;;; with the anyword matcher from a question by Lauri Karttunen after
+;;; the talk.
+;;;
+;;; The suffixes and finite-state morph-syntax grammar is based
+;;; (very roughly) on the rules in "Computational Morphology"
+;;; Ritchie et al. MIT Press 1992.
+;;;
+;;; Can be compiled with
+;;; wfst_build -type rg -o engmorphsyn.wfst -detmin engmorphsyn.scm
+;;;
+;;; The result can be combined with the morphographemic rules
+;;; with
+;;; wfst_build -type compose engmorph.wfst engmorphsyn.wfst -detmin -o engstemmer.wfst
+;;;
+;;; echo "# b o x e/+ s #" | wfst_run -wfst engstemmer.wfst -recog
+;;; state 0 #/# -> 1
+;;; state 1 b/b -> 3
+;;; state 3 o/o -> 17
+;;; state 17 x/x -> 14
+;;; state 14 e/+ -> 36
+;;; state 36 s/s -> 34
+;;; state 34 #/# -> 16
+;;; OK.
+;;; echo "# b o x e s #" | wfst_run -wfst engstemmer.wfst -recog
+;;; state 0 #/# -> 1
+;;; state 1 b/b -> 3
+;;; state 3 o/o -> 17
+;;; state 17 x/x -> 14
+;;; state 14 e/e -> 22
+;;; state 22 s/s -> -1
+
+(RegularGrammar
+ engsuffixmorphosyntax
+ ;; Sets
+ (
+ (V a e i o u y)
+ (C b c d f g h j k l m n p q r s t v w x y z)
+ )
+ ;; Rules
+
+ (
+ ;; A word *must* have a suffix to be recognized
+ (Word -> # Syls Suffix )
+ (Word -> # Syls End )
+
+ ;; This matches any string of characters that contains at least one vowel
+ (Syls -> Syl Syls )
+ (Syls -> Syl )
+ (Syl -> Cs V Cs )
+ (Cs -> C Cs )
+ (Cs -> )
+
+ (Suffix -> VerbSuffix )
+ (Suffix -> NounSuffix )
+ (Suffix -> AdjSuffix )
+ (VerbSuffix -> VerbFinal End )
+ (VerbSuffix -> VerbtoNoun NounSuffix )
+ (VerbSuffix -> VerbtoNoun End )
+ (VerbSuffix -> VerbtoAdj AdjSuffix )
+ (VerbSuffix -> VerbtoAdj End )
+ (NounSuffix -> NounFinal End )
+ (NounSuffix -> NountoNoun NounSuffix )
+ (NounSuffix -> NountoNoun End )
+ (NounSuffix -> NountoAdj AdjSuffix )
+ (NounSuffix -> NountoAdj End )
+ (NounSuffix -> NountoVerb VerbSuffix )
+ (NounSuffix -> NountoVerb End )
+ (AdjSuffix -> AdjFinal End )
+ (AdjSuffix -> AdjtoAdj AdjSuffix)
+ (AdjSuffix -> AdjtoAdj End)
+ (AdjSuffix -> AdjtoAdv End) ;; isn't any Adv to anything
+
+ (End -> # ) ;; word boundary symbol *always* present
+
+ (VerbFinal -> + e d)
+ (VerbFinal -> + i n g)
+ (VerbFinal -> + s)
+
+ (VerbtoNoun -> + e r)
+ (VerbtoNoun -> + e s s)
+ (VerbtoNoun -> + a t i o n)
+ (VerbtoNoun -> + i n g)
+ (VerbtoNoun -> + m e n t)
+
+ (VerbtoAdj -> + a b l e)
+
+ (NounFinal -> + s)
+
+ (NountoNoun -> + i s m)
+ (NountoNoun -> + i s t)
+ (NountoNoun -> + s h i p)
+
+ (NountoAdj -> + l i k e)
+ (NountoAdj -> + l e s s)
+ (NountoAdj -> + i s h)
+ (NountoAdj -> + o u s)
+
+ (NountoVerb -> + i f y)
+ (NountoVerb -> + i s e)
+ (NountoVerb -> + i z e)
+
+ (AdjFinal -> + e r)
+ (AdjFinal -> + e s t)
+
+ (AdjtoAdj -> + i s h)
+ (AdjtoAdv -> + l y)
+ (AdjtoNoun -> + n e s s)
+ (AdjtoVerb -> + i s e)
+ (AdjtoVerb -> + i z e)
+
+)
+)
+
+
+
+
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/f2bdurtreeZ.scm b/CosyVoice-ttsfrd/resource/festival/f2bdurtreeZ.scm
new file mode 100644
index 0000000000000000000000000000000000000000..407943a97c3d408cb74989c85cc35808ba279ac0
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/f2bdurtreeZ.scm
@@ -0,0 +1,869 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; First attempt at a tree to learn durations. Although
+;;; it was trained from F2B and the radio phone set should
+;;; work for others that are decalred with the same phone
+;;; features
+;;;
+
+;; in ancient items (not on independent data)
+;; RMSE 0.821086 Correlation is 0.573693 Mean (abs) Error 0.612327 (0.547034)
+
+;; on independent test data
+;; RMSE 0.8054 Correlation is 0.5327 Mean (abs) Error 0.6073 (0.5290)
+
+(set! f2b_duration_cart_tree
+'
+((name is #)
+ ((emph_sil is +)
+ ((0.0 -0.5))
+ ((R:Segment.p.R:SylStructure.parent.parent.pbreak is BB)
+ ((0.0 2.0))
+ ((0.0 0.0))))
+((R:SylStructure.parent.accented is 0)
+ ((R:Segment.p.ph_ctype is 0)
+ ((R:Segment.n.ph_cplace is 0)
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.position_type is initial)
+ ((ph_cplace is a)
+ ((0.675606 -0.068741))
+ ((0.674321 0.204279)))
+ ((ph_cplace is l)
+ ((0.688993 -0.124997))
+ ((R:SylStructure.parent.syl_out < 10)
+ ((0.610881 -0.394451))
+ ((0.664504 -0.603196)))))
+ ((ph_ctype is r)
+ ((lisp_onset_glide is 0)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((0.949991 0.619256))
+ ((1.05066 0.979668)))
+ ((0.858728 0.457972)))
+ ((R:SylStructure.parent.position_type is single)
+ ((syl_initial is 0)
+ ((ph_ctype is s)
+ ((0.692981 -0.788933))
+ ((0.834878 -0.116988)))
+ ((R:SylStructure.parent.syl_out < 9.4)
+ ((0.777932 0.357818))
+ ((0.852909 0.115478))))
+ ((R:Segment.n.ph_vrnd is +)
+ ((ph_ctype is s)
+ ((0.81305 0.87399))
+ ((0.65978 0.418928)))
+ ((R:SylStructure.parent.position_type is final)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.3)
+ ((0.71613 -0.2888))
+ ((0.642029 0.0624649)))
+ ((R:Segment.nn.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.854092 0.384456))
+ ((0.769274 0.10705)))
+ ((lisp_coda_stop is 0)
+ ((0.571763 0.0755348))
+ ((0.632928 -0.11117))))
+ ((lisp_coda_stop is 0)
+ ((R:SylStructure.parent.syl_out < 8.6)
+ ((0.555092 0.30006))
+ ((0.552673 -0.0263481)))
+ ((0.903186 0.519185))))
+ ((R:Segment.nn.ph_cplace is p)
+ ((0.563915 0.204967))
+ ((R:Segment.nn.ph_cvox is -)
+ ((ph_ctype is s)
+ ((0.67653 0.227681))
+ ((0.550623 0.435079)))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.93428 0.732003))
+ ((0.84114 0.423214)))))))))))
+ ((R:Segment.n.ph_ctype is s)
+ ((ph_ctype is s)
+ ((0.693376 -1.02719))
+ ((R:Segment.n.ph_cplace is v)
+ ((ph_ctype is r)
+ ((0.539799 -0.344524))
+ ((0.858576 0.154275)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
+ ((lisp_onset_glide is 0)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((ph_ctype is n)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.64604 -0.643797))
+ ((0.739746 -0.450649)))
+ ((ph_ctype is f)
+ ((0.657043 -0.462107))
+ ((0.798438 -0.19569))))
+ ((R:SylStructure.parent.syl_out < 8.4)
+ ((lisp_coda_stop is 0)
+ ((0.766789 -0.0484781))
+ ((0.717203 -0.322113)))
+ ((R:SylStructure.parent.position_type is single)
+ ((0.508168 -0.412874))
+ ((0.703458 -0.291121)))))
+ ((0.574827 -0.65022)))
+ ((0.801765 -0.120813)))))
+ ((ph_ctype is n)
+ ((R:Segment.n.ph_ctype is f)
+ ((R:Segment.n.ph_cplace is b)
+ ((0.797652 0.623764))
+ ((R:Segment.n.ph_cplace is a)
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((0.675567 0.288251))
+ ((0.854197 0.626272)))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.660394 -0.225466))
+ ((0.65275 0.0487195)))))
+ ((R:Segment.n.ph_ctype is n)
+ ((0.685613 -0.512227))
+ ((0.736366 -0.104066))))
+ ((R:Segment.n.ph_ctype is r)
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.1)
+ ((0.98185 0.152471))
+ ((0.851907 0.788208)))
+ ((ph_ctype is f)
+ ((0.76106 0.406474))
+ ((R:Segment.n.ph_cplace is a)
+ ((1.01348 -0.0422549))
+ ((0.786777 -0.714839)))))
+ ((ph_cplace is b)
+ ((R:SylStructure.parent.syl_out < 10.4)
+ ((0.799025 0.0992277))
+ ((0.851068 -0.115896)))
+ ((R:Segment.n.ph_cplace is p)
+ ((0.669855 -0.655488))
+ ((ph_ctype is r)
+ ((R:Segment.n.ph_cplace is a)
+ ((1.00772 0.130892))
+ ((0.635981 -0.35826)))
+ ((R:Segment.n.ph_ctype is l)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((0.746089 -0.286007))
+ ((0.89158 0.154432)))
+ ((R:Segment.n.ph_cplace is b)
+ ((1.04971 -0.0449782))
+ ((R:SylStructure.parent.syl_out < 9.8)
+ ((R:Segment.n.ph_ctype is f)
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((1.4144 0.143658))
+ ((0.781116 -0.281483)))
+ ((ph_vlng is 0)
+ ((0.755959 -0.33462))
+ ((0.81024 -0.615287))))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((0.7426 -0.24342))
+ ((R:Segment.n.ph_ctype is f)
+ ((R:Segment.n.ph_cplace is a)
+ ((R:SylStructure.parent.position_type is single)
+ ((0.578639 -0.322097))
+ ((0.55826 -0.663238)))
+ ((0.616575 -0.713688)))
+ ((0.759572 -0.314116))))))))))))))
+ ((R:Segment.n.ph_ctype is f)
+ ((ph_ctype is 0)
+ ((R:Segment.p.ph_ctype is r)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.2)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.733193 -0.180968))
+ ((0.563111 -0.467934)))
+ ((0.426244 -0.758137)))
+ ((ph_vlng is a)
+ ((R:Segment.n.ph_cplace is b)
+ ((R:Segment.nn.ph_cvox is +)
+ ((0.680234 0.059855))
+ ((R:SylStructure.parent.position_type is single)
+ ((0.980851 0.443893))
+ ((0.715307 0.112865))))
+ ((R:Segment.p.ph_cplace is a)
+ ((0.851224 0.695863))
+ ((R:Segment.nn.ph_cvox is -)
+ ((0.75892 0.195772))
+ ((0.630633 0.478738)))))
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((R:Segment.n.ph_cplace is b)
+ ((R:Segment.nn.ph_cplace is 0)
+ ((0.815979 -0.477579))
+ ((0.851491 -0.168622)))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.nn.ph_cvox is +)
+ ((1.14265 0.717697))
+ ((0.814726 0.291482)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((0.512322 -0.0749096))
+ ((0.488216 0.112774)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.693071 -0.200708))
+ ((R:Segment.p.ph_cvox is +)
+ ((0.489147 -0.378728))
+ ((0.695396 -0.525028)))))))
+ ((ph_vlng is s)
+ ((0.464234 -0.162706))
+ ((R:Segment.p.ph_cvox is +)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.2)
+ ((0.566845 -0.616918))
+ ((0.92747 -0.26777)))
+ ((0.632833 -0.858295)))))
+ ((R:Segment.n.ph_vrnd is 0)
+ ((R:Segment.p.ph_ctype is r)
+ ((ph_vlng is 0)
+ ((0.845308 -0.23426))
+ ((R:SylStructure.parent.syl_out < 4.8)
+ ((R:Segment.n.ph_ctype is n)
+ ((0.484602 -0.850587))
+ ((0.535398 -0.586652)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((ph_vlng is a)
+ ((0.368898 -0.799533))
+ ((lisp_coda_stop is 0)
+ ((0.387923 -1.11431))
+ ((0.407377 -0.859849))))
+ ((R:Segment.n.ph_cplace is a)
+ ((ph_vlng is a)
+ ((0.382367 -0.787669))
+ ((0.522121 -0.687376)))
+ ((0.361185 -0.853639))))))
+ ((ph_vlng is a)
+ ((ph_ctype is 0)
+ ((R:Segment.n.ph_ctype is s)
+ ((R:Segment.p.ph_cvox is +)
+ ((R:Segment.p.ph_cplace is d)
+ ((0.502849 -0.232866))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.641714 -0.0545426))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.6)
+ ((0.613913 0.373746))
+ ((R:Segment.n.ph_cplace is v)
+ ((0.581158 0.310101))
+ ((0.628758 -0.068165))))))
+ ((R:SylStructure.parent.position_type is mid)
+ ((0.459281 -0.553794))
+ ((0.728208 -0.138806))))
+ ((R:Segment.p.ph_cplace is v)
+ ((0.32179 -0.728364))
+ ((R:Segment.p.ph_cplace is l)
+ ((0.562971 -0.550272))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.937298 -0.0246324))
+ ((R:Segment.p.ph_cvox is +)
+ ((R:Segment.n.ph_ctype is n)
+ ((R:Segment.n.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.434029 -0.404793))
+ ((1.05548 -0.103717)))
+ ((0.408372 -0.556145)))
+ ((0.712335 -0.118776)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((0.379593 -0.658075))
+ ((0.549207 -0.494876))))))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.597124 -0.649729))
+ ((0.628822 -1.03743))))
+ ((ph_ctype is s)
+ ((R:Segment.n.ph_ctype is r)
+ ((R:SylStructure.parent.syl_out < 8.4)
+ ((0.760328 0.31651))
+ ((0.738363 -0.0177161)))
+ ((R:Segment.n.ph_ctype is l)
+ ((0.649328 -0.108791))
+ ((0.594945 -0.712753))))
+ ((ph_vlng is s)
+ ((R:Segment.n.ph_ctype is s)
+ ((R:Segment.n.ph_cplace is v)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.583211 0.0724331))
+ ((0.434605 -0.229857)))
+ ((R:Segment.p.ph_cplace is a)
+ ((R:SylStructure.parent.position_type is single)
+ ((0.785502 -0.00061573))
+ ((0.544995 -0.432984)))
+ ((R:Segment.nn.ph_cplace is 0)
+ ((0.507071 -0.715041))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.506404 -0.573733))
+ ((0.62466 -0.3356))))))
+ ((R:Segment.p.ph_cplace is l)
+ ((0.571756 -0.819693))
+ ((lisp_coda_stop is 0)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.906891 -0.352911))
+ ((R:Segment.n.ph_ctype is r)
+ ((0.620335 -0.445714))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.5)
+ ((R:Segment.p.ph_cvox is +)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.484057 -0.781483))
+ ((0.653917 -0.615429)))
+ ((0.754814 -0.531845)))
+ ((0.493988 -0.881596)))))
+ ((0.792979 -0.32648)))))
+ ((R:Segment.p.ph_cvox is +)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((lisp_coda_stop is 0)
+ ((0.913526 -0.195111))
+ ((0.56564 -0.64867)))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.n.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.790882 -0.488954))
+ ((0.780221 -0.185138)))
+ ((0.487794 -0.691338)))
+ ((R:Segment.p.ph_ctype is n)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.595729 -0.771698))
+ ((0.57908 -1.06592)))
+ ((R:Segment.pp.ph_vfront is 0)
+ ((0.591417 -0.784735))
+ ((0.486298 -0.436971))))))
+ ((ph_vlng is 0)
+ ((0.629869 -0.960652))
+ ((R:Segment.n.ph_ctype is r)
+ ((R:Segment.nn.ph_cplace is 0)
+ ((0.591783 -0.671576))
+ ((R:Segment.nn.ph_cvox is +)
+ ((0.365135 -0.822844))
+ ((0.428573 -0.988434))))
+ ((lisp_coda_stop is 0)
+ ((R:Segment.p.ph_cplace is a)
+ ((R:Segment.n.ph_cplace is a)
+ ((0.428189 -0.730057))
+ ((0.337443 -0.861764)))
+ ((0.57354 -0.494602)))
+ ((0.497606 -0.414451))))))))))
+ ((ph_vlng is l)
+ ((R:Segment.pp.ph_vfront is 1)
+ ((0.937199 0.833877))
+ ((R:SylStructure.parent.syl_out < 12.7)
+ ((0.729202 0.344121))
+ ((0.71086 0.101855))))
+ ((syl_initial is 0)
+ ((R:Segment.p.ph_ctype is r)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.844815 0.175273))
+ ((0.662523 -0.297527)))
+ ((ph_vlng is 0)
+ ((R:Segment.p.ph_ctype is s)
+ ((R:SylStructure.parent.syl_out < 14.6)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.665332 -0.610529))
+ ((0.42276 -0.848942)))
+ ((0.427946 -0.980726)))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((0.523367 -0.825038))
+ ((0.635654 -0.535303)))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.515996 -0.707614))
+ ((ph_cplace is a)
+ ((lisp_coda_stop is 0)
+ ((0.689738 0.0446601))
+ ((0.698347 -0.268593)))
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.706504 -0.659172))
+ ((0.775589 -0.201769)))))))
+ ((0.79472 -0.0539192))))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.p.ph_ctype is f)
+ ((0.641302 0.532411))
+ ((R:Segment.n.ph_vrnd is +)
+ ((0.800655 0.325651))
+ ((0.894711 0.0487864))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.618082 -0.0190591))
+ ((0.733637 0.156329)))
+ ((ph_cplace is a)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.3)
+ ((0.372869 -0.0827845))
+ ((0.494988 0.0882778)))
+ ((0.593526 -0.335404)))))
+ ((R:Segment.p.ph_cvox is +)
+ ((R:Segment.p.ph_ctype is n)
+ ((R:SylStructure.parent.syl_out < 5.4)
+ ((1.0207 -0.152517))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.711277 -0.513467))
+ ((0.509207 -0.726794))))
+ ((ph_cplace is g)
+ ((0.545188 -0.568352))
+ ((R:Segment.p.ph_cplace is a)
+ ((ph_ctype is n)
+ ((0.61149 -0.325094))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.p.ph_ctype is r)
+ ((0.525282 0.395446))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((0.85778 0.0760293))
+ ((0.704055 0.290369))))
+ ((R:Segment.pp.ph_vfront is 0)
+ ((0.590093 0.136983))
+ ((0.734563 -0.0570759)))))
+ ((R:Segment.pp.ph_vfront is 2)
+ ((0.519485 -0.477174))
+ ((0.707546 -0.13584))))))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.p.ph_ctype is f)
+ ((0.797877 0.00462775))
+ ((R:Segment.pp.ph_vfront is 1)
+ ((0.852184 -0.259914))
+ ((0.65313 -0.492506))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.662516 -0.45585))
+ ((lisp_onset_glide is 0)
+ ((0.652534 -0.652428))
+ ((0.482818 -0.885728))))))))))))
+ ((syl_initial is 0)
+ ((ph_cplace is 0)
+ ((R:SylStructure.parent.position_type is single)
+ ((R:Segment.n.ph_ctype is f)
+ ((R:Segment.p.ph_cplace is a)
+ ((R:Segment.n.ph_cplace is a)
+ ((R:Segment.pp.ph_vfront is 0)
+ ((1.06157 1.30945))
+ ((1.12041 1.85843)))
+ ((1.05622 0.921414)))
+ ((R:Segment.nn.ph_cvox is -)
+ ((1.03073 0.916168))
+ ((1.06857 0.452851))))
+ ((R:Segment.p.ph_ctype is r)
+ ((R:Segment.n.ph_cplace is v)
+ ((1.22144 0.672433))
+ ((R:Segment.p.ph_cplace is l)
+ ((0.859749 -0.315152))
+ ((R:Segment.nn.ph_cvox is -)
+ ((0.89862 0.131037))
+ ((0.760033 -0.121252)))))
+ ((R:SylStructure.parent.syl_out < 8.8)
+ ((R:SylStructure.parent.syl_out < 0.8)
+ ((1.06821 1.63716))
+ ((R:Segment.n.ph_cplace is a)
+ ((R:Segment.p.ph_cvox is +)
+ ((1.04477 0.581686))
+ ((R:Segment.nn.ph_cvox is +)
+ ((0.769059 0.301576))
+ ((0.953428 0.0764058))))
+ ((R:Segment.p.ph_cplace is a)
+ ((1.01367 0.507761))
+ ((1.2827 0.945031)))))
+ ((R:Segment.n.ph_cplace is l)
+ ((0.618397 -0.0873608))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((R:Segment.p.ph_cvox is +)
+ ((0.817182 0.477262))
+ ((0.792181 -0.0592145)))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((R:SylStructure.parent.syl_out < 16)
+ ((0.995411 0.497843))
+ ((0.784087 0.152266)))
+ ((1.11816 0.716352))))))))
+ ((R:Segment.n.ph_ctype is f)
+ ((R:SylStructure.parent.position_type is final)
+ ((1.35724 1.06028))
+ ((R:Segment.p.ph_ctype is r)
+ ((R:SylStructure.parent.syl_out < 8.6)
+ ((0.511716 -0.0833005))
+ ((0.492142 -0.30212)))
+ ((R:Segment.n.ph_cplace is b)
+ ((0.53059 0.00266551))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.3)
+ ((ph_vlng is l)
+ ((0.433396 0.821463))
+ ((0.66915 0.415614)))
+ ((0.501369 0.154721))))))
+ ((R:SylStructure.parent.position_type is final)
+ ((R:Segment.n.ph_ctype is s)
+ ((1.03896 0.524706))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((1.15147 0.428386))
+ ((R:Segment.p.ph_cplace is a)
+ ((0.919929 0.0314637))
+ ((0.716168 -0.366629)))))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 4)
+ ((0.816778 0.408786))
+ ((lisp_onset_glide is 0)
+ ((R:Segment.p.ph_ctype is n)
+ ((R:Segment.n.ph_ctype is s)
+ ((0.532911 -0.153851))
+ ((0.633518 -0.762353)))
+ ((R:Segment.p.ph_cvox is -)
+ ((R:Segment.p.ph_cplace is g)
+ ((0.618376 -0.593197))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((R:Segment.pp.ph_vfront is 0)
+ ((R:Segment.n.ph_ctype is n)
+ ((0.554085 -0.058903))
+ ((R:Segment.p.ph_cplace is a)
+ ((0.59842 -0.174458))
+ ((0.585539 -0.349335))))
+ ((0.500857 -0.416613)))
+ ((R:SylStructure.parent.syl_out < 7)
+ ((0.616683 -0.00213272))
+ ((0.631444 -0.141773)))))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((0.5198 -0.151901))
+ ((ph_vlng is s)
+ ((0.677428 0.203522))
+ ((0.780789 0.375429))))))
+ ((R:Segment.nn.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.594604 -0.27832))
+ ((0.736114 -0.422756)))
+ ((R:Segment.p.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.512186 -0.732785))
+ ((0.550759 -0.506471)))
+ ((0.47297 -0.791841)))))))))
+ ((R:Segment.p.ph_ctype is 0)
+ ((R:SylStructure.parent.position_type is final)
+ ((lisp_coda_stop is 0)
+ ((ph_ctype is f)
+ ((R:Segment.nn.ph_cplace is 0)
+ ((1.00978 0.366105))
+ ((0.80682 -0.0827529)))
+ ((R:Segment.n.ph_cplace is a)
+ ((R:Segment.nn.ph_cvox is -)
+ ((1.07097 1.77503))
+ ((1.14864 1.14754)))
+ ((R:Segment.n.ph_vrnd is -)
+ ((0.883474 0.286471))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((1.22264 0.884142))
+ ((1.03401 0.658192))))))
+ ((ph_cplace is a)
+ ((R:SylStructure.parent.syl_out < 6.4)
+ ((R:SylStructure.parent.syl_out < 0.6)
+ ((1.07956 0.602849))
+ ((1.12301 0.0555897)))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.898888 -0.17527))
+ ((0.940932 0.274301))))
+ ((1.10093 -0.68098))))
+ ((R:Segment.n.ph_ctype is s)
+ ((ph_cplace is v)
+ ((0.639932 -1.33353))
+ ((R:SylStructure.parent.position_type is single)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((lisp_coda_stop is 0)
+ ((0.822882 -0.131692))
+ ((0.971957 -0.385365)))
+ ((R:Segment.nn.ph_cvox is -)
+ ((1.06611 0.183678))
+ ((lisp_coda_stop is 0)
+ ((0.967183 0.0925019))
+ ((0.876026 -0.230108)))))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.syl_out < 13)
+ ((0.589198 -0.655594))
+ ((0.476651 -0.926625)))
+ ((R:SylStructure.parent.syl_out < 5)
+ ((0.682936 -0.227662))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.447309 -0.700998))
+ ((0.626113 -0.468853)))
+ ((0.657893 -0.383607)))))))
+ ((ph_ctype is r)
+ ((R:Segment.nn.ph_cvox is -)
+ ((1.15158 1.15233))
+ ((R:Segment.n.ph_vrnd is -)
+ ((1.05554 0.533749))
+ ((0.955478 0.0841894))))
+ ((ph_ctype is l)
+ ((R:Segment.n.ph_ctype is 0)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.766431 0.28943))
+ ((1.48633 1.09574)))
+ ((R:SylStructure.parent.position_type is single)
+ ((1.01777 0.474653))
+ ((0.545859 -0.402743))))
+ ((R:SylStructure.parent.syl_out < 4.8)
+ ((R:Segment.n.ph_vc is +)
+ ((ph_ctype is n)
+ ((0.776645 -0.433859))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.776179 0.23435))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.2)
+ ((0.744272 -0.0859672))
+ ((0.782605 0.115647))))
+ ((0.626541 -0.167615))))
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((1.28499 0.864144))
+ ((ph_cplace is a)
+ ((0.926103 0.0435837))
+ ((0.839172 -0.189514)))))
+ ((R:Segment.n.ph_ctype is n)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.1)
+ ((0.973489 -0.203415))
+ ((0.777589 -0.849733)))
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:Segment.n.ph_vc is +)
+ ((0.743482 -0.53384))
+ ((0.619309 -0.0987861)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((1.15555 0.0786295))
+ ((1.06689 0.681662))))
+ ((R:Segment.n.ph_ctype is r)
+ ((R:SylStructure.parent.syl_out < 8.9)
+ ((0.752079 -0.237421))
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.664182 -0.041521))
+ ((0.772712 0.103499))))
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((R:SylStructure.parent.position_type is mid)
+ ((R:SylStructure.parent.parent.word_numsyls < 3.3)
+ ((0.715944 -0.275113))
+ ((0.675729 0.202848)))
+ ((R:Segment.n.ph_vrnd is -)
+ ((R:SylStructure.parent.syl_out < 8.3)
+ ((ph_ctype is s)
+ ((0.82747 -0.116723))
+ ((0.689586 -0.303909)))
+ ((R:SylStructure.parent.syl_out < 17.7)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.659686 -0.621268))
+ ((ph_cplace is a)
+ ((0.861741 -0.285324))
+ ((0.507102 -0.444082))))
+ ((0.850664 -0.269084))))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.878643 -0.255833))
+ ((0.98882 0.115252)))))
+ ((ph_cplace is a)
+ ((R:SylStructure.parent.syl_out < 13)
+ ((0.850625 -0.289333))
+ ((0.788154 -0.44844)))
+ ((0.70482 -0.630276))))))))))))
+ ((R:Segment.p.ph_ctype is l)
+ ((R:SylStructure.parent.position_type is single)
+ ((0.873748 -0.21639))
+ ((lisp_coda_stop is 0)
+ ((0.71002 0.428132))
+ ((0.703501 0.015833))))
+ ((ph_vlng is 0)
+ ((R:Segment.p.ph_ctype is r)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.907151 -0.494409))
+ ((ph_ctype is s)
+ ((0.782539 -0.398555))
+ ((R:Segment.p.ph_cplace is 0)
+ ((0.767435 -0.298857))
+ ((0.767046 0.151217)))))
+ ((ph_cplace is a)
+ ((R:Segment.n.ph_ctype is r)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.689367 0.0195991))
+ ((0.64446 -0.256648)))
+ ((R:Segment.n.ph_vc is +)
+ ((ph_ctype is s)
+ ((R:Segment.nn.ph_cvox is +)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.59482 -0.214443))
+ ((0.745691 0.0292177)))
+ ((0.523103 -0.391245)))
+ ((R:Segment.p.ph_cvox is +)
+ ((R:Segment.p.ph_cplace is a)
+ ((0.524304 -0.428306))
+ ((0.605117 -0.165604)))
+ ((R:Segment.p.ph_ctype is f)
+ ((0.491251 -0.455353))
+ ((lisp_coda_stop is 0)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((0.175021 -1.02136))
+ ((0.264113 -0.976809)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((0.704803 -0.716976))
+ ((0.300317 -0.924727)))))))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.syl_out < 13)
+ ((R:Segment.n.ph_ctype is s)
+ ((0.731994 -0.711044))
+ ((0.768008 -0.415076)))
+ ((0.691821 -0.803284)))
+ ((R:Segment.nn.ph_cplace is 0)
+ ((R:Segment.n.ph_cplace is a)
+ ((0.569567 -0.993506))
+ ((0.689849 -0.761696)))
+ ((0.386818 -1.14744))))))
+ ((R:Segment.p.seg_onsetcoda is coda)
+ ((R:Segment.p.ph_cplace is a)
+ ((0.746337 -0.866206))
+ ((0.532751 -1.22185)))
+ ((ph_cplace is l)
+ ((0.74942 -0.820648))
+ ((0.685988 -0.298146))))))
+ ((0.812766 0.17291))))))
+ ((R:SylStructure.parent.position_type is mid)
+ ((ph_ctype is r)
+ ((0.577775 -0.54714))
+ ((R:Segment.n.ph_ctype is f)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.370448 0.00076407))
+ ((0.460385 0.20631)))
+ ((R:Segment.p.ph_cvox is -)
+ ((ph_vlng is 0)
+ ((0.615959 -0.57434))
+ ((0.50852 -0.197814)))
+ ((R:Segment.n.ph_ctype is 0)
+ ((1.34281 0.477163))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.59975 -0.1342))
+ ((0.640294 -0.32653)))))))
+ ((R:Segment.n.ph_ctype is f)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.758739 0.311943))
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((R:Segment.p.ph_ctype is f)
+ ((1.28746 1.99771))
+ ((R:Segment.pp.ph_vfront is 1)
+ ((1.42474 1.76925))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((0.979414 1.37583))
+ ((1.00321 1.06671)))))
+ ((1.15222 0.852004))))
+ ((R:Segment.p.ph_ctype is 0)
+ ((R:Segment.n.ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.664807 -0.0880262))
+ ((0.573589 0.217234)))
+ ((ph_ctype is s)
+ ((ph_cplace is l)
+ ((0.800348 0.66579))
+ ((ph_cplace is a)
+ ((0.859133 1.46854))
+ ((R:SylStructure.parent.position_type is single)
+ ((0.692229 1.23671))
+ ((0.552426 0.923928)))))
+ ((R:SylStructure.parent.syl_out < 9.2)
+ ((R:SylStructure.parent.position_type is single)
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((1.01673 1.26824))
+ ((0.848274 0.92375)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
+ ((R:Segment.nn.ph_cplace is a)
+ ((0.788163 0.818855))
+ ((0.822028 1.01227)))
+ ((0.8365 0.483313))))
+ ((lisp_coda_stop is 0)
+ ((R:Segment.nn.ph_cvox is +)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.807795 0.670829))
+ ((0.773774 0.435486)))
+ ((0.849529 0.103561)))
+ ((0.858848 0.763836))))))
+ ((R:Segment.n.ph_vrnd is -)
+ ((ph_vlng is 0)
+ ((R:SylStructure.parent.position_type is final)
+ ((ph_cplace is a)
+ ((R:Segment.nn.ph_cvox is -)
+ ((0.691915 -0.42124))
+ ((R:Segment.p.ph_cplace is a)
+ ((0.773696 0.354001))
+ ((0.65495 -0.14321))))
+ ((0.610433 -0.479739)))
+ ((R:Segment.p.ph_ctype is r)
+ ((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
+ ((0.560921 0.384674))
+ ((0.895267 0.746476)))
+ ((R:Segment.p.ph_ctype is l)
+ ((0.704694 0.568012))
+ ((R:Segment.p.ph_cplace is b)
+ ((1.34739 0.539049))
+ ((R:Segment.p.ph_ctype is s)
+ ((R:SylStructure.parent.syl_out < 12.9)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.807285 0.151429))
+ ((0.988033 0.383763)))
+ ((0.878655 0.102291)))
+ ((ph_ctype is n)
+ ((0.759582 -0.315096))
+ ((R:SylStructure.parent.syl_out < 8.8)
+ ((R:Segment.pp.ph_vfront is 0)
+ ((0.846546 0.000647117))
+ ((R:Segment.pp.ph_vfront is 1)
+ ((0.586216 0.150701))
+ ((0.793898 0.379041))))
+ ((lisp_coda_stop is 0)
+ ((ph_ctype is f)
+ ((0.74736 -0.31103))
+ ((0.715751 -0.00576581)))
+ ((0.914486 0.17528))))))))))
+ ((1.24204 0.908819)))
+ ((ph_ctype is s)
+ ((ph_cplace is a)
+ ((0.864408 1.35528))
+ ((R:Segment.n.seg_onsetcoda is coda)
+ ((0.85602 0.344576))
+ ((0.869622 0.659223))))
+ ((R:Segment.nn.ph_cvox is -)
+ ((R:Segment.n.ph_ctype is s)
+ ((R:Segment.nn.ph_cplace is 0)
+ ((0.942964 1.27475))
+ ((0.978218 0.650268)))
+ ((R:SylStructure.parent.syl_out < 3.9)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((1.32463 1.05026))
+ ((0.896966 0.417727)))
+ ((R:Segment.p.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
+ ((0.776698 0.195369))
+ ((0.969518 0.432394)))
+ ((0.799096 -0.0203318)))))
+ ((ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.680861 -0.315846))
+ ((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
+ ((0.954393 0.0965487))
+ ((0.884928 0.372884))))
+ ((lisp_coda_stop is 0)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((R:SylStructure.parent.position_type is final)
+ ((1.03696 0.565834))
+ ((0.906661 0.277961)))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.778429 -0.0967381))
+ ((0.863993 0.314023))))
+ ((R:Segment.p.ph_cplace is a)
+ ((R:SylStructure.parent.R:Syllable.p.stress is 0)
+ ((0.898898 0.571009))
+ ((0.830278 0.787486)))
+ ((1.1101 0.333888)))))))))))))
+;; RMSE 0.7726 Correlation is 0.5943 Mean (abs) Error 0.5752 (0.5160)
+
+))
+
+(provide 'f2bdurtreeZ)
diff --git a/CosyVoice-ttsfrd/resource/festival/f2bf0lr.scm b/CosyVoice-ttsfrd/resource/festival/f2bf0lr.scm
new file mode 100644
index 0000000000000000000000000000000000000000..6a066719ff42f98780e88056c0651433a14c983e
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/f2bf0lr.scm
@@ -0,0 +1,314 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; First attempt at a linear regression model to predict F0 values.
+;;; This is an attempt to reimplement the work in Black and
+;;; Hunt ICSLP96, though this model probably isn't as good.
+;;;
+
+;;;start
+;;; R2 = 0.251, F(74, 12711) = 57.5, Prob>F = 0.000
+;;; RMSE = 27.877
+;;;mid
+;;; R2 = 0.332, F(74, 12711) = 85.6, Prob>F = 0.000
+;;; RMSE = 28.293
+;;;end
+;;; R2 = 0.292, F(74, 12711) = 70.8, Prob>F = 0.000
+;;; RMSE = 27.139
+
+(define (emph_syl syl)
+ (if (string-equal (item.feat syl "tobi_accent") "NONE")
+ 0.0
+ (if (string-equal (item.feat
+ syl "R:SylStructure.parent.R:Token.parent.EMPH") "1")
+ 2.0
+ 0.0)))
+
+(set! f2b_f0_lr_start
+'(
+( Intercept 160.584956 )
+( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
+( pp.tobi_accent 10.081770 (H*) )
+( pp.tobi_accent 3.358613 (!H*) )
+( pp.tobi_accent 4.144342 (*? X*? H*!H* * L+H* L+!H*) )
+( pp.tobi_accent -1.111794 (L*) )
+( pp.tobi_accent 19.646313 (L*+H L*+!H) )
+( p.tobi_accent 32.081029 (H*) )
+( p.tobi_accent 18.090033 (!H*) )
+( p.tobi_accent 23.255280 (*? X*? H*!H* * L+H* L+!H*) )
+( p.tobi_accent -9.623577 (L*) )
+( p.tobi_accent 26.517095 (L*+H L*+!H) )
+( tobi_accent 5.221081 (H*) )
+( tobi_accent 10.159194 (!H*) )
+( tobi_accent 3.645511 (*? X*? H*!H* * L+H* L+!H*) )
+( tobi_accent -5.720030 (L*) )
+( tobi_accent -6.355773 (L*+H L*+!H) )
+( n.tobi_accent -5.691933 (H*) )
+( n.tobi_accent 8.265606 (!H*) )
+( n.tobi_accent 0.861427 (*? X*? H*!H* * L+H* L+!H*) )
+( n.tobi_accent 1.270504 (L*) )
+( n.tobi_accent 3.499418 (L*+H L*+!H) )
+( nn.tobi_accent -3.785701 (H*) )
+( nn.tobi_accent 7.013446 (!H*) )
+( nn.tobi_accent 2.637494 (*? X*? H*!H* * L+H* L+!H*) )
+( nn.tobi_accent -0.392176 (L*) )
+( nn.tobi_accent -2.957502 (L*+H L*+!H) )
+( pp.tobi_endtone -3.531153 (L-L%) )
+( pp.tobi_endtone 0.131156 (L-) )
+( pp.tobi_endtone 2.729199 (H-L% !H-L% -X?) )
+( pp.tobi_endtone 8.258756 (L-H%) )
+( pp.tobi_endtone 5.836487 (H-) )
+( pp.tobi_endtone 11.213440 (!H- H-H%) )
+( R:Syllable.p.tobi_endtone -28.081359 (L-L%) )
+( R:Syllable.p.tobi_endtone -20.553145 (L-) )
+( R:Syllable.p.tobi_endtone -5.442577 (H-L% !H-L% -X?) )
+( R:Syllable.p.tobi_endtone -6.585836 (L-H%) )
+( R:Syllable.p.tobi_endtone 8.537044 (H-) )
+( R:Syllable.p.tobi_endtone 4.243342 (!H- H-H%) )
+( tobi_endtone -9.333926 (L-L%) )
+( tobi_endtone -0.346711 (L-) )
+( tobi_endtone -0.507352 (H-L% !H-L% -X?) )
+( tobi_endtone -0.937483 (L-H%) )
+( tobi_endtone 9.472265 (H-) )
+( tobi_endtone 14.256898 (!H- H-H%) )
+( n.tobi_endtone -13.084253 (L-L%) )
+( n.tobi_endtone -1.060688 (L-) )
+( n.tobi_endtone -7.947205 (H-L% !H-L% -X?) )
+( n.tobi_endtone -5.471592 (L-H%) )
+( n.tobi_endtone -0.095669 (H-) )
+( n.tobi_endtone 4.933708 (!H- H-H%) )
+( nn.tobi_endtone -14.993470 (L-L%) )
+( nn.tobi_endtone -3.784284 (L-) )
+( nn.tobi_endtone -15.505132 (H-L% !H-L% -X?) )
+( nn.tobi_endtone -11.352400 (L-H%) )
+( nn.tobi_endtone -5.551627 (H-) )
+( nn.tobi_endtone -0.661581 (!H- H-H%) )
+( pp.old_syl_break -3.367677 )
+( p.old_syl_break 0.641755 )
+( old_syl_break -0.659002 )
+( n.old_syl_break 1.217358 )
+( nn.old_syl_break 2.974502 )
+( pp.stress 1.588098 )
+( p.stress 3.693430 )
+( stress 2.009843 )
+( n.stress 1.645560 )
+( nn.stress 1.926870 )
+( syl_in 1.048362 )
+( syl_out 0.315553 )
+( ssyl_in -2.096079 )
+( ssyl_out 0.303531 )
+( asyl_in -4.257915 )
+( asyl_out -2.422424 )
+( last_accent -0.397647 )
+( next_accent -0.418613 )
+( sub_phrases -5.472055 )
+))
+
+(set! f2b_f0_lr_mid
+'(
+( Intercept 169.183377 )
+( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
+( pp.tobi_accent 4.923247 (H*) )
+( pp.tobi_accent 0.955474 (!H*) )
+( pp.tobi_accent 1.193597 (*? X*? H*!H* * L+H* L+!H*) )
+( pp.tobi_accent 1.501383 (L*) )
+( pp.tobi_accent 7.992120 (L*+H L*+!H) )
+( p.tobi_accent 16.603350 (H*) )
+( p.tobi_accent 11.665814 (!H*) )
+( p.tobi_accent 13.063298 (*? X*? H*!H* * L+H* L+!H*) )
+( p.tobi_accent -2.288798 (L*) )
+( p.tobi_accent 29.168430 (L*+H L*+!H) )
+( tobi_accent 34.517868 (H*) )
+( tobi_accent 22.349656 (!H*) )
+( tobi_accent 23.551548 (*? X*? H*!H* * L+H* L+!H*) )
+( tobi_accent -14.117284 (L*) )
+( tobi_accent -5.978760 (L*+H L*+!H) )
+( n.tobi_accent -1.914945 (H*) )
+( n.tobi_accent 5.249441 (!H*) )
+( n.tobi_accent -1.929947 (*? X*? H*!H* * L+H* L+!H*) )
+( n.tobi_accent -3.287877 (L*) )
+( n.tobi_accent -4.980375 (L*+H L*+!H) )
+( nn.tobi_accent -6.147251 (H*) )
+( nn.tobi_accent 8.408949 (!H*) )
+( nn.tobi_accent 3.193500 (*? X*? H*!H* * L+H* L+!H*) )
+( nn.tobi_accent 1.323099 (L*) )
+( nn.tobi_accent 9.148058 (L*+H L*+!H) )
+( pp.tobi_endtone 4.255273 (L-L%) )
+( pp.tobi_endtone -1.033377 (L-) )
+( pp.tobi_endtone 11.992045 (H-L% !H-L% -X?) )
+( pp.tobi_endtone 6.989573 (L-H%) )
+( pp.tobi_endtone 2.598854 (H-) )
+( pp.tobi_endtone 12.178307 (!H- H-H%) )
+( R:Syllable.p.tobi_endtone -4.397973 (L-L%) )
+( R:Syllable.p.tobi_endtone -6.157077 (L-) )
+( R:Syllable.p.tobi_endtone 5.530608 (H-L% !H-L% -X?) )
+( R:Syllable.p.tobi_endtone 6.938086 (L-H%) )
+( R:Syllable.p.tobi_endtone 6.162763 (H-) )
+( R:Syllable.p.tobi_endtone 8.035727 (!H- H-H%) )
+( tobi_endtone -19.357902 (L-L%) )
+( tobi_endtone -13.877759 (L-) )
+( tobi_endtone -6.176061 (H-L% !H-L% -X?) )
+( tobi_endtone -7.328882 (L-H%) )
+( tobi_endtone 12.694193 (H-) )
+( tobi_endtone 30.923398 (!H- H-H%) )
+( n.tobi_endtone -17.727785 (L-L%) )
+( n.tobi_endtone -2.539592 (L-) )
+( n.tobi_endtone -8.126830 (H-L% !H-L% -X?) )
+( n.tobi_endtone -8.701685 (L-H%) )
+( n.tobi_endtone -1.006439 (H-) )
+( n.tobi_endtone 6.834498 (!H- H-H%) )
+( nn.tobi_endtone -15.407530 (L-L%) )
+( nn.tobi_endtone -2.974196 (L-) )
+( nn.tobi_endtone -12.287673 (H-L% !H-L% -X?) )
+( nn.tobi_endtone -7.621437 (L-H%) )
+( nn.tobi_endtone -0.458837 (H-) )
+( nn.tobi_endtone 3.170632 (!H- H-H%) )
+( pp.old_syl_break -4.196950 )
+( p.old_syl_break -5.176929 )
+( old_syl_break 0.047922 )
+( n.old_syl_break 2.153968 )
+( nn.old_syl_break 2.577074 )
+( pp.stress -2.368192 )
+( p.stress 1.080493 )
+( stress 1.135556 )
+( n.stress 2.447219 )
+( nn.stress 1.318122 )
+( syl_in 0.291663 )
+( syl_out -0.411814 )
+( ssyl_in -1.643456 )
+( ssyl_out 0.580589 )
+( asyl_in -5.649243 )
+( asyl_out 0.489823 )
+( last_accent 0.216634 )
+( next_accent 0.244134 )
+( sub_phrases -5.758156 )
+))
+
+
+(set! f2b_f0_lr_end
+'(
+( Intercept 169.570381 )
+( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
+( pp.tobi_accent 3.594771 (H*) )
+( pp.tobi_accent 0.432519 (!H*) )
+( pp.tobi_accent 0.235664 (*? X*? H*!H* * L+H* L+!H*) )
+( pp.tobi_accent 1.513892 (L*) )
+( pp.tobi_accent 2.474823 (L*+H L*+!H) )
+( p.tobi_accent 11.214208 (H*) )
+( p.tobi_accent 9.619350 (!H*) )
+( p.tobi_accent 9.084690 (*? X*? H*!H* * L+H* L+!H*) )
+( p.tobi_accent 0.519202 (L*) )
+( p.tobi_accent 26.593112 (L*+H L*+!H) )
+( tobi_accent 25.217589 (H*) )
+( tobi_accent 13.759851 (!H*) )
+( tobi_accent 17.635192 (*? X*? H*!H* * L+H* L+!H*) )
+( tobi_accent -12.149974 (L*) )
+( tobi_accent 13.345913 (L*+H L*+!H) )
+( n.tobi_accent 4.944848 (H*) )
+( n.tobi_accent 7.398383 (!H*) )
+( n.tobi_accent 1.683011 (*? X*? H*!H* * L+H* L+!H*) )
+( n.tobi_accent -6.516900 (L*) )
+( n.tobi_accent -6.768201 (L*+H L*+!H) )
+( nn.tobi_accent -4.335797 (H*) )
+( nn.tobi_accent 5.656462 (!H*) )
+( nn.tobi_accent 0.263288 (*? X*? H*!H* * L+H* L+!H*) )
+( nn.tobi_accent 1.022002 (L*) )
+( nn.tobi_accent 6.702368 (L*+H L*+!H) )
+( pp.tobi_endtone 10.274958 (L-L%) )
+( pp.tobi_endtone 3.129947 (L-) )
+( pp.tobi_endtone 15.476240 (H-L% !H-L% -X?) )
+( pp.tobi_endtone 10.446935 (L-H%) )
+( pp.tobi_endtone 6.104384 (H-) )
+( pp.tobi_endtone 14.182688 (!H- H-H%) )
+( R:Syllable.p.tobi_endtone 1.767454 (L-L%) )
+( R:Syllable.p.tobi_endtone -1.040077 (L-) )
+( R:Syllable.p.tobi_endtone 18.438093 (H-L% !H-L% -X?) )
+( R:Syllable.p.tobi_endtone 8.750018 (L-H%) )
+( R:Syllable.p.tobi_endtone 5.000340 (H-) )
+( R:Syllable.p.tobi_endtone 10.913437 (!H- H-H%) )
+( tobi_endtone -12.637935 (L-L%) )
+( tobi_endtone -13.597961 (L-) )
+( tobi_endtone -6.501965 (H-L% !H-L% -X?) )
+( tobi_endtone 8.747483 (L-H%) )
+( tobi_endtone 15.165833 (H-) )
+( tobi_endtone 50.190326 (!H- H-H%) )
+( n.tobi_endtone -16.965781 (L-L%) )
+( n.tobi_endtone -5.222475 (L-) )
+( n.tobi_endtone -7.358555 (H-L% !H-L% -X?) )
+( n.tobi_endtone -7.833168 (L-H%) )
+( n.tobi_endtone 4.701087 (H-) )
+( n.tobi_endtone 10.349902 (!H- H-H%) )
+( nn.tobi_endtone -15.369483 (L-L%) )
+( nn.tobi_endtone -2.207161 (L-) )
+( nn.tobi_endtone -9.363835 (H-L% !H-L% -X?) )
+( nn.tobi_endtone -7.052374 (L-H%) )
+( nn.tobi_endtone 2.207854 (H-) )
+( nn.tobi_endtone 5.271546 (!H- H-H%) )
+( pp.old_syl_break -4.745862 )
+( p.old_syl_break -5.685178 )
+( old_syl_break -2.633291 )
+( n.old_syl_break 1.678340 )
+( nn.old_syl_break 2.274729 )
+( pp.stress -2.747198 )
+( p.stress 0.306724 )
+( stress -0.565613 )
+( n.stress 2.838327 )
+( nn.stress 1.285244 )
+( syl_in 0.169955 )
+( syl_out -1.045661 )
+( ssyl_in -1.487774 )
+( ssyl_out 0.752405 )
+( asyl_in -5.081677 )
+( asyl_out 3.016218 )
+( last_accent 0.312900 )
+( next_accent 0.837992 )
+( sub_phrases -5.397805 )
+
+))
+
+;; groups
+;; tobi_accent_1 25.217589 (H*) )
+;; tobi_accent_2 13.759851 (!H*) )
+;; tobi_accent_3 17.635192 (*? X*? H*!H* * L+H* L+!H*) )
+;; tobi_accent_4 -12.149974 (L*) )
+;; tobi_accent_5 13.345913 (L*+H L*+!H) )
+
+;; tobi_endtone_1 10.274958 (L-L%) )
+;; tobi_endtone_2 3.129947 (L-) )
+;; tobi_endtone_3 15.476240 (H-L% !H-L% -X?) )
+;; tobi_endtone_4 10.446935 (L-H%) )
+;; tobi_endtone_5 6.104384 (H-) )
+;; tobi_endtone_6 14.182688 (!H- H-H%) )
+
+(provide 'f2bf0lr)
+
diff --git a/CosyVoice-ttsfrd/resource/festival/festival.el b/CosyVoice-ttsfrd/resource/festival/festival.el
new file mode 100644
index 0000000000000000000000000000000000000000..c1899f63a3b98c47faf0988348b70aa87a9fa114
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/festival.el
@@ -0,0 +1,282 @@
+;;;
+;;; File: festival.el
+;;; Emacs Lisp
+;;;
+;;; Alan W Black CSTR (awb@cstr.ed.ac.uk) June 1996
+;;;
+;;; Provide an emacs mode for interfacing to the festival speech
+;;; synthesizer system
+;;;
+;;; I've looked at many examples from the emacs Lisp directory
+;;; copying relevant bits from here and there, so this can only
+;;; reasonably inherit the GNU licence (GPL)
+;;;
+;;; Setup:
+;;; In your .emacs add the following 2 lines to get a Say menu:
+;;;
+;;; (autoload 'say-minor-mode "festival" "Menu for using Festival." t)
+;;; (say-minor-mode t)
+;;; (setq auto-mode-alist
+;;; (append '(("\\.festivalrc$" . scheme-mode)) auto-mode-alist))
+;;;
+;;; The following gives you pretty colors in emacs-19 if you are into
+;;; such things
+;;; ;;; Some colors for scheme mode
+;;; (hilit-set-mode-patterns
+;;; '(scheme-mode)
+;;; '(
+;;; (";.*" nil comment)
+;;; (hilit-string-find ?\\ string)
+;;; ("^\\s *(def\\s +" "\\()\\|nil\\)" defun)
+;;; ("^\\s *(defvar\\s +\\S +" nil decl)
+;;; ("^\\s *(set\\s +\\S +" nil decl)
+;;; ("^\\s *(defconst\\s +\\S +" nil define)
+;;; ("^\\s *(\\(provide\\|require\\).*$" nil include)
+;;; ("(\\(let\\*?\\|cond\\|if\\|or\\|and\\|map\\(car\\|concat\\)\\|prog[n1*]?\\|while\\|lambda\\|function\\|Parameter\\|set\\([qf]\\|car\\|cdr\\)?\\|nconc\\|eval-when-compile\\|condition-case\\|unwind-protect\\|catch\\|throw\\|error\\)[ \t\n]" 1 keyword)))
+;;;
+;;;
+;;;--------------------------------------------------------------------
+;;; Copyright (C) Alan W Black 1996
+;;; This code is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY. No author or distributor accepts
+;;; responsibility to anyone for the consequences of using this code
+;;; or for whether it serves any particular purpose or works at all,
+;;; unless explicitly stated in a written agreement.
+;;;
+;;; Everyone is granted permission to copy, modify and redistribute
+;;; this code, but only under the conditions described in the GNU
+;;; Emacs General Public License. A copy of this license is
+;;; distrubuted with GNU Emacs so you can know your rights and
+;;; responsibilities. It should be in a file named COPYING. Among
+;;; other things, the copyright notice and this notice must be
+;;; preserved on all copies.
+;;;--------------------------------------------------------------------
+;;;
+
+(defvar festival-program-name "festival")
+
+(defvar festival-process nil)
+
+(defvar festival-tmp-file
+ (format "/tmp/festival-emacs-tmp-%s" (user-real-login-name))
+ "Filename to save input for Festivial.")
+
+(defun festival-fast ()
+ (interactive)
+ (festival-send-command '(Parameter.set 'Duration.Stretch 0.8)))
+(defun festival-slow ()
+ (interactive)
+ (festival-send-command '(Parameter.set 'Duration.Stretch 1.2)))
+(defun festival-ndur ()
+ (interactive)
+ (festival-send-command '(Parameter.set 'Duration.Stretch 1.0)))
+(defun festival-intro ()
+ (interactive)
+ (festival-send-command '(intro)))
+
+(defun festival-gsw ()
+ (interactive)
+ (festival-send-command '(voice_gsw_diphone)))
+(defun festival-rab ()
+ (interactive)
+ (festival-send-command '(voice_rab_diphone)))
+(defun festival-ked ()
+ (interactive)
+ (festival-send-command '(voice_ked_diphone)))
+(defun festival-kal ()
+ (interactive)
+ (festival-send-command '(voice_kal_diphone)))
+(defun festival-don ()
+ (interactive)
+ (festival-send-command '(voice_don_diphone)))
+(defun festival-welsh ()
+ (interactive)
+ (festival-send-command '(voice_welsh_hl)))
+(defun festival-spanish ()
+ (interactive)
+ (festival-send-command '(voice_spanish_el)))
+
+(defun festival-say-string (string)
+ "Send string to festival and have it said"
+ (interactive "sSay: ")
+ (festival-start-process)
+ (process-send-string festival-process
+ (concat "(SayText " (format "%S" string) ")
+")))
+
+(defun festival-send-command (cmd)
+ "Send command to festival"
+ (interactive "px")
+ (festival-start-process)
+ (process-send-string festival-process (format "%S
+" cmd)))
+
+(defun festival-process-status ()
+ (interactive)
+ (if festival-process
+ (message (format "Festival process status: %s"
+ (process-status festival-process)))
+ (message (format "Festival process status: NONE"))))
+
+(defun festival-start-process ()
+ "Check status of process and start it if necessary"
+ (interactive )
+ (let ((process-connection-type t))
+ (if (and festival-process
+ (eq (process-status festival-process) 'run))
+ 't
+ ;;(festival-kill-festival t)
+ (message "Starting new synthesizer process...")
+ (sit-for 0)
+ (setq festival-process
+ (start-process "festival" (get-buffer-create "*festival*")
+ festival-program-name)))
+ ))
+
+(defun festival-kill-process ()
+ "Kill festival sub-process"
+ (interactive)
+ (if festival-process
+ (kill-process festival-process))
+ (setq festival-process nil)
+ (message "Festival process killed"))
+
+(defun festival-send-string (string)
+ "Send given string to fesitval process."
+ (interactive)
+ (festival-start-process)
+ (process-send-string festival-process string))
+
+(defun festival-say-region (reg-start reg-end)
+ "Send given region to festival for saying. This saves the region
+as a file in /tmp and then tells festival to say that file. The
+major mode is *not* passed as text mode name to Festival."
+ (interactive "r")
+ (write-region reg-start reg-end festival-tmp-file)
+ (festival-send-command (list 'tts festival-tmp-file nil)))
+
+(defun festival-say-buffer ()
+ "Send given region to festival for saying. This saves the region
+as a file in /tmp and then tells festival to say that file. The
+major-mode is passed as a text mode to Festival."
+ (interactive)
+ (write-region (point-min) (point-max) festival-tmp-file)
+ ;; Because there may by sgml-like sub-files mentioned
+ ;; ensure festival tracks the buffer's default-directory
+ (festival-send-command (list 'cd (expand-file-name default-directory)))
+ (if (equal "-mode" (substring (format "%S" major-mode) -5 nil))
+ (if (equal "sgml" (substring (format "%S" major-mode) 0 -5))
+ (festival-send-command
+ (list 'tts festival-tmp-file "sable"))
+ (festival-send-command
+ (list 'tts festival-tmp-file
+ (substring (format "%S" major-mode) 0 -5))))
+ (festival-send-command (list 'tts festival-tmp-file nil))))
+
+;;
+;; say-minor-mode provides a menu offering various speech synthesis commands
+;;
+(defvar say-minor-mode nil)
+
+(defun say-minor-mode (arg)
+ "Toggle say minor mode.
+With arg, turn say-minor-mode on iff arg is positive."
+ (interactive "P")
+ (setq say-minor-mode
+ (if (if (null arg) (not say-minor-mode)
+ (> (prefix-numeric-value arg) 0))
+ t))
+ (force-mode-line-update))
+
+(setq say-params-menu (make-sparse-keymap "Pitch/Duration"))
+(fset 'say-params-menu (symbol-value 'say-params-menu))
+(define-key say-params-menu [say-fast] '("Fast" . festival-fast))
+(define-key say-params-menu [say-slow] '("Slow" . festival-slow))
+(define-key say-params-menu [say-ndur] '("Normal Dur" . festival-ndur))
+
+(setq say-lang-menu (make-sparse-keymap "Select language"))
+(fset 'say-lang-menu (symbol-value 'say-lang-menu))
+(define-key say-lang-menu [say-lang-spain1] '("Spanish el" . festival-spanish))
+(define-key say-lang-menu [say-lang-welsh1] '("Welsh hl" . festival-welsh))
+(define-key say-lang-menu [say-lang-eng5] '("English gsw" . festival-gsw))
+(define-key say-lang-menu [say-lang-eng4] '("English don" . festival-don))
+(define-key say-lang-menu [say-lang-eng3] '("English rab" . festival-rab))
+(define-key say-lang-menu [say-lang-eng2] '("English ked" . festival-ked))
+(define-key say-lang-menu [say-lang-eng1] '("English kal" . festival-kal))
+;(define-key say-params-menu [say-set-dur-stretch]
+; '("Set Duration Stretch" . festival-set-dur-stretch))
+;(define-key say-params-menu [say-high] '("High" . festival-high))
+;(define-key say-params-menu [say-low] '("Low" . festival-low))
+;(define-key say-params-menu [say-npit] '("Normal Pitch" . festival-npit))
+;(define-key say-params-menu [say-set-pitch-stretch]
+; '("Set Pitch Stretch" . festival-set-pitch-stretch))
+
+(setq say-minor-mode-map (make-sparse-keymap))
+(setq say-menu (make-sparse-keymap "SAY"))
+(define-key say-minor-mode-map [menu-bar SAY] (cons "Say" say-menu))
+(define-key say-minor-mode-map [menu-bar SAY festival-intro] '("Festival Intro" . festival-intro))
+(define-key say-minor-mode-map [menu-bar SAY festival-process-status] '("Festival status" . festival-process-status))
+(define-key say-minor-mode-map [menu-bar SAY festival-kill-process] '("Kill Festival" . festival-kill-process))
+(define-key say-minor-mode-map [menu-bar SAY festival-start-process] '("(Re)start Festival" . festival-start-process))
+;;(define-key say-menu [separator-process] '("--"))
+;;(define-key say-menu [params] '("Pitch/Durations" . say-params-menu))
+(define-key say-menu [separator-buffers] '("--"))
+(define-key say-menu [festival-send-command] '("Festival eval command" . festival-send-command))
+(define-key say-menu [say-lang-menu] '("Select language" . say-lang-menu))
+(define-key say-menu [festival-say-buffer] '("Say buffer" . festival-say-buffer))
+(define-key say-menu [festival-say-region] '("Say region" . festival-say-region))
+
+
+(setq minor-mode-map-alist
+ (cons
+ (cons 'say-minor-mode say-minor-mode-map)
+ minor-mode-map-alist))
+
+(or (assq 'say-minor-mode minor-mode-alist)
+ (setq minor-mode-alist
+ (cons '(say-minor-mode "") minor-mode-alist)))
+
+;;;
+;;; A FESTIVAL inferior mode (copied from prolog.el)
+;;;
+(defvar inferior-festival-mode-map nil)
+
+(defun inferior-festival-mode ()
+ "Major mode for interacting with an inferior FESTIVAL process.
+
+The following commands are available:
+\\{inferior-festival-mode-map}
+
+Entry to this mode calls the value of `festival-mode-hook' with no arguments,
+if that value is non-nil. Likewise with the value of `comint-mode-hook'.
+`festival-mode-hook' is called after `comint-mode-hook'.
+
+You can send text to the inferior FESTIVAL from other buffers
+using the commands `send-region', `send-string'
+
+Return at end of buffer sends line as input.
+Return not at end copies rest of line to end and sends it.
+\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
+\\[comint-interrupt-subjob] interrupts the shell or its current subjob if any.
+\\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal."
+ (interactive)
+ (require 'comint)
+ (comint-mode)
+ (setq major-mode 'inferior-festival-mode
+ mode-name "Inferior FESTIVAL"
+ comint-prompt-regexp "^festival> ")
+ (if inferior-festival-mode-map nil
+ (setq inferior-festival-mode-map (copy-keymap comint-mode-map))
+ (festival-mode-commands inferior-festival-mode-map))
+ (use-local-map inferior-festivalr-mode-map)
+ (run-hooks 'festival-mode-hook))
+
+;;;###autoload
+(defun run-festival ()
+ "Run an inferior FESTIVAL process, input and output via buffer *festival*."
+ (interactive)
+ (require 'comint)
+ (switch-to-buffer (make-comint "festival" festival-program-name))
+ (inferior-festival-mode))
+
+(provide 'festival)
diff --git a/CosyVoice-ttsfrd/resource/festival/festival.scm b/CosyVoice-ttsfrd/resource/festival/festival.scm
new file mode 100644
index 0000000000000000000000000000000000000000..77b22929e3b661543b979cfe41bed1b45d6b1764
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/festival.scm
@@ -0,0 +1,633 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; General Festival Scheme specific functions
+;;; Including definitions of various standard variables.
+
+;; will be set automatically on start-up
+(defvar festival_version "unknown"
+ "festival_version
+ A string containing the current version number of the system.")
+
+;; will be set automatically on start-up
+(defvar festival_version_number '(x x x)
+ "festival_version_number
+ A list of major, minor and subminor version numbers of the current
+ system. e.g. (1 0 12).")
+
+(define (apply_method method utt)
+"(apply_method METHOD UTT)
+Apply the appropriate function to utt defined in parameter."
+ (let ((method_val (Parameter.get method)))
+ (cond
+ ((null method_val)
+ nil) ;; should be an error, but I'll let you off at present
+ ((and (symbol? method_val) (symbol-bound? method_val))
+ (apply (symbol-value method_val) (list utt)))
+ ((member (typeof method_val) '(subr closure))
+ (apply method_val (list utt)))
+ (t ;; again is probably an error
+ nil))))
+
+(define (require_module l)
+ "(require_module l)
+Check that certain compile-time modules are included in this installation.
+l may be a single atom or list of atoms. Each item in l must appear in
+*modules* otherwise an error is throw."
+ (if (consp l)
+ (mapcar require_module l)
+ (if (not (member_string l *modules*))
+ (error (format nil "module %s required, but not compiled in this installation\n" l))))
+ t)
+
+;;; Feature Function Functions
+(define (utt.features utt relname func_list)
+"(utt.features UTT RELATIONNAME FUNCLIST)
+ Get vectors of feature values for each item in RELATIONNAME in UTT.
+ [see Features]"
+ (mapcar
+ (lambda (s)
+ (mapcar (lambda (f) (item.feat s f)) func_list))
+ (utt.relation.items utt relname)))
+
+(define (utt.type utt)
+"(utt.type UTT)
+ Returns the type of UTT."
+ (intern (utt.feat utt 'type)))
+
+(define (utt.save.segs utt filename)
+"(utt.save.segs UTT FILE)
+ Save segments of UTT in a FILE in xlabel format."
+ (let ((fd (fopen filename "w")))
+ (format fd "#\n")
+ (mapcar
+ (lambda (info)
+ (format fd "%2.4f 100 %s\n" (car info) (car (cdr info))))
+ (utt.features utt 'Segment '(segment_end name)))
+ (fclose fd)
+ utt))
+
+(define (utt.save.words utt filename)
+"(utt.save.words UTT FILE)
+ Save words of UTT in a FILE in xlabel format."
+ (let ((fd (fopen filename "w")))
+ (format fd "#\n")
+ (mapcar
+ (lambda (info)
+ (format fd "%2.4f 100 %s\n" (car info) (car (cdr info))))
+ (utt.features utt 'Word '(word_end name)))
+ (fclose fd)
+ utt))
+
+(define (utt.resynth labfile f0file)
+"(utt.resynth LABFILE F0FILE)
+Resynthesize an utterance from a label file and F0 file (in any format
+supported by the Speech Tool Library). This loads, synthesizes and
+plays the utterance."
+ (let (u f0 f0_item)
+ (set! u (Utterance SegF0)) ; need some u to start with
+ (utt.relation.load u 'Segment labfile)
+ (utt.relation.create u 'f0)
+ (set! f0 (track.load f0file))
+ (set! f0_item (utt.relation.append u 'f0))
+ (item.set_feat f0_item "name" "f0")
+ (item.set_feat f0_item "f0" f0)
+
+ ;; emulabel may have flipped pau to H#
+ (mapcar
+ (lambda (s)
+ (cond
+ ((string-matches (item.name s) "[hH]#")
+ (item.set_feat s "name" "pau"))
+ ((string-matches (item.name s) "#.*")
+ (item.set_feat s "name" (string-after (item.name s) "#")))))
+ (utt.relation.items u 'Segment))
+
+ (Wave_Synth u)
+ (utt.play u)
+ u))
+
+(define (utt.relation.present utt relation)
+"(utt.relation.present UTT RELATIONNAME)
+Returns t if UTT caontains a relation called RELATIONNAME, nil otherwise."
+ (if (member_string relation (utt.relationnames utt))
+ t
+ nil))
+
+(define (utt.relation.leafs utt relation)
+"(utt.relation.leafs UTT RELATIONNAME)
+Returns a list of all the leafs in this relation."
+ (let ((leafs nil))
+ (mapcar
+ (lambda (i)
+ (if (not (item.down (item.relation i relation)))
+ (set! leafs (cons i leafs))))
+ (utt.relation.items utt relation))
+ (reverse leafs)))
+
+(define (utt.relation.first utt relation)
+"(utt.relation.first UTT RELATIONNAME)
+Returns a the first item in this relation."
+ (utt.relation utt relation))
+
+(define (utt.relation.last utt relation)
+"(utt.relation.last UTT RELATIONNAME)
+Returns a the last item in this relation."
+ (let ((i (utt.relation.first utt relation)))
+ (while (item.next i)
+ (set! i (item.next i)))
+ i))
+
+(define (item.feat.present item feat)
+ "(item.feat.present item feat)
+nil if feat doesn't existing in this item, non-nil otherwise."
+ (and item (assoc_string feat (item.features item))))
+
+(define (item.relation.append_daughter parent relname daughter)
+"(item.relation.append_daughter parent relname daughter)
+Make add daughter to parent as a new daughter in relname."
+ (item.append_daughter (item.relation parent relname) daughter))
+
+(define (item.relation.insert si relname newsi direction)
+"(item.relation.insert si relname newsi direction)
+Insert newsi in relation relname with respect to direction. If
+direction is ommited after is assumed, valid directions are after
+before, above and below. Note you should use
+item.relation.append_daughter for tree adjoining. newsi maybe
+a item itself of a LISP description of one."
+ (item.insert
+ (item.relation si relname)
+ newsi
+ direction))
+
+(define (item.relation.daughters parent relname)
+ "(item.relation.daughters parent relname)
+Return a list of all daughters of parent by relname."
+ (let ((d1 (item.daughter1 (item.relation parent relname)))
+ (daughters))
+ (while d1
+ (set! daughters (cons d1 daughters))
+ (set! d1 (item.next d1)))
+ (reverse daughters)))
+
+(define (item.daughters p)
+ "(item.daughters parent)
+Return a list of all daughters of parent."
+ (item.relation.daughters p (item.relation.name p)))
+
+(define (item.relation.parent si relname)
+ "(item.relation.parent item relname)
+Return the parent of this item in this relation."
+ (item.parent (item.relation si relname)))
+
+(define (item.relation.daughter1 si relname)
+ "(item.relation.daughter1 item relname)
+Return the first daughter of this item in this relation."
+ (item.daughter1 (item.relation si relname)))
+
+(define (item.relation.daughter2 si relname)
+ "(item.relation.daughter2 item relname)
+Return the second daughter of this item in this relation."
+ (item.daughter2 (item.relation si relname)))
+
+(define (item.relation.daughtern si relname)
+ "(item.relation.daughtern item relname)
+Return the final daughter of this item in this relation."
+ (item.daughtern (item.relation si relname)))
+
+(define (item.relation.next si relname)
+ "(item.relation.next item relname)
+Return the next item in this relation."
+ (item.next (item.relation si relname)))
+
+(define (item.relation.prev si relname)
+ "(item.relation.prev item relname)
+Return the previous item in this relation."
+ (item.prev (item.relation si relname)))
+
+(define (item.relation.first si relname)
+ "(item.relation.first item relname)
+Return the most previous item from this item in this relation."
+ (let ((n (item.relation si relname)))
+ (while (item.prev n)
+ (set! n (item.prev n)))
+ n))
+
+(define (item.leafs si)
+ "(item.relation.leafs item relname)
+Return a list of the leafs of this item in this relation."
+ (let ((ls nil)
+ (pl (item.first_leaf si))
+ (ll (item.next_leaf (item.last_leaf si))))
+ (while (and pl (not (equal? pl ll)))
+ (set! ls (cons pl ls))
+ (set! pl (item.next_leaf pl)))
+ (reverse ls)))
+
+(define (item.relation.leafs si relname)
+ "(item.relation.leafs item relname)
+Return a list of the leafs of this item in this relation."
+ (item.leafs (item.relation si relname)))
+
+(define (item.root s)
+ "(item.root s)
+Follow parent link until s has no parent."
+ (cond
+ ((item.parent s)
+ (item.root (item.parent s)))
+ (t s)))
+
+(define (item.parent_to s relname)
+ "(item.parent_to s relname)
+Find the first ancestor of s in its current relation that is also in
+relname. s is treated as an ancestor of itself so if s is in relname
+it is returned. The returned value is in will be in relation relname
+or nil if there isn't one."
+ (cond
+ ((null s) s)
+ ((member_string relname (item.relations s))
+ (item.relation s relname))
+ (t (item.parent_to (item.parent s) relname))))
+
+(define (item.daughter1_to s relname)
+ "(item.daughter1_to s relname)
+Follow daughter1 links of s in its current relation until an item
+is found that is also in relname, is s is in relname it is returned.
+The return item is returned in relation relname, or nil if there is
+nothing in relname."
+ (cond
+ ((null s) s)
+ ((member_string relname (item.relations s)) (item.relation s relname))
+ (t (item.daughter1_to (item.daughter1 s) relname))))
+
+(define (item.daughtern_to s relname)
+ "(item.daughter1_to s relname)
+Follow daughtern links of s in its current relation until an item
+is found that is also in relname, is s is in relname it is returned.
+The return item is returned in relation relname, or nil if there is
+nothing in relname."
+ (cond
+ ((null s) s)
+ ((member_string relname (item.relations s)) (item.relation s relname))
+ (t (item.daughtern_to (item.daughtern s) relname))))
+
+(define (item.name s)
+"(item.name ITEM)
+ Returns the name of ITEM. [see Accessing an utterance]"
+ (item.feat s "name"))
+
+(define (utt.wave utt)
+ "(utt.wave UTT)
+Get waveform from wave (R:Wave.first.wave)."
+ (item.feat (utt.relation.first utt "Wave") "wave"))
+
+(define (utt.wave.rescale . args)
+ "(utt.wave.rescale UTT FACTOR NORMALIZE)
+Modify the gain of the waveform in UTT by GAIN. If NORMALIZE is
+specified and non-nil the waveform is maximized first."
+ (wave.rescale (utt.wave (nth 0 args)) (nth 1 args) (nth 2 args))
+ (nth 0 args))
+
+(define (utt.wave.resample utt rate)
+ "(utt.wave.resample UTT RATE)\
+Resample waveform in UTT to RATE (if it is already at that rate it remains
+unchanged)."
+ (wave.resample (utt.wave utt) rate)
+ utt)
+
+(define (utt.import.wave . args)
+ "(utt.import.wave UTT FILENAME APPEND)
+Load waveform in FILENAME into UTT in R:Wave.first.wave. If APPEND
+is specified and non-nil append this to the current waveform."
+ (let ((utt (nth 0 args))
+ (filename (nth 1 args))
+ (append (nth 2 args)))
+ (if (and append (member 'Wave (utt.relationnames utt)))
+ (wave.append (utt.wave utt) (wave.load filename))
+ (begin
+ (utt.relation.create utt 'Wave)
+ (item.set_feat
+ (utt.relation.append utt 'Wave)
+ "wave"
+ (wave.load filename))))
+ utt))
+
+(define (utt.save.wave . args)
+ "(utt.save.wave UTT FILENAME FILETYPE)
+Save waveform in UTT in FILENAME with FILETYPE (if specified) or
+using global parameter Wavefiletype."
+ (wave.save
+ (utt.wave (nth 0 args))
+ (nth 1 args)
+ (nth 2 args))
+ (nth 0 args))
+
+(define (utt.play utt)
+ "(utt.play UTT)
+Play waveform in utt by current audio method."
+ (wave.play (utt.wave utt))
+ utt)
+
+(define (utt.save.track utt filename relation feature)
+ "(utt.save.track utt filename relation feature)
+DEPRICATED use trace.save instead."
+ (format stderr "utt.save.track: DEPRICATED use track.save instead\n")
+ (track.save
+ (item.feat
+ (utt.relation.first utt relation)
+ feature)
+ filename)
+ utt)
+
+(define (utt.import.track utt filename relation fname)
+ "(utt.import.track UTT FILENAME RELATION FEATURE_NAME)
+Load track in FILENAME into UTT in R:RELATION.first.FEATURE_NAME.
+Deletes RELATION if it already exists. (you maybe want to use track.load
+directly rather than this legacy function."
+ (utt.relation.create utt relation)
+ (item.set_feat
+ (utt.relation.append utt relation)
+ fname
+ (track.load filename))
+ utt)
+
+(define (wagon_predict item tree)
+"(wagon_predict ITEM TREE)
+Predict with given ITEM and CART tree and return the prediction
+(the last item) rather than whole probability distribution."
+ (car (last (wagon item tree))))
+
+(define (phone_is_silence phone)
+ (member_string
+ phone
+ (car (cdr (car (PhoneSet.description '(silences)))))))
+
+(define (phone_feature phone feat)
+"(phone_feature phone feat)
+Return the feature for given phone in current phone set, or 0
+if it doesn't exist."
+ (let ((ph (intern phone)))
+ (let ((fnames (cadr (assoc 'features (PhoneSet.description))))
+ (fvals (cdr (assoc ph (cadr (assoc 'phones (PhoneSet.description)))))))
+ (while (and fnames (not (string-equal feat (car (car fnames)))))
+ (set! fvals (cdr fvals))
+ (set! fnames (cdr fnames)))
+ (if fnames
+ (car fvals)
+ 0))))
+
+(defvar server_max_clients 10
+ "server_max_clients
+In server mode, the maximum number of clients supported at any one
+time. When more that this number of clients attach simulaneous
+the last ones are denied access. Default value is 10.
+[see Server/client API]")
+
+(defvar server_port 1314
+ "server_port
+In server mode the inet port number the server will wait for connects
+on. The default value is 1314. [see Server/client API]")
+
+(defvar server_log_file t
+ "server_log_file
+If set to t server log information is printed to standard output
+of the server process. If set to nil no output is given. If set
+to anything else the value is used as the name of file to which
+server log information is appended. Note this value is checked at
+server start time, there is no way a client may change this.
+[see Server/client API]")
+
+(defvar server_passwd nil
+ "server_passwd
+If non-nil clients must send this passwd to the server followed by
+a newline before they can get a connection. It would be normal
+to set this for the particular server task.
+[see Server/client API]")
+
+(defvar server_access_list '(localhost)
+ "server_access_list
+If non-nil this is the exhaustive list of machines and domains
+from which clients may access the server. This is a list of REGEXs
+that client host must match. Remember to add the backslashes before
+the dots. [see Server/client API]")
+
+(defvar server_deny_list nil
+ "server_deny_list
+If non-nil this is a list of machines which are to be denied access
+to the server absolutely, irrespective of any other control features.
+The list is a list of REGEXs that are used to matched the client hostname.
+This list is checked first, then server_access_list, then passwd.
+[see Server/client API]")
+
+(define (def_feature_docstring fname fdoc)
+"(def_feature_docstring FEATURENAME FEATUREDOC)
+As some feature are used directly of stream items with no
+accompanying feature function, the features are just values on the feature
+list. This function also those features to have an accompanying
+documentation string."
+ (let ((fff (assoc fname ff_docstrings)))
+ (cond
+ (fff ;; replace what's already there
+ (set-cdr! fff fdoc))
+ (t
+ (set! ff_docstrings (cons (cons fname fdoc) ff_docstrings))))
+ t))
+
+(define (linear_regression item model)
+ "(linear_regression ITEM MODEL)
+Use linear regression MODEL on ITEM. MODEL consists of a list
+of features, weights and optional map list. E.g. ((Intercept 100)
+(tobi_accent 10 (H* !H*)))."
+ (let ((intercept (if (equal? 'Intercept (car (car model)))
+ (car (cdr (car model))) 0))
+ (mm (if (equal? 'Intercept (car (car model)))
+ (cdr model) model)))
+ (apply +
+ (cons intercept
+ (mapcar
+ (lambda (f)
+ (let ((ff (item.feat item (car f))))
+ (if (car (cdr (cdr f)))
+ (if (member_string ff (car (cdr (cdr f))))
+ (car (cdr f))
+ 0)
+ (* (parse-number ff) (car (cdr f))))))
+ mm)))))
+
+(defvar help
+ "The Festival Speech Synthesizer System: Help
+
+Getting Help
+ (doc ') displays help on
+ (manual nil) displays manual in local netscape
+ C-c return to top level
+ C-d or (quit) Exit Festival
+(If compiled with editline)
+ M-h displays help on current symbol
+ M-s speaks help on current symbol
+ M-m displays relevant manula page in local netscape
+ TAB Command, symbol and filename completion
+ C-p or up-arrow Previous command
+ C-b or left-arrow Move back one character
+ C-f or right-arrow
+ Move forward one character
+ Normal Emacs commands work for editing command line
+
+Doing stuff
+ (SayText TEXT) Synthesize text, text should be surrounded by
+ double quotes
+ (tts FILENAME nil) Say contexts of file, FILENAME should be
+ surrounded by double quotes
+ (voice_rab_diphone) Select voice (Britsh Male)
+ (voice_kal_diphone) Select voice (American Male)
+")
+
+(define (festival_warranty)
+"(festival_warranty)
+ Display Festival's copyright and warranty. [see Copying]"
+ (format t
+ (string-append
+ " The Festival Speech Synthesis System: "
+ festival_version
+"
+ Centre for Speech Technology Research
+ University of Edinburgh, UK
+ Copyright (c) 1996-2014
+ All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to use and distribute
+ this software and its documentation without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of this work, and to
+ permit persons to whom this work is furnished to do so, subject to
+ the following conditions:
+ 1. The code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+ 2. Any modifications must be clearly marked as such.
+ 3. Original authors' names are not deleted.
+ 4. The authors' names are not used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK
+ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
+ SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ THIS SOFTWARE.
+")))
+
+(define (intro)
+"(intro)
+ Synthesize an introduction to the Festival Speech Synthesis System."
+ (tts (path-append libdir "../examples/intro.text") nil))
+
+(define (intro-spanish)
+"(intro-spanish)
+ Synthesize an introduction to the Festival Speech Synthesis System
+ in spanish. Spanish voice must already be selected for this."
+ (tts (path-append libdir "../examples/spintro.text") nil))
+
+(define (na_play FILENAME)
+"(play_wave FILENAME)
+Play given wavefile"
+ (utt.play (utt.synth (eval (list 'Utterance 'Wave FILENAME)))))
+
+;;; Some autoload commands
+(autoload manual-sym "festdoc" "Show appropriate manual section for symbol.")
+(autoload manual "festdoc" "Show manual section.")
+
+(autoload display "display" "Graphically display utterance.")
+
+(autoload festtest "festtest" "Run tests of Festival.")
+
+(defvar diphone_module_hooks nil
+ "diphone_module_hooks
+ A function or list of functions that will be applied to the utterance
+ at the start of the diphone module. It can be used to map segment
+ names to those that will be used by the diphone database itself.
+ Typical use specifies _ and $ for consonant clusters and syllable
+ boundaries, mapping to dark ll's etc. Reduction and tap type
+ phenomena should probabaly be done by post lexical rules though the
+ distinction is not a clear one.")
+
+(def_feature_docstring
+ 'Segment.diphone_phone_name
+ "Segment.diphone_phone_name
+ This is produced by the diphone module to contain the desired phone
+ name for the desired diphone. This adds things like _ if part of
+ a consonant or $ to denote syllable boundaries. These are generated
+ on a per voice basis by function(s) specified by diphone_module_hooks.
+ Identification of dark ll's etc. may also be included. Note this is not
+ necessarily the name of the diphone selected as if it is not found
+ some of these characters will be removed and fall back values will be
+ used.")
+
+(def_feature_docstring
+ 'Syllable.stress
+ "Syllable.stress
+ The lexical stress of the syllable as specified from the lexicon entry
+ corresponding to the word related to this syllable.")
+
+;;;
+;;; I tried some tests on the resulting speed both runtime and loadtime
+;;; but compiled files don't seem to make any significant difference
+;;;
+(define (compile_library)
+ "(compile_library)
+Compile all the scheme files in the library directory."
+ (mapcar
+ (lambda (file)
+ (format t "compile ... %s\n" file)
+ (compile-file (string-before file ".scm")))
+ (list
+ "synthesis.scm" "siod.scm" "init.scm" "lexicons.scm"
+ "festival.scm" "gsw_diphone.scm" "intonation.scm" "duration.scm"
+ "pos.scm" "phrase.scm" "don_diphone.scm" "rab_diphone.scm"
+ "voices.scm" "tts.scm" "festdoc.scm" "languages.scm" "token.scm"
+ "mbrola.scm" "display.scm" "postlex.scm" "tokenpos.scm"
+ "festtest.scm" "cslush.scm" "ducs_cluster.scm" "sucs.scm"
+ "web.scm" "cart_aux.scm"
+ "lts_nrl.scm" "lts_nrl_us.scm" "email-mode.scm"
+ "mrpa_phones.scm" "radio_phones.scm" "holmes_phones.scm"
+ "mrpa_durs.scm" "klatt_durs.scm" "gswdurtreeZ.scm"
+ "tobi.scm" "f2bf0lr.scm"))
+ t)
+
+;;; For mlsa resynthesizer
+(defvar mlsa_alpha_param 0.42)
+(defvar mlsa_beta_param 0.0)
+
+(provide 'festival)
diff --git a/CosyVoice-ttsfrd/resource/festival/festtest.scm b/CosyVoice-ttsfrd/resource/festival/festtest.scm
new file mode 100644
index 0000000000000000000000000000000000000000..345c3cc2b59600933adb490050507c429e7eb7ef
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/festtest.scm
@@ -0,0 +1,72 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Some basic functions used in tests for Festival
+;;;
+
+(define (test_words text)
+"(test_words TEXT)
+prints TEXT, Synthesizes TEXT and outputs the words in it."
+ (format t "Word test: %s\n " text)
+ (set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
+ (mapcar
+ (lambda (word) (format t "%s " (car word)))
+ (utt.features utt1 'Word '(name)))
+ (format t "\n")
+ t)
+
+(define (test_segments text)
+"(test_segments TEXT)
+prints TEXT, Synthesizes TEXT and outputs the segments in it."
+ (format t "Segment test: %s\n " text)
+ (set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
+ (mapcar
+ (lambda (word) (format t "%s " (car word)))
+ (utt.features utt1 'Segment '(name)))
+ (format t "\n")
+)
+
+(define (test_phrases text)
+"(test_phrases TEXT)
+prints TEXT, Synthesizes TEXT and outputs the words and phrase breaks."
+ (format t "Phrase test: %s \n " text)
+ (set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
+ (mapcar
+ (lambda (phrase)
+ (mapcar (lambda (w) (format t "%s " (car (car w)))) (cdr phrase))
+ (format t "%s\n " (car (car phrase))))
+ (utt.relation_tree utt1 'Phrase))
+ (format t "\n")
+ t)
+
+(provide 'festtest)
diff --git a/CosyVoice-ttsfrd/resource/festival/fringe.scm b/CosyVoice-ttsfrd/resource/festival/fringe.scm
new file mode 100644
index 0000000000000000000000000000000000000000..b60bd1e5106687642dba7f33449a6817ff4e9152
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/fringe.scm
@@ -0,0 +1,108 @@
+
+
+
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
+ ;;;
+ ;;; The master copy of this file is in ../../speech_tools/lib/siod/fringe.scm
+ ;;; and is copied here at build time.
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+
+
+
+
+
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Talking to fringe.
+
+(defvar fringe_verbose nil
+ "fringe_verbose
+ If this is set true, all subsequent fringe connections will
+ print a trace of what they are doing.")
+
+;;; Aliases which are better suited to command line use.
+
+(defvar fringe_name "fringe"
+ "fringe_name
+ The name of the last name passed to \[fringe_setup\].")
+
+(defvar fringe_connection nil
+ "fringe_connection
+ A connection to fringe, used by the command line fringe functions.")
+
+(define (fringe_setup &opt name)
+ "(fringe_setup &opt name)
+ Connect to fringe."
+
+ (fringe_read_server_table)
+ (if (not name) (set! name fringe_name))
+ (set! fringe_connection (fringe_server "fringe"))
+ (set! fringe_name name)
+ )
+
+(define (fringe command)
+ "(fringe COMMAND)
+ Send COMMAND to the fringe server \[fringe_connection\]
+ For command line use, use (fringe_comand_string...) in scripts. "
+ (if (not fringe_connection) (fringe_setup))
+ (let ((val (fringe_command_string fringe_connection command)))
+ (if (or (null val) (consp val))
+ nil
+ val)
+ )
+ )
+
+(define (fringel package operation args)
+ "(fringel PACKAGE OPERATION ARGS)
+ Send a command to the fringe server \[fringe_connection\].
+ For command line use, use (fringe_comand...) in scripts. "
+
+ (if (not fringe_connection) (fringe_setup))
+ (let ((val (fringe_command fringe_connection package operation args)))
+ (if (or (null val) (consp val))
+ nil
+ val)
+ )
+ )
+
+(provide 'fringe)
diff --git a/CosyVoice-ttsfrd/resource/festival/gswdurtreeZ.scm b/CosyVoice-ttsfrd/resource/festival/gswdurtreeZ.scm
new file mode 100644
index 0000000000000000000000000000000000000000..4968192dce221ec1f557c83bcadc4d41fa035b90
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/gswdurtreeZ.scm
@@ -0,0 +1,947 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; A tree to predict zcore durations build from gsw 450 (timit)
+;;; doesn't use actual phonemes so it can have better generalizations
+;;;
+
+;; pre Sue's changes to mrpa_phones (on traing data)
+;; RMSE 0.79102 Correlation is 0.610184 Mean (abs) Error 0.605081 (0.509517)
+;; Post with balance
+;; train test spit --stop 19 --balance 16
+;; RMSE 0.841861 Correlation is 0.526064 Mean (abs) Error 0.646614 (0.539288)
+;; on training data
+;; RMSE 0.784032 Correlation is 0.619165 Mean (abs) Error 0.602819 (0.501332)
+;;
+;; Oct 29th 1997
+;; stepwise (but its over trained)
+;; RMSE 0.8322 Correlation is 0.5286 Mean (abs) Error 0.6375 (0.5350)
+;;
+;; May 11th 1998
+;; new architecture, full new train on f2b on test data
+;; in zscore domain
+;; RMSE 0.8076 Correlation is 0.5307 Mean (abs) Error 0.6113 (0.5278)
+;; in absolute domain
+;; RMSE 0.0276 Correlation 0.7468 Mean (abs) error 0.0203 (0.0187)
+;;
+;; May 18th 1998
+;; various corrections f2bdur.bbz.H0.S50.tree no names zscore
+;; in zscore domain
+;; RMSE 0.8049 Correlation is 0.6003 Mean (abs) Error 0.6008 (0.5357)
+;; in absolute domain
+;; RMSE 0.0268 Correlation 0.7766 Mean (abs) error 0.0196 (0.0183)
+
+(set! gsw_duration_cart_tree
+'
+((name is #)
+ ((emph_sil is +)
+ ((0.0 -0.5))
+ ((p.R:SylStructure.parent.parent.pbreak is BB)
+ ((0.0 2.0))
+ ((0.0 0.0))))
+
+((R:SylStructure.parent.accented is 0)
+ ((n.ph_ctype is 0)
+ ((p.ph_vlng is 0)
+ ((R:SylStructure.parent.syl_codasize < 1.5)
+ ((p.ph_ctype is n)
+ ((ph_ctype is f)
+ ((0.559208 -0.783163))
+ ((1.05215 -0.222704)))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((0.589948 0.764459))
+ ((R:SylStructure.parent.asyl_in < 0.7)
+ ((1.06385 0.567944))
+ ((0.691943 0.0530272))))
+ ((ph_vlng is l)
+ ((pp.ph_vfront is 1)
+ ((1.06991 0.766486))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((0.69665 0.279248))
+ ((0.670353 0.0567774))))
+ ((p.ph_ctype is s)
+ ((seg_onsetcoda is coda)
+ ((0.828638 -0.038356))
+ ((ph_ctype is f)
+ ((0.7631 -0.545853))
+ ((0.49329 -0.765994))))
+ ((R:SylStructure.parent.parent.gpos is det)
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((R:SylStructure.parent.sub_phrases < 1)
+ ((0.811686 0.160195))
+ ((0.799015 0.713958)))
+ ((0.731599 -0.215472)))
+ ((ph_ctype is r)
+ ((0.673487 0.092772))
+ ((R:SylStructure.parent.asyl_in < 1)
+ ((0.745273 0.00132813))
+ ((0.75457 -0.334898)))))))))
+ ((pos_in_syl < 0.5)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.902446 -0.041618))
+ ((R:SylStructure.parent.sub_phrases < 2.3)
+ ((0.900629 0.262952))
+ ((1.18474 0.594794))))
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.position_type is mid)
+ ((0.512323 -0.760444))
+ ((R:SylStructure.parent.syl_out < 6.8)
+ ((pp.ph_vlng is a)
+ ((0.640575 -0.450449))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.sub_phrases < 1.3)
+ ((0.862876 -0.296956))
+ ((R:SylStructure.parent.syl_out < 2.4)
+ ((0.803215 0.0422868))
+ ((0.877856 -0.154465))))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((R:SylStructure.parent.syl_out < 1.2)
+ ((0.567081 -0.264199))
+ ((0.598043 -0.541738)))
+ ((0.676843 -0.166623)))))
+ ((0.691678 -0.57173))))
+ ((R:SylStructure.parent.parent.gpos is cc)
+ ((1.15995 0.313289))
+ ((pp.ph_vfront is 1)
+ ((0.555993 0.0695819))
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((0.721635 -0.367088))
+ ((0.71919 -0.194887)))
+ ((0.547052 -0.0637491)))))))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((0.650007 -0.333421))
+ ((0.846301 -0.165383)))
+ ((0.527756 -0.516332)))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_ctype is s)
+ ((0.504414 -0.779112))
+ ((0.812498 -0.337611)))
+ ((pos_in_syl < 1.4)
+ ((0.513041 -0.745807))
+ ((p.ph_ctype is s)
+ ((0.350582 -1.04907))
+ ((0.362 -0.914974))))))))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.position_type is initial)
+ ((pos_in_syl < 1.2)
+ ((0.580485 0.172658))
+ ((0.630973 -0.101423)))
+ ((0.577937 -0.360092)))
+ ((R:SylStructure.parent.syl_out < 2.9)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.896092 0.764189))
+ ((R:SylStructure.parent.sub_phrases < 3.6)
+ ((ph_ctype is s)
+ ((0.877362 0.555132))
+ ((0.604511 0.369882)))
+ ((0.799982 0.666966))))
+ ((seg_onsetcoda is coda)
+ ((p.ph_vlng is a)
+ ((R:SylStructure.parent.last_accent < 0.4)
+ ((0.800736 0.240634))
+ ((0.720606 0.486176)))
+ ((1.18173 0.573811)))
+ ((0.607147 0.194468))))
+ ((ph_ctype is r)
+ ((0.88377 0.499383))
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((0.62798 0.0737318))
+ ((0.787334 0.331014)))
+ ((ph_ctype is s)
+ ((0.808368 0.0929299))
+ ((0.527948 -0.0443271))))
+ ((seg_coda_fric is 0)
+ ((p.ph_vlng is a)
+ ((0.679745 0.517681))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((0.759979 0.128316))
+ ((0.775233 0.361383))))
+ ((R:SylStructure.parent.last_accent < 1.3)
+ ((0.696255 0.054136))
+ ((0.632425 0.246742))))))))
+ ((pos_in_syl < 0.3)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.847602 0.621547))
+ ((ph_ctype is s)
+ ((0.880645 0.501679))
+ ((R:SylStructure.parent.sub_phrases < 3.3)
+ ((R:SylStructure.parent.sub_phrases < 0.3)
+ ((0.901014 -0.042049))
+ ((0.657493 0.183226)))
+ ((0.680126 0.284799)))))
+ ((ph_ctype is s)
+ ((p.ph_vlng is s)
+ ((0.670033 -0.820934))
+ ((0.863306 -0.348735)))
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((0.656966 -0.40092))
+ ((0.530966 -0.639366)))
+ ((seg_coda_fric is 0)
+ ((1.04153 0.364857))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.syl_out < 3.4)
+ ((0.81503 -0.00768613))
+ ((0.602665 -0.197753)))
+ ((0.601844 -0.394632)))))))))
+ ((n.ph_ctype is f)
+ ((pos_in_syl < 1.5)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((pos_in_syl < 0.1)
+ ((1.63863 0.938841))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.897722 -0.0796637))
+ ((nn.ph_vheight is 0)
+ ((0.781081 0.480026))
+ ((0.779711 0.127175)))))
+ ((ph_ctype is r)
+ ((p.ph_ctype is s)
+ ((0.581329 -0.708767))
+ ((0.564366 -0.236212)))
+ ((ph_vlng is a)
+ ((p.ph_ctype is r)
+ ((0.70992 -0.273389))
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((0.764696 0.0581338))
+ ((nn.ph_vheight is 0)
+ ((0.977737 0.721904))
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((pp.ph_vfront is 0)
+ ((0.586708 0.0161206))
+ ((0.619949 0.227372)))
+ ((0.707285 0.445569))))))
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.syl_break is 1)
+ ((nn.ph_vfront is 2)
+ ((0.430295 -0.120097))
+ ((0.741371 0.219042)))
+ ((0.587492 0.321245)))
+ ((p.ph_ctype is n)
+ ((0.871586 0.134075))
+ ((p.ph_ctype is r)
+ ((0.490751 -0.466418))
+ ((R:SylStructure.parent.syl_codasize < 1.3)
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((p.ph_ctype is s)
+ ((0.407452 -0.425925))
+ ((0.644771 -0.542809)))
+ ((0.688772 -0.201899)))
+ ((ph_vheight is 1)
+ ((nn.ph_vheight is 0)
+ ((0.692018 0.209018))
+ ((0.751345 -0.178136)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((R:SylStructure.parent.asyl_in < 1.5)
+ ((0.599633 -0.235593))
+ ((0.60042 0.126118)))
+ ((p.ph_vlng is a)
+ ((0.7148 -0.174812))
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((0.761296 -0.231509))
+ ((0.813081 -0.536405)))))))))))))
+ ((ph_ctype is n)
+ ((0.898844 0.163343))
+ ((p.ph_vlng is s)
+ ((seg_coda_fric is 0)
+ ((0.752921 -0.45528))
+ ((0.890079 -0.0998025)))
+ ((ph_ctype is f)
+ ((0.729376 -0.930547))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((0.745052 -0.634119))
+ ((0.521502 -0.760176)))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((0.766575 -0.121355))
+ ((0.795616 -0.557509))))))))
+ ((p.ph_vlng is 0)
+ ((p.ph_ctype is r)
+ ((ph_vlng is 0)
+ ((0.733659 -0.402734))
+ ((R:SylStructure.parent.sub_phrases < 1.5)
+ ((ph_vlng is s)
+ ((0.326176 -0.988478))
+ ((n.ph_ctype is s)
+ ((0.276471 -0.802536))
+ ((0.438283 -0.900628))))
+ ((nn.ph_vheight is 0)
+ ((ph_vheight is 2)
+ ((0.521 -0.768992))
+ ((0.615436 -0.574918)))
+ ((ph_vheight is 1)
+ ((0.387376 -0.756359))
+ ((pos_in_syl < 0.3)
+ ((0.417235 -0.808937))
+ ((0.384043 -0.93315)))))))
+ ((ph_vlng is a)
+ ((ph_ctype is 0)
+ ((n.ph_ctype is s)
+ ((p.ph_ctype is f)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.415908 -0.428493))
+ ((pos_in_syl < 0.1)
+ ((0.790441 0.0211071))
+ ((0.452465 -0.254485))))
+ ((p.ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.582447 -0.389966))
+ ((0.757648 0.185781)))
+ ((R:SylStructure.parent.sub_phrases < 1.4)
+ ((0.628965 0.422551))
+ ((0.713613 0.145576)))))
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((pp.ph_vfront is 1)
+ ((0.412363 -0.62319))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((0.729259 -0.317324))
+ ((0.441633 -0.591051))))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((0.457728 -0.405607))
+ ((0.532411 -0.313148)))
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((1.14175 0.159416))
+ ((0.616396 -0.254651)))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.264181 -0.799896))
+ ((0.439801 -0.551309)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.552027 -0.707084))
+ ((0.585661 -0.901874))))
+ ((ph_ctype is s)
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((pp.ph_vfront is 1)
+ ((0.607449 0.196466))
+ ((0.599662 0.00382414)))
+ ((0.64109 -0.12859)))
+ ((pp.ph_vfront is 1)
+ ((0.720484 -0.219339))
+ ((0.688707 -0.516734))))
+ ((ph_vlng is s)
+ ((n.ph_ctype is s)
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.position_type is single)
+ ((0.659206 0.159445))
+ ((R:SylStructure.parent.parent.word_numsyls < 3.5)
+ ((R:SylStructure.parent.sub_phrases < 2)
+ ((0.447186 -0.419103))
+ ((0.631822 -0.0928561)))
+ ((0.451623 -0.576116))))
+ ((ph_vheight is 3)
+ ((0.578626 -0.64583))
+ ((0.56636 -0.4665))))
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((0.771516 -0.217292))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.688571 -0.304382))
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((n.ph_ctype is n)
+ ((0.556085 -0.572203))
+ ((0.820173 -0.240338)))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.2)
+ ((0.595398 -0.588171))
+ ((0.524737 -0.95797))))
+ ((R:SylStructure.parent.sub_phrases < 3.9)
+ ((0.371492 -0.959427))
+ ((0.440479 -0.845747)))))))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((p.ph_ctype is f)
+ ((0.524088 -0.482247))
+ ((nn.ph_vheight is 1)
+ ((0.587666 -0.632362))
+ ((ph_vlng is l)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.513286 -0.713117))
+ ((0.604613 -0.924308)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((0.577997 -0.891342))
+ ((0.659804 -1.15252))))))
+ ((pp.ph_vlng is s)
+ ((ph_ctype is f)
+ ((0.813383 -0.599624))
+ ((0.984027 -0.0771909)))
+ ((p.ph_ctype is f)
+ ((R:SylStructure.parent.parent.gpos is in)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((0.313572 -1.03242))
+ ((0.525854 -0.542799)))
+ ((R:SylStructure.parent.syl_out < 2.8)
+ ((0.613007 -0.423979))
+ ((0.570258 -0.766379))))
+ ((R:SylStructure.parent.syl_break is 1)
+ ((R:SylStructure.parent.parent.gpos is to)
+ ((0.364585 -0.792895))
+ ((ph_vlng is l)
+ ((0.69143 -0.276816))
+ ((0.65673 -0.523721))))
+ ((R:SylStructure.parent.syl_out < 3.6)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.682096 -0.488102))
+ ((0.406364 -0.731758)))
+ ((0.584694 -0.822229)))))))))))
+ ((n.ph_ctype is r)
+ ((R:SylStructure.parent.position_type is initial)
+ ((p.ph_vlng is a)
+ ((0.797058 1.02334))
+ ((ph_ctype is s)
+ ((1.0548 0.536277))
+ ((0.817253 0.138201))))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((R:SylStructure.parent.syl_out < 3.3)
+ ((0.884574 -0.23471))
+ ((0.772063 -0.525292)))
+ ((nn.ph_vfront is 1)
+ ((1.25254 0.417485))
+ ((0.955557 -0.0781996)))))
+ ((pp.ph_vfront is 0)
+ ((ph_ctype is f)
+ ((n.ph_ctype is s)
+ ((R:SylStructure.parent.parent.gpos is content)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
+ ((0.583506 -0.56941))
+ ((0.525949 -0.289362)))
+ ((0.749316 -0.0921038)))
+ ((p.ph_vlng is s)
+ ((0.734234 0.139463))
+ ((0.680119 -0.0708717))))
+ ((ph_vlng is s)
+ ((ph_vheight is 1)
+ ((0.908712 -0.618971))
+ ((0.55344 -0.840495)))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.838715 0.00913392))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((ph_vheight is 2)
+ ((0.555513 -0.512523))
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.758711 0.121704))
+ ((0.737555 -0.25637))))
+ ((R:SylStructure.parent.syl_out < 3.1)
+ ((n.ph_ctype is s)
+ ((0.611756 -0.474522))
+ ((1.05437 -0.247206)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.567761 -0.597866))
+ ((0.785599 -0.407765)))
+ ((0.575598 -0.741256))))))
+ ((ph_ctype is s)
+ ((n.ph_ctype is s)
+ ((0.661069 -1.08426))
+ ((0.783184 -0.39789)))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 2.6)
+ ((0.511323 -0.666011))
+ ((0.691878 -0.499492)))
+ ((ph_ctype is r)
+ ((0.482131 -0.253186))
+ ((0.852955 -0.372832))))))
+ ((0.854447 -0.0936489)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.685939 -0.249982))
+ ((R:SylStructure.parent.syl_out < 3.2)
+ ((0.989843 0.18086))
+ ((0.686805 -0.0402908)))))))))
+ ((R:SylStructure.parent.syl_out < 2.4)
+ ((R:SylStructure.parent.syl_out < 0.2)
+ ((seg_onsetcoda is coda)
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.syl_break is 4)
+ ((pp.ph_vlng is 0)
+ ((0.959737 1.63203))
+ ((1.20714 0.994933)))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((0.864809 0.214457))
+ ((0.874278 0.730381)))
+ ((pp.ph_vfront is 0)
+ ((seg_coda_fric is 0)
+ ((1.20844 -0.336221))
+ ((1.01357 0.468302)))
+ ((0.658106 -0.799121)))))
+ ((n.ph_ctype is f)
+ ((ph_ctype is f)
+ ((1.26332 0.0300613))
+ ((ph_vlng is d)
+ ((1.02719 1.1649))
+ ((ph_ctype is 0)
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((1.14048 2.2668))
+ ((ph_vheight is 1)
+ ((1.15528 1.50375))
+ ((1.42406 2.07927))))
+ ((R:SylStructure.parent.sub_phrases < 1.1)
+ ((0.955892 1.10243))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.32682 1.8432))
+ ((1.27582 1.59853)))))))
+ ((n.ph_ctype is 0)
+ ((ph_ctype is n)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.45399 1.12927))
+ ((1.05543 0.442376)))
+ ((R:SylStructure.parent.syl_break is 4)
+ ((R:SylStructure.parent.position_type is final)
+ ((ph_ctype is f)
+ ((1.46434 1.76508))
+ ((0.978055 0.7486)))
+ ((1.2395 2.30826)))
+ ((ph_ctype is 0)
+ ((0.935325 1.69917))
+ ((nn.ph_vfront is 1)
+ ((1.20456 1.31128))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((nn.ph_vheight is 0)
+ ((1.16907 0.212421))
+ ((0.952091 0.653094)))
+ ((p.ph_ctype is 0)
+ ((1.05502 1.25802))
+ ((0.818731 0.777568))))))))
+ ((ph_ctype is f)
+ ((p.ph_ctype is 0)
+ ((1.03918 0.163941))
+ ((0.737545 -0.167063)))
+ ((R:SylStructure.parent.position_type is final)
+ ((n.ph_ctype is n)
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((R:SylStructure.parent.sub_phrases < 2.8)
+ ((0.826207 -0.000859005))
+ ((0.871119 0.273433)))
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((1.17405 1.05694))
+ ((0.858394 0.244916))))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((p.ph_ctype is 0)
+ ((1.14092 1.21187))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.02653 0.59865))
+ ((0.94248 1.1634))))
+ ((seg_coda_fric is 0)
+ ((1.07441 0.292935))
+ ((1.15736 0.92574)))))
+ ((ph_vlng is s)
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.34638 1.23484))
+ ((0.951514 2.02008)))
+ ((ph_ctype is 0)
+ ((p.ph_ctype is r)
+ ((0.806106 0.697089))
+ ((R:SylStructure.parent.syl_break is 2)
+ ((1.10891 0.992197))
+ ((1.04657 1.51093))))
+ ((1.18165 0.520952)))))))))
+ ((p.ph_vlng is 0)
+ ((pos_in_syl < 0.7)
+ ((R:SylStructure.parent.position_type is final)
+ ((ph_ctype is r)
+ ((0.966357 0.185827))
+ ((ph_ctype is s)
+ ((0.647163 0.0332298))
+ ((0.692972 -0.534917))))
+ ((ph_ctype is s)
+ ((0.881521 0.575107))
+ ((p.ph_ctype is f)
+ ((0.8223 -0.111275))
+ ((R:SylStructure.parent.last_accent < 0.3)
+ ((0.969188 0.09447))
+ ((0.894438 0.381947))))))
+ ((p.ph_ctype is f)
+ ((0.479748 -0.490108))
+ ((0.813125 -0.201268))))
+ ((ph_ctype is s)
+ ((0.908566 1.20397))
+ ((R:SylStructure.parent.last_accent < 1.2)
+ ((0.88078 0.636568))
+ ((0.978087 1.07763))))))
+ ((pos_in_syl < 1.3)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((pos_in_syl < 0.1)
+ ((R:SylStructure.parent.position_type is initial)
+ ((p.ph_ctype is n)
+ ((0.801651 -0.0163359))
+ ((ph_ctype is s)
+ ((n.ph_ctype is r)
+ ((0.893307 1.07253))
+ ((p.ph_vlng is 0)
+ ((0.92651 0.525806))
+ ((0.652444 0.952792))))
+ ((p.ph_vlng is 0)
+ ((seg_onsetcoda is coda)
+ ((0.820151 0.469117))
+ ((p.ph_ctype is f)
+ ((0.747972 -0.0716448))
+ ((ph_ctype is f)
+ ((0.770882 0.457137))
+ ((0.840905 0.102492)))))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.667824 0.697337))
+ ((0.737967 0.375114))))))
+ ((ph_vheight is 1)
+ ((0.624353 0.410671))
+ ((R:SylStructure.parent.asyl_in < 0.8)
+ ((0.647905 -0.331055))
+ ((p.ph_ctype is s)
+ ((0.629039 -0.240616))
+ ((0.749277 -0.0191273))))))
+ ((ph_vheight is 3)
+ ((p.ph_ctype is s)
+ ((0.626922 0.556537))
+ ((0.789357 0.153892)))
+ ((seg_onsetcoda is coda)
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.parent.word_numsyls < 3.4)
+ ((0.744714 0.123242))
+ ((0.742039 0.295753)))
+ ((seg_coda_fric is 0)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((ph_vheight is 1)
+ ((0.549715 -0.341018))
+ ((0.573641 -0.00893114)))
+ ((nn.ph_vfront is 2)
+ ((0.67099 -0.744625))
+ ((0.664438 -0.302803))))
+ ((p.ph_vlng is 0)
+ ((0.630028 0.113815))
+ ((0.632794 -0.128733)))))
+ ((ph_ctype is r)
+ ((0.367169 -0.854509))
+ ((0.94334 -0.216179))))))
+ ((n.ph_ctype is f)
+ ((ph_vlng is 0)
+ ((1.3089 0.46195))
+ ((R:SylStructure.parent.syl_codasize < 1.3)
+ ((1.07673 0.657169))
+ ((pp.ph_vlng is 0)
+ ((0.972319 1.08222))
+ ((1.00038 1.46257)))))
+ ((p.ph_vlng is l)
+ ((1.03617 0.785204))
+ ((p.ph_vlng is a)
+ ((R:SylStructure.parent.position_type is final)
+ ((1.00681 0.321168))
+ ((0.928115 0.950834)))
+ ((ph_vlng is 0)
+ ((pos_in_syl < 0.1)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.863682 -0.167374))
+ ((nn.ph_vheight is 0)
+ ((p.ph_ctype is f)
+ ((0.773591 -0.00374425))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.951802 0.228448))
+ ((1.02282 0.504252))))
+ ((1.09721 0.736476))))
+ ((R:SylStructure.parent.position_type is final)
+ ((1.04302 0.0590974))
+ ((0.589208 -0.431535))))
+ ((n.ph_ctype is 0)
+ ((1.27879 1.00642))
+ ((ph_vlng is s)
+ ((R:SylStructure.parent.asyl_in < 1.4)
+ ((0.935787 0.481652))
+ ((0.9887 0.749861)))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((R:SylStructure.parent.position_type is final)
+ ((0.921307 0.0696307))
+ ((0.83675 0.552212)))
+ ((0.810076 -0.0479225))))))))))
+ ((ph_ctype is s)
+ ((n.ph_ctype is s)
+ ((0.706959 -1.0609))
+ ((p.ph_ctype is n)
+ ((0.850614 -0.59933))
+ ((n.ph_ctype is r)
+ ((0.665947 0.00698725))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.762889 -0.0649044))
+ ((0.723956 -0.248899)))
+ ((R:SylStructure.parent.sub_phrases < 1.4)
+ ((0.632957 -0.601987))
+ ((0.889114 -0.302401)))))))
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.865267 0.164636))
+ ((0.581827 -0.0989051)))
+ ((nn.ph_vfront is 2)
+ ((0.684459 -0.316836))
+ ((0.778854 -0.0961191))))
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((p.ph_ctype is s)
+ ((0.837964 -0.429437))
+ ((0.875304 -0.0652743)))
+ ((0.611071 -0.635089))))
+ ((p.ph_ctype is r)
+ ((R:SylStructure.parent.syl_out < 1.1)
+ ((0.762012 0.0139361))
+ ((0.567983 -0.454845)))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((ph_ctype is l)
+ ((1.18845 0.809091))
+ ((R:SylStructure.parent.position_type is initial)
+ ((ph_ctype is n)
+ ((0.773548 -0.277092))
+ ((1.01586 0.281001)))
+ ((p.ph_ctype is 0)
+ ((1.06831 0.699145))
+ ((0.924189 0.241873)))))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((ph_ctype is n)
+ ((0.592321 -0.470784))
+ ((0.778688 -0.072112)))
+ ((n.ph_ctype is s)
+ ((1.08848 0.0733489))
+ ((1.25674 0.608371))))))))))
+ ((pos_in_syl < 0.7)
+ ((p.ph_vlng is 0)
+ ((R:SylStructure.parent.position_type is mid)
+ ((ph_ctype is 0)
+ ((ph_vheight is 2)
+ ((0.456225 -0.293282))
+ ((0.561529 -0.0816115)))
+ ((0.6537 -0.504024)))
+ ((ph_ctype is s)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((1.31586 0.98395))
+ ((R:SylStructure.parent.position_type is single)
+ ((0.816869 0.634789))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((1.05578 0.479029))
+ ((R:SylStructure.parent.asyl_in < 0.4)
+ ((1.11813 0.143214))
+ ((0.87178 0.406834))))))
+ ((n.ph_ctype is n)
+ ((R:SylStructure.parent.last_accent < 0.6)
+ ((0.838154 -0.415599))
+ ((0.924024 0.110288)))
+ ((seg_onsetcoda is coda)
+ ((nn.ph_vfront is 2)
+ ((0.670096 0.0314187))
+ ((n.ph_ctype is f)
+ ((1.00363 0.693893))
+ ((R:SylStructure.parent.syl_out < 6)
+ ((0.772363 0.215675))
+ ((0.920313 0.574068)))))
+ ((R:SylStructure.parent.position_type is final)
+ ((0.673837 -0.458142))
+ ((R:SylStructure.parent.sub_phrases < 2.8)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.894817 0.304628))
+ ((ph_ctype is n)
+ ((0.787302 -0.23094))
+ ((R:SylStructure.parent.asyl_in < 1.2)
+ ((ph_ctype is f)
+ ((R:SylStructure.parent.last_accent < 0.5)
+ ((1.12278 0.326954))
+ ((0.802236 -0.100616)))
+ ((0.791255 -0.0919132)))
+ ((0.95233 0.219053)))))
+ ((R:SylStructure.parent.position_type is initial)
+ ((ph_ctype is f)
+ ((1.0616 0.216118))
+ ((0.703216 -0.00834086)))
+ ((ph_ctype is f)
+ ((1.22277 0.761763))
+ ((0.904811 0.332721))))))))))
+ ((ph_vheight is 0)
+ ((p.ph_vlng is s)
+ ((0.873379 0.217178))
+ ((n.ph_ctype is r)
+ ((0.723915 1.29451))
+ ((n.ph_ctype is 0)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((R:SylStructure.parent.sub_phrases < 4)
+ ((seg_coda_fric is 0)
+ ((p.ph_vlng is l)
+ ((0.849154 0.945261))
+ ((0.633261 0.687498)))
+ ((0.728546 0.403076)))
+ ((0.850962 1.00255)))
+ ((0.957999 1.09113)))
+ ((0.85771 0.209045)))))
+ ((ph_vheight is 2)
+ ((0.803401 -0.0544067))
+ ((0.681353 0.256045)))))
+ ((n.ph_ctype is f)
+ ((ph_ctype is s)
+ ((p.ph_vlng is 0)
+ ((0.479307 -0.9673))
+ ((0.700477 -0.351397)))
+ ((ph_ctype is f)
+ ((0.73467 -0.6233))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_ctype is s)
+ ((0.56282 0.266234))
+ ((p.ph_ctype is r)
+ ((0.446203 -0.302281))
+ ((R:SylStructure.parent.sub_phrases < 2.7)
+ ((ph_ctype is 0)
+ ((0.572016 -0.0102436))
+ ((0.497358 -0.274514)))
+ ((0.545477 0.0482177)))))
+ ((ph_vlng is s)
+ ((0.805269 0.888495))
+ ((ph_ctype is n)
+ ((0.869854 0.653018))
+ ((R:SylStructure.parent.sub_phrases < 2.2)
+ ((0.735031 0.0612886))
+ ((0.771859 0.346637))))))))
+ ((R:SylStructure.parent.syl_codasize < 1.4)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
+ ((R:SylStructure.parent.position_type is initial)
+ ((0.743458 0.0411808))
+ ((1.13068 0.613305)))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
+ ((1.11481 0.175467))
+ ((0.937893 -0.276407)))
+ ((0.74264 -0.550878))))
+ ((pos_in_syl < 3.4)
+ ((seg_onsetcoda is coda)
+ ((ph_ctype is r)
+ ((n.ph_ctype is s)
+ ((0.714319 -0.240328))
+ ((p.ph_ctype is 0)
+ ((0.976987 0.330352))
+ ((1.1781 -0.0816682))))
+ ((ph_ctype is l)
+ ((n.ph_ctype is 0)
+ ((1.39137 0.383533))
+ ((0.725585 -0.324515)))
+ ((ph_vheight is 3)
+ ((ph_vlng is d)
+ ((0.802626 -0.62487))
+ ((n.ph_ctype is r)
+ ((0.661091 -0.513869))
+ ((R:SylStructure.parent.position_type is initial)
+ ((R:SylStructure.parent.parent.word_numsyls < 2.4)
+ ((0.482285 0.207874))
+ ((0.401601 -0.0204711)))
+ ((0.733755 0.397372)))))
+ ((n.ph_ctype is r)
+ ((p.ph_ctype is 0)
+ ((pos_in_syl < 1.2)
+ ((0.666325 0.271734))
+ ((nn.ph_vheight is 0)
+ ((0.642401 -0.261466))
+ ((0.783684 -0.00956571))))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.692225 -0.381895))
+ ((0.741921 -0.0898767))))
+ ((nn.ph_vfront is 2)
+ ((ph_ctype is s)
+ ((0.697527 -1.12626))
+ ((n.ph_ctype is s)
+ ((ph_vlng is 0)
+ ((R:SylStructure.parent.sub_phrases < 2.4)
+ ((0.498719 -0.906926))
+ ((0.635342 -0.625651)))
+ ((0.45886 -0.385089)))
+ ((0.848596 -0.359702))))
+ ((p.ph_vlng is a)
+ ((p.ph_ctype is 0)
+ ((0.947278 0.216904))
+ ((0.637933 -0.394349)))
+ ((p.ph_ctype is r)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((0.529903 -0.860573))
+ ((0.581378 -0.510488)))
+ ((ph_vlng is 0)
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((seg_onset_stop is 0)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((p.ph_vlng is d)
+ ((0.768363 0.0108428))
+ ((ph_ctype is s)
+ ((0.835756 -0.035054))
+ ((ph_ctype is f)
+ ((p.ph_vlng is s)
+ ((0.602016 -0.179727))
+ ((0.640126 -0.297341)))
+ ((0.674628 -0.542602)))))
+ ((ph_ctype is s)
+ ((0.662261 -0.60496))
+ ((0.662088 -0.432058))))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((0.582448 -0.389079))
+ ((ph_ctype is s)
+ ((0.60413 -0.73564))
+ ((0.567153 -0.605444)))))
+ ((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
+ ((0.761115 -0.827377))
+ ((ph_ctype is n)
+ ((0.855183 -0.275338))
+ ((R:SylStructure.parent.syl_break is 0)
+ ((0.788288 -0.802801))
+ ((R:SylStructure.parent.syl_codasize < 2.2)
+ ((0.686134 -0.371234))
+ ((0.840184 -0.772883)))))))
+ ((pos_in_syl < 1.2)
+ ((R:SylStructure.parent.syl_break is 0)
+ ((n.ph_ctype is n)
+ ((0.423592 -0.655006))
+ ((R:SylStructure.parent.syl_out < 4.4)
+ ((0.595269 -0.303751))
+ ((0.478433 -0.456882))))
+ ((0.688133 -0.133182)))
+ ((seg_onset_stop is 0)
+ ((1.27464 0.114442))
+ ((0.406837 -0.167545))))))))))))
+ ((ph_ctype is r)
+ ((0.462874 -0.87695))
+ ((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
+ ((0.645442 -0.640572))
+ ((0.673717 -0.321322)))))
+ ((0.61008 -0.925472))))))))
+;; RMSE 0.8085 Correlation is 0.5899 Mean (abs) Error 0.6024 (0.5393)
+
+
+))
+
+(provide 'gswdurtreeZ)
diff --git a/CosyVoice-ttsfrd/resource/festival/hts.scm b/CosyVoice-ttsfrd/resource/festival/hts.scm
new file mode 100644
index 0000000000000000000000000000000000000000..030bf4f8a52fedcc5b8552d6004a9397712276b3
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/hts.scm
@@ -0,0 +1,522 @@
+;; ---------------------------------------------------------------- ;;
+;; Nagoya Institute of Technology and ;;
+;; Carnegie Mellon University ;;
+;; Copyright (c) 2002 ;;
+;; All Rights Reserved. ;;
+;; ;;
+;; Permission is hereby granted, free of charge, to use and ;;
+;; distribute this software and its documentation without ;;
+;; restriction, including without limitation the rights to use, ;;
+;; copy, modify, merge, publish, distribute, sublicense, and/or ;;
+;; sell copies of this work, and to permit persons to whom this ;;
+;; work is furnished to do so, subject to the following conditions: ;;
+;; ;;
+;; 1. The code must retain the above copyright notice, this list ;;
+;; of conditions and the following disclaimer. ;;
+;; ;;
+;; 2. Any modifications must be clearly marked as such. ;;
+;; ;;
+;; 3. Original authors' names are not deleted. ;;
+;; ;;
+;; 4. The authors' names are not used to endorse or promote ;;
+;; products derived from this software without specific prior ;;
+;; written permission. ;;
+;; ;;
+;; NAGOYA INSTITUTE OF TECHNOLOGY, CARNEGIE MELLON UNIVERSITY AND ;;
+;; THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH ;;
+;; REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ;;
+;; MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NAGOYA INSTITUTE ;;
+;; OF TECHNOLOGY, CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS ;;
+;; BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ;;
+;; ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ;;
+;; PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ;;
+;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ;;
+;; PERFORMANCE OF THIS SOFTWARE. ;;
+;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Generic HTS support code and specific features ;;
+;; http://hts.ics.nitech.ac.jp ;;
+;; Author : Alan W Black ;;
+;; Date : August 2002 (and April 2004) ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ;;
+;; Still has language specific features in here, that will have to ;;
+;; move out to the voices ;;
+;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defvar hts_synth_pre_hooks nil)
+(defvar hts_synth_post_hooks nil)
+(defvar hts_engine_params nil)
+
+(defvar hts_duration_stretch 0)
+(defvar hts_f0_mean 0)
+(defvar hts_f0_std 1)
+(defvar hts_fw_factor 0.42)
+(defvar hts_total_length 0.0)
+(defvar hts_uv_threshold 0.5)
+(defvar hts_use_phone_align 0)
+
+(defSynthType HTS
+ (let ((featfile (make_tmp_filename))
+ (mcepfile (make_tmp_filename))
+ (f0file (make_tmp_filename))
+ (wavfile (make_tmp_filename))
+ (labfile (make_tmp_filename)))
+
+ (apply_hooks hts_synth_pre_hooks utt)
+
+ (set! hts_output_params
+ (list
+ (list "-labelfile" featfile)
+ (list "-om" mcepfile)
+ (list "-of" f0file)
+ (list "-or" wavfile)
+ (list "-od" labfile))
+ )
+
+ (hts_dump_feats utt hts_feats_list featfile)
+
+ (HTS_Synthesize utt)
+
+ (delete-file featfile)
+ (delete-file mcepfile)
+ (delete-file f0file)
+ (delete-file wavfile)
+ (delete-file labfile)
+
+ (apply_hooks hts_synth_post_hooks utt)
+ utt)
+)
+
+(define (hts_feats_output ofd s)
+ "This is bad as it makes decisions about what the feats are"
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; SEGMENT
+
+; boundary
+ (format ofd "%10.0f %10.0f "
+ (* 10000000 (item.feat s "segment_start"))
+ (* 10000000 (item.feat s "segment_end")))
+
+; pp.name
+ (format ofd "%s" (if (string-equal "0" (item.feat s "p.p.name"))
+ "x" (item.feat s "p.p.name")))
+; p.name
+ (format ofd "^%s" (if (string-equal "0" (item.feat s "p.name"))
+ "x" (item.feat s "p.name")))
+; c.name
+ (format ofd "-%s" (if (string-equal "0" (item.feat s "name"))
+ "x" (item.feat s "name")))
+; n.name
+ (format ofd "+%s" (if (string-equal "0" (item.feat s "n.name"))
+ "x" (item.feat s "n.name")))
+; nn.name
+ (format ofd "=%s" (if (string-equal "0" (item.feat s "n.n.name"))
+ "x" (item.feat s "n.n.name")))
+
+; position in syllable (segment)
+ (format ofd "@")
+ (format ofd "%s" (if (string-equal "pau" (item.feat s "name"))
+ "x" (+ 1 (item.feat s "pos_in_syl"))))
+ (format ofd "_%s" (if (string-equal "pau" (item.feat s "name"))
+ "x" (- (item.feat s "R:SylStructure.parent.R:Syllable.syl_numphones")
+ (item.feat s "pos_in_syl"))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; SYLLABLE
+
+;; previous syllable
+
+; p.stress
+ (format ofd "/A:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.R:Syllable.stress")
+ (item.feat s "R:SylStructure.parent.R:Syllable.p.stress")))
+; p.accent
+ (format ofd "_%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.R:Syllable.accented")
+ (item.feat s "R:SylStructure.parent.R:Syllable.p.accented")))
+; p.length
+ (format ofd "_%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.R:Syllable.syl_numphones")
+ (item.feat s "R:SylStructure.parent.R:Syllable.p.syl_numphones")))
+;; current syllable
+
+; c.stress
+ (format ofd "/B:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.stress")))
+; c.accent
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.accented")))
+; c.length
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.syl_numphones")))
+
+; position in word (syllable)
+ (format ofd "@%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1 (item.feat s "R:SylStructure.parent.R:Syllable.pos_in_word"))))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (-
+ (item.feat s "R:SylStructure.parent.parent.R:Word.word_numsyls")
+ (item.feat s "R:SylStructure.parent.R:Syllable.pos_in_word"))))
+
+; position in phrase (syllable)
+ (format ofd "&%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.syl_in"))))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.syl_out"))))
+
+; position in phrase (stressed syllable)
+ (format ofd "#%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.ssyl_in"))))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.ssyl_out"))))
+
+; position in phrase (accented syllable)
+ (format ofd "$%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.asyl_in"))))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1
+ (item.feat s "R:SylStructure.parent.R:Syllable.asyl_out"))))
+
+; distance from stressed syllable
+ (format ofd "!%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_p_stress")))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_n_stress")))
+
+; distance from accented syllable
+ (format ofd ";%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_p_accent")))
+ (format ofd "-%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_n_accent")))
+
+; name of the vowel of current syllable
+ (format ofd "|%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.R:Syllable.syl_vowel")))
+
+;; next syllable
+ (format ofd "/C:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.R:Syllable.stress")
+ (item.feat s "R:SylStructure.parent.R:Syllable.n.stress")))
+; n.accent
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.R:Syllable.accented")
+ (item.feat s "R:SylStructure.parent.R:Syllable.n.accented")))
+; n.length
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.R:Syllable.syl_numphones")
+ (item.feat s "R:SylStructure.parent.R:Syllable.n.syl_numphones")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; WORD
+
+;;;;;;;;;;;;;;;;;;
+;; previous word
+
+; p.gpos
+ (format ofd "/D:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.parent.R:Word.gpos")
+ (item.feat s "R:SylStructure.parent.parent.R:Word.p.gpos")))
+; p.lenght (syllable)
+ (format ofd "_%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.parent.R:Word.word_numsyls")
+ (item.feat s "R:SylStructure.parent.parent.R:Word.p.word_numsyls")))
+
+;;;;;;;;;;;;;;;;;
+;; current word
+
+; c.gpos
+ (format ofd "/E:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.gpos")))
+; c.lenght (syllable)
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.word_numsyls")))
+
+; position in phrase (word)
+ (format ofd "@%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (+ 1 (item.feat s "R:SylStructure.parent.parent.R:Word.pos_in_phrase"))))
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.words_out")))
+
+; position in phrase (content word)
+ (format ofd "&%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.content_words_in")))
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.content_words_out")))
+
+; distance from content word in phrase
+ (format ofd "#%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.lisp_distance_to_p_content")))
+ (format ofd "+%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Word.lisp_distance_to_n_content")))
+
+;;;;;;;;;;;;;;
+;; next word
+
+; n.gpos
+ (format ofd "/F:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.parent.R:Word.gpos")
+ (item.feat s "R:SylStructure.parent.parent.R:Word.n.gpos")))
+; n.lenghte (syllable)
+ (format ofd "_%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.parent.R:Word.word_numsyls")
+ (item.feat s "R:SylStructure.parent.parent.R:Word.n.word_numsyls")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; PHRASE
+
+;;;;;;;;;;;;;;;;;;;;
+;; previous phrase
+
+; length of previous phrase (syllable)
+ (format ofd "/G:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.p.lisp_num_syls_in_phrase")))
+
+; length of previous phrase (word)
+ (format ofd "_%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "p.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.p.lisp_num_words_in_phrase")))
+
+;;;;;;;;;;;;;;;;;;;;
+;; current phrase
+
+; length of current phrase (syllable)
+ (format ofd "/H:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")))
+
+; length of current phrase (word)
+ (format ofd "=%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ "x"
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")))
+
+; position in major phrase (phrase)
+ (format ofd "@%s"
+ (+ 1 (item.feat s "R:SylStructure.parent.R:Syllable.sub_phrases")))
+ (format ofd "=%s"
+ (-
+ (item.feat s "lisp_total_phrases")
+ (item.feat s "R:SylStructure.parent.R:Syllable.sub_phrases")))
+
+; type of tobi endtone of current phrase
+ (format ofd "|%s"
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern.tobi_endtone"))
+
+;;;;;;;;;;;;;;;;;;;;
+;; next phrase
+
+; length of next phrase (syllable)
+ (format ofd "/I:%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.n.lisp_num_syls_in_phrase")))
+
+; length of next phrase (word)
+ (format ofd "=%s"
+ (if (string-equal "pau" (item.feat s "name"))
+ (item.feat s "n.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")
+ (item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.n.lisp_num_words_in_phrase")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; UTTERANCE
+
+; length (syllable)
+ (format ofd "/J:%s" (item.feat s "lisp_total_syls"))
+
+; length (word)
+ (format ofd "+%s" (item.feat s "lisp_total_words"))
+
+; length (phrase)
+ (format ofd "-%s" (item.feat s "lisp_total_phrases"))
+
+ (format ofd "\n")
+
+)
+
+(define (hts_dump_feats utt feats ofile)
+ (let ((ofd (fopen ofile "w")))
+ (mapcar
+ (lambda (s)
+ (hts_feats_output ofd s))
+ (utt.relation.items utt 'Segment))
+ (fclose ofd)
+ ))
+
+
+;;
+;; Extra features
+;; From Segment items refer by
+;;
+;; R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase
+;; R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase
+;; lisp_total_words
+;; lisp_total_syls
+;; lisp_total_phrases
+;;
+;; The last three will act on any item
+
+(define (distance_to_p_content i)
+ (let ((c 0) (rc 0 ) (w (item.relation.prev i "Phrase")))
+ (while w
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "contentp"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.prev w)))
+ )
+ rc))
+
+(define (distance_to_n_content i)
+ (let ((c 0) (rc 0) (w (item.relation.next i "Phrase")))
+ (while w
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "contentp"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.next w)))
+ )
+ rc))
+
+(define (distance_to_p_accent i)
+ (let ((c 0) (rc 0 ) (w (item.relation.prev i "Syllable")))
+ (while (and w (member_string (item.feat w "syl_break") '("0" "1")))
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "accented"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.prev w)))
+ )
+ rc))
+
+(define (distance_to_n_accent i)
+ (let ((c 0) (rc 0 ) (w (item.relation.next i "Syllable")))
+ (while (and w (member_string (item.feat w "p.syl_break") '("0" "1")))
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "accented"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.next w)))
+ )
+ rc))
+
+(define (distance_to_p_stress i)
+ (let ((c 0) (rc 0 ) (w (item.relation.prev i "Syllable")))
+ (while (and w (member_string (item.feat w "syl_break") '("0" "1")))
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "stress"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.prev w)))
+ )
+ rc))
+
+(define (distance_to_n_stress i)
+ (let ((c 0) (rc 0 ) (w (item.relation.next i "Syllable")))
+ (while (and w (member_string (item.feat w "p.syl_break") '("0" "1")))
+ (set! c (+ 1 c))
+ (if (string-equal "1" (item.feat w "stress"))
+ (begin
+ (set! rc c)
+ (set! w nil))
+ (set! w (item.next w)))
+ )
+ rc))
+
+(define (num_syls_in_phrase i)
+ (apply
+ +
+ (mapcar
+ (lambda (w)
+ (length (item.relation.daughters w 'SylStructure)))
+ (item.relation.daughters i 'Phrase))))
+
+(define (num_words_in_phrase i)
+ (length (item.relation.daughters i 'Phrase)))
+
+(define (total_words w)
+ (length
+ (utt.relation.items (item.get_utt w) 'Word)))
+
+(define (total_syls s)
+ (length
+ (utt.relation.items (item.get_utt s) 'Syllable)))
+
+(define (total_phrases s)
+ (length
+ (utt.relation_tree (item.get_utt s) 'Phrase)))
+
+(provide 'hts)
diff --git a/CosyVoice-ttsfrd/resource/festival/init.scm b/CosyVoice-ttsfrd/resource/festival/init.scm
new file mode 100644
index 0000000000000000000000000000000000000000..90bccb7e7bf74ec6132112ce475e70ea75cc1ede
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/init.scm
@@ -0,0 +1,157 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Initialisation file -- loaded before anything else
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Basic siod library (need this before load_library or require works)
+(load (path-append libdir "siod.scm"))
+
+(defvar home-directory (or (getenv "HOME") "/")
+ "home-directory
+ Place looked at for .festivalrc etc.")
+
+;;; User startup initialization, can be used to override load-path
+;;; to allow alternate basic modules to be loaded.
+(if (probe_file (path-append home-directory ".siodvarsrc"))
+ (load (path-append home-directory ".siodvarsrc")))
+
+(if (probe_file (path-append home-directory ".festivalvarsrc"))
+ (load (path-append home-directory ".festivalvarsrc")))
+
+;;; A chance to set various variables to a local setting e.g.
+;;; lexdir, voices_dir audio etc etc.
+(if (probe_file (path-append libdir "sitevars.scm"))
+ (load (path-append libdir "sitevars.scm")))
+
+;;; CSTR siod extensions
+(require 'cstr)
+
+;;; Festival specific definitions
+(require 'festival)
+
+;;; Dealing with module descriptions
+(require 'module_description)
+
+;;; Web related definitions
+(require 'web)
+
+;;; Utterance types and support
+(require 'synthesis)
+
+;;; Some default parameters
+(Parameter.def 'Wavefiletype 'riff)
+
+;;; Set default audio method
+(cond
+ ((member 'nas *modules*)
+ (Parameter.def 'Audio_Method 'netaudio))
+ ((member 'esd *modules*)
+ (Parameter.def 'Audio_Method 'esdaudio))
+ ((member 'sun16audio *modules*)
+ (Parameter.def 'Audio_Method 'sun16audio))
+ ((member 'freebsd16audio *modules*)
+ (Parameter.def 'Audio_Method 'freebsd16audio))
+ ((member 'linux16audio *modules*)
+ (Parameter.def 'Audio_Method 'linux16audio))
+ ((member 'irixaudio *modules*)
+ (Parameter.def 'Audio_Method 'irixaudio))
+ ((member 'macosxaudio *modules*)
+ (Parameter.def 'Audio_Method 'macosxaudio))
+ ((member 'win32audio *modules*)
+ (Parameter.def 'Audio_Method 'win32audio))
+ ((member 'os2audio *modules*)
+ (Parameter.def 'Audio_Method 'os2audio))
+ ((member 'mplayeraudio *modules*)
+ (Parameter.def 'Audio_Method 'mplayeraudio))
+ (t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists
+ (Parameter.def 'Audio_Method 'sunaudio)))
+;;; If you have an external program to play audio add its definition
+;;; in siteinit.scm
+
+;;; The audio spooler doesn't work under Windows so redefine audio_mode
+(if (member 'mplayeraudio *modules*)
+ (define (audio_mode param) param)
+)
+
+;;; Intonation
+(require 'intonation)
+
+;;; Duration
+(require 'duration)
+
+;;; A large lexicon
+(require 'lexicons)
+(require 'pauses)
+
+;;; Part of speech prediction
+(require 'pos)
+
+;;; Phrasing (dependent on pos)
+(require 'phrase)
+
+;;; POstlexical rules
+(require 'postlex)
+
+;;; Different voices
+(require 'voices) ;; sets voice_default
+(require 'languages)
+
+;;; Some higher level functions
+(require 'token)
+(require 'tts)
+
+;;;
+;;; Local site initialization, if the file exists load it
+;;;
+(if (probe_file (path-append libdir "siteinit.scm"))
+ (load (path-append libdir "siteinit.scm")))
+
+;;; User initialization, if a user has a personal customization
+;;; file loaded it
+(if (probe_file (path-append home-directory ".siodrc"))
+ (load (path-append home-directory ".siodrc")))
+
+(if (probe_file (path-append home-directory ".festivalrc"))
+ (load (path-append home-directory ".festivalrc")))
+
+;;; Default voice (have to do something cute so autoloads still work)
+(eval (list voice_default))
+
+(provide 'init)
+
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/intonation.scm b/CosyVoice-ttsfrd/resource/festival/intonation.scm
new file mode 100644
index 0000000000000000000000000000000000000000..8062e03a8f63f13c13a555bc4a251e05aab7947f
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/intonation.scm
@@ -0,0 +1,187 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Basic Intonation modules. These call appropriate sub-modules
+;;; depending on the chosen intonation methods
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; These modules should predict intonation events/labels
+;;; based on information in the phrase and word streams
+
+; to detect prespecified accents (feature "accent" in 'Word relation)
+; AS 5/29/00
+
+(define (tobi_accent_prespecified utt)
+ (let ((tobi_found nil)
+ (words (utt.relation.items utt 'Word)))
+
+ (while (and words (not tobi_found))
+; feature "accent" might be prespecified on words or tokens, AS 05/29/00
+ (if (item.feat.present (car words) 'accent)
+ (set! tobi_found t)
+; if Token relation exists, check tokens as well
+ (if (not (null (item.parent (item.relation (car words) 'Token))))
+ (if (item.feat.present (item.parent (item.relation (car words) 'Token)) 'accent)
+ (set! tobi_found t)
+ (set! words (cdr words)))
+ (set! words (cdr words)))))
+ tobi_found))
+
+(set! int_accent_cart_tree_no_accent
+'((NONE)))
+
+(define (Intonation utt)
+"(Intonation utt)
+Select between different intonation modules depending on the Parameter
+Int_Method. Currently offers three types: Simple, hats on each content
+word; ToBI, a tree method for predicting ToBI accents; and Default a
+really bad method with a simple downward sloping F0. This is the first
+of a two-stage intonation prediction process. This adds accent-like
+features to syllables, the second, Int_Targets generates the F0 contour
+itself. [see Intonation]"
+
+; AS 5/29/00: Hack to avoid prediction of further accent labels
+; on utterance chunks that have already been annotated with
+; accent labels
+; use CART that doesn't assign any labels when using Intonation_Tree
+
+(if (tobi_accent_prespecified utt)
+ (progn
+ (set! int_accent_cart_tree_save int_accent_cart_tree)
+ (set! int_accent_cart_tree int_accent_cart_tree_no_accent)
+ (Intonation_Tree utt)
+ (set! int_accent_cart_tree int_accent_cart_tree_save))
+
+ (let ((rval (apply_method 'Int_Method utt)))
+ (Parameter.get 'Int_Method)
+ (cond
+ (rval rval) ;; new style
+ ((eq 'Simple (Parameter.get 'Int_Method))
+ (Intonation_Simple utt))
+ ((eq 'ToBI (Parameter.get 'Int_Method))
+ (format t "Using Intonation_Tree")
+ (Intonation_Tree utt))
+ ((eq 'General (Parameter.get 'Int_Method))
+ (Intonation_Simple utt)) ;; yes this is a duplication
+ (t
+ (Intonation_Default utt))))))
+
+
+;;; These modules should create an actual F0 contour based on the
+;;; the existing intonational events/labels etc
+;;; Specifically this is called after durations have been predicted
+
+(define (Int_Targets utt)
+"(Int_Targets utt)
+The second stage in F0 prediction. This generates F0 targets
+related to segments using one of three methods, a simple hat,
+linear regression based on ToBI markings, and a simple declining
+slope. This second part deals with actual F0 values and durations,
+while the previous section only deals with accent (and boundary tone)
+assignment. [see Intonation]"
+ (let ((rval (apply_method 'Int_Target_Method utt)))
+ (cond
+ (rval rval) ;; new style
+ ((eq 'Simple (Parameter.get 'Int_Method))
+ (Int_Targets_Simple utt))
+ ((eq 'ToBI (Parameter.get 'Int_Method))
+ (Int_Targets_LR utt))
+ ((eq 'General (Parameter.get 'Int_Method))
+ (Int_Targets_General utt))
+ (t
+ (Int_Targets_Default utt)))))
+
+;;;
+;;; A tree that adds accents (H) to all content words
+;;; simple but better than nothing at all
+;;;
+(set! simple_accent_cart_tree
+ '
+ ((R:SylStructure.parent.gpos is content)
+ ((stress is 1)
+ ((Accented))
+ ((position_type is single)
+ ((Accented))
+ ((NONE))))
+ ((NONE))))
+
+(defvar duffint_params '((start 130) (end 110))
+ "duffint_params
+Default parameters for Default (duff) intonation target generation.
+This is an assoc list of parameters. Two parameters are supported
+start specifies the start F0 in Hertz for an utterance, and end specifies
+the end.")
+
+;;;
+;;; For simple testing, this function adds fixed duration and
+;;; monotone intonation to a set of phones
+;;;
+(defvar FP_F0 120
+"FP_F0
+In using Fixed_Prosody as used in Phones type utterances and hence
+SayPhones, this is the value in Hertz for the monotone F0.")
+(defvar FP_duration 100
+"FP_duration
+In using Fixed_Prosody as used in Phones type utterances and hence
+SayPhones, this is the fix value in ms for phone durations.")
+
+(define (Fixed_Prosody utt)
+"(Fixed_Prosody UTT)
+Add fixed duration and fixed monotone F0 to the sgements in UTT.
+Uses values of FP_duration and FP_F0 as fixed values."
+ (let (utt1
+ (dur_stretch (Parameter.get 'Duration_Stretch))
+ (orig_duffint_params duffint_params))
+ (Parameter.set 'Duration_Stretch (/ FP_duration 100.0))
+ (set! duffint_params (list (list 'start FP_F0) (list 'end FP_F0)))
+
+ (set! utt1 (Duration_Default utt))
+ (set! utt1 (Int_Targets_Default utt1))
+
+ ;; Reset Parameter values back
+ (Parameter.set 'Duration_Stretch dur_stretch)
+ (set! duffint_params orig_duffint_params)
+
+ utt1
+ )
+)
+
+(define (segment_dpitch seg)
+"(segment_dpitch UTT SEG)
+Returns delta pitch, this pitch minus previous pitch."
+ (-
+ (parse-number (item.feat utt seg 'seg_pitch))
+ (parse-number (item.feat utt seg 'R:Segment.p.seg_pitch))))
+
+(provide 'intonation)
diff --git a/CosyVoice-ttsfrd/resource/festival/java.scm b/CosyVoice-ttsfrd/resource/festival/java.scm
new file mode 100644
index 0000000000000000000000000000000000000000..e6f514ea45036efe9a7f0346cb6636a2e62fe114
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/java.scm
@@ -0,0 +1,39 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1998 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Functions specific to supporting a Java client
+;;;
+
+;; none required yet
+
+(provide 'java)
diff --git a/CosyVoice-ttsfrd/resource/festival/languages.scm b/CosyVoice-ttsfrd/resource/festival/languages.scm
new file mode 100644
index 0000000000000000000000000000000000000000..5f4fb41d17db5ed25cf75c81b028cfc97ad115d5
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/languages.scm
@@ -0,0 +1,122 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Specification of voices and some major choices of synthesis
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; This should use some sort of database description for voices so
+;;; new voices will become automatically available.
+;;;
+
+(define (language_british_english)
+"(language_british_english)
+Set up language parameters for British English."
+ (require 'voices)
+ ;; Will get more elaborate, with different choices of voices in language
+
+ (set! male1 voice_rab_diphone)
+ (if (symbol-bound? 'voice_don_diphone)
+ (set! male2 voice_don_diphone))
+ (if (symbol-bound? 'voice_gsw_diphone)
+ (set! male3 voice_gsw_diphone))
+ (if (symbol-bound? 'voice_gsw_450)
+ (set! male4 voice_gsw_450))
+
+ (male1)
+ (Parameter.set 'Language 'britishenglish)
+)
+
+(define (language_american_english)
+"(language_american_english)
+Set up language parameters for Aemerican English."
+ (require 'voices)
+ (if (symbol-bound? 'voice_kal_diphone)
+ (set! female1 voice_kal_diphone))
+ (if (symbol-bound? 'voice_kal_diphone)
+ (set! male1 voice_kal_diphone))
+
+ (male1)
+ (Parameter.set 'Language 'americanenglish)
+)
+
+(define (language_scots_gaelic)
+"(language_scots_gaelic)
+Set up language parameters for Scots Gaelic."
+ (error "Scots Gaelic not yet supported.")
+
+ (Parameter.set 'Language 'scotsgaelic)
+)
+
+(define (language_welsh)
+"(language_welsh)
+Set up language parameters for Welsh."
+
+ (set! male1 voice_welsh_hl)
+
+ (male1)
+ (Parameter.set 'Language 'welsh)
+)
+
+(define (language_castillian_spanish)
+"(language_spanish)
+Set up language parameters for Castillian Spanish."
+
+ (voice_el_diphone)
+ (set! male1 voice_el_diphone)
+
+ (Parameter.set 'Language 'spanish)
+)
+
+(define (select_language language)
+ (cond
+ ((or (equal? language 'britishenglish)
+ (equal? language 'english)) ;; we all know its the *real* English
+ (language_british_english))
+ ((equal? language 'americanenglish)
+ (language_american_english))
+ ((equal? language 'scotsgaelic)
+ (language_scots_gaelic))
+ ((equal? language 'welsh)
+ (language_welsh))
+ ((equal? language 'spanish)
+ (language_castillian_spanish))
+ ((equal? language 'klingon)
+ (language_klingon))
+ (t
+ (print "Unsupported language, using English")
+ (language_british_english))))
+
+(defvar language_default language_british_english)
+
+(provide 'languages)
diff --git a/CosyVoice-ttsfrd/resource/festival/lts.scm b/CosyVoice-ttsfrd/resource/festival/lts.scm
new file mode 100644
index 0000000000000000000000000000000000000000..23c2dad2f889501ee593881c5c77610be64a8aef
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/lts.scm
@@ -0,0 +1,212 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1998 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Functions specific to supporting a trained LTS rules
+;;;
+
+(define (lts_rules_predict word feats)
+ (let ((dcword (downcase word))
+ (syls) (phones))
+ (if (string-matches dcword "[a-z]*")
+ (begin
+ (set! phones
+ (cdr (reverse (cdr (reverse (lts_predict dcword))))))
+ (set! phones (add_lex_stress word feats phones))
+ (set! syls (lex.syllabify.phstress phones))
+;; (set! syls (add_lex_stress word syls))
+ )
+ (set! syls nil))
+ (format t "word %l phones %l\n" word syls)
+ (list word nil syls)))
+
+;(define (add_lex_stress word syls)
+; (cond
+; ((> (length syls) 1)
+; (set-car! (cdr (nth (- (length syls) 2) syls)) 1))
+; ((word-is-content word english_guess_pos)
+; (set-car! (cdr (car syls)) 1)))
+; syls)
+
+(define (word-is-content word guess_pos)
+ (cond
+ ((null guess_pos)
+ t)
+ ((member_string word (cdr (car guess_pos)))
+ nil)
+ (t
+ (word-is-content word (cdr guess_pos)))))
+
+(defvar lts_pos nil)
+
+(define (lts_predict word rules)
+ "(lts_predict word rules)
+Return list of phones related to word using CART trees."
+ (let ((utt (make_let_utt (enworden (wordexplode word)))))
+ (predict_phones utt rules)
+ (cdr (reverse (cdr (reverse ;; remove #'s
+ (mapcar
+ (lambda (p) (intern (item.name p)))
+ (utt.relation.items utt 'PHONE))))))
+ )
+)
+
+(define (wordexplode lets)
+ (if (consp lets)
+ lets
+ (symbolexplode lets)))
+
+(define (make_let_utt letters)
+"(make_let_utt letters)
+Build an utterances from th4ese letters."
+ (let ((utt (Utterance Text "")))
+ (utt.relation.create utt 'LTS)
+ (utt.relation.create utt 'LETTER)
+ (utt.relation.create utt 'PHONE)
+ ;; Create letter stream
+ (mapcar
+ (lambda (l)
+ (let ((lsi (utt.relation.append utt 'LETTER)))
+ (item.set_feat lsi "pos" lts_pos)
+ (item.set_name lsi l)))
+ letters)
+ utt))
+
+(define (predict_phones utt rules)
+ "(predict_phones utt)
+Predict phones using CART."
+ (add_new_phone utt (utt.relation.first utt 'LETTER) '#)
+ (mapcar
+ (lambda (lsi)
+ (let ((tree (car (cdr (assoc_string (item.name lsi) rules)))))
+ (if (not tree)
+ (format t "failed to find tree for %s\n" (item.name lsi))
+ (let ((p (wagon_predict lsi tree)))
+; (format t "predict %s %s\n" (item.name lsi) p)
+ (cond
+ ((string-matches p ".*-.*-.*-.*") ; a quad one
+ (add_new_phone utt lsi (string-before p "-"))
+ (add_new_phone utt lsi (string-before (string-after p "-") "-"))
+ (add_new_phone utt lsi (string-before (string-after (string-after p "-") "-") "-"))
+ (add_new_phone utt lsi (string-after (string-after (string-after p "-") "-") "-")))
+ ((string-matches p ".*-.*-.*") ; a triple one
+ (add_new_phone utt lsi (string-before p "-"))
+ (add_new_phone utt lsi (string-before (string-after p "-") "-"))
+ (add_new_phone utt lsi (string-after (string-after p "-") "-")))
+ ((string-matches p ".*-.*");; a double one
+ (add_new_phone utt lsi (string-before p "-"))
+ (add_new_phone utt lsi (string-after p "-")))
+ (t
+ (add_new_phone utt lsi p)))))))
+ (reverse (cdr (reverse (cdr (utt.relation.items utt 'LETTER))))))
+ (add_new_phone utt (utt.relation.last utt 'LETTER) '#)
+ utt)
+
+(define (add_new_phone utt lsi p)
+ "(add_new_phone utt lsi p)
+Add new phone linking to letter, ignoreing it if its _epsilon_."
+ (if (not (equal? p '_epsilon_))
+ (let ((psi (utt.relation.append utt 'PHONE)))
+ (item.set_name psi p)
+ (item.relation.append_daughter
+ (utt.relation.append utt 'LTS lsi)
+ 'LTS psi)
+ )))
+
+(define (enworden lets)
+ (cons '# (reverse (cons '# (reverse lets)))))
+
+;;; Lexical stress assignment
+;;;
+
+(define (add_lex_stress word pos phones tree)
+ "(add_lex_stress word syls)
+Predict lexical stress by decision tree."
+ (let ((utt (Utterance Text ""))
+ (si)
+ (nphones))
+ (utt.relation.create utt 'Letter)
+ (set! si (utt.relation.append utt 'Letter))
+ (item.set_feat si 'pos pos)
+ (item.set_feat si 'numsyls (count_syls phones))
+ (item.set_feat si 'sylpos 1)
+ (set! nphones (add_lex_stress_syl phones si tree))
+; (format t "%l\n" phones)
+; (format t "%l\n" nphones)
+ nphones))
+
+(define (count_syls phones)
+ (cond
+ ((null phones) 0)
+ ((string-matches (car phones) "[aeiou@].*")
+ (+ 1 (count_syls (cdr phones))))
+ (t (count_syls (cdr phones)))))
+
+(define (add_lex_stress_syl phones si tree)
+ "(add_lex_stress_syl phones si tree)
+Add lexical stressing."
+ (cond
+ ((null phones) nil)
+ ((string-matches (car phones) "[aeiou@].*")
+ (item.set_feat si 'phone (car phones))
+ (item.set_feat si 'name (car phones))
+ (item.set_feat si 'num2end
+ (- (+ 1 (item.feat si 'numsyls))
+ (item.feat si 'sylpos)))
+ (set! stress (wagon_predict si tree))
+ (item.set_feat si 'sylpos
+ (+ 1 (item.feat si 'sylpos)))
+ (cons
+ (if (not (string-equal stress "0"))
+ (string-append (car phones) stress)
+ (car phones))
+ (add_lex_stress_syl (cdr phones) si tree)))
+ (t
+ (cons
+ (car phones)
+ (add_lex_stress_syl (cdr phones) si tree)))))
+
+;;; Morphological analysis
+
+
+;(define (wfst_stemmer)
+; (wfst.load 'stemmer "/home/awb/projects/morpho/engstemmer.wfst")
+; (wfst.load 'stemmerL "/home/awb/projects/morpho/engstemmerL.wfst")
+; t)
+
+;(define (stem word)
+; (wfst.transduce 'stemmer (enworden (symbolexplode word))))
+
+;(define (stemL word)
+; (wfst.transduce 'stemmerL (enworden (symbolexplode word))))
+
+(provide 'lts)
diff --git a/CosyVoice-ttsfrd/resource/festival/module_description.scm b/CosyVoice-ttsfrd/resource/festival/module_description.scm
new file mode 100644
index 0000000000000000000000000000000000000000..0cf426f9a9afcd012bed5a49642fee8821b6cfd5
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/module_description.scm
@@ -0,0 +1,117 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Handle module descriptions.
+;;;
+
+(defvar *module-descriptions* nil
+ "*module-descriptions*
+ An association list recording the description objects for proclaimed
+ modules.")
+
+(define (set_module_description mod desc)
+ "(set_module_description MOD DESC)
+ Set the description for the module named MOD."
+ (let ((entry (assoc mod *module-descriptions*)))
+ (if entry
+ (set-cdr! entry (cons desc nil))
+ (set! *module-descriptions* (cons (cons mod (cons desc nil))
+ *module-descriptions*))
+ )
+ )
+ )
+
+(define (module_description mod)
+ "(module_description MOD)
+ Returns the description record of the module named by symbol MOD"
+ (let ((entry (assoc mod *module-descriptions*)))
+ (if entry
+ (car (cdr entry))
+ nil
+ )
+ )
+ )
+
+(defmac (proclaim form)
+ "(proclaim NAME &opt DESCRIPTION...)
+ Anounce the availability of a module NAME. DESCRIPTION
+ is a description in a fixed format."
+ (let ((name (car (cdr form)))
+ (description (cdr form))
+ )
+ (list 'proclaim-real (list 'quote name) (list 'quote description))
+ )
+ )
+
+(define (proclaim-real name description)
+ (set! *modules* (cons name *modules*))
+; (if description
+; (set_module_description name (create_module_description description))
+; )
+ )
+
+(define (describe_module mod)
+ "(describe_module MOD)
+ Describe the module named by the symbol MOD."
+
+ (let ((entry (module_description mod)))
+ (format t "---------------------\n")
+ (if entry
+ (print_module_description entry)
+ (format t "No description for %l\n" mod)
+ )
+ (format t "---------------------\n")
+ )
+ )
+
+(define (describe_all_modules)
+ "(describe_all_modules)
+ Print descriptions of all proclaimed modules"
+ (format t "---------------------\n")
+ (let ((p *module-descriptions*))
+ (while p
+ (print_module_description (car (cdr (car p))))
+ (format t "---------------------\n")
+ (set! p (cdr p))
+ )
+ )
+ )
+
+(proclaim
+ module_description 1.1
+ "CSTR" "Richard Caley "
+ ( "Handle module descriptions from C++ and from Scheme."
+ )
+ )
+
+(provide 'module_description)
diff --git a/CosyVoice-ttsfrd/resource/festival/mrpa_allophones.scm b/CosyVoice-ttsfrd/resource/festival/mrpa_allophones.scm
new file mode 100644
index 0000000000000000000000000000000000000000..fbabf369c8047c14c6553c5323e8495f56f9619f
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/mrpa_allophones.scm
@@ -0,0 +1,111 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ;;
+;; Centre for Speech Technology Research ;;
+;; University of Edinburgh, UK ;;
+;; Copyright (c) 1996,1997 ;;
+;; All Rights Reserved. ;;
+;; ;;
+;; Permission is hereby granted, free of charge, to use and distribute ;;
+;; this software and its documentation without restriction, including ;;
+;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;; permit persons to whom this work is furnished to do so, subject to ;;
+;; the following conditions: ;;
+;; 1. The code must retain the above copyright notice, this list of ;;
+;; conditions and the following disclaimer. ;;
+;; 2. Any modifications must be clearly marked as such. ;;
+;; 3. Original authors' names are not deleted. ;;
+;; 4. The authors' names are not used to endorse or promote products ;;
+;; derived from this software without specific prior written ;;
+;; permission. ;;
+;; ;;
+;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;; THIS SOFTWARE. ;;
+;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; A definition of the extended mrpa phone set used for some diphone sets
+;;
+
+(defPhoneSet
+ mrpa_allophones
+ ;;; Phone Features
+ (;; vowel or consonant
+ (vc + -)
+ ;; vowel length: short long dipthong schwa
+ (vlng s l d a 0)
+ ;; vowel height: high mid low
+ (vheight 1 2 3 -)
+ ;; vowel frontness: front mid back
+ (vfront 1 2 3 -)
+ ;; lip rounding
+ (vrnd + -)
+ ;; consonant type: stop fricative affricative nasal liquid
+ (ctype s f a n l 0)
+ ;; place of articulation: labial alveolar palatal labio-dental
+ ;; dental velar
+ (cplace l a p b d v 0)
+ ;; consonant voicing
+ (cvox + -)
+ )
+ ;; Phone set members
+ (
+ (uh + s 2 3 - 0 0 +)
+ (e + s 2 1 - 0 0 +)
+ (a + s 3 1 - 0 0 +)
+ (o + s 3 3 - 0 0 +)
+ (i + s 1 1 - 0 0 +)
+ (u + s 1 3 + 0 0 +)
+ (ii + l 1 1 - 0 0 +)
+ (uu + l 2 3 + 0 0 +)
+ (oo + l 3 2 - 0 0 +)
+ (aa + l 3 1 - 0 0 +)
+ (@@ + l 2 2 - 0 0 +)
+ (ai + d 3 1 - 0 0 +)
+ (ei + d 2 1 - 0 0 +)
+ (oi + d 3 3 - 0 0 +)
+ (au + d 3 3 + 0 0 +)
+ (ou + d 3 3 + 0 0 +)
+ (e@ + d 2 1 - 0 0 +)
+ (i@ + d 1 1 - 0 0 +)
+ (u@ + d 3 1 - 0 0 +)
+ (@ + a - - - 0 0 +)
+ (p - 0 - - + s l -)
+ (t - 0 - - + s a -)
+ (k - 0 - - + s p -)
+ (b - 0 - - + s l +)
+ (d - 0 - - + s a +)
+ (g - 0 - - + s p +)
+ (s - 0 - - + f a -)
+ (z - 0 - - + f a +)
+ (sh - 0 - - + f p -)
+ (zh - 0 - - + f p +)
+ (f - 0 - - + f b -)
+ (v - 0 - - + f b +)
+ (th - 0 - - + f d -)
+ (dh - 0 - - + f d +)
+ (ch - 0 - - + a a -)
+ (jh - 0 - - + a a +)
+ (h - 0 - - + a v -)
+ (m - 0 - - + n l +)
+ (n - 0 - - + n d +)
+ (ng - 0 - - + n v +)
+ (l - 0 - - + l d +)
+ (ll - 0 - - + l d +)
+ (y - 0 - - + l a +)
+ (r - 0 - - + l p +)
+ (w - 0 - - + l l +)
+ (# - 0 - - - 0 0 -)
+ )
+ )
+
+(PhoneSet.silences '(#))
+
+(provide 'mrpa_allophones)
diff --git a/CosyVoice-ttsfrd/resource/festival/mrpa_durs.scm b/CosyVoice-ttsfrd/resource/festival/mrpa_durs.scm
new file mode 100644
index 0000000000000000000000000000000000000000..86b14ca79e63fe01266c18a3e55c6eea50d88755
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/mrpa_durs.scm
@@ -0,0 +1,136 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; mrpa average phoneme durations from gsw 450
+;;;
+(set! phoneme_durations
+'(
+(u 0.067)
+(i@ 0.146)
+(h 0.067)
+(uu 0.105)
+(uh 0.090)
+(v 0.053)
+(oo 0.145)
+(i 0.060)
+(jh 0.097)
+(ii 0.095)
+(w 0.066)
+(k 0.088)
+(+ 0.036)
+(y 0.051)
+(l 0.067)
+(zh 0.080)
+(ng 0.072)
+(m 0.070)
+(z 0.079)
+(## 0.256)
+(au 0.162)
+(a 0.118)
+(n 0.065)
+(o 0.102)
+(ai 0.156)
+(b 0.071)
+(ou 0.129)
+(ch 0.119)
+(p 0.094)
+(oi 0.165)
+(# 0.040)
+(e@ 0.131)
+(d 0.052)
+(dh 0.032)
+(e 0.091)
+(r 0.062)
+(sh 0.101)
+(@@ 0.149)
+(ei 0.131)
+(f 0.091)
+(s 0.093)
+(g 0.066)
+(u@ 0.120)
+(aa 0.173)
+(t 0.073)
+(th 0.080)
+(@ 0.054)
+))
+
+(set! gsw_durs
+'(
+(# 0.200 0.100)
+(h 0.061 0.028)
+(i@ 0.141 0.061)
+(u 0.067 0.024)
+(uu 0.107 0.044)
+(uh 0.087 0.025)
+(v 0.051 0.019)
+(oo 0.138 0.046)
+(i 0.058 0.023)
+(ii 0.092 0.035)
+(w 0.054 0.023)
+(jh 0.094 0.024)
+(k 0.089 0.034)
+(y 0.048 0.025)
+(l 0.056 0.026)
+(zh 0.077 0.030)
+(ng 0.064 0.024)
+(m 0.063 0.021)
+(z 0.072 0.029)
+(a 0.120 0.036)
+(au 0.171 0.046)
+(n 0.059 0.025)
+(ou 0.134 0.039)
+(b 0.073 0.021)
+(o 0.094 0.037)
+(ai 0.137 0.047)
+(ch 0.128 0.039)
+(oi 0.183 0.050)
+(p 0.101 0.032)
+(e@ 0.144 0.061)
+(d 0.048 0.021)
+(dh 0.031 0.016)
+(e 0.092 0.035)
+(r 0.053 0.025)
+(sh 0.108 0.031)
+(f 0.095 0.033)
+(@@ 0.147 0.035)
+(ei 0.130 0.042)
+(s 0.102 0.037)
+(u@ 0.140 0.057)
+(th 0.093 0.050)
+(g 0.064 0.021)
+(aa 0.155 0.045)
+(t 0.070 0.034)
+(@ 0.046 0.020)
+))
+
+(provide 'mrpa_durs)
diff --git a/CosyVoice-ttsfrd/resource/festival/mrpa_phones.scm b/CosyVoice-ttsfrd/resource/festival/mrpa_phones.scm
new file mode 100644
index 0000000000000000000000000000000000000000..84e2c176df50504131af5fcc94cfbb670c1ab966
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/mrpa_phones.scm
@@ -0,0 +1,114 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ;;
+;; Centre for Speech Technology Research ;;
+;; University of Edinburgh, UK ;;
+;; Copyright (c) 1996,1997 ;;
+;; All Rights Reserved. ;;
+;; ;;
+;; Permission is hereby granted, free of charge, to use and distribute ;;
+;; this software and its documentation without restriction, including ;;
+;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;; permit persons to whom this work is furnished to do so, subject to ;;
+;; the following conditions: ;;
+;; 1. The code must retain the above copyright notice, this list of ;;
+;; conditions and the following disclaimer. ;;
+;; 2. Any modifications must be clearly marked as such. ;;
+;; 3. Original authors' names are not deleted. ;;
+;; 4. The authors' names are not used to endorse or promote products ;;
+;; derived from this software without specific prior written ;;
+;; permission. ;;
+;; ;;
+;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;; THIS SOFTWARE. ;;
+;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; A definition of the mrpa phone set
+;;
+
+(defPhoneSet
+ mrpa
+ ;;; Phone Features
+ (;; vowel or consonant
+ (vc + -)
+ ;; vowel length: short long dipthong schwa
+ (vlng s l d a 0)
+ ;; vowel height: high mid low
+ (vheight 1 2 3 0)
+ ;; vowel frontness: front mid back
+ (vfront 1 2 3 0)
+ ;; lip rounding
+ (vrnd + - 0)
+ ;; consonant type: stop fricative affricate nasal lateral approximant
+ (ctype s f a n l r 0)
+ ;; place of articulation: labial alveolar palatal labio-dental
+ ;; dental velar glottal
+ (cplace l a p b d v g 0)
+ ;; consonant voicing
+ (cvox + - 0)
+ )
+ ;; Phone set members
+ (
+ (uh + s 2 3 - 0 0 0)
+ (e + s 2 1 - 0 0 0)
+ (a + s 3 1 - 0 0 0)
+ (o + s 2 3 + 0 0 0)
+ (i + s 1 1 - 0 0 0)
+ (u + s 1 3 + 0 0 0)
+ (ii + l 1 1 - 0 0 0)
+ (uu + l 1 3 + 0 0 0)
+ (oo + l 3 3 + 0 0 0)
+ (aa + l 3 3 - 0 0 0)
+ (@@ + l 2 2 - 0 0 0)
+ (ai + d 3 2 - 0 0 0)
+ (ei + d 2 1 - 0 0 0)
+ (oi + d 3 3 + 0 0 0)
+ (au + d 3 2 + 0 0 0)
+ (ou + d 2 2 - 0 0 0)
+ (e@ + d 2 1 - 0 0 0)
+ (i@ + d 1 1 - 0 0 0)
+ (u@ + d 3 1 + 0 0 0)
+ (@ + a 2 2 - 0 0 0)
+ (p - 0 0 0 0 s l -)
+ (t - 0 0 0 0 s a -)
+ (k - 0 0 0 0 s v -)
+ (b - 0 0 0 0 s l +)
+ (d - 0 0 0 0 s a +)
+ (g - 0 0 0 0 s v +)
+ (s - 0 0 0 0 f a -)
+ (z - 0 0 0 0 f a +)
+ (sh - 0 0 0 0 f p -)
+ (zh - 0 0 0 0 f p +)
+ (f - 0 0 0 0 f b -)
+ (v - 0 0 0 0 f b +)
+ (th - 0 0 0 0 f d -)
+ (dh - 0 0 0 0 f d +)
+ (ch - 0 0 0 0 a p -)
+ (jh - 0 0 0 0 a p +)
+ (h - 0 0 0 0 f g -)
+ (m - 0 0 0 0 n l +)
+ (n - 0 0 0 0 n a +)
+ (ng - 0 0 0 0 n v +)
+ (l - 0 0 0 0 l a +)
+ (y - 0 0 0 0 r p +)
+ (r - 0 0 0 0 r a +)
+ (w - 0 0 0 0 r l +)
+ (# - 0 0 0 0 0 0 -)
+ )
+ )
+
+(PhoneSet.silences '(#))
+
+(provide 'mrpa_phones)
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/ogimarkup-mode.scm b/CosyVoice-ttsfrd/resource/festival/ogimarkup-mode.scm
new file mode 100644
index 0000000000000000000000000000000000000000..2bca41a1a49d62b30ee39ca9e0418c6831caabce
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/ogimarkup-mode.scm
@@ -0,0 +1,191 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; An example tts text mode for reading OGI's CSLU toolkit mark up
+;;;
+;;; Note not all tokens do something in festival but all are removed
+;;; from the actual text
+;;;
+
+(defvar ogimarkup_eou_tree
+'((n.name matches "<.*")
+ ((1))
+((n.whitespace matches ".*\n.*\n\\(.\\|\n\\)*") ;; A significant break (2 nls)
+ ((1))
+ ((punc in ("?" ":" "!"))
+ ((1))
+ ((punc is ".")
+ ;; This is to distinguish abbreviations vs periods
+ ;; These are heuristics
+ ((name matches "\\(.*\\..*\\|[A-Z][A-Za-z]?[A-Za-z]?\\|etc\\)") ;; an abbreviation
+ ((n.whitespace is " ")
+ ((0)) ;; if abbrev single space isn't enough for break
+ ((n.name matches "[A-Z].*")
+ ((1))
+ ((0))))
+ ((n.whitespace is " ") ;; if it doesn't look like an abbreviation
+ ((n.name matches "[A-Z].*") ;; single space and non-cap is no break
+ ((1))
+ ((0)))
+ ((1))))
+ ((0)))))))
+
+(define (ogimarkup_init_func)
+ "Called on starting ogimarkup text mode."
+ (set! ogimarkup_in_tag nil)
+ (set! ogimarkup_tagtokens "")
+ (set! ogimarkup_previous_t2w_func token_to_words)
+ (set! english_token_to_words ogimarkup_token_to_words)
+ (set! token_to_words ogimarkup_token_to_words)
+ (set! ogimarkup_previous_eou_tree eou_tree)
+ (set! eou_tree ogimarkup_eou_tree))
+
+(define (ogimarkup_exit_func)
+ "Called on exit ogimarkup text mode."
+ (Parameter.set 'Duration_Stretch 1.0)
+ (set! token_to_words ogimarkup_previous_t2w_func)
+ (set! english_token_to_words ogimarkup_previous_t2w_func)
+ (set! eou_tree ogimarkup_previous_eou_tree))
+
+(define (ogimarkup_token_to_words token name)
+ "(ogimarkup_token_to_words token name)
+OGI markup specific token to word rules. Tags may have optional
+argument e.g. or which means the tag may be over
+a number of tokens."
+ (let (tag (arg nil) (rval nil))
+ (cond
+ ((string-matches name "<.*")
+ (set! ogimarkup_tagtokens "")
+ (set! tag (string-after name "<"))
+ (if (string-matches tag ".*>$")
+ (set! tag (string-before tag ">"))
+ (if (string-matches (set! arg (item.feat token "n.name"))
+ ".*>$")
+ (set! arg (string-before arg ">"))))
+ (set! ogimarkup_in_tag tag)
+ (cond
+ ((string-equal tag "slow")
+ (Parameter.set 'Duration_Stretch 1.3))
+ ((string-equal tag "SLOW")
+ (Parameter.set 'Duration_Stretch 2.0))
+ ((string-equal tag "normal")
+ (Parameter.set 'Duration_Stretch 1.0))
+ ((string-matches tag "FAST")
+ (Parameter.set 'Duration_Stretch 0.5))
+ ((string-matches tag "fast")
+ (Parameter.set 'Duration_Stretch 0.8))
+ ((string-matches tag"spell")
+ ;; This ain't really right as we'll get an utterance break here
+ (set! rval (symbolexplode arg)))
+ ((string-matches tag "phone")
+ ;; This ain't really right as we'll get an utterance break here
+ (item.set_feat token "token_pos" "digits") ;; canonical phone number
+ (set! rval (ogimarkup_previous_t2w_func token arg)))
+ ((string-matches tag "male")
+ (if (and (member 'OGIresLPC *modules*)
+ (symbol-bound? 'voice_aec_diphone))
+ (voice_aec_diphone)
+ (voice_kal_diphone)))
+ ((string-matches tag "Male")
+ (if (and (member 'OGIresLPC *modules*)
+ (symbol-bound? 'voice_mwm_diphone))
+ (voice_mwm_diphone)
+ (voice_cmu_us_rms_cg)))
+ ((string-matches tag "MALE")
+ (if (and (member 'OGIresLPC *modules*)
+ (symbol-bound? 'voice_jph_diphone))
+ (voice_jph_diphone)
+ (voice_rab_diphone)))
+ ((string-matches tag "FT")
+ t) ;; do nothing until the end of this tag
+ ((string-matches (downcase tag) "female")
+ ;; only one female voice so map female Female FEMALE to it
+ (if (and (member 'OGIresLPC *modules*)
+ (symbol-bound? 'voice_tll_diphone))
+ (voice_tll_diphone)
+ (voice_cmu_us_slt_arctic_hts))))
+ (if (string-matches name ".*>$")
+ (set! ogimarkup_in_tag nil))
+ rval ;; mostly nil
+ )
+ ((string-matches name ".*>$")
+ (set! ogimarkup_tagtokens
+ (string-append
+ ogimarkup_tagtokens
+ (ogimarkup_get_token_string token t))) ;; delete final >
+ (if (string-equal ogimarkup_in_tag "FT")
+ (ogimarkup_festival_eval ogimarkup_tagtokens))
+ (set! ogimarkup_in_tag nil) ;; end of tag
+ nil)
+ (ogimarkup_in_tag
+ (set! ogimarkup_tagtokens
+ (string-append
+ ogimarkup_tagtokens
+ (ogimarkup_get_token_string token nil)))
+ nil) ;; still in tag
+ (t ;; for all other cases
+ (ogimarkup_previous_t2w_func token name)))))
+
+(set! tts_text_modes
+ (cons
+ (list
+ 'ogimarkup ;; mode name
+ (list ;; ogimarkup mode params
+ (list 'init_func ogimarkup_init_func)
+ (list 'exit_func ogimarkup_exit_func)))
+ tts_text_modes))
+
+(define (ogimarkup_get_token_string token delend)
+ "(ogimarkup_get_token_string TOKEN DELEND)
+return string for token including whitespace and punctuation. If DELEND
+is true remove > from the name."
+ (string-append
+ (item.feat token "whitespace")
+ (item.feat token "prepunctuation")
+ (if delend
+ (string-before
+ (item.feat token "name") ">")
+ (item.feat token "name"))
+ (if (string-equal "0" (item.feat token "punc"))
+ ""
+ (item.feat token "punc"))))
+
+(define (ogimarkup_festival_eval tagtokens)
+"(ogimarkup_festival_eval TAGTOKENS
+Take a string of the tokens within the tag and read an s-expression from
+it and then evaluate it."
+ (let ((com "") (command nil))
+ (set! command (read-from-string tagtokens))
+ (eval command)))
+
+(provide 'ogimarkup-mode)
diff --git a/CosyVoice-ttsfrd/resource/festival/pauses.scm b/CosyVoice-ttsfrd/resource/festival/pauses.scm
new file mode 100644
index 0000000000000000000000000000000000000000..18af2a9cf30a36db91999ae264103aab8c95a604
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/pauses.scm
@@ -0,0 +1,242 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Predicting pause insertion
+
+(define (Pauses utt)
+"(Pauses utt)
+Insert pauses where required."
+ (let ((rval (apply_method 'Pause_Method utt)))
+ (cond
+ (rval rval) ;; new style
+ (t
+ (Classic_Pauses utt))))
+ (Pause_optional_deleting_B_X utt))
+
+(define (Classic_Pauses utt)
+ "(Pauses UTT)
+Predict pause insertion."
+ (let ((words (utt.relation.items utt 'Word)) lastword tpname)
+ (if words
+ (begin
+ (insert_initial_pause utt) ;; always have a start pause
+ (set! lastword (car (last words)))
+ (mapcar
+ (lambda (w)
+ (let ((pbreak (item.feat w "pbreak"))
+ (emph (item.feat w "R:Token.parent.EMPH")))
+ (cond
+ ((or (string-equal "B" pbreak)
+ (string-equal "BB" pbreak))
+ (insert_pause utt w))
+; ((string-equal emph "1")
+; (insert_pause utt w))
+ ((equal? w lastword)
+ (insert_pause utt w)))))
+ words)
+ ;; The embarrassing bit. Remove any words labelled as punc or fpunc
+ (mapcar
+ (lambda (w)
+ (let ((pos (item.feat w "pos")))
+ (if (or (string-equal "punc" pos)
+ (string-equal "fpunc" pos))
+ (let ((pbreak (item.feat w "pbreak"))
+ (wp (item.relation w 'Phrase)))
+ (if (and (string-matches pbreak "BB?")
+ (item.relation.prev w 'Word))
+ (item.set_feat
+ (item.relation.prev w 'Word) "pbreak" pbreak))
+ (item.relation.remove w 'Word)
+ ;; can't refer to w as we've just deleted it
+ (item.relation.remove wp 'Phrase)))))
+ words)
+ ;; 12/01/2006 V.Strom: Even more embarrasing: Delete all silences
+ ;; that are followed by a silence. These silence sequences
+ ;; emerge if 'punc of phrase-final words consists of more than one
+ ;; character, e.g. period+quote. That in turn causes problems in
+ ;; build_utts: the 2nd silence ends up with no features but its name,
+ ;; because there is no corresponding 2nd silence in the phone
+ ;; segmentation to align with.
+ ;; This schould be fixed in the functions below, but it is easier for
+ ;; me to clean up at the end:
+ (set! sil (car (car (cdr (car (PhoneSet.description '(silences)))))))
+ (set! seg (item.next(utt.relation.first utt 'Segment)))
+ (while seg
+ (if(and(equal? sil (item.name seg))
+ (equal? sil (item.name (item.prev seg))))
+ (item.delete (item.prev seg)))
+ (set! seg (item.next seg)))))
+ utt))
+
+(define (insert_pause utt word)
+"(insert_pause UTT WORDITEM)
+Insert a silence segment after the last segment in WORDITEM in UTT."
+ (let ((lastseg (find_last_seg word))
+ (silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
+ (if lastseg
+ (item.relation.insert
+ lastseg 'Segment (list silence) 'after))))
+
+(define (insert_initial_pause utt)
+"(insert_initial_pause UTT)
+Always have an initial silence if the utterance is non-empty.
+Insert a silence segment after the last segment in WORDITEM in UTT."
+ (let ((firstseg (car (utt.relation.items utt 'Segment)))
+ (silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
+ (if firstseg
+ (item.relation.insert
+ firstseg 'Segment (list silence) 'before))))
+
+(define (insert_final_pause utt)
+"(insert_final_pause UTT)
+Always have a final silence if the utterance is non-empty."
+ (let ((lastseg (utt.relation.last utt 'Segment))
+ (silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
+ (set! silence (format nil "%l" silence)) ; to make the symbol a string
+ ;(format t "silence is %l\n" silence)
+ ;(format t "lastseg is %l\n" (item.name lastseg))
+ (if lastseg
+ (if (not(equal? (item.name lastseg) silence))
+ (begin
+ (format t "iserted final pause %s\n" silence)
+ (item.relation.insert lastseg 'Segment (list silence) 'after))))))
+
+
+(define (find_last_seg word)
+;;; Find the segment that is immediately at this end of this word
+;;; If this word is punctuation it might not have any segments
+;;; so we have to check back until we find a word with a segment in it
+ (cond
+ ((null word)
+ nil) ;; there are no segs (don't think this can happen)
+ (t
+ (let ((lsyl (item.relation.daughtern word 'SylStructure)))
+ (if lsyl
+ (item.relation.daughtern lsyl 'SylStructure)
+ (find_last_seg (item.relation.prev word 'Word)))))))
+
+(define (Unisyn_Pauses utt)
+ "(Unisyn_Pauses UTT)
+Predict pause insertion in a Unisyn utterance structure."
+ (let ((words (utt.relation.items utt 'Word)) lastword tpname)
+ (if words
+ (begin
+ (us_insert_initial_pause utt) ;; always have a start pause
+ (set! lastword (car (last words)))
+ (mapcar
+ (lambda (w)
+ (let ((pbreak (item.feat w "pbreak"))
+ (emph (item.feat w "R:Token.parent.EMPH")))
+ (cond
+ ((or (string-equal "B" pbreak)
+ (string-equal "BB" pbreak))
+ (us_insert_pause utt w))
+; ((string-equal emph "1")
+; (us_insert_pause utt w))
+ ((equal? w lastword)
+ (us_insert_pause utt w)))))
+ words)
+ ;; The embarrassing bit. Remove any words labelled as punc or fpunc
+ (mapcar
+ (lambda (w)
+ (let ((pos (item.feat w "pos")))
+ (if (or (string-equal "punc" pos)
+ (string-equal "fpunc" pos))
+ (let ((pbreak (item.feat w "pbreak"))
+ (wp (item.relation w 'Phrase)))
+ (if (and (string-matches pbreak "BB?")
+ (item.relation.prev w 'Word))
+ (item.set_feat
+ (item.relation.prev w 'Word) "pbreak" pbreak))
+ (item.relation.remove w 'Word)
+ ;; can't refer to w as we've just deleted it
+ (item.relation.remove wp 'Phrase)))))
+ words)))
+ utt))
+
+(define (us_insert_pause utt word)
+"(us_insert_pause UTT WORDITEM)
+Insert a silence segment after the last segment in WORDITEM in UTT."
+ (let ((lastseg (us_find_last_seg word))
+ (silence "pau"))
+ (if lastseg
+ (item.relation.insert
+ lastseg 'Segment (list silence) 'after))))
+
+(define (us_insert_initial_pause utt)
+"(us_insert_initial_pause UTT)
+Always have an initial silence if the utterance is non-empty.
+Insert a silence segment after the last segment in WORDITEM in UTT."
+ (let ((firstseg (utt.relation.first utt 'Segment))
+ (silence "pau"))
+ (if firstseg
+ (item.relation.insert
+ firstseg 'Segment (list silence) 'before))))
+
+(define (us_find_last_seg word)
+;;; Find the segment that is immediately at this end of this word
+;;; If this word is punctuation it might not have any segments
+;;; so we have to check back until we find a word with a segment in it
+ (cond
+ ((null word)
+ nil) ;; there are no segs (don't think this can happen)
+ (t
+ (if (item.daughtern_to (item.relation word 'WordStructure) 'Syllable)
+ (item.daughtern_to
+ (item.relation
+ (item.daughtern_to (item.relation word 'WordStructure) 'Syllable)
+ 'SylStructure)
+ 'Segment)
+ (us_find_last_seg (item.relation.prev word 'Word))))))
+
+(define (Pause_optional_deleting_B_X utt)
+"(Pause_optional_deleting_B_X utt)
+
+Delete all phone symbols starting with 'B_' from the segemt relation
+(a B_150 e.g. is a 150ms pause) if symbol 'Pause_delete_B_X is defined.
+"
+; The B_X never occur in the phone segmentation but are predicted by
+; some pause methods, in particular the default I used to produce the
+; .utt files for the 2009 test sentences for the Blizzard challange.
+; Some participants complained about them and I had to fix it quickly.
+ (if (symbol-bound? 'Pause_delete_B_X)
+ (let(seg )
+ (set! seg (item.next(utt.relation.first utt 'Segment)))
+ (while seg
+ (set! next_seg (item.next seg))
+ ;(format t "segment %l\n" (item.name seg))
+ (if(string-matches (item.name seg) "B_[0-9]*")
+ (item.delete seg))
+ (set! seg next_seg)))))
+
+(provide 'pauses)
diff --git a/CosyVoice-ttsfrd/resource/festival/postlex.scm b/CosyVoice-ttsfrd/resource/festival/postlex.scm
new file mode 100644
index 0000000000000000000000000000000000000000..7fb038bad9437d00bba9e7e7e95b7b3964002e89
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/postlex.scm
@@ -0,0 +1,587 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Postlexical rules
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Modifed for CSTR HTS Voice Library ;;
+;; Author : Junichi Yamagishi (jyamagis@inf.ed.ac.uk) ;;
+;; Date : Sept 2008 ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(define (PostLex utt)
+"(PostLex utt)
+Apply post lexical rules to segment stream. These may be almost
+arbitrary rules as specified by the particular voice, through the
+postlex_hooks variable. A number of standard post lexical rule
+sets are provided including reduction, posessives etc. These
+rules are also used to mark standard segments with their cluster
+information used in creating diphone names."
+(let ((rval (apply_method 'PostLex_Method utt)))
+ (cond
+ (rval rval) ;; new style
+ (t ;; should only really need this one
+ (apply_hooks postlex_rules_hooks utt)))
+ utt
+))
+
+(define (Classic_PostLex utt)
+ "(Classic_PostLex utt)
+Apply post lexical rules (both builtin and those specified in
+postlex_rules_hooks)."
+ (Builtin_PostLex utt) ;; haven't translated all the rules yet
+ (apply_hooks postlex_rules_hooks utt)
+ utt
+)
+
+(defvar postlex_rules_hooks nil
+"postlex_rules_hooks
+A function or list of functions which encode post lexical rules.
+This will be voice specific, though some rules will be shared across
+languages.")
+
+;;; Mapping of full vowels to reduced vowels, this should be part
+;;; of the phoneset definitions
+(defvar postlex_vowel_reduce_table
+ '((mrpa
+ ((uh @) (i @) (a @) (e @) (u @) (o @) (oo @)))
+ (radio
+ ((ah ax el en em)
+ (ih ax)
+; (er axr ax)
+; (iy ih)
+; (ey ax)
+ (aa ax)
+ (ae ax)
+ (eh ax))))
+"postlex_vowel_reduce_table
+Mapping of vowels to their reduced form. This in an assoc list of
+phoneset name to an assoc list of full vowel to reduced form.")
+
+(defvar postlex_vowel_reduce_cart_tree nil
+"postlex_vowel_reduce_cart_tree
+CART tree for vowel reduction.")
+
+(defvar postlex_vowel_reduce_cart_tree_hand
+ '((stress is 0)
+ ((p.syl_break < 2)
+ ((syl_break < 2)
+ ((1))
+ ((0)))
+ ((0)))
+ ((0)))
+"postlex_vowel_reduce_cart_tree_hand
+A CART tree for vowel reduction. This is hand-written.")
+
+(defvar postlex_vowel_reduce_cart_data
+'
+((R:SylStructure.parent.gpos is cc)
+ (((0 0.993548) (1 0.00645161) 0))
+ ((p.R:SylStructure.parent.gpos is md)
+ (((0 0.903226) (1 0.0967742) 0))
+ ((p.R:SylStructure.parent.gpos is det)
+ ((n.R:SylStructure.parent.gpos is content)
+ ((last_accent < 2.5)
+ ((next_accent < 2.5)
+ ((next_accent < 1.2)
+ ((n.syl_break is 4)
+ (((0 0.967213) (1 0.0327869) 0))
+ ((syl_break is 4)
+ (((0 0.952381) (1 0.047619) 0))
+ ((n.syl_break is 4)
+ (((0 0.953488) (1 0.0465116) 0))
+ ((position_type is single)
+ (((0 0.947368) (1 0.0526316) 0))
+ ((accented is 0)
+ ((n.accented is 0)
+ (((0 0.857143) (1 0.142857) 0))
+ (((0 0.415385) (1 0.584615) 1)))
+ (((0 0.974359) (1 0.025641) 0)))))))
+ (((0 0.968254) (1 0.031746) 0)))
+ (((0 0.969697) (1 0.030303) 0)))
+ (((0 0.976744) (1 0.0232558) 0)))
+ (((0 0.990291) (1 0.00970874) 0)))
+ ((next_accent < 108.5)
+ ((p.R:SylStructure.parent.gpos is pps)
+ (((0 0.828947) (1 0.171053) 0))
+ ((R:SylStructure.parent.gpos is det)
+ ((accented is 0)
+ (((0 0.0599572) (1 0.940043) 1))
+ (((0 0.949367) (1 0.0506329) 0)))
+ ((p.R:SylStructure.parent.gpos is cc)
+ (((0 0.880952) (1 0.119048) 0))
+ ((p.R:SylStructure.parent.gpos is wp)
+ (((0 0.875) (1 0.125) 0))
+ ((p.R:SylStructure.parent.gpos is in)
+ ((n.syl_break is 4)
+ (((0 0.961538) (1 0.0384615) 0))
+ ((next_accent < 2.5)
+ ((syl_break is 4)
+ (((0 0.95122) (1 0.0487805) 0))
+ ((next_accent < 1.2)
+ ((accented is 0)
+ ((n.stress is 0)
+ (((0 0.788462) (1 0.211538) 0))
+ ((R:SylStructure.parent.R:Word.p.gpos is content)
+ (((0 0.863636) (1 0.136364) 0))
+ ((position_type is single)
+ (((0 0.729167) (1 0.270833) 0))
+ (((0 0.4) (1 0.6) 1)))))
+ (((0 0.983871) (1 0.016129) 0)))
+ (((0 0.96) (1 0.04) 0))))
+ (((0 0.963636) (1 0.0363636) 0))))
+ ((position_type is single)
+ ((syl_break is 4)
+ (((0 0.993865) (1 0.00613497) 0))
+ ((p.R:SylStructure.parent.gpos is to)
+ (((0 0.984375) (1 0.015625) 0))
+ ((syl_break is 1)
+ ((accented is 0)
+ ((n.R:SylStructure.parent.gpos is in)
+ (((0 0.869565) (1 0.130435) 0))
+ ((R:SylStructure.parent.gpos is content)
+ (((0 0.861789) (1 0.138211) 0))
+ ((p.R:SylStructure.parent.gpos is content)
+ ((p.syl_break is 4)
+ (((0 0.858065) (1 0.141935) 0))
+ ((R:SylStructure.parent.gpos is in)
+ ((p.syl_break is 1)
+ ((n.R:SylStructure.parent.gpos is det)
+ (((0 0.659574) (1 0.340426) 0))
+ ((p.stress is 0)
+ (((0 0.422222) (1 0.577778) 1))
+ (((0 0.582278) (1 0.417722) 0))))
+ ((n.accented is 0)
+ ((n.R:SylStructure.parent.gpos is content)
+ (((0 0.65) (1 0.35) 0))
+ ((p.stress is 0)
+ (((0 0.464286) (1 0.535714) 1))
+ (((0 0.538462) (1 0.461538) 0))))
+ (((0 0.803279) (1 0.196721) 0))))
+ ((n.R:SylStructure.parent.gpos is det)
+ (((0 0.952381) (1 0.047619) 0))
+ ((n.syl_break is 4)
+ (((0 0.833333) (1 0.166667) 0))
+ ((p.stress is 0)
+ ((p.syl_break is 1)
+ ((n.syl_break is 1)
+ (((0 0.740741) (1 0.259259) 0))
+ ((R:SylStructure.parent.gpos is aux)
+ (((0 0.478261) (1 0.521739) 1))
+ (((0 0.769231) (1 0.230769) 0))))
+ (((0 0.755556) (1 0.244444) 0)))
+ (((0 0.797619) (1 0.202381) 0)))))))
+ (((0 0.870968) (1 0.129032) 0)))))
+ (((0 0.983806) (1 0.0161943) 0)))
+ (((0 0.977778) (1 0.0222222) 0)))))
+ ((next_accent < 21.6)
+ ((p.stress is 0)
+ ((R:SylStructure.parent.R:Word.p.gpos is md)
+ (((0 0.961538) (1 0.0384615) 0))
+ ((position_type is mid)
+ (((0 0.977612) (1 0.0223881) 0))
+ ((n.R:SylStructure.parent.gpos is det)
+ (((0 0.916667) (1 0.0833333) 0))
+ ((R:SylStructure.parent.R:Word.n.gpos is 0)
+ (((0 0.915493) (1 0.084507) 0))
+ ((R:SylStructure.parent.R:Word.n.gpos is pps)
+ (((0 0.884615) (1 0.115385) 0))
+ ((n.stress is 0)
+ ((n.syl_break is 4)
+ (((0 0.986755) (1 0.013245) 0))
+ ((p.syl_break is 4)
+ (((0 0.977011) (1 0.0229885) 0))
+ ((n.syl_break is 4)
+ (((0 0.965517) (1 0.0344828) 0))
+ ((last_accent < 1.2)
+ ((last_accent < 0.1)
+ (((0 0.910448) (1 0.0895522) 0))
+ ((next_accent < 1.2)
+ ((R:SylStructure.parent.R:Word.n.gpos is in)
+ (((0 0.82) (1 0.18) 0))
+ ((n.syl_break is 0)
+ ((R:SylStructure.parent.R:Word.p.gpos is content)
+ (((0 0.819672) (1 0.180328) 0))
+ (((0 0.444444) (1 0.555556) 1)))
+ (((0 0.785714) (1 0.214286) 0))))
+ (((0 0.836364) (1 0.163636) 0))))
+ (((0 0.962025) (1 0.0379747) 0))))))
+ ((stress is 0)
+ ((n.syl_break is 4)
+ (((0 0.21875) (1 0.78125) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is aux)
+ (((0 0.259259) (1 0.740741) 1))
+ ((p.syl_break is 1)
+ (((0 0.243094) (1 0.756906) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is det)
+ (((0 0.290323) (1 0.709677) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is in)
+ (((0 0.3) (1 0.7) 1))
+ ((syl_break is 1)
+ (((0 0.289157) (1 0.710843) 1))
+ ((p.syl_break is 4)
+ (((0 0.352941) (1 0.647059) 1))
+ ((n.syl_break is 0)
+ (((0 0.311475) (1 0.688525) 1))
+ ((syl_break is 4)
+ (((0 0.4) (1 0.6) 1))
+ (((0 0.581395) (1 0.418605) 0)))))))))))
+ (((0 1) (1 0) 0)))))))))
+ ((stress is 0)
+ ((R:SylStructure.parent.R:Word.n.gpos is 0)
+ (((0 0.121212) (1 0.878788) 1))
+ ((next_accent < 2.4)
+ ((R:SylStructure.parent.gpos is content)
+ ((position_type is mid)
+ (((0 0.176895) (1 0.823105) 1))
+ ((p.syl_break is 1)
+ (((0 0.229167) (1 0.770833) 1))
+ ((syl_break is 4)
+ (((0 0.242775) (1 0.757225) 1))
+ ((p.syl_break is 0)
+ ((n.R:SylStructure.parent.gpos is in)
+ (((0 0.253521) (1 0.746479) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is in)
+ (((0 0.262774) (1 0.737226) 1))
+ ((last_accent < 2.1)
+ ((n.R:SylStructure.parent.gpos is aux)
+ (((0 0.304348) (1 0.695652) 1))
+ ((next_accent < 1.2)
+ ((n.R:SylStructure.parent.gpos is cc)
+ (((0 0.291667) (1 0.708333) 1))
+ ((syl_break is 1)
+ ((n.syl_break is 4)
+ (((0 0.344828) (1 0.655172) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is det)
+ (((0 0.364706) (1 0.635294) 1))
+ ((n.syl_break is 4)
+ (((0 0.384615) (1 0.615385) 1))
+ ((last_accent < 1.2)
+ ((p.accented is 0)
+ (((0 0.584906) (1 0.415094) 0))
+ ((n.accented is 0)
+ ((R:SylStructure.parent.R:Word.p.gpos is content)
+ (((0 0.41) (1 0.59) 1))
+ (((0 0.6) (1 0.4) 0)))
+ (((0 0.333333) (1 0.666667) 1))))
+ (((0 0.380952) (1 0.619048) 1))))))
+ ((p.accented is 0)
+ (((0 0.183673) (1 0.816327) 1))
+ ((n.R:SylStructure.parent.gpos is content)
+ ((n.stress is 0)
+ (((0 0.295455) (1 0.704545) 1))
+ ((R:SylStructure.parent.R:Word.p.gpos is content)
+ ((n.syl_break is 1)
+ (((0 0.5) (1 0.5) 0))
+ (((0 0.40625) (1 0.59375) 1)))
+ (((0 0.333333) (1 0.666667) 1))))
+ (((0 0.2) (1 0.8) 1))))))
+ (((0 0.3) (1 0.7) 1))))
+ (((0 0.302326) (1 0.697674) 1)))))
+ (((0 0.25) (1 0.75) 1))))))
+ (((0 0.173913) (1 0.826087) 1)))
+ (((0 0.166667) (1 0.833333) 1))))
+ (((0 1) (1 0) 0))))
+ (((0 0.2) (1 0.8) 1)))))))))
+ (((0 0.15) (1 0.85) 1)))))))
+
+(defvar postlex_mrpa_r_cart_tree
+'((name is r)
+ ((R:Segment.n.ph_vc is -)
+ ((delete))
+ ((nil)))
+ ((nil)))
+"postlex_mrpa_r_cart_tree
+For remove final R when not between vowels.")
+
+
+;; Changed this to actually work... (Rob 09/12/04)
+;; Changed this to delete the syllable when schwa is unneccesary (awb 19/07/04)
+(define (postlex_apos_s_check utt)
+ "(postlex_apos_s_check UTT)
+Deal with possesive s for English (American and British). Delete
+schwa of 's if previous is not an alveolar or palatal fricative or affricative, and
+change voiced to unvoiced s if previous is not voiced."
+ (mapcar
+ (lambda (syl)
+ ; word is 's
+ (if (string-equal "'s" (item.feat
+ syl "R:SylStructure.parent.name"))
+ (begin
+ ;; de-voice if last phone of previous word is unvoiced
+ (if (string-equal
+ "-"
+ (item.feat syl "p.R:SylStructure.daughtern.ph_cvox"))
+ (item.set_name
+ (item.relation.daughtern syl 'SylStructure)
+ "s")) ;; change it from "z" to "s"
+ ; if the previous seg is a aveolar or palatal,
+ ; fricative or affricate don't delete schwa otherwise delete it
+ (if (and
+ (member_string
+ (item.feat syl "p.R:SylStructure.daughtern.ph_ctype") '(f a))
+ (member_string
+ (item.feat syl "p.R:SylStructure.daughtern.ph_cplace") '(a p)))
+ (begin
+ t)
+ (begin
+ ;; delete the schwa
+ (item.delete (item.relation.daughter1 syl 'SylStructure))
+ ;; attach orphaned s/z to previous word
+ (item.relation.append_daughter
+ (item.prev syl)
+ 'SylStructure
+ (item.relation.daughtern syl 'SylStructure))
+ ;; delete the now empty syllable
+ (item.delete syl))))))
+ ;; never happens to if 's is first in an utterance
+ (cdr (utt.relation.items utt 'Syllable)))
+ utt)
+
+;; Changed this to work the other way round, too. Volker 10/08/06
+(define (postlex_the_vs_thee utt)
+"(postlex_the_vs_thee utt)
+Unnreduce the schwa in \"the\" when a vowel follows.
+Reduce the vowel in \"the\" when no vowel follows (this
+requires a lexicon entry for \"the\" with feature \"reduced\",
+otherwise there will be no reduction)."
+(let ((fullform (cadr (car (caar (cdr (cdar (lex.lookup_all 'thee)))))))
+ (reducedform (cadr(car(caar(cddr(lex.lookup 'the '(reduced)))))))
+ seg)
+
+ (mapcar
+ (lambda (word)
+ (if (string-equal "the" (downcase (item.feat word "name")))
+ (begin
+ (set! seg (item.relation (item.daughtern (item.relation.daughtern word 'SylStructure)) 'Segment))
+ (if (string-equal "+" (item.feat (item.next seg) 'ph_vc))
+ (item.set_feat seg 'name fullform)
+ (item.set_feat seg 'name reducedform)))))
+ (utt.relation.items utt 'Word)))
+utt)
+
+(define (postlex_the_vs_thee_changeflag utt)
+"(postlex_the_vs_thee_changeflag utt)
+Unnreduce the schwa in \"the\" when a vowel follows.
+Reduce the vowel in \"the\" when no vowel follows (this
+requires a lexicon entry for \"the\" with feature \"reduced\",
+otherwise there will be no reduction)."
+(let ((fullform (cadr (car (caar (cdr (cdar (lex.lookup_all 'thee)))))))
+ (reducedform (cadr(car(caar(cddr(lex.lookup 'the '(reduced)))))))
+ seg)
+
+ (mapcar
+ (lambda (word)
+ (if (string-equal "the" (downcase (item.feat word "name")))
+ (begin
+ (set! seg (item.relation (item.daughtern (item.relation.daughtern word 'SylStructure)) 'Segment))
+ (if (string-equal "+" (item.feat (item.next seg) 'ph_vc))
+ (item.set_feat seg 'reducable 0)
+ (item.set_feat seg 'reducable 1)))))
+ (utt.relation.items utt 'Word)))
+utt)
+
+
+;; For Multisyn voices only. Volker 14/08/06
+(define (postlex_a utt)
+"(postlex_a utt)
+If POS of \"a\" is \"nn\" and segment feature \"reducable\", set it to 0.
+This is a bugfix, but still requires the target cost function to add a
+penalty if a candidate is reducable but the target is not. expro_target_cost
+does that."
+(let(seg)
+ (mapcar
+ (lambda(word)
+;; (format t "%s\t%s\n" (item.feat word 'name)(item.feat word 'pos))
+ (if(and(string-equal "a" (downcase (item.feat word "name")))
+ (string-equal "nn" (item.feat word "pos")))
+ (begin
+ (set! seg (item.relation (item.daughtern (item.relation.daughtern word
+'SylStructure)) 'Segment))
+;; (format t "should not be reducable\n")
+ (if (eq 1 (parse-number (item.feat seg 'reducable)))
+ (item.set_feat seg 'reducable 0))))
+ )
+ (utt.relation.items utt 'Word)))
+utt)
+
+
+
+(define (postlex_unilex_vowel_reduction utt)
+"(postlex_unilex_vowel_reduction utt)
+Perform vowel reduction based on unilex specification of what can be reduced."
+(let ()
+ (mapcar
+ (lambda (seg)
+ (if (and (eq? (parse-number (item.feat seg "reducable")) 1)
+ (not (> (parse-number (item.feat seg "R:SylStructure.parent.stress")) 0)))
+ (if (not (and (seg_word_final seg)
+ (string-equal (item.feat (item.next seg) 'ph_vc) "+")))
+ (item.set_feat seg "name" (item.feat seg "reducedform")))))
+ (utt.relation.items utt 'Segment)))
+utt)
+
+
+
+
+(define (seg_word_final seg)
+"(seg_word_final seg)
+Is this segment word final?"
+ (let ((this_seg_word (item.parent (item.relation.parent seg 'SylStructure)))
+ (silence (car (cadr (car (PhoneSet.description '(silences))))))
+ next_seg_word)
+ (if (item.next seg)
+ (set! next_seg_word (item.parent (item.relation.parent (item.next seg) 'SylStructure))))
+ (if (or (equal? this_seg_word next_seg_word)
+ (string-equal (item.feat seg "name") silence))
+ nil
+ t)))
+
+
+
+;; imported from postlex_intervoc_r.scm Volker 14/08/06
+(define (postlex_intervoc_r utt)
+"(postlex_intervoc_r UTT)
+
+Remove any word-final /r/ which is phrase-final or not going
+to be inter-vocalic i.e. the following words does not start
+with a vowel.
+
+NOTE: in older versions of unilex-rpx.out for Festival, there
+is no word-final /r/.
+
+"
+(let (word next_word last_phone following_phone)
+ (set! word (utt.relation.first utt 'Word))
+
+ (while word
+ (set! next_word (item.next word))
+ (set! last_phone (item.daughtern
+ (item.daughtern(item.relation word 'SylStructure))))
+ (if next_word
+ (begin
+
+ (set! following_phone (item.daughter1
+ (item.daughter1
+ (item.relation next_word 'SylStructure))))
+ ; last_phone and following_phone should always be defined at this point,
+ ; but since the upgrade to Fedora and characters no longer being in ISO
+ ; but in UTF8, the pound sterling is no longer treated correctly.
+ ; Probably (Token utt) should be fixed.
+
+ (if (and following_phone last_phone)
+ (begin
+ (format t "%s\t%s %s %s %s\n" (item.name word)
+ (item.name last_phone)
+ (item.name following_phone)
+ (item.feat following_phone 'ph_vc)
+ (item.feat word 'pbreak))
+ (if(and(equal? "r" (item.name last_phone))
+ (or(not(equal? "NB" (item.feat word 'pbreak)))
+ (equal? "-" (item.feat following_phone 'ph_vc))))
+ (begin
+ (format t "\t\t\t/r/ in \"%s %s\" deleted\n"
+ (item.name word)(item.name next_word))
+ (item.delete last_phone))))))
+ (if(and last_phone (equal? "r" (item.name last_phone)))
+ (begin
+ (format t "\t\t\tutterance-final /r/ deleted\n")
+ (item.delete last_phone)))
+ )
+
+ (set! word (item.next word))))
+ utt)
+
+
+(define (postlex_stop_deletion utt)
+"(postlex_stop_deletion utt)
+
+Delete any stop or affricative (phone which has a closure)
+immediately followed by another stop or affricative.
+
+Also save the identity of the deleted phone for the
+context cost functions. Consider:
+
+backtrack /b a k t r a k/ -> /b a t r a k/
+(actually Jenny reduces : /b a k_cl k t_cl t r a k/ -> /b a k_cl t r a k/)
+If we then look for a diphone /a t/ we want to favour
+candidates coming from the same context i.e. which
+are actually a reduced /a k t/. In the data base,
+the 1st /a/ gets the feature right_context=k and the
+/t/ gets the fearture left_context=k.
+
+"
+(let(seg next_seg prev_seg)
+ (set! seg (utt.relation.first utt 'Segment))
+ (while seg
+ (set! prev_seg (item.prev seg))
+ (if prev_seg
+ (begin
+ ;(format t "%s %s %s\n" (item.name seg)
+ ; (item.feat seg 'ph_ctype)
+ ; (item.feat seg 'p.ph_ctype))
+ (if(and(or(equal? "s" (item.feat seg 'ph_ctype))
+ (equal? "a" (item.feat seg 'ph_ctype)))
+ (or(equal? "s" (item.feat seg 'p.ph_ctype))
+ (equal? "a" (item.feat seg 'p.ph_ctype)))
+ ; When there are 3 stops in a row, and after the 1st has been
+ ; deleted, this prevents the 2nd to be deleted as well:
+ (equal? 0 (item.feat prev_seg 'left_context)))
+ (begin
+ (set! prev_prev_seg (item.prev prev_seg))
+ (format t "postlex_stop_deletion: %s in %s\n"
+ (item.name prev_seg)
+ (item.name(item.parent(item.relation.parent prev_seg
+ 'SylStructure))))
+ (if prev_prev_seg
+ (begin
+ ;(format t "setting left_context of %s and right context of %s to %s\n"
+ ; (item.name seg)
+ ; (item.name prev_prev_seg)
+ ; (item.name prev_seg))
+ (item.set_feat seg 'left_context (item.name prev_seg))
+ (item.set_feat prev_prev_seg 'right_context (item.name prev_seg))))
+ (if(and(item.next seg)
+ (equal? (item.name seg) (item.name prev_seg)))
+ (begin
+ ;(format t "setting left_context of %s to %s\n"
+ ; (item.name (item.next seg)
+ ; (item.name prev_seg))
+
+ (item.set_feat (item.next seg) 'left_context (item.name prev_seg))))
+ (item.delete prev_seg)))))
+ (set! seg (item.next seg))))
+utt)
+
+(provide 'postlex)
diff --git a/CosyVoice-ttsfrd/resource/festival/sable-latin.ent b/CosyVoice-ttsfrd/resource/festival/sable-latin.ent
new file mode 100644
index 0000000000000000000000000000000000000000..f068020fc1bc2f26c724e83182487d4ed2f7a600
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/sable-latin.ent
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/sable-mode.scm b/CosyVoice-ttsfrd/resource/festival/sable-mode.scm
new file mode 100644
index 0000000000000000000000000000000000000000..3c73882fb28d1220c012b1b7cf4267134041fc9f
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/sable-mode.scm
@@ -0,0 +1,560 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1998 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Festival (1.3.X) support for SABLE 0.2 the SGML/XML based mark up ;;
+;;; language. ;;
+;;; ;;
+;;; This is XML version requiring Edinburgh's LTG's rxp XML parser as ;;
+;;; distributed with Festival ;;
+;;; ;;
+
+(require_module 'rxp)
+
+;;(set! auto-text-mode-alist
+;; (cons
+;; (cons "\\.sable$" 'sable)
+;; auto-text-mode-alist))
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Remember where to find these two XML entities. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(xml_register_id "-//SABLE//DTD SABLE speech mark up//EN"
+ (path-append libdir "Sable.v0_2.dtd")
+ )
+
+(xml_register_id "-//SABLE//ENTITIES Added Latin 1 for SABLE//EN"
+ (path-append libdir "sable-latin.ent")
+ )
+
+;; (print (xml_registered_ids))
+
+(defvar SABLE_RXDOUBLE "-?\\(\\([0-9]+\\.[0-9]*\\)\\|\\([0-9]+\\)\\|\\(\\.[0-9]+\\)\\)\\([eE][---+]?[0-9]+\\)?")
+
+(defvar sable_pitch_base_map
+ '((highest 1.2)
+ (high 1.1)
+ (medium 1.0)
+ (default 1.0)
+ (low 0.9)
+ (lowest 0.8)))
+(defvar sable_pitch_med_map
+ '((highest 1.2)
+ (high 1.1)
+ (medium 1.0)
+ (default 1.0)
+ (low 0.9)
+ (lowest 0.8)))
+(defvar sable_pitch_range_map
+ '((largest 1.2)
+ (large 1.1)
+ (medium 1.0)
+ (default 1.0)
+ (small 0.9)
+ (smallest 0.8)))
+(defvar sable_rate_speed_map
+ '((fastest 1.5)
+ (fast 1.2)
+ (medium 1.0)
+ (default 1.0)
+ (slow 0.8)
+ (slowest 0.6)))
+(defvar sable_volume_level_map
+ '((loudest 2.0)
+ (loud 1.5)
+ (default 1.0)
+ (medium 1.0)
+ (quiet 0.5)))
+
+(define (sable_init_globals)
+ (set! utts nil)
+ (set! sable_omitted_mode nil)
+ (set! sable_word_features_stack nil)
+ (set! sable_pitch_context nil)
+ (set! sable_vol_context nil)
+ (set! sable_vol_type 'no_change)
+ (set! sable_vol_factor 1.0)
+ (set! sable_current_language 'britishenglish)
+ (set! sable_unsupported_language nil)
+ (set! sable_language_stack nil)
+ (set! sable_current_speaker 'voice_kal_diphone)
+ (set! sable_speaker_stack nil)
+)
+
+(define (sable_token_to_words token name)
+ "(sable_token_to_words utt token name)
+SABLE mode token specific analysis."
+ (cond
+ ((or sable_omitted_mode sable_unsupported_language)
+ ;; don't say anything (whole utterance)
+ nil)
+ ((string-equal "1" (item.feat token "done_sable_sub"))
+ ;; to catch recursive calls this when splitting up sub expressions
+ (sable_previous_token_to_words token name))
+ ((and (not (string-equal "0" (item.feat token "sable_sub")))
+ (string-equal "0" (item.feat token "p.sable_sub")))
+ (let (words (sub (item.feat token "sable_sub")))
+ (item.set_feat token "done_sable_sub" "1")
+ (set! words
+ (apply append
+ (mapcar
+ (lambda (w)
+ (set! www (sable_previous_token_to_words token w))
+ www)
+ (read-from-string sub))))
+ (item.set_feat token "done_sable_sub" "0")
+ words))
+ ((string-equal "1" (item.feat token "sable_ignore"))
+ ;; don't say anything (individual word)
+ nil)
+ ((string-equal "1" (item.feat token "sable_ipa"))
+ ;; Each token is an IPA phone
+ (item.set_feat token "phonemes" (sable-map-ipa name))
+ (list name))
+ ((string-equal "1" (item.feat token "sable_literal"))
+ ;; Only deal with spell here
+ (let ((subwords) (subword))
+ (item.set_feat token "pos" token.letter_pos)
+ (mapcar
+ (lambda (letter)
+ ;; might be symbols or digits
+ (set! subword (sable_previous_token_to_words token letter))
+ (if subwords
+ (set! subwords (append subwords subword))
+ (set! subwords subword)))
+ (symbolexplode name))
+ subwords))
+ ((not (string-equal "0" (item.feat token "token_pos")))
+ ;; bypass the prediction stage, if English
+ (if (member_string (Parameter.get 'Language)
+ '(britishenglish americanenglish))
+ (builtin_english_token_to_words token name)
+ (sable_previous_token_to_words token name)))
+ ;; could be others here later
+ (t
+ (sable_previous_token_to_words token name))))
+
+(defvar sable_elements
+'(
+ ("(SABLE" (ATTLIST UTT)
+ (eval (list sable_current_speaker)) ;; so we know what state we start in
+ (sable_setup_voice_params)
+ nil
+ )
+ (")SABLE" (ATTLIST UTT)
+ (xxml_synth UTT) ;; Synthesis the remaining tokens
+ nil
+ )
+ ;; Utterance break elements
+ ("(LANGUAGE" (ATTLIST UTT)
+ ;; Status: probably complete
+ (xxml_synth UTT)
+ (set! sable_language_stack
+ (cons
+ (list sable_current_language sable_unsupported_language)
+ sable_language_stack))
+ ;; Select a new language
+ (let ((language (upcase (car (xxml_attval "ID" ATTLIST)))))
+ (cond
+ ((or (string-equal language "SPANISH")
+ (string-equal language "ES"))
+ (set! sable_current_language 'spanish)
+ (set! sable_unsupported_language nil)
+ (select_language 'spanish))
+ ((or (string-equal language "ENGLISH")
+ (string-equal language "EN"))
+ (set! sable_current_language 'britishenglish)
+ (set! sable_unsupported_language nil)
+ (select_language 'britishenglish))
+ (t ;; skip languages you don't know
+ ;; BUG: if current language isn't English this wont work
+ (apply_hooks tts_hooks
+ (eval (list 'Utterance 'Text
+ (string-append "Some text in " language))))
+ (set! sable_unsupported_language t)))
+ nil))
+ (")LANGUAGE" (ATTLIST UTT)
+ (xxml_synth UTT)
+ (set! sable_unsupported_language (car (cdr (car sable_language_stack))))
+ (set! sable_current_language (car (car sable_language_stack)))
+ (set! sable_language_stack (cdr sable_language_stack))
+ (if (not sable_omitted_mode)
+ (begin
+ (select_language sable_current_language)
+ (sable_setup_voice_params)))
+ nil)
+ ("(SPEAKER" (ATTLIST UTT)
+ ;; Status: GENDER/AGE ignored, should be done by sable-def-speaker
+ ;; function to define Festival voices to SABLE
+ (xxml_synth UTT)
+ (set! sable_speaker_stack (cons sable_current_speaker sable_speaker_stack))
+ (cond
+ ((not equal? sable_current_language 'britishenglish)
+ (print "SABLE: choosen unknown voice, current voice unchanged"))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'male1)
+ (set! sable_current_speaker 'voice_kal_diphone)
+ (voice_kal_diphone))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'male2)
+ (set! sable_current_speaker 'voice_cmu_us_rms_cg)
+ (voice_cmu_us_rms_cg))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'male3)
+ (set! sable_current_speaker 'voice_ked_diphone)
+ (voice_ked_diphone))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'male4)
+ (set! sable_current_speaker 'voice_rab_diphone)
+ (voice_rab_diphone))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'male5)
+ (set! sable_current_speaker 'voice_cmu_us_awb_cg)
+ (voice_cmu_us_awb_cg))
+ ((equal? (car (xxml_attval "NAME" ATTLIST)) 'female1)
+ (set! sable_current_speaker 'voice_cmu_us_slt_cg)
+ (voice_us1_mbrola))
+ (t
+ (set! sable_current_speaker (intern (string-append "voice_" (car (xxml_attval "NAME" ATTLIST)))))
+ (eval (list sable_current_speaker))))
+ (sable_setup_voice_params)
+ nil)
+ (")SPEAKER" (ATTLIST UTT)
+ (xxml_synth UTT)
+ (set! sable_utt UTT)
+ (set! sable_current_speaker (car sable_speaker_stack))
+ (set! sable_speaker_stack (cdr sable_speaker_stack))
+ (eval (list sable_current_speaker))
+ (sable_setup_voice_params)
+ nil)
+ ("BREAK" (ATTLIST UTT)
+ ;; Status: probably complete
+ ;; may cause an utterance break
+ (let ((level (upcase (car (xxml_attval "LEVEL" ATTLIST)))))
+ (cond
+ ((null UTT) nil)
+ ((string-equal "LARGE" level)
+ (xxml_synth UTT)
+ nil)
+ (t
+ (let ((last_token (utt.relation.last UTT'Token)))
+ (if last_token
+ (item.set_feat last_token "pbreak" "B"))
+ UTT)))))
+ ("(DIV" (ATLIST UTT)
+ ;; Status: probably complete
+ (xxml_synth UTT)
+ nil)
+ ("AUDIO" (ATTLIST UTT)
+ ;; Status: MODE (background) ignored, only insertion supported
+ ;; mime type of file also ignored, as its LEVEL
+ (let ((tmpfile (make_tmp_filename)))
+ ;; ignoring mode-background (and will for sometime)
+ ;; ignoring level option
+ (xxml_synth UTT) ;; synthesizing anything ready to be synthesized
+ (get_url (car (xxml_attval "SRC" ATTLIST)) tmpfile)
+ (apply_hooks tts_hooks
+ (eval (list 'Utterance 'Wave tmpfile)))
+ (delete-file tmpfile)
+ nil))
+ ("(EMPH" (ATTLIST UTT)
+ ;; Status: nesting makes no difference, levels ignored
+ ;; Festival is particularly bad at adding specific emphasis
+ ;; that's what happens when you use statistical methods that
+ ;; don't include any notion of emphasis
+ ;; This is *not* recursive and only one level of EMPH supported
+ (sable_push_word_features)
+ (set! xxml_word_features
+ (cons (list "dur_stretch" 1.6)
+ (cons
+ (list "EMPH" "1") xxml_word_features)))
+ UTT)
+ (")EMPH" (ATTLIST UTT)
+ (set! xxml_word_features (sable_pop_word_features))
+ UTT)
+ ("(PITCH" (ATTLIST UTT)
+ ;; Status: probably complete
+ ;; At present festival requires an utterance break here
+ (xxml_synth UTT)
+ (set! sable_pitch_context (cons int_lr_params sable_pitch_context))
+ (let ((base (sable_interpret_param
+ (car (xxml_attval "BASE" ATTLIST))
+ sable_pitch_base_map
+ (cadr (assoc 'target_f0_mean int_lr_params))
+ sable_pitch_base_original))
+ (med (sable_interpret_param
+ (car (xxml_attval "MED" ATTLIST))
+ sable_pitch_med_map
+ (cadr (assoc 'target_f0_mean int_lr_params))
+ sable_pitch_med_original))
+ (range (sable_interpret_param
+ (car (xxml_attval "RANGE" ATTLIST))
+ sable_pitch_range_map
+ (cadr (assoc 'target_f0_std int_lr_params))
+ sable_pitch_range_original))
+ (oldmean (cadr (assoc 'target_f0_mean int_lr_params))))
+ ;; Festival (if it supports anything) supports mean and std
+ ;; so we treat base as med if med doesn't seem to do anything
+ (if (equal? med oldmean)
+ (set! med base))
+ (set! int_lr_params
+ (cons
+ (list 'target_f0_mean med)
+ (cons
+ (list 'target_f0_std range)
+ int_lr_params)))
+ nil))
+ (")PITCH" (ATTLIST UTT)
+ (xxml_synth UTT)
+ (set! int_lr_params (car sable_pitch_context))
+ (set! sable_pitch_context (cdr sable_pitch_context))
+ nil)
+ ("(RATE" (ATTLIST UTT)
+ ;; Status: can't deal with absolute word per minute SPEED.
+ (sable_push_word_features)
+ ;; can't deal with words per minute value
+ (let ((rate (sable_interpret_param
+ (car (xxml_attval "SPEED" ATTLIST))
+ sable_rate_speed_map
+ (sable_find_fval "dur_stretch" xxml_word_features 1.0)
+ sable_rate_speed_original)))
+ (set! xxml_word_features
+ (cons (list "dur_stretch" (/ 1.0 rate)) xxml_word_features))
+ UTT))
+ (")RATE" (ATTLIST UTT)
+ (set! xxml_word_features (sable_pop_word_features))
+ UTT)
+ ("(VOLUME" (ATTLIST UTT)
+ ;; Status: probably complete
+ ;; At present festival requires an utterance break here
+ (xxml_synth UTT)
+ (set! sable_vol_context (cons (list sable_vol_type sable_vol_factor)
+ sable_vol_context))
+ (let ((level (sable_interpret_param
+ (car (xxml_attval "LEVEL" ATTLIST))
+ sable_volume_level_map
+ sable_vol_factor
+ 1.0)))
+ (cond
+ ((string-matches (car (xxml_attval "LEVEL" ATTLIST)) ".*%")
+ (set! sable_vol_type 'relative))
+ ((string-matches (car (xxml_attval "LEVEL" ATTLIST)) SABLE_RXDOUBLE)
+ (set! sable_vol_type 'absolute))
+ (t
+ (set! sable_vol_type 'relative)))
+ (set! sable_vol_factor level))
+ nil)
+ (")VOLUME" (ATTLIST UTT)
+ (xxml_synth UTT)
+ (set! sable_vol_type (car (car sable_vol_context)))
+ (set! sable_vol_factor (car (cdr (car sable_vol_context))))
+ (set! sable_vol_context (cdr sable_vol_context))
+ nil)
+ ("(ENGINE" (ATTLIST UTT)
+ ;; Status: probably complete
+ (xxml_synth UTT)
+ (if (string-matches (car (xxml_attval "ID" ATTLIST)) "festival.*")
+ (let ((datastr ""))
+ (mapcar
+ (lambda (c) (set! datastr (string-append datastr " " c)))
+ (xxml_attval "DATA" ATTLIST))
+ (apply_hooks tts_hooks (eval (list 'Utterance 'Text datastr)))
+ (set! sable_omitted_mode t)) ;; ignore contents
+ ;; else
+ ;; its not relevant to me
+ )
+ nil)
+ (")ENGINE" (ATTLIST UTT)
+ (xxml_synth UTT)
+ (set! sable_omitted_mode nil)
+ nil)
+ ("MARKER" (ATTLIST UTT)
+ ;; Status: does nothing
+ ;; Can't support this without low-level control of audio spooler
+ (format t "SABLE: marker \"%s\"\n"
+ (car (xxml_attval "MARK" ATTLIST)))
+ UTT)
+ ("(PRON" (ATTLIST UTT)
+ ;; Status: IPA currently ignored
+ (sable_push_word_features)
+ ;; can't deal with words per minute value
+ (let ((ipa (xxml_attval "IPA" ATTLIST))
+ (sub (xxml_attval "SUB" ATTLIST)))
+ (cond
+ (ipa
+ (format t "SABLE: ipa ignored\n")
+ (set! xxml_word_features
+ (cons (list "sable_ignore" "1") xxml_word_features)))
+ (sub
+ (set! xxml_word_features
+ (cons (list "sable_sub" (format nil "%l" sub))
+ xxml_word_features))
+ (set! xxml_word_features
+ (cons (list "sable_ignore" "1") xxml_word_features))))
+ UTT))
+ (")PRON" (ATTLIST UTT)
+ (set! xxml_word_features (sable_pop_word_features))
+ UTT)
+ ("(SAYAS" (ATTLIST UTT)
+ ;; Status: only a few of the types are dealt with
+ (sable_push_word_features)
+ (set! sable_utt UTT)
+ ;; can't deal with words per minute value
+ (let ((mode (downcase (car (xxml_attval "MODE" ATTLIST))))
+ (modetype (car (xxml_attval "MODETYPE" ATTLIST))))
+ (cond
+ ((string-equal mode "literal")
+ (set! xxml_word_features
+ (cons (list "sable_literal" "1") xxml_word_features)))
+ ((string-equal mode "phone")
+ (set! xxml_word_features
+ (cons (list "token_pos" "digits") xxml_word_features)))
+ ((string-equal mode "ordinal")
+ (set! xxml_word_features
+ (cons (list "token_pos" "ordinal") xxml_word_features)))
+ ((string-equal mode "cardinal")
+ (set! xxml_word_features
+ (cons (list "token_pos" "cardinal") xxml_word_features)))
+ (t
+ ;; blindly trust festival to get it right
+ t))
+ UTT))
+ (")SAYAS" (ATTLIST UTT)
+ (set! xxml_word_features (sable_pop_word_features))
+ UTT)
+
+
+))
+
+(define (sable_init_func)
+ "(sable_init_func)
+Initialisation for SABLE mode"
+ (sable_init_globals)
+ (voice_kal_diphone)
+ (set! sable_previous_elements xxml_elements)
+ (set! xxml_elements sable_elements)
+ (set! sable_previous_token_to_words english_token_to_words)
+ (set! english_token_to_words sable_token_to_words)
+ (set! token_to_words sable_token_to_words))
+
+(define (sable_exit_func)
+ "(sable_exit_func)
+Exit function for SABLE mode"
+ (set! xxml_elements sable_previous_elements)
+ (set! token_to_words sable_previous_token_to_words)
+ (set! english_token_to_words sable_previous_token_to_words))
+
+(define (sable_push_word_features)
+"(sable_push_word_features)
+Save current word features on stack."
+ (set! sable_word_features_stack
+ (cons xxml_word_features sable_word_features_stack)))
+
+(define (sable_adjust_volume utt)
+ "(sable_adjust_volume utt)
+Amplify or attenutate signale based on value of sable_vol_factor
+and sable_vol_type (absolute or relative)."
+ (set! utts (cons utt utts))
+ (cond
+ ((equal? sable_vol_type 'no_change)
+ utt)
+ ((equal? sable_vol_type 'absolute)
+ (utt.wave.rescale utt sable_vol_factor 'absolute))
+ ((equal? sable_vol_type 'relative)
+ (utt.wave.rescale utt sable_vol_factor))
+ (t
+ (format stderr "SABLE: volume unknown type \"%s\"\n" sable_vol_type)
+ utt))
+ utt)
+
+(define (sable_pop_word_features)
+"(sable_pop_word_features)
+Pop word features from stack."
+ (let ((r (car sable_word_features_stack)))
+ (set! sable_word_features_stack (cdr sable_word_features_stack))
+ r))
+
+(define (sable_find_fval feat flist def)
+ (cond
+ ((null flist) def)
+ ((string-equal feat (car (car flist)))
+ (car (cdr (car flist))))
+ (t
+ (sable_find_fval feat (cdr flist) def))))
+
+(define (sable_interpret_param ident map original current)
+"(sable_interpret_param IDENT MAP ORIGINAL CURRENT)
+If IDENT is in map return ORIGINAL times value in map, otherwise
+treat IDENT of the form +/-N% and modify CURRENT accordingly."
+ (let ((mm (assoc ident map)))
+ (cond
+ (mm
+ (* original (car (cdr mm))))
+ ((string-matches ident SABLE_RXDOUBLE)
+ (parse-number ident))
+ ((string-matches ident ".*%")
+ (+ current (* current (/ (parse-number (string-before ident "%"))
+ 100.0))))
+;; ((string-matches ident ".*%")
+;; (* current (/ (parse-number (string-before ident "%")) 100.0)))
+ ((not ident) current)
+ (t
+ (format stderr "SABLE: modifier \"%s\" not of float, tag or +/-N\n"
+ ident)
+ current))))
+
+(define (sable_setup_voice_params)
+"(sable_setup_voice_params)
+Set up original values for various voice parameters."
+ (set! sable_pitch_base_original (cadr (assoc 'target_f0_mean int_lr_params)))
+ (set! sable_pitch_med_original (cadr (assoc 'target_f0_mean int_lr_params)))
+ (set! sable_pitch_range_original (cadr (assoc 'target_f0_std int_lr_params)))
+ (set! sable_rate_speed_original 1.0)
+ (if (and after_synth_hooks (not (consp after_synth_hooks)))
+ (set! after_synth_hooks
+ (cons after_synth_hooks (list sable_adjust_volume)))
+ (set! after_synth_hooks
+ (append after_synth_hooks (list sable_adjust_volume))))
+)
+
+;;; Declare the new mode to Festival
+(set! tts_text_modes
+ (cons
+ (list
+ 'sable ;; mode name
+ (list
+ (list 'init_func sable_init_func)
+ (list 'exit_func sable_exit_func)
+ '(analysis_type xml)
+ ))
+ tts_text_modes))
+
+(provide 'sable-mode)
diff --git a/CosyVoice-ttsfrd/resource/festival/scfg_wsj_wp20.gram b/CosyVoice-ttsfrd/resource/festival/scfg_wsj_wp20.gram
new file mode 100644
index 0000000000000000000000000000000000000000..2df54146c494981119c42bf25f61098ab2f4e4b6
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/scfg_wsj_wp20.gram
@@ -0,0 +1,523 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-*-mode:scheme-*-
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; A Stochastic context free grammar for the wp20 tag set with 19
+;;; nonterminals
+;;;
+;;; This was trained from 10,000 sentences (00-04) of the UPenn WSJ tree
+;;; bank using the inside-outside algorithm seeded with the bracketing from
+;;; the treebank. The implementation is the scfg_ suite in the
+;; speech tools and is based on the paper "Inside-Outside
+;;; Reestimation from partially bracketed corpora", F Pereira and
+;;; Y. Schabes. pp 128-135, 30th ACL, Newark, Delaware 1992.
+;;;
+;;; This grammar with 19 nonterminals was trained for 174 passes
+;;; using a fifth of training data each time. It was tested against
+;;; independent data both bracketed and unbracketed. After training,
+;;; all rules with a probability less than 1.0e-6 were pruned.
+;;;
+;;; On an unseen test set of 686 sentences (from wsj/05/) this gets
+;;; 92.2397% bracketing accuracy and 29.5918% sentences fully correct
+;;;
+;;; previous best 15_20 grammar
+;;; 90.2377% bracketing accuracy and 24.7813% sentences fully correct
+;;;
+;;; Training this grammar took a long time. This is best grammar
+;;; by testing grammars varying the number of non-terminals from 11-25
+;;; as the number of NTs increases the time for training also increases
+;;; This 19_20 grammar took 20 days on a Sun Ultra 1 140, but I also
+;;; had to search 11-18 to confirm this is best, which was done with a
+;;; collection of Ultra 140s 170s and Pentium Pros (Linux and FreeBSD)
+;;;
+(0.00593452 NT00 NT00 NT00)
+(0.0319023 NT00 NT00 NT13)
+(0.00105452 NT00 NT00 NT18)
+(0.00061816 NT00 NT02 NT10)
+(0.000399698 NT00 NT02 NT12)
+(0.0383818 NT00 NT05 NT00)
+(0.00011458 NT00 NT06 NT03)
+(0.00164298 NT00 NT06 NT17)
+(0.00153884 NT00 NT07 NT07)
+(0.00118244 NT00 NT07 NT12)
+(0.00171642 NT00 NT07 NT13)
+(0.00031308 NT00 NT07 NT17)
+(0.0949408 NT00 NT09 NT18)
+(0.000932166 NT00 NT10 NT03)
+(0.000150288 NT00 NT10 NT17)
+(0.0152371 NT00 NT12 NT18)
+(0.73409 NT00 NT14 NT13)
+(0.0403652 NT00 NT14 NT18)
+(0.000195643 NT00 NT16 NT07)
+(0.0134222 NT00 NT18 NT13)
+(0.015624 NT00 NT18 NT18)
+(0.00251118 NT01 NT01 NT07)
+(0.00354571 NT01 NT01 NT11)
+(0.22337 NT01 NT01 NT16)
+(0.0467048 NT01 NT02 NT05)
+(0.000518329 NT01 NT04 NT01)
+(0.000100574 NT01 NT06 NT05)
+(0.0480904 NT01 NT07 NT05)
+(0.000358197 NT01 NT11 NT11)
+(0.00278007 NT01 NT16 NT05)
+(0.000179198 NT01 NT16 NT15)
+(0.00140099 NT01 n)
+(0.00228587 NT01 v)
+(0.524988 NT01 dt)
+(0.00128028 NT01 in)
+(0.0660845 NT01 j)
+(0.0131026 NT01 cd)
+(0.00584238 NT01 r)
+(0.0548382 NT01 prp)
+(0.000445004 NT01 wdt)
+(0.00135794 NT01 wp)
+(0.000195991 NT01 wrb)
+(0.000264526 NT02 NT01 NT01)
+(0.00243627 NT02 NT01 NT02)
+(0.613543 NT02 NT01 NT07)
+(0.00180865 NT02 NT01 NT11)
+(0.0042804 NT02 NT01 NT16)
+(0.0392418 NT02 NT02 NT07)
+(0.026104 NT02 NT02 NT12)
+(0.000916683 NT02 NT02 NT16)
+(0.00158862 NT02 NT04 NT01)
+(0.000206161 NT02 NT04 NT02)
+(0.00343189 NT02 NT04 NT16)
+(0.000417113 NT02 NT07 NT05)
+(0.0988457 NT02 NT07 NT07)
+(0.000931386 NT02 NT07 NT11)
+(0.00073236 NT02 NT07 NT12)
+(0.000153421 NT02 NT10 NT13)
+(0.00163484 NT02 NT11 NT02)
+(0.0379562 NT02 NT11 NT07)
+(0.0149 NT02 NT11 NT11)
+(0.00105811 NT02 NT11 NT12)
+(0.000175184 NT02 NT16 NT02)
+(0.0403395 NT02 NT16 NT07)
+(0.00297703 NT02 NT16 NT12)
+(0.0875026 NT02 n)
+(0.00496719 NT02 v)
+(0.000409658 NT02 dt)
+(0.00239978 NT02 j)
+(0.010203 NT02 r)
+(0.000194628 NT02 pdt)
+(0.000377009 NT03 NT04 NT02)
+(0.11551 NT03 NT08 NT13)
+(0.347629 NT03 NT09 NT13)
+(0.484911 NT03 NT10 NT13)
+(0.00188291 NT03 NT11 NT12)
+(0.0495461 NT03 NT17 NT13)
+(0.00918797 NT04 NT03 NT05)
+(0.000303954 NT04 NT04 NT02)
+(0.00284848 NT04 NT04 NT04)
+(0.00710115 NT04 NT04 NT12)
+(0.000597744 NT04 NT04 NT15)
+(0.000377075 NT04 NT04 NT16)
+(0.00130088 NT04 NT09 NT05)
+(0.00175428 NT04 NT10 NT13)
+(0.000127716 NT04 NT15 NT04)
+(0.00013648 NT04 NT15 NT06)
+(0.00045093 NT04 NT15 NT07)
+(0.000626479 NT04 NT15 NT16)
+(0.000563588 NT04 NT16 NT15)
+(0.0232089 NT04 NT17 NT05)
+(0.000138094 NT04 NT17 NT15)
+(0.00094009 NT04 n)
+(0.671108 NT04 v)
+(0.0150619 NT04 punc)
+(0.00056566 NT04 dt)
+(0.144629 NT04 r)
+(0.00270621 NT04 prp)
+(0.0449587 NT04 to)
+(0.0543755 NT04 md)
+(0.00839747 NT04 wdt)
+(0.00813689 NT04 wp)
+(0.000560496 NT05 NT07 NT05)
+(0.000901219 NT05 NT15 NT07)
+(0.180172 NT05 punc)
+(0.533041 NT05 cc)
+(0.285244 NT05 pos)
+(0.00164003 NT06 NT00 NT13)
+(0.00222915 NT06 NT01 NT06)
+(0.275903 NT06 NT01 NT07)
+(0.00191616 NT06 NT01 NT11)
+(0.00316549 NT06 NT01 NT12)
+(0.000730143 NT06 NT01 NT14)
+(0.000559842 NT06 NT02 NT06)
+(0.0236744 NT06 NT02 NT07)
+(0.00284929 NT06 NT02 NT09)
+(0.155052 NT06 NT02 NT12)
+(0.00387995 NT06 NT02 NT14)
+(0.0161403 NT06 NT02 NT18)
+(0.000110944 NT06 NT04 NT01)
+(0.00237845 NT06 NT04 NT02)
+(0.00625142 NT06 NT04 NT06)
+(0.00118802 NT06 NT04 NT08)
+(0.000132901 NT06 NT04 NT10)
+(0.000192545 NT06 NT04 NT11)
+(0.000199118 NT06 NT06 NT01)
+(0.0081704 NT06 NT06 NT12)
+(0.00198439 NT06 NT06 NT14)
+(0.000889455 NT06 NT06 NT18)
+(0.00142038 NT06 NT07 NT05)
+(0.0820095 NT06 NT07 NT07)
+(0.000112894 NT06 NT07 NT09)
+(0.0220243 NT06 NT07 NT12)
+(0.000133911 NT06 NT07 NT14)
+(0.00100807 NT06 NT07 NT17)
+(0.000191764 NT06 NT08 NT13)
+(0.000340112 NT06 NT10 NT08)
+(0.000126776 NT06 NT10 NT09)
+(0.0136266 NT06 NT10 NT12)
+(0.00867414 NT06 NT10 NT13)
+(0.00341334 NT06 NT10 NT18)
+(0.00154851 NT06 NT11 NT12)
+(0.00104947 NT06 NT12 NT12)
+(0.000219189 NT06 NT14 NT05)
+(0.00313879 NT06 NT14 NT13)
+(0.000745073 NT06 NT15 NT02)
+(0.000433144 NT06 NT15 NT06)
+(0.000159867 NT06 NT15 NT16)
+(0.00124313 NT06 NT16 NT02)
+(0.00918606 NT06 NT16 NT07)
+(0.00373496 NT06 NT16 NT12)
+(0.014053 NT06 NT18 NT13)
+(0.0155714 NT06 n)
+(0.00123379 NT06 punc)
+(0.0152764 NT06 dt)
+(0.00123486 NT06 j)
+(0.00359625 NT06 r)
+(0.212966 NT06 prp)
+(0.00199168 NT06 cc)
+(0.0383471 NT06 wdt)
+(0.0182587 NT06 wp)
+(0.00204833 NT06 wrb)
+(0.0109929 NT06 ex)
+(0.0011995 NT07 NT05 NT16)
+(0.119588 NT07 NT07 NT07)
+(0.000353596 NT07 NT07 NT11)
+(0.000177793 NT07 NT07 NT12)
+(0.00101956 NT07 NT11 NT11)
+(0.000357614 NT07 NT15 NT01)
+(0.00084812 NT07 NT15 NT06)
+(0.0182872 NT07 NT16 NT07)
+(0.00018607 NT07 NT16 NT11)
+(0.856315 NT07 n)
+(0.000736333 NT07 v)
+(0.000645479 NT08 NT00 NT09)
+(0.000990156 NT08 NT01 NT02)
+(0.0410251 NT08 NT01 NT07)
+(0.0013863 NT08 NT01 NT09)
+(0.000242552 NT08 NT01 NT12)
+(0.00174478 NT08 NT01 NT14)
+(0.000596656 NT08 NT01 NT16)
+(0.00130945 NT08 NT02 NT07)
+(0.166303 NT08 NT02 NT09)
+(0.0143253 NT08 NT02 NT12)
+(0.0113813 NT08 NT02 NT14)
+(0.000597887 NT08 NT02 NT16)
+(0.0133053 NT08 NT03 NT09)
+(0.0109076 NT08 NT03 NT17)
+(0.000211313 NT08 NT04 NT01)
+(0.0105796 NT08 NT04 NT02)
+(0.00440181 NT08 NT04 NT04)
+(0.00203737 NT08 NT04 NT06)
+(0.213275 NT08 NT04 NT08)
+(0.0781169 NT08 NT04 NT09)
+(0.0190657 NT08 NT04 NT10)
+(0.00319326 NT08 NT04 NT12)
+(0.000693766 NT08 NT04 NT15)
+(0.00112226 NT08 NT04 NT16)
+(0.00117025 NT08 NT06 NT02)
+(0.00807496 NT08 NT06 NT08)
+(0.0183971 NT08 NT06 NT09)
+(0.00127343 NT08 NT06 NT14)
+(0.0322725 NT08 NT06 NT17)
+(0.00396897 NT08 NT07 NT07)
+(0.0154729 NT08 NT07 NT09)
+(0.000708139 NT08 NT07 NT10)
+(0.00186499 NT08 NT07 NT11)
+(0.000701346 NT08 NT07 NT14)
+(0.0116278 NT08 NT08 NT09)
+(0.0965117 NT08 NT10 NT09)
+(0.000142086 NT08 NT10 NT12)
+(0.000210725 NT08 NT10 NT14)
+(0.00336223 NT08 NT11 NT07)
+(0.00183799 NT08 NT11 NT09)
+(0.00109249 NT08 NT11 NT11)
+(0.000880671 NT08 NT11 NT12)
+(0.0032493 NT08 NT12 NT08)
+(0.0372072 NT08 NT12 NT09)
+(0.00113127 NT08 NT12 NT12)
+(0.00892231 NT08 NT15 NT02)
+(0.00383754 NT08 NT15 NT06)
+(0.000528365 NT08 NT15 NT07)
+(0.0060705 NT08 NT15 NT08)
+(0.00853698 NT08 NT15 NT10)
+(0.0349777 NT08 NT15 NT14)
+(0.000202857 NT08 NT16 NT06)
+(0.00709689 NT08 NT16 NT07)
+(0.000240097 NT08 NT16 NT08)
+(0.0401819 NT08 NT16 NT09)
+(0.00124754 NT08 NT16 NT14)
+(0.00862498 NT08 n)
+(0.0115193 NT08 v)
+(0.000974267 NT08 in)
+(0.0169837 NT08 j)
+(0.00626434 NT08 r)
+(0.00437851 NT08 prp)
+(0.0062359 NT09 NT01 NT07)
+(0.000165196 NT09 NT01 NT14)
+(0.00151872 NT09 NT02 NT04)
+(0.000660061 NT09 NT02 NT15)
+(0.000434321 NT09 NT02 NT16)
+(0.00805872 NT09 NT03 NT09)
+(0.000180982 NT09 NT04 NT08)
+(0.050609 NT09 NT04 NT09)
+(0.000307442 NT09 NT04 NT15)
+(0.00281491 NT09 NT04 NT17)
+(0.000295911 NT09 NT06 NT15)
+(0.00133828 NT09 NT07 NT11)
+(0.0235741 NT09 NT12 NT09)
+(0.00121997 NT09 NT12 NT12)
+(0.00391762 NT09 NT15 NT01)
+(0.173027 NT09 NT15 NT02)
+(0.000462089 NT09 NT15 NT06)
+(0.0276663 NT09 NT15 NT07)
+(0.210483 NT09 NT15 NT08)
+(0.000177004 NT09 NT15 NT09)
+(0.243402 NT09 NT15 NT10)
+(0.0174403 NT09 NT15 NT11)
+(0.00646962 NT09 NT15 NT12)
+(0.155174 NT09 NT15 NT14)
+(0.00930502 NT09 NT15 NT17)
+(0.000311399 NT09 NT16 NT02)
+(0.0052031 NT09 NT16 NT07)
+(0.00742336 NT09 NT16 NT09)
+(0.000409254 NT09 in)
+(0.0019424 NT09 j)
+(0.0393282 NT09 r)
+(0.00016039 NT09 prp)
+(0.00268682 NT10 NT01 NT07)
+(0.00173594 NT10 NT01 NT09)
+(0.00550051 NT10 NT01 NT10)
+(0.00269002 NT10 NT01 NT11)
+(0.00881491 NT10 NT01 NT12)
+(0.0158503 NT10 NT02 NT02)
+(0.00229071 NT10 NT02 NT07)
+(0.00765082 NT10 NT02 NT09)
+(0.00102327 NT10 NT02 NT11)
+(0.474288 NT10 NT02 NT12)
+(0.0119086 NT10 NT02 NT14)
+(0.000270767 NT10 NT02 NT15)
+(0.00425023 NT10 NT02 NT16)
+(0.0533347 NT10 NT04 NT02)
+(0.00286524 NT10 NT04 NT06)
+(0.0687658 NT10 NT04 NT10)
+(0.0157381 NT10 NT04 NT12)
+(0.000809508 NT10 NT05 NT12)
+(0.00188343 NT10 NT06 NT04)
+(0.000155481 NT10 NT06 NT09)
+(0.00569591 NT10 NT06 NT14)
+(0.00233367 NT10 NT06 NT17)
+(0.000189475 NT10 NT07 NT05)
+(0.018548 NT10 NT07 NT07)
+(0.00472354 NT10 NT07 NT09)
+(0.0121145 NT10 NT07 NT11)
+(0.0698482 NT10 NT07 NT12)
+(0.000402661 NT10 NT07 NT16)
+(0.00183044 NT10 NT07 NT17)
+(0.00166519 NT10 NT10 NT02)
+(0.015445 NT10 NT10 NT09)
+(0.019208 NT10 NT10 NT12)
+(0.000942866 NT10 NT10 NT18)
+(0.00149941 NT10 NT11 NT01)
+(0.00624706 NT10 NT11 NT02)
+(0.0381755 NT10 NT11 NT11)
+(0.00754256 NT10 NT11 NT12)
+(0.00139213 NT10 NT15 NT02)
+(0.000523505 NT10 NT15 NT06)
+(0.0015256 NT10 NT15 NT10)
+(0.00119525 NT10 NT15 NT12)
+(0.00683524 NT10 NT16 NT02)
+(0.000398591 NT10 NT16 NT04)
+(0.0701558 NT10 NT16 NT07)
+(0.00198721 NT10 NT16 NT11)
+(0.0075364 NT10 NT16 NT12)
+(0.0186618 NT10 n)
+(0.000591828 NT10 uh)
+(0.157827 NT11 NT11 NT11)
+(0.0422576 NT11 NT15 NT11)
+(0.00247895 NT11 NT15 NT16)
+(0.000257833 NT11 dt)
+(0.754818 NT11 cd)
+(0.0421123 NT11 r)
+(0.00236916 NT12 NT01 NT07)
+(0.000118511 NT12 NT02 NT16)
+(0.00638739 NT12 NT04 NT02)
+(0.0055731 NT12 NT04 NT04)
+(0.0340903 NT12 NT04 NT12)
+(0.00102031 NT12 NT04 NT15)
+(0.00143793 NT12 NT04 NT16)
+(0.000102621 NT12 NT04 NT17)
+(0.0032774 NT12 NT06 NT04)
+(0.000366976 NT12 NT07 NT07)
+(0.00218153 NT12 NT07 NT11)
+(0.0117989 NT12 NT11 NT07)
+(0.00303601 NT12 NT12 NT12)
+(0.0747798 NT12 NT13 NT03)
+(0.000232806 NT12 NT15 NT01)
+(0.341016 NT12 NT15 NT02)
+(0.0190932 NT12 NT15 NT06)
+(0.100931 NT12 NT15 NT07)
+(0.193386 NT12 NT15 NT10)
+(0.0142796 NT12 NT15 NT11)
+(0.000915196 NT12 NT16 NT07)
+(0.000299768 NT12 NT16 NT11)
+(0.0135637 NT12 NT16 NT12)
+(0.115493 NT12 n)
+(0.00344871 NT12 v)
+(0.0262404 NT12 punc)
+(0.000493049 NT12 in)
+(0.00235382 NT12 j)
+(0.0192274 NT12 r)
+(0.00199831 NT12 prp)
+(0.000209376 NT13 NT11 NT15)
+(0.00188858 NT13 NT13 NT03)
+(0.540855 NT13 punc)
+(0.00804226 NT13 cc)
+(0.000413617 NT14 NT00 NT09)
+(0.0218326 NT14 NT00 NT14)
+(0.000451496 NT14 NT00 NT18)
+(0.00149459 NT14 NT01 NT07)
+(0.00384046 NT14 NT01 NT17)
+(0.00138254 NT14 NT02 NT09)
+(0.0525259 NT14 NT03 NT14)
+(0.000893974 NT14 NT04 NT02)
+(0.000175088 NT14 NT04 NT06)
+(0.000478859 NT14 NT04 NT08)
+(0.00086439 NT14 NT04 NT09)
+(0.00529624 NT14 NT04 NT10)
+(0.000476852 NT14 NT04 NT12)
+(0.00549502 NT14 NT04 NT14)
+(0.0281873 NT14 NT05 NT14)
+(0.76715 NT14 NT06 NT17)
+(0.00303311 NT14 NT07 NT07)
+(0.00027137 NT14 NT07 NT09)
+(0.000748841 NT14 NT07 NT12)
+(0.0874896 NT14 NT07 NT17)
+(0.00416962 NT14 NT09 NT14)
+(0.00175999 NT14 NT10 NT09)
+(0.000710869 NT14 NT11 NT17)
+(0.000723932 NT14 NT12 NT07)
+(0.00440147 NT14 NT12 NT14)
+(0.000761726 NT14 NT14 NT09)
+(0.00084762 NT14 NT14 NT17)
+(0.000323644 NT14 NT15 NT02)
+(0.00264492 NT14 NT15 NT14)
+(0.000238841 NT14 NT16 NT07)
+(0.000126025 NT14 NT16 NT09)
+(0.000217731 NT14 r)
+(0.00024161 NT14 wrb)
+(0.000366989 NT15 NT04 NT04)
+(0.00127143 NT15 NT04 NT15)
+(0.00137902 NT15 NT11 NT07)
+(0.000109067 NT15 NT15 NT04)
+(0.00380199 NT15 NT15 NT06)
+(0.000193842 NT15 NT15 NT15)
+(0.000253898 NT15 NT15 NT16)
+(0.00556123 NT15 v)
+(0.0798535 NT15 punc)
+(0.557206 NT15 in)
+(0.0519477 NT15 cc)
+(0.170466 NT15 of)
+(0.113587 NT15 to)
+(0.0125211 NT15 wrb)
+(0.00146961 NT15 pdt)
+(0.000682686 NT16 NT01 NT16)
+(0.000353409 NT16 NT02 NT02)
+(0.0034721 NT16 NT02 NT05)
+(0.00392739 NT16 NT04 NT04)
+(0.0225952 NT16 NT04 NT16)
+(0.00368407 NT16 NT05 NT16)
+(0.000275916 NT16 NT06 NT05)
+(0.0263102 NT16 NT07 NT05)
+(0.00344251 NT16 NT07 NT12)
+(0.00271063 NT16 NT07 NT16)
+(0.000950873 NT16 NT10 NT13)
+(0.0229124 NT16 NT11 NT07)
+(0.0173136 NT16 NT11 NT11)
+(0.0094147 NT16 NT11 NT16)
+(0.00210054 NT16 NT13 NT03)
+(0.000417271 NT16 NT15 NT01)
+(0.0100377 NT16 NT15 NT11)
+(0.000679194 NT16 NT16 NT05)
+(0.00203961 NT16 NT16 NT11)
+(0.00352444 NT16 NT16 NT12)
+(0.0133536 NT16 NT16 NT16)
+(0.0041124 NT16 n)
+(0.0518387 NT16 v)
+(0.0133556 NT16 punc)
+(0.746857 NT16 j)
+(0.0325454 NT16 cd)
+(0.000994964 NT16 r)
+(0.000325555 NT17 NT03 NT09)
+(0.000431668 NT17 NT03 NT17)
+(0.000283523 NT17 NT04 NT01)
+(0.00308221 NT17 NT04 NT02)
+(0.000106449 NT17 NT04 NT07)
+(0.584517 NT17 NT04 NT08)
+(0.0389749 NT17 NT04 NT09)
+(0.00927257 NT17 NT04 NT10)
+(0.000698039 NT17 NT04 NT11)
+(0.0594712 NT17 NT04 NT14)
+(0.000381951 NT17 NT04 NT16)
+(0.248255 NT17 NT04 NT17)
+(0.000264379 NT17 NT05 NT08)
+(0.00194384 NT17 NT05 NT10)
+(0.000308808 NT17 NT05 NT14)
+(0.000271388 NT17 NT07 NT08)
+(0.000131093 NT17 NT07 NT10)
+(0.00011195 NT17 NT07 NT17)
+(0.000462643 NT17 NT08 NT09)
+(0.00153331 NT17 NT11 NT07)
+(0.00214335 NT17 NT11 NT11)
+(0.000307068 NT17 NT11 NT12)
+(0.000550528 NT17 NT15 NT10)
+(0.000125644 NT17 NT16 NT02)
+(0.000474489 NT17 NT17 NT09)
+(0.00032483 NT17 NT17 NT18)
+(0.045027 NT17 v)
+(0.00425503 NT18 NT07 NT18)
+(0.978831 NT18 NT13 NT00)
+(0.00130119 NT18 NT13 NT03)
+(0.0155958 NT18 NT17 NT13)
diff --git a/CosyVoice-ttsfrd/resource/festival/sec.B.hept.ngrambin b/CosyVoice-ttsfrd/resource/festival/sec.B.hept.ngrambin
new file mode 100644
index 0000000000000000000000000000000000000000..3434e0f5736b3582c1ca3d53b1a4b5c50aed9172
Binary files /dev/null and b/CosyVoice-ttsfrd/resource/festival/sec.B.hept.ngrambin differ
diff --git a/CosyVoice-ttsfrd/resource/festival/sec.ts20.quad.ngrambin b/CosyVoice-ttsfrd/resource/festival/sec.ts20.quad.ngrambin
new file mode 100644
index 0000000000000000000000000000000000000000..3b35f451bc36c3122ad5a5b2baf63991d9d029d1
Binary files /dev/null and b/CosyVoice-ttsfrd/resource/festival/sec.ts20.quad.ngrambin differ
diff --git a/CosyVoice-ttsfrd/resource/festival/siteinit.scm b/CosyVoice-ttsfrd/resource/festival/siteinit.scm
new file mode 100644
index 0000000000000000000000000000000000000000..61f048dfe1939fe6323a3f9dec7efbe0057857ac
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/siteinit.scm
@@ -0,0 +1,65 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Site specific initialisation file
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; If festival's internal audio playing support doesn't work on your
+;; machine you can make Festival use your own program to play waveform
+;; files. Uncomment the following and change "play" to the name of
+;; your local program that can play files
+
+;(Parameter.set 'Audio_Required_Format 'riff)
+;(Parameter.set 'Audio_Method 'Audio_Command)
+
+;; Apple OSX (if you can file afplay)
+;(Parameter.set 'Audio_Command "afplay $FILE")
+
+;; SOX (play) often a good alternative on cygwin and linux
+;(Parameter.set 'Audio_Command "play -q $FILE")
+
+;; Windows 7 (when sox's play doesn't work -- but this might not exit)
+;(Parameter.set 'Audio_Command "c:/Windows/System32/WindowsPowerShell/v1.0/powershell -c '(New-Object Media.Soundplayer C:/cygwin'$FILE').PlaySync(); Exit;'")
+
+;; If you want a voice different from the system installed default
+;; uncomment the following line and change the name to the voice you
+;; want
+
+;(set! voice_default 'voice_cmu_us_awb_arctic_hts)
+
+(provide 'siteinit)
+
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/speech.properties b/CosyVoice-ttsfrd/resource/festival/speech.properties
new file mode 100644
index 0000000000000000000000000000000000000000..507a5197951156291622c5c71cf561c3cb7d6db2
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/speech.properties
@@ -0,0 +1,2 @@
+# Register speech engines
+cstr.festival.EngineCentral=cstr.festival.jsapi.EngineCentral
diff --git a/CosyVoice-ttsfrd/resource/festival/synthesis.scm b/CosyVoice-ttsfrd/resource/festival/synthesis.scm
new file mode 100644
index 0000000000000000000000000000000000000000..69c5d56995162a77d5f83b474218ade57ec69ffd
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/synthesis.scm
@@ -0,0 +1,443 @@
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Centre for Speech Technology Research ;;
+ ;; University of Edinburgh, UK ;;
+ ;; Copyright (c) 1996,1997 ;;
+ ;; All Rights Reserved. ;;
+ ;; ;;
+ ;; Permission is hereby granted, free of charge, to use and distribute ;;
+ ;; this software and its documentation without restriction, including ;;
+ ;; without limitation the rights to use, copy, modify, merge, publish, ;;
+ ;; distribute, sublicense, and/or sell copies of this work, and to ;;
+ ;; permit persons to whom this work is furnished to do so, subject to ;;
+ ;; the following conditions: ;;
+ ;; 1. The code must retain the above copyright notice, this list of ;;
+ ;; conditions and the following disclaimer. ;;
+ ;; 2. Any modifications must be clearly marked as such. ;;
+ ;; 3. Original authors' names are not deleted. ;;
+ ;; 4. The authors' names are not used to endorse or promote products ;;
+ ;; derived from this software without specific prior written ;;
+ ;; permission. ;;
+ ;; ;;
+ ;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+ ;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+ ;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+ ;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+ ;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+ ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+ ;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+ ;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+ ;; THIS SOFTWARE. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Author: Richard Caley (rjc@cstr.ed.ac.uk) ;;
+ ;; Date: Fri Aug 15 1997 ;;
+ ;; ------------------------------------------------------------------- ;;
+ ;; New synthesis mainline. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Hooks to add to the synthesis process. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defvar default_before_synth_hooks nil
+ "default_before_synth_hooks
+ The default list of functions to be run on all synthesized utterances
+ before synthesis starts.")
+
+(defvar before_synth_hooks default_before_synth_hooks
+ "before_synth_hooks
+ List of functions to be run on synthesised utterances before synthesis
+ starts.")
+
+(defvar default_after_analysis_hooks nil
+ "default_after_analysis_hooks
+ The default list of functions to be run on all synthesized utterances
+ after analysis but before synthesis.")
+
+(defvar after_analysis_hooks default_after_analysis_hooks
+ "after_analysis_hooks
+ List of functions to be applied after analysis and before synthesis.")
+
+(defvar default_after_synth_hooks nil
+ "default_after_synth_hooks
+ The default list of functions to be run on all synthesized utterances
+ after Wave_Synth. This will normally be nil but if for some reason you
+ need to change the gain or rescale *all* waveforms you could set the
+ function here, in your siteinit.scm.")
+
+(defvar after_synth_hooks default_after_synth_hooks
+ "after_synth_hooks
+ List of functions to be applied after all synthesis modules have been
+ applied. This is primarily designed to allow waveform manipulation,
+ particularly resampling and volume changes.")
+
+(defvar default_access_strategy 'ondemand
+ "default_access_strategy
+ How to access units from databases.")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Macro to define utterance types. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defmac (defUttType form)
+ (list 'defUttType_real
+ (list 'quote (cadr form))
+ (list 'quote (cddr form))))
+
+(defvar UttTypes nil
+ "UttTypes
+ List of types and functions used by the utt.synth function to call
+ appropriate methods.")
+
+(define (defUttType_real type form)
+ "(defUttType TYPE . BODY)
+ Define a new utterance type. TYPE is an atomic type that is specified
+ as the first argument to the function Utterance. BODY is evaluated
+ with argument utt, when utt.synth is called with an utterance of type
+ TYPE. You almost always require the function Initialize first.
+ [see Utterance types]"
+ ;;; Yes I am cheating a bit with the macro/function name.
+ ;;; should check about redefining and the syntax of the forms
+ (set! UttTypes
+ (cons
+ (cons type form)
+ UttTypes))
+ type)
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Macro to define synthesis types. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defmac (defSynthType form)
+ (list 'defSynthType_real
+ (list 'quote (cadr form))
+ (list 'quote (cddr form))))
+
+(defvar SynthTypes nil
+ "SynthTypes
+ List of synthesis types and functions used by the utt.synth function to
+ call appropriate methods for wave synthesis.")
+
+(define (defSynthType_real type form)
+ "(defSynthType TYPE . BODY)
+ Define a new wave synthesis type. TYPE is an atomic type that
+ identifies the type of synthesis. BODY is evaluated with argument
+ utt, when utt.synth is called with an utterance of type TYPE.
+ [see Utterance types]"
+
+ (set! SynthTypes
+ (cons
+ (cons type form)
+ SynthTypes))
+ type)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Some actual Utterance type definitions
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defUttType Words
+ (Initialize utt)
+ (POS utt)
+ (Phrasify utt)
+ (Word utt)
+ (Pauses utt)
+ (Intonation utt)
+ (PostLex utt)
+ (Duration utt)
+ (Int_Targets utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Text
+ (Initialize utt)
+ (Text utt)
+ (Token_POS utt)
+ (Token utt)
+ (POS utt)
+ (Phrasify utt)
+ (Word utt)
+ (Pauses utt)
+ (Intonation utt)
+ (PostLex utt)
+ (Duration utt)
+ (Int_Targets utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Tokens ;; This is used in tts_file, Tokens will be preloaded
+ (Token_POS utt) ;; when utt.synth is called
+ (Token utt)
+ (POS utt)
+ (Phrasify utt)
+ (Word utt)
+ (Pauses utt)
+ (Intonation utt)
+ (PostLex utt)
+ (Duration utt)
+ (Int_Targets utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Concept ;; rather gradious name for when information has
+ (POS utt) ;; been preloaded (probably XML) to give a word
+ (Phrasify utt) ;; relation (SOLE uses this)
+ (Word utt)
+ (Pauses utt)
+ (Intonation utt)
+ (PostLex utt)
+ (Duration utt)
+ (Int_Targets utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Phrase
+ (Initialize utt)
+ (Token_POS utt)
+ (Token utt)
+ (POS utt)
+ (Phrasify utt)
+ (Word utt)
+ (Pauses utt)
+ (Intonation utt)
+ (PostLex utt)
+ (Duration utt)
+ (Int_Targets utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Segments
+ (Initialize utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType Phones
+ (Initialize utt)
+ (Fixed_Prosody utt)
+ (Wave_Synth utt)
+ )
+
+(defUttType SegF0
+ (Wave_Synth utt)
+ )
+
+(defUttType Wave
+ (Initialize utt))
+
+
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; And some synthesis types. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defSynthType Taylor
+ (Taylor_Synthesize utt)
+ )
+
+(defSynthType UniSyn
+ (defvar UniSyn_module_hooks nil)
+ (Param.def "unisyn.window_name" "hanning")
+ (Param.def "unisyn.window_factor" 1.0)
+ (Parameter.def 'us_sigpr 'lpc)
+
+ (apply_hooks UniSyn_module_hooks utt) ;; for processing of diphone names
+ (us_get_diphones utt)
+ (us_unit_concat utt)
+
+ (if (not (member 'f0 (utt.relationnames utt)))
+ (targets_to_f0 utt))
+;; temporary fix
+ (if (utt.relation.last utt 'Segment)
+ (set! pm_end (+ (item.feat (utt.relation.last utt 'Segment) "end") 0.02))
+ (set! pm_end 0.02))
+
+ (us_f0_to_pitchmarks utt 'f0 'TargetCoef pm_end)
+ (us_mapping utt 'segment_single)
+ (cond
+ ((string-equal "td_psola" (Parameter.get 'us_sigpr))
+ ;; Not in standard distribution, so has to be separate function
+ (us_tdpsola_synthesis utt 'analysis_period))
+ (t
+ ;; All the rest
+ (us_generate_wave utt (Parameter.get 'us_sigpr)
+ 'analysis_period)))
+)
+
+(defSynthType None
+ ;; do nothing
+ utt
+ )
+
+(defSynthType Standard
+ (print "synth method: Standard")
+
+ (let ((select (Parameter.get 'SelectionMethod)))
+ (if select
+ (progn
+ (print "select")
+ (apply select (list utt))
+ )
+ )
+ )
+
+ (let ((join (Parameter.get 'JoiningMethod)))
+ (if join
+ (progn
+ (print "join")
+ (apply join (list utt))
+ )
+ )
+ )
+
+ (let ((impose (Parameter.get 'ImposeMethod)))
+ (if impose
+ (progn
+ (print "impose")
+ (apply impose (list utt))
+ )
+ )
+ )
+
+ (let ((power (Parameter.get 'PowerSmoothMethod)))
+ (if power
+ (progn
+ (print "power")
+ (apply power (list utt))
+ )
+ )
+ )
+
+ (let ((wavesynthesis (Parameter.get 'WaveSynthesisMethod)))
+ (if wavesynthesis
+ (progn
+ (print "synthesis")
+ (apply wavesynthesis (list utt))
+ )
+ )
+ )
+ )
+
+(defSynthType Minimal
+ (print "synth method: Minimal")
+
+ (let ((select (Parameter.get 'SelectionMethod)))
+ (if select
+ (progn
+ (print "select")
+ (apply select (list utt))
+ )
+ )
+ )
+
+ (let ((wavesynthesis (Parameter.get 'WaveSynthesisMethod)))
+ (if wavesynthesis
+ (progn
+ (print "synthesis")
+ (apply wavesynthesis (list utt "Unit" "Join" "Wave"))
+ )
+ )
+ )
+ )
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; Finally the actual driver function. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (utt.synth utt)
+
+ "(utt.synth UTT)
+ The main synthesis function. Given UTT it will apply the
+ functions specified for UTT's type, as defined with deffUttType
+ and then those demanded by the voice. After modules have been
+ applied synth_hooks are applied to allow extra manipulation.
+ [see Utterance types]"
+
+ (apply_hooks before_synth_hooks utt)
+
+ (let ((type (utt.type utt)))
+ (let ((definition (assoc type UttTypes)))
+ (if (null? definition)
+ (error "Unknown utterance type" type)
+ (let ((body (eval (cons 'lambda
+ (cons '(utt) (cdr definition))))))
+ (body utt)))))
+
+ (apply_hooks after_synth_hooks utt)
+ utt)
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; And a couple of utility expressions. ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (SayText text)
+"(SayText TEXT)
+TEXT, a string, is rendered as speech."
+ (utt.play (utt.synth (eval (list 'Utterance 'Text text)))))
+
+(define (SynthText text)
+"(SynthText TEXT)
+TEXT, a string, is rendered as speech."
+ (utt.synth (eval (list 'Utterance 'Text text))))
+
+(define (SayPhones phones)
+"(SayPhones PHONES)
+PHONES is a list of phonemes. This uses the Phones type utterance
+to synthesize and play the given phones. Fixed duration specified in
+FP_duration and fixed monotone duration (FP_F0) are used to generate
+prosody."
+ (utt.play (utt.synth (eval (list 'Utterance 'Phones phones)))))
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;
+ ;; This is the standard synthesis function. The Wave Synthesis may be ;;
+ ;; more than a simple module ;;
+ ;; ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(define (Wave_Synth utt)
+"(Wave_Synth UTT)
+ Generate waveform from information in UTT, at least a Segment stream
+ must exist. The actual form of synthesis used depends on the Parameter
+ Synth_Method. If it is a function that is applied. If it is atom it
+ should be a SynthType as defined by defSynthType
+ [see Utterance types]"
+ (apply_hooks after_analysis_hooks utt)
+ (let ((method_val (Parameter.get 'Synth_Method)))
+ (cond
+ ((null method_val)
+ (error "Undefined Synth_Method"))
+ ((and (symbol? method_val) (symbol-bound? method_val))
+ ;; Wish there was a function?
+ (apply (symbol-value method_val) (list utt)))
+ ((member (typeof method_val) '(subr closure))
+ (apply method_val (list utt)))
+ (t ;; its a defined synthesis type
+ (let ((synthesis_modules (assoc_string method_val SynthTypes)))
+ (if (null? synthesis_modules)
+ (error (format nil "Undefined SynthType %s\n" method_val))
+ (let ((body (eval (cons 'lambda
+ (cons '(utt) (cdr synthesis_modules))))))
+ (body utt)))))))
+ utt)
+
+(provide 'synthesis)
+
+
+
diff --git a/CosyVoice-ttsfrd/resource/festival/tilt.scm b/CosyVoice-ttsfrd/resource/festival/tilt.scm
new file mode 100644
index 0000000000000000000000000000000000000000..92dbec6420dbd5c2f98aa9bd736fc381044ab517
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/tilt.scm
@@ -0,0 +1,972 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Author: Alan W Black, Kurt Dusterhoff, Janet Hitzeman
+;;; Date: April 1999
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Tilt intonation modules, accent/boundary preditions and F0 generation
+;;; The F0 generation is done using models as described in
+;;; Dusterhoff, K. and Black, A. (1997). "Generating F0 contours for
+;;; speech synthesis using the Tilt intonation theory"
+;;; (http://www.cstr.ed.ac.uk/awb/papers/esca-int97.ps)
+;;; Proceedings of ESCA Workshop of Intonation, pp 107-110, September,
+;;; Athens, Greece.
+;;;
+;;; Intonation_Tilt assigns accents and boundaries by a CART tree
+;;; the c and sil nodes are derived directly duration creation
+;;;
+;;; Int_Targets_Tilt generates the F0 using the CART trees as
+;;; described in the paper referenced above.
+;;;
+;;; THIS CONTAINS *VERY* EXPERIMENTAL CODE
+;;; it requires a thoroughly clean up and probably split into
+;;; multiple files
+
+(defvar int_tilt_params nil
+ "int_tilt_params
+Parameters for tilt intonation model.")
+
+(Parameter.def 'tilt_method 'cart)
+
+(define (Intonation_Tilt utt)
+ "(Intonation_Tilt utt)
+Assign accent and boundary IntEvents to each syllable, and fill in
+spaces with silence and connections."
+ (let (accent boundary)
+ ;; Create basic intonation relations
+ (utt.relation.create utt 'Intonation)
+ (utt.relation.create utt 'IntonationSyllable)
+ (mapcar
+ (lambda (syl)
+ ;; If first syllable in phrase add phrase_start
+ (if (string-equal "pau"
+ (item.feat syl "R:SylStructure.daughter1_to.Segment.p.name"))
+ (tilt_add_intevent utt syl 'phrase_start))
+
+ (set! accent (wagon_predict syl tilt_a_cart_tree))
+ (set! boundary (wagon_predict syl tilt_b_cart_tree))
+; (format t "%s: accent %s boundary %s\n"
+; (item.feat syl "R:WordStructure.root.name")
+; accent
+; boundary)
+ (if (not (string-equal accent "0"))
+ (tilt_add_intevent utt syl accent))
+ (if (not (string-equal boundary "0"))
+ (if (and (string-equal boundary "afb")
+ (not (string-equal accent "0")))
+ (tilt_add_intevent utt syl "fb") ;; can't have a/afb
+ (tilt_add_intevent utt syl boundary)))
+
+ ;; If last syllable in phrase add phrase_end
+ (if (string-equal "pau"
+ (item.feat syl "R:SylStructure.daughtern_to.Segment.n.name"))
+ (tilt_add_intevent utt syl 'phrase_end)))
+ (utt.relation.items utt 'Syllable))
+;; (utt.relation.print utt 'Intonation)
+ utt))
+
+(define (tilt_add_intevent utt syl name)
+"(tilt_add_intevent utt syl name)
+Add a new IntEvent related to syl with name."
+ (let (ie)
+ (set! ie (utt.relation.append utt 'Intonation (list name)))
+ (if (not (item.relation syl 'IntonationSyllable))
+ (utt.relation.append utt 'IntonationSyllable syl))
+ (item.relation.append_daughter syl 'IntonationSyllable ie)
+ (if (not (string-matches name "phrase_.*"))
+ (item.set_feat ie "int_event" 1))
+ ie))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Fo generate through tilt parameters and F0 rendering
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define (Int_Targets_Tilt utt)
+ "(Int_Targets_Tilt utt)
+Assign Tilt parameters to each IntEvent and then generate the
+F0 contour and assign targets."
+ (utt.relation.set_feat utt "Intonation" "intonation_style" "tilt")
+ (tilt_assign_parameters utt)
+; (tilt_F0_and_targets utt) ;; this has to be C++, sorry
+; (tilt_map_f0_range utt)
+ (tilt_to_f0 utt "f0")
+ (tilt_validate utt)
+ utt
+)
+
+(define (tilt_validate utt)
+ "(tilt_validate utt)
+Checks that the predicted tilt parameter fall with reasonable
+limits and modify them where possible to be more reasonable."
+ (mapcar
+ (lambda (ie)
+ (cond
+ ((string-equal (item.name ie) "phrase_end")
+ ;; check previous event does overflow segments
+ )
+ (t
+ t))
+ )
+ (utt.relation.items utt 'Intonation))
+)
+
+(define (tilt_map_f0_range utt)
+ "(tilt_map_f0_range utt)
+In order fo better trained models to be used for voices which don't
+have the necessary data to train models from the targets may be mapped
+to a different pitch range. Note this is not optimal as pitch ranges
+don't map that easily, but the the results can sometimes be better than
+using a less sophisticated F0 generation model. The method used
+is to define the mean and standard deviation of the speaker the
+model was trained on and the mean and standard deciation of the
+desired speaker. Mapping is by converting the actual F0 value
+to zscores (distance from mean in number of stddev) and back into
+the other domain. The variable int_tilt_params is used to find
+the values."
+ (let ((target_f0_mean (car (cdr (assoc 'target_f0_mean int_tilt_params))))
+ (target_f0_std (car (cdr (assoc 'target_f0_std int_tilt_params))))
+ (model_f0_std (car (cdr (assoc 'model_f0_std int_tilt_params))))
+ (model_f0_mean (car (cdr (assoc 'model_f0_mean int_tilt_params)))))
+ (if target_f0_mean ;; only if one is specified
+ (lambda (targ)
+ (item.set_name
+ targ
+ (+ target_f0_mean
+ (* target_f0_std
+ (/ (- (parse-number (item.name targ))
+ model_f0_mean)
+ model_f0_std)))))
+ (utt.relation.leafs utt 'Target))))
+
+(define (tilt_assign_parameters utt)
+ "(tilt_assign_parameters utt)
+Assigned tilt parameters to IntEvents, depending on the value
+of the Parameter tilt_method uses wagon trees (cart) or linear
+regression models (lr)."
+ (let ((method (Parameter.get 'tilt_method)))
+ (cond
+ ((equal? method 'cart)
+ (tilt_assign_parameters_wagon utt))
+ ((equal? method 'lr)
+ (tilt_assign_parameters_lr utt))
+ (t
+ (error "Tilt: unknown tilt param prediction method: " tilt_method)))))
+
+(define (tilt_assign_parameters_wagon utt)
+ "(tilt_assign_parameters_wagon utt)
+Assing parameters (start_f0, tilt, amplitude, peak_pos and duration)
+to each IntEvent. Uses Wagon trees to predict values"
+ (mapcar
+ (lambda (ie)
+ (let ((param_trees (cdr (assoc_string (item.name ie)
+ tilt_param_trees))))
+ (item.set_feat ie "time_path" "IntonationSyllable")
+ (if (string-equal "1" (item.feat ie "int_event"))
+ (item.set_function ie "time" "unisyn_tilt_event_position")
+ (item.set_function ie "time" "unisyn_tilt_phrase_position"))
+ (cond
+ ((null param_trees)
+ (format stderr "Tilt: unknown Intonation type %s, ignored\n"
+ (item.name ie))
+ ;; *need* to assign default values
+ (item.set_feat ie "ev.f0" 100)
+ (item.set_feat ie "tilt.amp" 20.0)
+ (item.set_feat ie "tilt.dur" 0.25)
+ (item.set_feat ie "tilt.tilt" -0.2)
+ (item.set_feat ie "rel_pos" 0.0)
+ )
+ (t
+ (tilt_assign_params_wagon ie param_trees)))))
+ (utt.relation.items utt 'Intonation)))
+
+(define (tilt_assign_params_wagon ie trees)
+ "(tilt_assign_params_wagon ie trees)
+Assign the names parameters to ie using the trees and names in
+trees."
+ (mapcar
+ (lambda (tree)
+ (let ((val (wagon_predict ie (car (cdr tree)))))
+ (item.set_feat ie (car tree) val)))
+ trees))
+
+(define (tilt_assign_parameters_lr utt)
+ "(tilt_assign_parameters_lr utt)
+Assing parameters (start_f0, tilt, amplitude, peak_pos and duration)
+to each IntEvent. Prediction by linear regression models"
+ (mapcar
+ (lambda (ie)
+ (let ((param_lrmodels (cdr (assoc_string (item.name ie)
+ tilt_param_lrmodels))))
+ (cond
+ ((null param_lrmodels)
+ (format stderr "Tilt: unknown IntEvent type %s, ignored\n"
+ (item.name ie))
+ ;; *need* to assign default values
+ (item.set_feat ie "ev.f0" 100)
+ (item.set_feat ie "tilt.amp" 20.0)
+ (item.set_feat ie "tilt.dur" 0.25)
+ (item.set_feat ie "tilt.tilt" -0.2)
+ (item.set_feat ie "rel_pos" 0.0)
+ )
+ (t
+ (tilt_assign_params_lr ie param_lrmodels)))))
+ (utt.relation.items utt 'IntEvent)))
+
+(define (tilt_assign_params_lr ie lrmodels)
+ "(tilt_assign_params_lr ie lrmodels)
+Assign the names parameters to ie using the trees and names in
+trees."
+ (mapcar
+ (lambda (lrm)
+ (let ((val (lr_predict ie (cdr lrm))))
+ (item.set_feat ie (car lrm) val)))
+ lrmodels))
+
+(define (utt.save.tilt_events utt filename)
+"(utt.save.til_events UTT FILENAME)
+Save tilt events in UTT to FILENAME in a format suitable for
+ev_synth."
+ (let ((fd (fopen filename "w")))
+ (format fd "#\n")
+ (mapcar
+ (lambda (ie)
+ (let ((name (item.name ie)))
+ (cond
+ ((or (string-equal name "sil")
+ (string-equal name "c"))
+ (format fd " %2.4f 100 %s; tilt: %2.6f\n"
+ (item.feat ie 'end)
+ name
+ (item.feat ie "tilt_start_f0")))
+ (t ;; accent or boundary
+ (format fd " %2.4f 100 %s; tilt: %2.6f %2.6f %2.6f %2.6f %2.6f\n"
+ (item.feat ie 'end)
+ name
+ (item.feat ie "ev.f0")
+ (item.feat ie "tilt.amp")
+ (item.feat ie "tilt.dur")
+ (item.feat ie "tilt.tilt")
+ (item.feat ie "rel_pos"))))))
+ (utt.relation.items utt 'IntEvent))
+ (fclose fd)
+ utt))
+
+
+;;;;;
+;;; Some features which should be pruned
+;;;;;
+
+(def_feature_docstring 'Syllable.lisp_time_to_next_vowel
+ "Syllable.lisp_time_to_next_vowel syl
+ The time from vowel_start to next vowel_start")
+(define (time_to_next_vowel syl)
+ "(time_to_next_vowel syl)
+ The time from vowel_start to next vowel_start"
+ (let (ttnv)
+ (if (string-equal "0" (item.feat syl "n.vowel_start"))
+ (set! ttnv 0.00)
+ (set! ttnv (- (item.feat syl "n.vowel_start")
+ (item.feat syl "vowel_start"))))
+ ttnv))
+
+(def_feature_docstring 'Syllable.lisp_next_stress
+ "Syllable.lisp_next_stress
+ Number of syllables to next stressed syllable. 0 if this syllable is
+ stressed. It is effectively assumed the syllable after the last syllable
+ is stressed.")
+(define (next_stress syl)
+ (cond
+ ((null syl) 0)
+ ((string-equal (item.feat syl 'stress_num) "1")
+ 0)
+ (t
+ (+ 1 (next_stress (item.relation.next syl 'Syllable))))))
+
+(def_feature_docstring 'Syllable.lisp_last_stress
+ "Syllable.lisp_last_stress
+ Number of syllables from previous stressed syllable. 0 if this syllable
+ is stressed. It is effectively assumed that the syllable before the
+ first syllable is stressed.")
+(define (last_stress syl)
+ (cond
+ ((null syl) 0)
+ ((string-equal (item.feat syl 'stress_num) "1")
+ 0)
+ (t
+ (+ 1 (last_stress (item.relation.prev syl 'Syllable))))))
+
+
+(def_feature_docstring 'SylStructure.lisp_length_to_last_seg
+ "SylStructure.lisp_length_to_last_seg
+ Length from start of the vowel to start of last segment of syllable.")
+(define (length_to_last_seg syl)
+ (- (item.feat syl "daughtern_to.Segment.start")
+ (item.feat syl "vowel_start")))
+
+(def_feature_docstring 'SylStructure.lisp_get_rhyme_length
+ "Syllable.lisp_get_rhyme_length
+ Length from start of the vowel to end of syllable.")
+(define (get_rhyme_length syl)
+ (- (item.feat syl 'end)
+ (item.feat syl 'vowel_start syl)))
+
+(def_feature_docstring 'SylStructure.lisp_get_onset_length
+ "Syllable.lisp_get_onset_length
+ Length from start of syllable to start of vowel.")
+(define (get_onset_length syl)
+ (cond
+ ((< (- (item.feat syl 'vowel_start)
+ (item.feat syl 'start))
+ 0.000)
+ 0.000) ;; just in case
+ (t
+ (- (item.feat syl 'vowel_start)
+ (item.feat syl 'start)))))
+
+(def_feature_docstring 'Syllable.lisp_tilt_accent
+ "Syllable.lisp_tilt_accent
+ Returns \"a\" if there is a tilt accent related to this syllable, 0
+ otherwise.")
+(define (tilt_accent syl)
+ (let ((events (item.relation.daughters syl 'IntonationSyllable))
+ (r "0"))
+ (mapcar
+ (lambda (i)
+ (if (member_string (item.name i) tilt_accent_list)
+ (set! r "a")))
+ events)
+ r))
+
+(def_feature_docstring 'Syllable.lisp_tilt_boundary
+ "Syllable.lisp_tilt_boundary
+ Returns boundary label if there is a tilt boundary related to this
+syllable, 0 otherwise.")
+(define (tilt_boundary syl)
+ (let ((events (item.relation.daughters syl 'IntonationSyllable))
+ (r "0"))
+ (mapcar
+ (lambda (i)
+ (let ((name (item.name i)))
+ (if (member_string name tilt_boundary_list)
+ (cond
+ ((string-matches name "a.*")
+ (set! r (string-after name "a")))
+ ((string-matches name "m.*")
+ (set! r (string-after name "m")))
+ (t
+ (set! r name))))))
+ events)
+ r))
+
+(def_feature_docstring 'Syllable.lisp_tilt_accented
+ "Syllable.lisp_tilt_accented
+ Returns 1 if there is a tilt accent related to this syllable, 0
+ otherwise.")
+(define (tilt_accented syl)
+ (let ((events (item.relation.daughters syl 'IntonationSyllable))
+ (r "0"))
+ (mapcar
+ (lambda (i)
+ (if (member_string (item.name i) tilt_accent_list)
+ (set! r "1")))
+ events)
+ r))
+
+(def_feature_docstring 'Syllable.lisp_tilt_boundaried
+ "Syllable.lisp_tilt_boundaried
+ Returns 1 if there is a tilt boundary related to this syllable, 0
+ otherwise.")
+(define (tilt_boundaried syl)
+ (let ((events (item.relation.daughters syl 'IntonationSyllable))
+ (r "0"))
+ (mapcar
+ (lambda (i)
+ (if (member_string (item.name i) tilt_boundary_list)
+ (set! r "1")))
+ events)
+ r))
+
+(def_feature_docstring 'SylStructure.lisp_vowel_height
+ "SylStructure.lisp_vowel_height syl
+Classifies vowels as high, low or mid")
+(define (vowel_height syl)
+ (let ((vh (item.feat syl "daughtern.daughter1.daughter1.df.height")))
+ vh)
+)
+
+(def_feature_docstring 'SylStructure.lisp_vowel_frontness
+ "SylStructure.vowel_frontness syl
+Classifies vowels as front, back or mid")
+(define (vowel_frontness syl)
+ (let ((vf (item.feat syl "daughtern.daughter1.daughter1.df.front")))
+ vf)
+)
+
+(def_feature_docstring 'SylStructure.lisp_vowel_length
+ "SylStructure.vowel_length syl
+Returns the df.length feature of a syllable's vowel")
+(define (vowel_length syl)
+ (let ((vl (item.feat syl "daughtern.daughter1.daughter1.df.length")))
+ vl)
+)
+
+(defvar sonority_vless_obst '("f" "h" "hh" "k" "p" "s" "sh" "t" "th" "ch")
+ "sonority_vless_obst
+List of voiceless obstruents for use in sonority scaling (only good w/ radio_speech)"
+ )
+(defvar sonority_v_obst '("v" "b" "g" "z" "zh" "d" "dh" "jh")
+ "sonority_v_obst
+List of voiced obstruents for use in sonority scaling (only good w/ radio_speech)"
+ )
+(defvar sonority_nas '("m" "n" "ng" "nx" "em" "en")
+ "sonority_nas
+List of nasals (only good w/ radio_speech)"
+ )
+(defvar sonority_liq '("r" "l" "er" "el" "axr")
+ "sonority_liq
+List of liquids (only good w/ radio_speech)"
+ )
+(defvar sonority_glides '("y" "w")
+ "sonority_glides
+List of glides (only good w/ radio_speech)"
+ )
+
+(def_feature_docstring 'SylStructure.lisp_sonority_scale_coda
+ "SylStructure.sonority_scale_coda syl
+Returns value on sonority scale (1 -6, where 6 is most sonorous)
+for the coda of a syllable, based on least sonorant portion.")
+(define (sonority_scale_coda syl)
+ (let ((segs (item.daughters (item.daughtern (item.daughtern syl))))
+ (scale 6))
+ (mapcar
+ (lambda (seg)
+ (cond
+ ((member_string (item.name seg) sonority_vless_obst)
+ (if (> scale 1)
+ (set! scale 1)))
+ ((member_string (item.name seg) sonority_v_obst)
+ (if (> scale 2)
+ (set! scale 2)))
+ ((member_string (item.name seg) sonority_nas)
+ (if (> scale 3)
+ (set! scale 3)))
+ ((member_string (item.name seg) sonority_liq)
+ (if (> scale 4)
+ (set! scale 4)))
+ ((member_string (item.name seg) sonority_glides)
+ (if (> scale 5)
+ (set! scale 5)))
+ (t
+ (if (> scale 6)
+ (set! scale 6)))
+ )
+ )
+ segs)
+ scale))
+
+(def_feature_docstring 'SylStructure.lisp_sonority_scale_onset
+ "SylStructure.sonority_scale_onset syl
+Returns value on sonority scale (1 -6, where 6 is most sonorous)
+for the onset of a syllable, based on least sonorant portion.")
+(define (sonority_scale_onset syl)
+ (if (string-equal "Onset" (item.feat (item.daughter1 syl) "sylval"))
+ (let ((segs (item.daughters (item.daughter1 syl)))
+ (scale 6))
+ (mapcar
+ (lambda (seg)
+ (cond
+ ((member_string (item.name seg) sonority_vless_obst)
+ (if (> scale 1)
+ (set! scale 1)))
+ ((member_string (item.name seg) sonority_v_obst)
+ (if (> scale 2)
+ (set! scale 2)))
+ ((member_string (item.name seg) sonority_nas)
+ (if (> scale 3)
+ (set! scale 3)))
+ ((member_string (item.name seg) sonority_liq)
+ (if (> scale 4)
+ (set! scale 4)))
+ ((member_string (item.name seg) sonority_glides)
+ (if (> scale 5)
+ (set! scale 5)))
+ (t (set! scale 6))
+ )
+ )
+ segs)
+ scale)
+ 0))
+
+(def_feature_docstring 'SylStructure.lisp_num_postvocalic_c
+ "SylStructure.lisp_num_postvocalic_c
+Finds the number of postvocalic consonants in a syllable.")
+(define (num_postvocalic_c syl)
+ "(num_postvocalic_c syl)
+Finds the number of postvocalic consonants in a syllable."
+ (let (segs (npc 0))
+ (set! segs (item.daughters (item.daughtern (item.daughtern syl))))
+ (mapcar
+ (lambda (seg)
+ (set! npc (+ npc 1))
+ )
+ segs)
+ npc))
+
+
+(def_feature_docstring 'SylStructure.lisp_syl_numphones
+ "SylStructure.lisp_syl_numphones syl
+Finds the number segments in a syllable.")
+(define (syl_numphones syl)
+ (length (mt_segs_from_syl syl))
+ )
+
+(def_feature_docstring 'Segment.lisp_pos_in_syl
+ "Segment.lisp_pos_in_syl seg
+Finds the position in a syllable of a segment - returns a number.")
+(define (pos_in_syl seg)
+ (let ((segments (mt_segs_from_syl
+ (item.relation (item.parent_to
+ (item.relation seg 'SylStructure)
+ 'Syllable)
+ 'SylStructure)))
+ (seg_count 1))
+ (mapcar
+ (lambda (s)
+ (if (not (eqv? s seg))
+ (set! seg_count (+ 1.0 seg_count))
+ nil))
+ segs)
+ seg_count))
+
+(def_feature_docstring 'Intonation.lisp_peak_anchor_segment_type
+ "Intonation.peak_anchor_segment_type ie
+Determines whether the segment anchor for a peak
+is the first consonant of a syl - C0 -, the
+vowel of a syl - V0 -, or segments after that
+- C1->X,V1->X. If the segment is in a following syl,
+the return value will be preceded by a 1 - e.g. 1V1")
+(define (peak_anchor_segment_type ie)
+ (let ( syl peak_anchor_num numsegs peak_anchor_type)
+ (set! peak_anchor_num (peak_segment_anchor ie))
+
+
+ (if (> 9 peak_anchor_num)
+ (set! syl (item.relation
+ (item.parent (item.relation ie "IntonationSyllable"))
+ "SylStructure")))
+ (if (> 9 peak_anchor_num)
+ (set! numsegs (item.feat syl "syl_numphones")))
+
+ (cond
+ ((< 9 peak_anchor_num)
+ (set! peak_anchor_type "none"))
+ ((> 0 peak_anchor_num)
+ (set! peak_anchor_type
+ (string-append
+ "-1" (get_anchor_value (item.prev syl)
+ (+ peak_anchor_num
+ (item.feat syl "p.syl_numphones"))))))
+ ((< peak_anchor_num numsegs)
+ (set! peak_anchor_type (get_anchor_value syl numsegs)))
+ ((> peak_anchor_num numsegs)
+ (set! peak_anchor_type
+ (string-append
+ "1" (get_anchor_value (item.next syl) (- peak_anchor_num numsegs)))))
+ (set! peak_anchor_type "none"))
+; (format stderr "pat: %s\n" peak_anchor_type)
+ peak_anchor_type))
+
+(define (get_anchor_value sylSyl seg_num)
+ "(get_anchor_value sylSyl seg_num)
+Gets the c/v value of the segment within a syllable."
+ (let ((syl (item.relation sylSyl "SylStructure"))
+ (seg_val "none") segs (ccnt -1) (vcnt -1) (vpis 0))
+ (set! segs (mt_segs_from_syl sylSyl))
+ (mapcar
+ (lambda (seg)
+ (cond
+ ((string-equal "consonant" (item.feat seg "df.type"))
+ (set! vcnt (+ 1 vcnt))
+ (set! vpis (item.feat seg "pos_in_syl")))
+ (t
+ (set! ccnt (+ 1 ccnt))))
+ (cond
+ ((and
+ (eq (- seg_num 1.0) (item.feat seg "pos_in_syl"))
+ ( string-equal "consonant" (item.feat seg "df.type")))
+ (set! seg_val (string-append "V" vcnt)))
+ ((and
+ (eq (- seg_num 1.0) (item.feat seg "pos_in_syl"))
+ ( string-equal "vowel" (item.feat seg "df.type")))
+ (set! seg_val (string-append "C" (- (item.feat seg "pos_in_syl")
+ vpis) "V" vcnt)))
+ (t nil))
+ )
+ segs)
+ seg_val))
+
+(define (peak_segment_anchor ie)
+ "peak_segment_anchor ie
+Determines what segment acts as the anchor for a peak.
+Returns number of segments from start of accented syllable
+to peak."
+; (format stderr "accent: %s\n"
+; (item.name ie))
+ (let ((pk_pos (item.feat ie "position"))
+ (peak_seg_anchor 11))
+ (if
+ (or
+ (string-equal "phrase_start" (item.name ie))
+ (string-equal "phrase_end" (item.name ie))
+ (string-equal "pause" (item.name ie)))
+ (set! peak_seg_anchor 10)
+ (set! peak_seg_anchor (find_peak_seg_anchor ie pk_pos)))
+ peak_seg_anchor))
+
+(define (find_peak_seg_anchor ie pk_pos)
+ "find_peak_seg_anchor ie pk_pos
+Part of the workings of peak_segment_anchor."
+ (let (( syl (item.relation
+ (item.parent (item.relation ie 'IntonationSyllable))
+ 'SylStructure))
+ (seg_anchor 11))
+ (cond
+ ((not (eq 9.0 (segs_to_peak syl pk_pos)))
+ (set! seg_anchor (segs_to_peak syl pk_pos)))
+
+ ((and (item.prev syl)
+ (not (eq 9.0 (segs_to_peak (item.prev syl) pk_pos))))
+; (format stderr "%s\n" (item.name (item.prev syl)))
+ (set! seg_anchor (* -1
+ (- (+ 1 (item.feat syl "p.syl_numphones"))
+ (segs_to_peak (item.prev syl) pk_pos)))))
+
+ ((and (item.next syl)
+ (> pk_pos (item.feat syl "n.start")))
+; (format stderr "%s\n" (item.name (item.next syl)))
+ (set! seg_anchor (+ 1
+ (item.feat syl "syl_numphones")
+ (segs_to_peak (item.next syl) pk_pos))))
+ (t
+ (format stderr "No seg anchor could be found\n")))
+; (format stderr "seg_anchor: %f\n" seg_anchor)
+ seg_anchor))
+
+(define (segs_to_peak sylSyl pk_pos)
+ "(segs_to_peak sylSyl pk_pos)
+Determines the number of segments from the start of a syllable
+to an intonation peak"
+ (let ((syl (item.relation sylSyl "SylStructure"))
+ (segs_2_peak 9) segs)
+ (set! segs (mt_segs_from_syl syl))
+ (mapcar
+ (lambda (seg)
+; (format stderr "seg_end: %f pk: %f\n" (item.feat seg "end")
+; pk_pos)
+ (if (eq 1.0 (peak_wi_seg seg pk_pos))
+ (set! segs_2_peak (item.feat seg "pos_in_syl")))
+; (format stderr "segs_2_peak: %f\n" segs_2_peak)
+ )
+ segs)
+ segs_2_peak))
+
+(define (peak_wi_seg segment pk_pos)
+ "peak_wi_seg segment pk_pos
+Finds if a peak occurs w/i a segment"
+ (let ((s_start (item.feat segment "start"))
+ (s_end (item.feat segment "end"))
+ (ret 0.0))
+ (if (and (< s_start pk_pos)
+ (< pk_pos s_end))
+ (set! ret 1.0)
+ nil)
+ ret))
+
+(defvar tilt_accent_list '("a" "arb" "afb" "m" "mfb" "mrb")
+ "tilt_accent_list
+List of events containing accents in tilt model.")
+(defvar tilt_boundary_list '("rb" "arb" "afb" "fb" "mfb" "mrb")
+ "tilt_boundary_list
+List of events containing boundaries in tilt model.")
+
+(def_feature_docstring 'Intonation.lisp_last_tilt_accent
+ "Intonation.lisp_last_tilt_accent
+ Returns the most recent tilt accent.")
+(define (last_tilt_accent intev)
+ (let ((pie (item.relation.prev intev 'Intonation)))
+ (cond
+ ((not pie)
+ "0")
+ ((member_string (item.name pie) tilt_accent_list)
+ (item.name pie))
+ (t (last_tilt_accent pie)))))
+
+(def_feature_docstring 'Intonation.lisp_next_tilt_accent
+ "Intonation.lisp_next_tilt_accent
+ Returns the next tilt accent.")
+(define (next_tilt_accent intev)
+ (let ((nie (item.relation.next intev 'Intonation)))
+ (cond
+ ((not nie) "0")
+ ((member_string (item.name nie) tilt_accent_list)
+ (item.name nie))
+ (t (next_tilt_accent nie)))))
+
+(def_feature_docstring 'Intonation.lisp_last_tilt_boundary
+ "Intonation.lisp_last_tilt_boundary
+ Returns the most recent tilt boundary.")
+(define (last_tilt_boundary intev)
+ (let ((pie (item.relation.prev intev 'Intonation)))
+ (cond
+ ((not pie) "0")
+ ((member_string (item.name pie) tilt_boundary_list)
+ (item.name pie))
+ (t (last_tilt_boundary pie)))))
+
+(def_feature_docstring 'Intonation.lisp_next_tilt_boundary
+ "Intonation.lisp_next_tilt_boundary
+ Returns the next tilt boundary.")
+(define (next_tilt_boundary intev)
+ (let ((nie (item.relation.next intev 'Intonation)))
+ (cond
+ ((not nie) "0")
+ ((member_string (item.name nie) tilt_boundary_list)
+ (item.name nie))
+ (t (next_tilt_boundary nie)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Some basic function to metrical tree structure
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define (mt_syl_from_seg seg)
+ (if seg
+ (item.root (item.relation seg 'SylStructure))
+ nil))
+(define (mt_word_from_syl syl)
+ (if syl
+ (item.root (item.relation syl 'WordStructure))
+ nil))
+(define (mt_word_from_seg seg)
+ (mt_word_from_syl (mt_syl_from_seg seg)))
+
+(define (mt_segs_from_syl s)
+ (cond
+ ((null s) nil)
+ ((member_string 'Segment (item.relations s))
+ (list s))
+ (t
+ (apply
+ append
+ (mapcar mt_segs_from_syl (item.relation.daughters s 'SylStructure))))))
+
+(define (sylmtval s)
+ (let ((syl (mt_syl_from_seg s)))
+ (if syl
+ (item.feat syl "MetricalValue")
+ "0")))
+
+(define (sylpmtval s)
+ (let ((syl (mt_syl_from_seg s)))
+ (if syl
+ (item.feat syl "R:MetricalTree.parent.MetricalValue")
+ "0")))
+
+(define (mt_numsyls w)
+ (let ((s1 (item.daughter1_to (item.relation w 'WordStructure) 'Syllable))
+ (sn (item.daughtern_to (item.relation w 'WordStructure) 'Syllable))
+ (count 1))
+ (while (and s1 (not (equal? s1 sn)))
+ (set! count (+ 1 count))
+ (set! s1 (item.next s1)))
+ (if s1
+ count
+ 0)))
+
+(define (mt_seg_numsyls s)
+ (let ((w (mt_word_from_seg s)))
+ (if w
+ (mt_num_syls w)
+ 0)))
+
+
+;;; These functions should be sort out some time
+
+;;; Difference between this syl and the next
+;;; number of closing brackets, number of opening brackets
+;;; difference between them
+
+(define (mt_close n)
+ "(mt_close n)
+The number of consituents this is the end of, Effectively the
+number of closing brackets after this word."
+ (if (or (not n) (item.next n))
+ 0
+ (+ 1 (mt_close (item.parent n)))))
+
+(define (mt_open n)
+ "(mt_open n)
+The number of consituents this is the start of, Effectively the
+number of opening brackets before this word."
+ (if (or (not n) (item.prev n))
+ 0
+ (+ 1 (mt_open (item.parent n)))))
+
+(define (mt_postype syl)
+ "(mt_postype syl)
+Returns single, initial, final or middle."
+ (let ((w (mt_word_from_syl syl))
+ (psw (mt_word_from_syl (item.relation.prev syl 'Syllable)))
+ (nsw (mt_word_from_syl (item.relation.next syl 'Syllable))))
+ (cond
+ ((and (equal? w psw)
+ (equal? w nsw))
+ 'middle)
+ ((and (not (equal? w psw))
+ (not (equal? w nsw)))
+ 'single)
+ ((equal? w psw)
+ 'final)
+ (t
+ 'initial))))
+
+(define (mt_accent syl)
+ "(mt_accent syl)
+Accent or 0 if none."
+ (let ((a 0))
+ (mapcar
+ (lambda (i)
+ (if (string-matches (item.name i) "^a.*")
+ (set! a "a")))
+ (item.relation.daughters syl 'IntonationSyllable))
+ a))
+
+(define (mt_break syl)
+ "(mt_break syl)
+Break or 0 if none."
+ (let ((a 0))
+ (mapcar
+ (lambda (i)
+ (if (string-matches (item.name i) ".*b$")
+ (set! a (item.name i))))
+ (item.relation.daughters syl 'IntonationSyllable))
+ a))
+
+(define (mt_ssyl_out s)
+ (cond
+ ((null s) 0)
+ ((not (string-equal
+ "0" (item.feat s "R:WordStructure.root.lisp_word_mt_break")))
+ 0)
+ ((string-equal "s" (item.feat s "MetricalValue"))
+ (+ 1 (mt_ssyl_out (item.relation.next s 'Syllable))))
+ (t
+ (mt_ssyl_out (item.relation.next s 'Syllable)))))
+
+(define (mt_num_s s)
+ "(mt_num_s s)
+The number of s MetricalValues from here to a w or top."
+ (cond
+ ((null s) 0)
+ ((string-equal "w" (item.feat s "MetricalValue"))
+ 0)
+ (t
+ (+ 1 (mt_num_s (item.parent s))))))
+
+(define (mt_num_w s)
+ "(mt_num_w s)
+The number of w MetricalValues from here to a s or top."
+ (cond
+ ((null s) 0)
+ ((string-equal "s" (item.feat s "MetricalValue"))
+ 0)
+ (t
+ (+ 1 (mt_num_w (item.parent s))))))
+
+(define (mt_strong s)
+ "(mt_strong s)
+1 if all MetricalValues a s to a word, 0 otherwise."
+ (cond
+ ((string-equal "w" (item.feat s "MetricalValue"))
+ "0")
+ ((member_string 'Word (item.relations s)) "1")
+ (t
+ (mt_strong (item.relation.parent s 'MetricalTree)))))
+
+(define (mt_lssp s)
+ "(mt_lssp s)
+1 if last stressed syllable in phrase, 0 otherwise."
+ (if (and (string-equal "s" (item.feat s "MetricalValue"))
+ (equal? 0 (mt_ssyl_out s)))
+ "1"
+ "0"))
+
+(define (mt_fssw s)
+ "(mt_fssw s)
+1 if first stressed syllable in word, 0 otherwise."
+ (if (and (string-equal "s" (item.feat s "MetricalValue"))
+ (mt_no_stress_before (item.relation.prev s 'Syllable)))
+ "1"
+ "0"))
+
+(define (mt_nfssw s)
+ "(nfssw s)
+1 if second or later stressed syllable in word, 0 otherwise."
+ (if (and (string-equal "s" (item.feat s "MetricalValue"))
+ (null (mt_no_stress_before (item.relation.prev s 'Syllable))))
+ "1"
+ "0"))
+
+(define (mt_no_stress_before ss)
+ (cond
+ ((null ss) t)
+ ((not (string-equal
+ (item.feat ss "R:WordStructure.root.addr")
+ (item.feat (item.next ss) "R:WordStructure.root.addr")))
+ t)
+ ((string-equal "s" (item.feat ss "MetricalValue"))
+ nil)
+ (t
+ (mt_no_stress_before (item.prev ss)))))
+
+(define (word_mt_break w)
+ (cond
+ ((string-equal "1" (item.feat w "sentence_end"))
+ "BB")
+ ((string-equal "1" (item.feat w "phrase_end"))
+ "B")
+ (t
+ "0")))
+
+(provide 'tilt)
diff --git a/CosyVoice-ttsfrd/resource/festival/unilex_phones.scm b/CosyVoice-ttsfrd/resource/festival/unilex_phones.scm
new file mode 100644
index 0000000000000000000000000000000000000000..25e905ebc780874425dbd9565039065eb73dd1e6
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/unilex_phones.scm
@@ -0,0 +1,189 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 2003, 2004 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; unilex phoneset
+;;;
+
+
+(defPhoneSet
+ unilex
+ ;;; Phone Features
+ (;; vowel or consonant
+ (vc + -)
+ ;; vowel length: short long dipthong schwa
+ (vlng s l d a 0)
+ ;; vowel height: high mid low
+ (vheight 1 2 3 0)
+ ;; vowel frontness: front mid back
+ (vfront 1 2 3 0)
+ ;; lip rounding
+ (vrnd + - 0)
+ ;; consonant type: stop fricative affricative nasal liquid approximant
+ (ctype s f a n l t r 0)
+ ;; place of articulation: labial alveolar palatal labio-dental
+ ;; dental velar glottal
+ (cplace l a p b d v g 0)
+ ;; consonant voicing
+ (cvox + - 0)
+ )
+ (
+ (SIL - 0 0 0 0 0 0 -) ;; slience ...
+ (# - 0 0 0 0 0 0 -) ;; slience ...
+ (B_10 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_20 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_30 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_40 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_50 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_100 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_150 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_200 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_250 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_300 - 0 0 0 0 0 0 -) ;; Pauses
+ (B_400 - 0 0 0 0 0 0 -) ;; Pauses
+ (IGNORE - 0 0 0 0 0 0 -) ;; Pauses
+
+
+ ;; insert the phones here, see examples in
+ ;; festival/lib/*_phones.scm
+
+ ;(name vc vling vheight vfront vrnd ctype cplace cvox)
+
+ ;;; Rob guesed these values for Edinburgh English
+ ;;; Not to be taken too seriously.
+
+ (p - 0 0 0 0 s l -)
+ (t - 0 0 0 0 s a -)
+ (? - 0 0 0 0 s g +) ;;; ???
+ (t^ - 0 0 0 0 t a +) ;;; ???
+ (k - 0 0 0 0 s v -)
+ (x - 0 0 0 0 f v -)
+ (b - 0 0 0 0 s l +)
+ (d - 0 0 0 0 s a +)
+ (g - 0 0 0 0 s v +)
+ (ch - 0 0 0 0 a p -)
+ (jh - 0 0 0 0 a p +)
+ (s - 0 0 0 0 f a -)
+ (z - 0 0 0 0 f a +)
+ (sh - 0 0 0 0 f p -)
+ (zh - 0 0 0 0 f p +)
+ (f - 0 0 0 0 f b -)
+ (v - 0 0 0 0 f b +)
+ (th - 0 0 0 0 f d -)
+ (dh - 0 0 0 0 f d +)
+ (h - 0 0 0 0 f 0 -) ;;; ???
+ (m - 0 0 0 0 n l +)
+ (m! - 0 0 0 0 n l +)
+ (n - 0 0 0 0 n a +)
+ (n! - 0 0 0 0 n a +)
+ (ng - 0 0 0 0 n v +)
+ (l - 0 0 0 0 r a +)
+ (ll - 0 0 0 0 r a +)
+ (lw - 0 0 0 0 r a +)
+ (l! - 0 0 0 0 r a +)
+ (r - 0 0 0 0 r a +)
+ (y - 0 0 0 0 l p +)
+ (w - 0 0 0 0 l l +)
+ (hw - 0 0 0 0 l l +)
+ (e + s 2 1 - 0 0 0)
+ (ao + s 3 1 - 0 0 0)
+ (a + s 3 1 - 0 0 0)
+ (ah + s 3 1 - 0 0 0)
+ (oa + s 3 1 - 0 0 0)
+ (aa + s 3 1 - 0 0 0)
+ (ar + s 3 1 - 0 0 0)
+ (eh + s 3 1 - 0 0 0) ;;; ?
+ (oul + d 2 3 + 0 0 0) ;;; ?
+ (ou + d 2 3 + 0 0 0)
+ (ouw + d 2 3 + 0 0 0)
+ (oou + l 3 3 + 0 0 0)
+ (o + l 3 3 + 0 0 0)
+ (au + l 3 3 + 0 0 0)
+ (oo + l 3 3 + 0 0 0)
+ (or + l 3 3 + 0 0 0)
+ (our + d 2 3 + 0 0 0)
+ (ii + l 1 1 - 0 0 0)
+ (ihr + s 1 1 - 0 0 0)
+ (iy + l 1 1 - 0 0 0)
+ (i + s 1 1 - 0 0 0)
+ (ie + l 1 1 - 0 0 0) ;;; ?
+ (iii + s 1 1 - 0 0 0) ;;; was ii;
+ (@r + a 2 2 - r a +)
+ (@ + a 2 2 - 0 0 0)
+ (uh + s 2 2 - 0 0 0)
+ (uhr + s 2 2 - 0 0 0)
+ (u + l 1 3 + 0 0 0)
+ (uu + l 1 3 + 0 0 0)
+ (iu + l 1 3 + 0 0 0)
+ (uuu + l 1 3 + 0 0 0) ;;; was uu;
+ (uw + l 1 3 + 0 0 0) ;;; ???
+ (uul + l 1 3 + 0 0 0) ;;; ???
+ (ei + d 2 1 - 0 0 0)
+ (ee + d 2 1 - 0 0 0)
+ (ai + d 3 2 - 0 0 0) ;;; ???
+ (ae + d 3 2 - 0 0 0) ;;; ???
+ (aer + d 3 2 - 0 0 0) ;;; ???
+ (aai + d 3 2 - 0 0 0) ;;; ???
+ (oi + d 2 3 + 0 0 0) ;;; ???
+ (oir + d 2 3 + 0 0 0) ;;; ???
+ (ow + d 3 2 - 0 0 0)
+ (owr + d 3 2 - 0 0 0) ;;; ???
+ (oow + d 3 2 - 0 0 0) ;;; ???
+ (i@ + l 1 1 - 0 0 0) ;;; iy + @ ?
+ (ir + s 1 1 - 0 0 0)
+ (irr + s 1 1 - 0 0 0) ;;; was ir;
+ (iir + s 1 1 - 0 0 0)
+ (@@r + a 2 2 - 0 0 0)
+ (er + s 2 1 - 0 0 0)
+ (eir + s 2 1 - 0 0 0) ;;; ???
+ (ur + s 1 3 + 0 0 0) ;;; ???
+ (urr + s 1 3 + 0 0 0) ;;; ???
+ (iur + s 1 3 + 0 0 0) ;;; ???
+ )
+)
+
+(PhoneSet.silences '( # SIL))
+
+(define (unilex::select_phoneset)
+ "(unilex::select_phoneset)
+Set up phone set for unilex"
+ (Parameter.set 'PhoneSet 'unilex)
+ (PhoneSet.select 'unilex)
+)
+
+(define (unilex::reset_phoneset)
+ "(unilex::reset_phoneset)
+Reset phone set for unilex."
+ t
+)
+
+(provide 'unilex_phones)
diff --git a/CosyVoice-ttsfrd/resource/festival/voices.scm b/CosyVoice-ttsfrd/resource/festival/voices.scm
new file mode 100644
index 0000000000000000000000000000000000000000..168d842a75c46e5a030f589a0fbb1341cfab7773
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/voices.scm
@@ -0,0 +1,361 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;
+;;; Centre for Speech Technology Research ;;
+;;; University of Edinburgh, UK ;;
+;;; Copyright (c) 1996,1997 ;;
+;;; All Rights Reserved. ;;
+;;; ;;
+;;; Permission is hereby granted, free of charge, to use and distribute ;;
+;;; this software and its documentation without restriction, including ;;
+;;; without limitation the rights to use, copy, modify, merge, publish, ;;
+;;; distribute, sublicense, and/or sell copies of this work, and to ;;
+;;; permit persons to whom this work is furnished to do so, subject to ;;
+;;; the following conditions: ;;
+;;; 1. The code must retain the above copyright notice, this list of ;;
+;;; conditions and the following disclaimer. ;;
+;;; 2. Any modifications must be clearly marked as such. ;;
+;;; 3. Original authors' names are not deleted. ;;
+;;; 4. The authors' names are not used to endorse or promote products ;;
+;;; derived from this software without specific prior written ;;
+;;; permission. ;;
+;;; ;;
+;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
+;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
+;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
+;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
+;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
+;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
+;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
+;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
+;;; THIS SOFTWARE. ;;
+;;; ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Preapre to access voices. Searches down a path of places.
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define current-voice nil
+ "current-voice
+ The name of the current voice.")
+
+;; The path to search for voices is created from the load-path with
+;; an extra list of directories appended.
+
+(defvar system-voice-path '( )
+ "system-voice-path
+ Additional directory not near the load path where voices can be
+ found, this can be redefined in lib/sitevars.scm if desired.")
+
+(defvar system-voice-path-multisyn '( )
+ "system-voice-path-multisyn
+ Additional directory not near the load path where multisyn voices can be
+ found, this can be redefined in lib/sitevars.scm if desired.")
+
+(defvar voice-path
+ (remove-duplicates
+ (append (mapcar (lambda (d) (path-append d "voices/")) load-path)
+ (mapcar (lambda (d) (path-as-directory d)) system-voice-path)
+ ))
+
+ "voice-path
+ List of places to look for voices. If not set it is initialised from
+ load-path by appending \"voices/\" to each directory with
+ system-voice-path appended.")
+
+(defvar voice-path-multisyn
+ (remove-duplicates
+ (append (mapcar (lambda (d) (path-append d "voices-multisyn/")) load-path)
+ (mapcar (lambda (d) (path-as-directory d)) system-voice-path-multisyn)
+ ))
+
+ "voice-path-multisyn
+ List of places to look for multisyn voices. If not set it is initialised from
+ load-path by appending \"voices-multisyn/\" to each directory with
+ system-voice-path-multisyn appended.")
+
+
+;; Declaration of voices. When we declare a voice we record the
+;; directory and set up an autoload for the vocie-selecting function
+
+(defvar voice-locations ()
+ "voice-locations
+ Association list recording where voices were found.")
+
+(defvar voice-location-trace nil
+ "voice-location-trace
+ Set t to print voice locations as they are found")
+
+(define (voice-location name dir doc)
+ "(voice-location NAME DIR DOCSTRING)
+ Record the location of a voice. Called for each voice found on voice-path.
+ Can be called in site-init or .festivalrc for additional voices which
+ exist elsewhere."
+ (let ((func_name (intern (string-append "voice_" name)))
+ )
+
+ (set! name (intern name))
+ (set! voice-locations (cons (cons name dir) voice-locations))
+ (eval (list 'autoload func_name (path-append dir "festvox/" name) doc))
+ (if voice-location-trace
+ (format t "Voice: %s %s\n" name dir)
+ )
+ )
+ )
+
+(define (voice-location-multisyn name rootname dir doc)
+ "(voice-location NAME ROOTNAME DIR DOCSTRING)
+ Record the location of a voice. Called for each voice found on voice-path.
+ Can be called in site-init or .festivalrc for additional voices which
+ exist elsewhere."
+ (let ((func_name (intern (string-append "voice_" name)))
+ )
+
+ (set! name (intern name))
+ (set! voice-locations (cons (cons name dir) voice-locations))
+ (eval (list 'autoload func_name (path-append dir "festvox/" rootname) doc))
+ (if voice-location-trace
+ (format t "Voice: %s %s\n" name dir)
+ )
+ )
+ )
+
+
+
+(define (current_voice_reset)
+"(current_voice_reset)
+This function is called at the start of defining any new voice.
+It is design to allow the previous voice to reset any global
+values it has messed with. If this variable value is nil then
+the function wont be called.")
+
+(define (voice_reset)
+"(voice_reset)
+This resets all variables back to acceptable values that may affect
+voice generation. This function should always be called at the
+start of any function defining a voice. In addition to reseting
+standard variables the function current_voice_reset will be called.
+This should always be set by the voice definition function (even
+if it does nothing). This allows voice specific changes to be reset
+when a new voice is selection. Unfortunately I can't force this
+to be used."
+ (Parameter.set 'Duration_Stretch 1.0)
+ (set! after_synth_hooks default_after_synth_hooks)
+
+ ;; The follow are reset to allow existing voices to continue
+ ;; to work, new voices should be setting these explicitly
+ (Parameter.set 'Token_Method 'Token_English)
+ (Parameter.set 'POS_Method Classic_POS)
+ (Parameter.set 'Phrasify_Method Classic_Phrasify)
+ (Parameter.set 'Word_Method Classic_Word)
+ (Parameter.set 'Pause_Method Classic_Pauses)
+ (Parameter.set 'PostLex_Method Classic_PostLex)
+
+ (set! diphone_module_hooks nil)
+ (set! UniSyn_module_hooks nil)
+
+ (if current_voice_reset
+ (current_voice_reset))
+ (set! current_voice_reset nil)
+)
+
+
+(defvar Voice_descriptions nil
+ "Internal variable containing list of voice descriptions as
+decribed by proclaim_voice.")
+
+(define (proclaim_voice name description)
+"(proclaim_voice NAME DESCRIPTION)
+Describe a voice to the systen. NAME should be atomic name, that
+conventionally will have voice_ prepended to name the basic selection
+function. OPTIONS is an assoc list of feature and value and must
+have at least features for language, gender, dialect and
+description. The first there of these are atomic, while the description
+is a text string describing the voice."
+ (let ((voxdesc (assoc name Voice_descriptions)))
+ (if voxdesc
+ (set-car! (cdr voxdesc) description)
+ (set! Voice_descriptions
+ (cons (list name description) Voice_descriptions))))
+)
+
+(define (voice.description name)
+"(voice.description NAME)
+Output description of named voice. If the named voice is not yet loaded
+it is loaded."
+ (let ((voxdesc (assoc name Voice_descriptions))
+ (cv current-voice))
+ (if (null voxdesc)
+ (unwind-protect
+ (begin
+ (voice.select name)
+ (voice.select cv) ;; switch back to current voice
+ (set! voxdesc (assoc name Voice_descriptions)))))
+ (if voxdesc
+ voxdesc
+ (begin
+ (format t "SIOD: unknown voice %s\n" name)
+ nil))))
+
+(define (voice.select name)
+"(voice.select NAME)
+Call function to set up voice NAME. This is normally done by
+prepending voice_ to NAME and call it as a function."
+ (eval (list (intern (string-append "voice_" name)))))
+
+(define (voice.describe name)
+"(voice.describe NAME)
+Describe voice NAME by saying its description. Unfortunately although
+it would be nice to say that voice's description in the voice itself
+its not going to work cross language. So this just uses the current
+voice. So here we assume voices describe themselves in English
+which is pretty anglo-centric, shitsurei shimasu."
+ (let ((voxdesc (voice.description name)))
+ (let ((desc (car (cdr (assoc 'description (car (cdr voxdesc)))))))
+ (cond
+ (desc (tts_text desc nil))
+ (voxdesc
+ (SayText
+ (format nil "A voice called %s exist but it has no description"
+ name)))
+ (t
+ (SayText
+ (format nil "There is no voice called %s defined" name)))))))
+
+(define (voice.list)
+"(voice.list)
+List of all (potential) voices in the system. This checks the voice-location
+list of potential voices found be scanning the voice-path at start up time.
+These names can be used as arguments to voice.description and
+voice.describe."
+ (mapcar car voice-locations))
+
+;; Voices are found on the voice-path if they are in directories of the form
+;; DIR/LANGUAGE/NAME
+
+(define (search-for-voices)
+ "(search-for-voices)
+ Search down voice-path to locate voices."
+
+ (let ((dirs voice-path)
+ (dir nil)
+ languages language
+ voices voicedir voice
+ )
+ (while dirs
+ (set! dir (car dirs))
+ (setq languages (directory-entries dir t))
+ (while languages
+ (set! language (car languages))
+ (set! voices (directory-entries (path-append dir language) t))
+ (while voices
+ (set! voicedir (car voices))
+ (set! voice (path-basename voicedir))
+ (if (string-matches voicedir ".*\\..*")
+ nil
+ (voice-location
+ voice
+ (path-as-directory (path-append dir language voicedir))
+ "voice found on path")
+ )
+ (set! voices (cdr voices))
+ )
+ (set! languages (cdr languages))
+ )
+ (set! dirs (cdr dirs))
+ )
+ )
+ )
+
+;; A single file is allowed to define multiple multisyn voices, so this has
+;; been adapted for this. Rob thinks this is just evil, but couldn't think
+;; of a better way.
+(define (search-for-voices-multisyn)
+ "(search-for-voices-multisyn)
+ Search down multisyn voice-path to locate multisyn voices."
+ (let ((dirs voice-path-multisyn)
+ (dir nil)
+ languages language
+ voices voicedir voice voice-list
+ )
+ (while dirs
+ (set! dir (car dirs))
+ (set! languages (directory-entries dir t))
+ (while languages
+ (set! language (car languages))
+ (set! voices (directory-entries (path-append dir language) t))
+ (while voices
+ (set! voicedir (car voices))
+ (set! voice (path-basename voicedir))
+ (if (string-matches voicedir ".*\\..*")
+ nil
+ (begin
+ ;; load the voice definition file, but don't evaluate it!
+ (set! voice-def-file (load (path-append dir language voicedir "festvox"
+ (string-append voicedir ".scm")) t))
+ ;; now find the "proclaim_voice" lines and register these voices.
+ (mapcar
+ (lambda (line)
+ (if (string-matches (car line) "proclaim_voice")
+ (voice-location-multisyn (intern (cadr (cadr line))) voicedir (path-append dir language voicedir) "registerd multisyn voice")))
+ voice-def-file)
+ ))
+ (set! voices (cdr voices)))
+ (set! languages (cdr languages)))
+ (set! dirs (cdr dirs)))))
+
+(search-for-voices)
+(search-for-voices-multisyn)
+
+;; We select the default voice from a list of possibilities. One of these
+;; had better exist in every installation.
+
+(define (no_voice_error)
+ (format t "\nWARNING\n")
+ (format t "No default voice found in %l\n" voice-path)
+ (format t "either no voices unpacked or voice-path is wrong\n")
+ (format t "Scheme interpreter will work, but there is no voice to speak with.\n")
+ (format t "WARNING\n\n"))
+
+(defvar voice_default 'no_voice_error
+ "voice_default
+A variable whose value is a function name that is called on start up to
+the default voice. [see Site initialization]")
+
+(defvar default-voice-priority-list
+ '(kal_diphone
+ cmu_us_slt_cg
+ cmu_us_rms_cg
+ cmu_us_bdl_cg
+ cmu_us_jmk_cg
+ cmu_us_awb_cg
+; cstr_rpx_nina_multisyn ; restricted license (lexicon)
+; cstr_rpx_jon_multisyn ; restricted license (lexicon)
+; cstr_edi_awb_arctic_multisyn ; restricted license (lexicon)
+; cstr_us_awb_arctic_multisyn
+ ked_diphone
+ don_diphone
+ rab_diphone
+ en1_mbrola
+ us1_mbrola
+ us2_mbrola
+ us3_mbrola
+ gsw_diphone ;; not publically distributed
+ el_diphone
+ )
+ "default-voice-priority-list
+ List of voice names. The first of them available becomes the default voice.")
+
+(let ((voices default-voice-priority-list)
+ voice)
+ (while (and voices (eq voice_default 'no_voice_error))
+ (set! voice (car voices))
+ (if (assoc voice voice-locations)
+ (set! voice_default (intern (string-append "voice_" voice)))
+ )
+ (set! voices (cdr voices))
+ )
+ )
+
+
+(provide 'voices)
diff --git a/CosyVoice-ttsfrd/resource/festival/voices/english/rab_diphone/group/rablpc16k.group b/CosyVoice-ttsfrd/resource/festival/voices/english/rab_diphone/group/rablpc16k.group
new file mode 100644
index 0000000000000000000000000000000000000000..def4210b6ff9770888a7b8e632834da245d88b6a
--- /dev/null
+++ b/CosyVoice-ttsfrd/resource/festival/voices/english/rab_diphone/group/rablpc16k.group
@@ -0,0 +1,60719 @@
+EST_File index
+DataType ascii
+NumEntries 2005
+IndexName rab_lpc_sep
+DataFormat grouped
+Version 2
+track_file_format est_binary
+sig_file_format snd
+EST_Header_End
+r-uh 0 1257 2
+r-e 3091 4424 4
+r-i 6470 7651 3
+r-o 9329 10662 3
+r-u 12730 14139 5
+r-a 16208 17617 2
+r-ii 19813 21222 3
+r-@@ 23314 24951 4
+r-aa 27600 29389 4
+r-oo 32442 34155 4
+r-uu 36882 38443 4
+r-ei 40769 42330 3
+r-ai 44831 46392 5
+r-oi 48945 50354 3
+r-au 52615 54404 3
+r-ou 57413 58974 2
+r-e@ 61455 63244 3
+r-i@ 66128 67917 2
+r-u@ 70752 72693 6
+w-uh 75788 77121 5
+w-e 79134 80543 3
+w-i 82648 83905 4
+w-o 85705 86962 4
+w-u 88845 90102 5
+w-a 91933 93418 3
+w-ii 95766 97251 5
+w-@@ 99553 101266 4
+w-aa 103994 105859 4
+w-oo 108940 110805 5
+w-uu 113883 115520 4
+w-ei 117988 119853 5
+w-ai 122856 124721 5
+w-oi 127799 129740 6
+w-au 132837 134626 4
+w-ou 137593 139230 4
+w-e@ 141867 143732 5
+w-i@ 146700 148489 4
+w-u@ 151287 153076 5
+y-uh 155897 157306 4
+y-e 159435 161224 4
+y-i 163927 165260 4
+y-o 167076 168485 3
+y-u 170729 172138 4
+y-a 174249 175582 3
+y-ii 177697 179106 4
+y-@@ 181289 182926 3
+y-aa 185619 187408 4
+y-oo 190492 192281 4
+y-uu 195206 196767 4
+y-ei 199077 200714 3
+y-ai 203292 205005 4
+y-oi 207849 209562 4
+y-au 212403 214040 3
+y-ou 216776 218337 4
+y-e@ 220919 222860 4
+y-i@ 225958 227595 3
+y-u@ 230135 232000 4
+l-uh 235025 236358 5
+l-e 238252 239509 4
+l-i 241265 242369 4
+l-o 243877 245210 4
+l-u 247130 248463 5
+l-a 250355 251612 4
+l-ii 253365 254698 3
+l-@@ 256513 258150 4
+l-aa 260614 262403 5
+l-oo 265150 266939 4
+l-uu 269617 271102 3
+l-ei 273203 274840 4
+l-ai 277406 279119 3
+l-oi 281770 283483 4
+l-au 286163 288028 4
+l-ou 290867 292352 2
+l-e@ 294649 296362 4
+l-i@ 298922 300863 5
+l-u@ 303796 305585 3
+m-uh 308286 309695 5
+m-e 311678 313087 4
+m-i 315137 316394 4
+m-o 318072 319481 5
+m-u 321558 322739 3
+m-a 324231 325716 5
+m-ii 327929 329414 4
+m-@@ 331522 333235 4
+m-aa 335872 337661 5
+m-oo 340566 342355 6
+m-uu 345133 346770 4
+m-ei 349189 350826 4
+m-ai 353351 355140 6
+m-oi 358038 359751 4
+m-au 362447 364084 4
+m-ou 366636 368273 4
+m-e@ 370694 372483 5
+m-i@ 375141 377006 5
+m-u@ 379836 381701 5
+n-uh 384520 385929 5
+n-e 387962 389447 4
+n-i 391675 392856 4
+n-o 394433 396146 4
+n-u 398813 400146 5
+n-a 401986 403319 3
+n-ii 405271 406680 4
+n-@@ 408652 410365 5
+n-aa 413038 414751 4
+n-oo 417532 419169 4
+n-uu 421702 423111 4
+n-ei 425264 426749 3
+n-ai 429022 430735 4
+n-oi 433545 435258 5
+n-au 438011 439648 3
+n-ou 442167 443652 3
+n-e@ 445835 447320 2
+n-i@ 449577 451214 3
+n-u@ 453755 455468 4
+ng-uh 458082 459339 4
+ng-e 461041 462374 4
+ng-i 464336 465669 7
+ng-o 467632 468889 3
+ng-u 470718 471975 5
+ng-a 473657 474914 3
+ng-ii 476683 478168 2
+ng-@@ 480203 481764 4
+ng-aa 483994 485707 3
+ng-oo 488369 489930 3
+ng-uu 492206 493843 4
+ng-ei 496320 497957 3
+ng-ai 500510 502375 6
+ng-oi 505660 507297 3
+ng-au 509708 511345 3
+ng-ou 513906 515391 3
+ng-e@ 517589 519302 4
+ng-i@ 521862 523727 3
+ng-u@ 526596 528461 5
+p-uh 531590 532847 4
+p-e 534543 535876 3
+p-i 537657 538838 3
+p-o 540418 541675 3
+p-u 543399 544656 5
+p-a 546404 547737 4
+p-ii 549662 551147 4
+p-@@ 553316 554877 4
+p-aa 557187 558824 4
+p-oo 561346 562983 5
+p-uu 565538 567023 5
+p-ei 569197 570834 3
+p-ai 573361 575074 3
+p-oi 577713 579274 2
+p-au 581673 583310 3
+p-ou 585756 587241 3
+p-e@ 589393 590954 2
+p-i@ 593186 594671 2
+p-u@ 596925 598486 3
+t-uh 600829 602238 5
+t-e 604378 605787 4
+t-i 607905 609162 4
+t-o 610922 612255 4
+t-u 614215 615548 5
+t-a 617480 618889 5
+t-ii 620993 622478 5
+t-@@ 624653 626214 3
+t-aa 628629 630266 3
+t-oo 632863 634424 3
+t-uu 636854 638643 6
+t-ei 641321 643110 6
+t-ai 645896 647533 4
+t-oi 650111 651748 4
+t-au 654306 655867 3
+t-ou 658307 659792 3
+t-e@ 662039 663676 3
+t-i@ 666218 667855 3
+t-u@ 670273 672062 5
+k-uh 674685 676018 4
+k-e 677877 679286 4
+k-i 681329 682662 5
+k-o 684545 685802 4
+k-u 687537 688641 3
+k-a 690155 691564 6
+k-ii 693571 694980 4
+k-@@ 697056 698617 4
+k-aa 700955 702440 5
+k-oo 704683 706320 6
+k-uu 708919 710404 4
+k-ei 712589 714074 4
+k-ai 716188 717673 3
+k-oi 719967 721680 6
+k-au 724305 725942 5
+k-ou 728412 729745 3
+k-e@ 731682 733167 2
+k-i@ 735360 736845 4
+k-u@ 739127 740840 4
+b-uh 743308 744260 1
+b-e 745551 746655 2
+b-i 748140 749092 1
+b-o 750295 751323 1
+b-u 752722 753750 1
+b-a 755262 756443 2
+b-ii 758158 759262 2
+b-@@ 760853 762110 1
+b-aa 763984 765393 2
+b-oo 767626 769035 2
+b-uu 771252 772509 2
+b-ei 774436 775769 2
+b-ai 777773 779182 2
+b-oi 781508 782841 2
+b-au 784886 786219 1
+b-ou 788316 789649 2
+b-e@ 791649 792982 1
+b-i@ 795016 796120 1
+b-u@ 797701 799034 1
+d-uh 801094 802198 3
+d-e 803795 804899 3
+d-i 806676 808009 5
+d-o 810150 811331 2
+d-u 813115 814067 1
+d-a 815452 816709 2
+d-ii 818721 819902 2
+d-@@ 821633 823042 2
+d-aa 825347 826680 1
+d-oo 828844 830253 2
+d-uu 832510 833843 4
+d-ei 835901 837158 1
+d-ai 839063 840472 1
+d-oi 842690 843947 1
+d-au 845972 847305 1
+d-ou 849469 850726 2
+d-e@ 852652 854061 2
+d-i@ 856261 857594 1
+d-u@ 859754 861239 1
+g-uh 863453 864481 2
+g-e 866001 867029 1
+g-i 868379 869331 1
+g-o 870555 871583 1
+g-u 873074 874178 2
+g-a 875646 876827 1
+g-ii 878531 879712 2
+g-@@ 881371 882780 3
+g-aa 884952 886361 2
+g-oo 888542 890027 2
+g-uu 892278 893535 2
+g-ei 895230 896639 2
+g-ai 898732 900065 1
+g-oi 902108 903517 2
+g-au 905633 907042 1
+g-ou 909199 910608 2
+g-e@ 912718 914203 2
+g-i@ 916462 917947 2
+g-u@ 920149 921710 3
+s-uh 924059 925468 6
+s-e 927535 929096 5
+s-i 931568 932825 5
+s-o 934650 935983 5
+s-u 937994 939251 4
+s-a 941112 942521 5
+s-ii 944710 946043 5
+s-@@ 947996 949633 6
+s-aa 952204 953841 5
+s-oo 956477 958190 6
+s-uu 960858 962343 6
+s-ei 964613 966098 6
+s-ai 968442 970003 5
+s-oi 972473 973958 5
+s-au 976316 977877 4
+s-ou 980269 981830 5
+s-e@ 984253 986042 5
+s-i@ 988949 990662 6
+s-u@ 993365 995002 4
+sh-uh 997509 998918 6
+sh-e 1001053 1002462 4
+sh-i 1004576 1005833 5
+sh-o 1007677 1009010 4
+sh-u 1010996 1012253 6
+sh-a 1014066 1015475 5
+sh-ii 1017555 1018964 5
+sh-@@ 1020981 1022542 4
+sh-aa 1024948 1026737 6
+sh-oo 1029608 1031169 4
+sh-uu 1033559 1035120 6
+sh-ei 1037512 1039149 5
+sh-ai 1041711 1043348 4
+sh-oi 1045925 1047638 5
+sh-au 1050295 1052008 5
+sh-ou 1054761 1056398 6
+sh-e@ 1058895 1060684 5
+sh-i@ 1063438 1065227 6
+sh-u@ 1068069 1069782 5
+f-uh 1072476 1073733 4
+f-e 1075542 1076799 4
+f-i 1078656 1079913 5
+f-o 1081731 1082988 5
+f-u 1084867 1086048 4
+f-a 1087673 1089082 5
+f-ii 1091188 1092673 5
+f-@@ 1094882 1096519 5
+f-aa 1099036 1100749 5
+f-oo 1103439 1105152 6
+f-uu 1107800 1109437 5
+f-ei 1111889 1113526 5
+f-ai 1116133 1117770 4
+f-oi 1120369 1122082 5
+f-au 1124854 1126567 4
+f-ou 1129284 1130921 4
+f-e@ 1133338 1135203 5
+f-i@ 1138126 1140067 7
+f-u@ 1143189 1144978 5
+th-uh 1147662 1148995 5
+th-e 1150946 1152279 5
+th-i 1154327 1155660 5
+th-o 1157667 1159000 5
+th-u 1160994 1162327 5
+th-a 1164228 1165713 5
+th-ii 1168007 1169492 5
+th-@@ 1171731 1173596 8
+th-aa 1176520 1178309 5
+th-oo 1181100 1182737 5
+th-uu 1185290 1186927 6
+th-ei 1189450 1191087 5
+th-ai 1193633 1195270 5
+th-oi 1197834 1199471 5
+th-au 1202108 1203593 3
+th-ou 1205832 1207317 4
+th-e@ 1209550 1211339 4
+th-i@ 1214238 1216027 5
+th-u@ 1218825 1220690 6
+z-uh 1223671 1224775 2
+z-e 1226398 1227502 2
+z-i 1229192 1230373 3
+z-o 1232212 1233393 3
+z-u 1235234 1236415 3
+z-a 1238137 1239394 3
+z-ii 1241396 1242729 3
+z-@@ 1244663 1246148 2
+z-aa 1248553 1250190 3
+z-oo 1252886 1254447 3
+z-uu 1257138 1258623 3
+z-ei 1261044 1262605 2
+z-ai 1265106 1266667 3
+z-oi 1269303 1270940 3
+z-au 1273602 1275087 3
+z-ou 1277551 1278884 2
+z-e@ 1281083 1282644 3
+z-i@ 1285274 1286911 3
+z-u@ 1289656 1291217 2
+zh-uh 1293802 1295059 2
+zh-e 1296820 1298077 2
+zh-i 1300028 1301132 3
+zh-o 1302720 1304053 3
+zh-u 1305922 1307103 2
+zh-a 1308895 1310228 3
+zh-ii 1312364 1313773 2
+zh-@@ 1315979 1317540 3
+zh-aa 1320000 1321637 2
+zh-oo 1324498 1326059 2
+zh-uu 1328638 1330047 3
+zh-ei 1332117 1333678 3
+zh-ai 1336100 1337813 2
+zh-oi 1340552 1342189 3
+zh-au 1344731 1346292 3
+zh-ou 1348603 1350088 3
+zh-e@ 1352454 1354319 3
+zh-i@ 1357225 1359090 4
+zh-u@ 1362027 1363968 4
+v-uh 1366934 1368191 4
+v-e 1370135 1371392 4
+v-i 1373420 1374677 4
+v-o 1376619 1377952 4
+v-u 1380163 1381420 3
+v-a 1383388 1384721 4
+v-ii 1386877 1388286 4
+v-@@ 1390450 1392011 4
+v-aa 1394516 1396153 4
+v-oo 1398838 1400475 3
+v-uu 1403223 1404632 2
+v-ei 1406806 1408367 4
+v-ai 1410993 1412554 3
+v-oi 1415225 1416938 3
+v-au 1419855 1421492 3
+v-ou 1424102 1425587 3
+v-e@ 1428023 1429660 3
+v-i@ 1432386 1434327 5
+v-u@ 1437618 1439635 4
+dh-uh 1443004 1444261 3
+dh-e 1446186 1447367 3
+dh-i 1449192 1450449 4
+dh-o 1452351 1453608 3
+dh-u 1455565 1456822 3
+dh-a 1458681 1460090 3
+dh-ii 1462282 1463843 4
+dh-@@ 1466202 1467839 4
+dh-aa 1470520 1472157 3
+dh-oo 1474920 1476557 3
+dh-uu 1479202 1480611 2
+dh-ei 1482718 1484203 3
+dh-ai 1486558 1488195 3
+dh-oi 1490920 1492633 4
+dh-au 1495461 1497174 3
+dh-ou 1500043 1501680 4
+dh-e@ 1504478 1506343 4
+dh-i@ 1509492 1511357 4
+dh-u@ 1514598 1516539 5
+ch-uh 1519807 1521672 12
+ch-e 1524720 1526357 9
+ch-i 1529051 1530764 11
+ch-o 1533489 1535278 11
+ch-u 1538204 1539917 10
+ch-a 1542665 1544530 11
+ch-ii 1547575 1549744 13
+ch-@@ 1553390 1555407 10
+ch-aa 1558808 1561205 12
+ch-oo 1565282 1567527 12
+ch-uu 1571313 1573406 12
+ch-ei 1576794 1578811 10
+ch-ai 1582137 1584230 9
+ch-oi 1587891 1590060 12
+ch-au 1593812 1595905 10
+ch-ou 1599419 1601360 10
+ch-e@ 1604604 1606773 9
+ch-i@ 1610411 1612732 11
+ch-u@ 1616670 1618839 10
+jh-uh 1622376 1623709 6
+jh-e 1625936 1627497 7
+jh-i 1630069 1631554 7
+jh-o 1633906 1635315 6
+jh-u 1637567 1638976 7
+jh-a 1641229 1642714 6
+jh-ii 1645293 1647006 7
+jh-@@ 1649695 1651636 8
+jh-aa 1654851 1656640 6
+jh-oo 1659638 1661427 6
+jh-uu 1664409 1666122 5
+jh-ei 1668861 1670650 6
+jh-ai 1673552 1675341 5
+jh-oi 1678270 1680135 7
+jh-au 1683211 1685076 7
+jh-ou 1688264 1690053 6
+jh-e@ 1693058 1694923 6
+jh-i@ 1698124 1700217 8
+jh-u@ 1703723 1705740 7
+h-uh 1709257 1710438 3
+h-e 1712148 1713481 4
+h-i 1715349 1716530 3
+h-o 1718196 1719377 3
+h-u 1721167 1722348 3
+h-a 1724017 1725350 4
+h-ii 1727223 1728632 5
+h-@@ 1730621 1732182 3
+h-aa 1734518 1736003 3
+h-oo 1738296 1739781 3
+h-uu 1742000 1743333 2
+h-ei 1745244 1746577 2
+h-ai 1748467 1749876 4
+h-oi 1752034 1753367 2
+h-au 1755348 1756681 3
+h-ou 1758841 1760098 3
+h-e@ 1762009 1763570 3
+h-i@ 1765989 1767550 3
+h-u@ 1769897 1771534 3
+r-@ 1773923 1774799 2
+w-@ 1776060 1776936 2
+y-@ 1778226 1779178 2
+l-@ 1780626 1781502 1
+m-@ 1782779 1783731 3
+n-@ 1785146 1786022 1
+ng-@ 1787337 1788289 3
+p-@ 1789670 1790622 3
+t-@ 1791946 1793050 4
+k-@ 1794785 1795889 4
+b-@ 1797596 1798472 1
+d-@ 1799698 1800574 1
+g-@ 1801895 1802695 1
+s-@ 1803741 1804769 3
+sh-@ 1806349 1807377 3
+f-@ 1808887 1809915 3
+th-@ 1811439 1812467 3
+z-@ 1814016 1814968 2
+zh-@ 1816471 1817499 2
+v-@ 1819140 1820016 2
+dh-@ 1821330 1822206 1
+ch-@ 1823488 1824821 6
+jh-@ 1827076 1828257 4
+h-@ 1830212 1831012 1
+uh-r 1832042 1833223 5
+uh-w 1834923 1836256 5
+uh-y 1838346 1839679 5
+uh-l 1841706 1842810 5
+uh-ll 1844302 1845483 4
+uh-m 1847011 1848192 4
+uh-n 1849837 1851018 5
+uh-ng 1852671 1853928 3
+uh-s 1855710 1857119 4
+uh-sh 1859387 1860720 5
+uh-f 1862818 1864227 6
+uh-th 1866364 1867621 4
+uh-z 1869555 1870659 3
+uh-zh 1872443 1873928 7
+uh-v 1875853 1877034 5
+uh-dh 1878983 1880240 6
+uh-h 1882247 1883580 6
+uh-b 1885522 1886626 6
+uh-d 1888141 1889398 5
+uh-g 1891216 1892320 5
+uh-p 1893893 1895074 4
+uh-t 1896832 1898089 5
+uh-k 1899896 1900924 4
+e-r 1902368 1903549 4
+e-w 1905185 1906442 6
+e-y 1908322 1909579 5
+e-l 1911368 1912625 5
+e-ll 1914433 1915614 4
+e-m 1917209 1918466 5
+e-n 1920233 1921337 3
+e-ng 1922846 1924179 4
+e-s 1926096 1927505 5
+e-sh 1929649 1931058 6
+e-f 1933197 1934606 5
+e-th 1936916 1938401 6
+e-z 1940655 1941988 6
+e-zh 1944158 1945795 9
+e-v 1947913 1949322 7
+e-dh 1951691 1952948 6
+e-h 1954912 1956245 6
+e-b 1958190 1959218 5
+e-d 1960612 1961793 6
+e-g 1963451 1964555 5
+e-p 1966048 1967533 6
+e-t 1969701 1970805 5
+e-k 1972329 1973433 5
+i-r 1975024 1976205 5
+i-w 1977838 1979019 5
+i-y 1980768 1981872 3
+i-l 1983402 1984506 4
+i-ll 1985966 1987070 4
+i-m 1988453 1989634 4
+i-n 1991272 1992453 4
+i-ng 1994101 1995358 5
+i-s 1997079 1998336 3
+i-sh 2000080 2001261 3
+i-f 2003042 2004375 5
+i-th 2006248 2007581 4
+i-z 2009612 2010793 5
+i-zh 2012562 2013895 7
+i-v 2015557 2016661 5
+i-dh 2018291 2019395 4
+i-h 2021027 2022055 3
+i-b 2023439 2024467 4
+i-d 2025871 2027052 5
+i-g 2028594 2029546 4
+i-p 2030818 2031999 5
+i-t 2033662 2034843 5
+i-k 2036345 2037449 4
+o-r 2038881 2039985 5
+o-w 2041522 2042855 5
+o-y 2044984 2046165 4
+o-l 2047899 2048775 2
+o-ll 2049920 2050872 3
+o-m 2052069 2053326 5
+o-n 2055249 2056430 5
+o-ng 2058091 2059348 4
+o-s 2061195 2062528 5
+o-sh 2064782 2066191 5
+o-f 2068373 2069706 5
+o-th 2071813 2073070 4
+o-z 2075125 2076382 6
+o-zh 2078404 2079661 6
+o-v 2081739 2083148 5
+o-dh 2085354 2086687 5
+o-h 2088781 2090038 4
+o-b 2091977 2093005 5
+o-d 2094458 2095715 6
+o-g 2097566 2098747 6
+o-p 2100583 2101840 4
+o-t 2103729 2104910 6
+o-k 2106677 2107934 5
+u-r 2109850 2110878 4
+u-w 2112211 2113315 4
+u-y 2114821 2116078 5
+u-l 2117890 2118994 4
+u-ll 2120523 2121704 4
+u-m 2123254 2124511 4
+u-n 2126344 2127448 4
+u-ng 2128961 2130142 5
+u-s 2131775 2133032 4
+u-sh 2135002 2136411 5
+u-f 2138629 2139962 4
+u-th 2142085 2143494 5
+u-z 2145641 2146898 6
+u-zh 2148839 2150096 6
+u-v 2152021 2153202 5
+u-dh 2154974 2156155 5
+u-h 2157907 2159088 5
+u-b 2160941 2162045 5
+u-d 2163589 2164693 6
+u-g 2166190 2167294 6
+u-p 2168855 2170112 4
+u-t 2171924 2173105 6
+u-k 2174807 2175988 4
+a-r 2177647 2178904 6
+a-w 2180831 2182088 5
+a-y 2184161 2185494 6
+a-l 2187680 2188784 5
+a-ll 2190338 2191442 4
+a-m 2193028 2194285 5
+a-n 2196116 2197297 6
+a-ng 2198998 2200407 6
+a-s 2202581 2203990 6
+a-sh 2206269 2207602 6
+a-f 2209745 2211078 5
+a-th 2213178 2214587 5
+a-z 2216835 2218168 7
+a-zh 2220299 2221632 7
+a-v 2223773 2225030 6
+a-dh 2227047 2228304 6
+a-h 2230341 2231750 6
+a-b 2233979 2235236 7
+a-d 2237104 2238285 7
+a-g 2240107 2241211 6
+a-p 2242823 2244004 4
+a-t 2245734 2246991 6
+a-k 2248877 2250058 5
+ii-r 2251848 2253105 6
+ii-w 2255002 2256183 5
+ii-y 2258013 2259346 5
+ii-l 2261465 2262798 7
+ii-ll 2264884 2266217 7
+ii-m 2268025 2269358 6
+ii-n 2271261 2272518 5
+ii-ng 2274336 2275821 6
+ii-s 2278139 2279624 6
+ii-sh 2282059 2283544 6
+ii-f 2286015 2287500 6
+ii-th 2289799 2291208 5
+ii-z 2293470 2294803 6
+ii-zh 2296959 2298292 7
+ii-v 2300381 2301638 7
+ii-dh 2303598 2304931 8
+ii-h 2307099 2308356 6
+ii-b 2310309 2311490 6
+ii-d 2313211 2314315 6
+ii-g 2315920 2317177 6
+ii-p 2319088 2320345 6
+ii-t 2322083 2323187 6
+ii-k 2324632 2325813 6
+@@-r 2327509 2328842 8
+@@-w 2330784 2332193 8
+@@-y 2334334 2335819 8
+@@-l 2338276 2339761 8
+@@-ll 2342035 2343216 6
+@@-m 2344789 2346198 7
+@@-n 2348315 2349800 9
+@@-ng 2352016 2353577 8
+@@-s 2355954 2357515 8
+@@-sh 2360060 2361545 7
+@@-f 2364052 2365537 6
+@@-th 2367934 2369495 8
+@@-z 2371972 2373381 8
+@@-zh 2375695 2377180 10
+@@-v 2379765 2381174 8
+@@-dh 2383417 2384826 8
+@@-h 2387191 2388676 9
+@@-b 2391074 2392331 8
+@@-d 2394161 2395418 8
+@@-g 2397263 2398520 8
+@@-p 2400389 2401722 7
+@@-t 2403828 2405009 8
+@@-k 2406730 2407987 6
+aa-l 2409905 2411466 9
+oo-r 2413882 2415139 6
+oo-w 2417001 2418410 7
+oo-y 2420747 2422156 7
+oo-l 2424407 2425740 7
+oo-ll 2427784 2429041 6
+oo-m 2430774 2432183 8
+oo-n 2434421 2435830 8
+oo-ng 2438022 2439507 8
+oo-s 2441885 2443294 6
+oo-sh 2445582 2447067 8
+oo-f 2449424 2450909 7
+oo-th 2453326 2454887 8
+oo-z 2457458 2458943 9
+oo-zh 2461428 2462913 9
+oo-v 2465456 2466865 9
+oo-dh 2469217 2470702 9
+oo-h 2473135 2474696 9
+oo-b 2477292 2478549 7
+oo-d 2480479 2481812 8
+oo-g 2483842 2485099 8
+oo-p 2486987 2488320 7
+oo-t 2490364 2491697 8
+oo-k 2493751 2495084 7
+uu-r 2497193 2498602 8
+uu-w 2500641 2502126 8
+uu-y 2504478 2506039 9
+uu-l 2508535 2509944 8
+uu-ll 2512109 2513366 6
+uu-m 2515036 2516445 8
+uu-n 2518609 2520018 8
+uu-ng 2522117 2523602 7
+uu-s 2525939 2527424 7
+uu-sh 2529858 2531267 7
+uu-f 2533445 2534854 6
+uu-th 2537148 2538557 5
+uu-z 2540788 2542121 7
+uu-zh 2544451 2545784 7
+uu-v 2548057 2549466 8
+uu-dh 2551780 2553189 7
+uu-h 2555525 2556934 6
+uu-b 2559247 2560428 6
+uu-d 2562171 2563428 7
+uu-g 2565252 2566585 7
+uu-p 2568518 2569927 7
+uu-t 2571938 2573195 7
+uu-k 2575103 2576284 6
+ei-r 2578078 2579487 8
+ei-w 2581655 2583064 8
+ei-y 2585393 2586878 5
+ei-l 2589240 2590497 6
+ei-ll 2592413 2593670 5
+ei-m 2595383 2596792 7
+ei-n 2598949 2600434 8
+ei-ng 2602854 2604339 6
+ei-s 2606591 2608076 7
+ei-sh 2610512 2611997 6
+ei-f 2614489 2615898 6
+ei-th 2618214 2619699 7
+ei-z 2622115 2623600 9
+ei-zh 2625997 2627558 11
+ei-v 2630278 2631763 9
+ei-dh 2634195 2635528 7
+ei-h 2637695 2639180 8
+ei-b 2641677 2643010 7
+ei-d 2645038 2646371 9
+ei-g 2648414 2649747 8
+ei-p 2651695 2652876 6
+ei-t 2654562 2655743 6
+ei-k 2657430 2658611 6
+ai-r 2660332 2661969 10
+ai-w 2664577 2666062 9
+ai-y 2668609 2670018 7
+ai-l 2672429 2673838 8
+ai-ll 2676183 2677516 7
+ai-m 2679440 2680925 9
+ai-n 2683285 2684770 9
+ai-ng 2687176 2688889 10
+ai-s 2691710 2693271 8
+ai-sh 2695917 2697478 8
+ai-f 2700104 2701741 8
+ai-th 2704484 2706045 7
+ai-z 2708690 2710099 8
+ai-zh 2712582 2714067 9
+ai-v 2716749 2718158 8
+ai-dh 2720493 2721978 9
+ai-h 2724628 2726113 8
+ai-b 2728678 2730011 8
+ai-d 2732029 2733362 8
+ai-g 2735488 2736821 8
+ai-p 2738942 2740351 7
+ai-t 2742552 2743885 7
+ai-k 2745927 2747031 5
+oi-r 2748679 2750012 7
+oi-w 2752049 2753534 9
+oi-y 2756055 2757464 7
+oi-l 2759843 2761328 8
+oi-ll 2763717 2765050 6
+oi-m 2766914 2768399 9
+oi-n 2770804 2772213 7
+oi-ng 2774467 2776104 9
+oi-s 2778768 2780253 7
+oi-sh 2782780 2784341 7
+oi-f 2786954 2788591 8
+oi-th 2791297 2792858 7
+oi-z 2795461 2796946 9
+oi-zh 2799544 2801105 10
+oi-v 2803865 2805426 10
+oi-dh 2808148 2809633 9
+oi-h 2812271 2813832 9
+oi-b 2816467 2817876 8
+oi-d 2820060 2821393 9
+oi-g 2823386 2824719 9
+oi-p 2826713 2828122 7
+oi-t 2830267 2831980 13
+oi-k 2834732 2835989 7
+au-r 2837876 2839361 10
+au-w 2841910 2843395 9
+au-y 2845876 2847285 8
+au-l 2849678 2851239 10
+au-ll 2853902 2855235 6
+au-m 2857157 2858718 10
+au-n 2861345 2862906 9
+au-ng 2865483 2867196 9
+au-s 2870228 2871865 9
+au-sh 2874607 2876016 7
+au-f 2878407 2879816 7
+au-th 2882106 2883591 7
+au-z 2885997 2887330 8
+au-zh 2889747 2891232 9
+au-v 2893866 2895275 8
+au-dh 2897725 2899058 7
+au-h 2901335 2902820 9
+au-b 2905535 2907020 9
+au-d 2909385 2910870 9
+au-g 2913275 2914760 9
+au-p 2917131 2918540 7
+au-t 2920760 2922093 7
+au-k 2924180 2925437 6
+ou-r 2927437 2928846 9
+ou-w 2931210 2932543 6
+ou-y 2934582 2936067 7
+ou-l 2938499 2939908 7
+ou-ll 2942205 2943386 4
+ou-m 2944973 2946382 7
+ou-n 2948601 2950010 7
+ou-ng 2952151 2953560 6
+ou-s 2955650 2957135 7
+ou-sh 2959504 2960913 7
+ou-f 2963149 2964558 6
+ou-th 2966830 2968315 6
+ou-z 2970678 2972011 8
+ou-zh 2974308 2975641 8
+ou-v 2977960 2979293 7
+ou-dh 2981478 2982811 7
+ou-h 2985105 2986666 7
+ou-b 2989275 2990532 7
+ou-d 2992395 2993652 7
+ou-g 2995582 2996915 8
+ou-p 2998962 3000295 6
+ou-t 3002337 3003594 6
+ou-k 3005488 3006669 5
+e@-r 3008473 3009882 7
+e@-w 3012319 3013728 8
+e@-y 3016352 3017761 8
+e@-l 3020188 3021597 8
+e@-ll 3024118 3025451 7
+e@-m 3027462 3028871 8
+e@-n 3031240 3032725 8
+e@-ng 3035276 3036837 7
+e@-s 3039538 3041251 9
+e@-sh 3044233 3046022 9
+e@-f 3049116 3050753 8
+e@-th 3053663 3055452 10
+e@-z 3058561 3060122 10
+e@-zh 3062945 3064506 9
+e@-v 3067389 3068798 8
+e@-dh 3071464 3073025 9
+e@-h 3075997 3077406 8
+e@-b 3079943 3081352 8
+e@-d 3083594 3084927 9
+e@-g 3087160 3088493 9
+e@-p 3090692 3092177 8
+e@-t 3094598 3096083 9
+e@-k 3098463 3099872 7
+i@-r 3102211 3103620 7
+i@-w 3105870 3107431 10
+i@-y 3110228 3111789 8
+i@-l 3114440 3116001 9
+i@-ll 3118778 3120263 7
+i@-m 3122496 3123981 8
+i@-n 3126541 3128026 8
+i@-ng 3130635 3132196 7
+i@-s 3134876 3136741 10
+i@-sh 3139937 3141726 10
+i@-f 3144771 3146408 8
+i@-th 3149254 3150891 9
+i@-z 3153609 3155170 10
+i@-zh 3158070 3159631 10
+i@-v 3162576 3164213 11
+i@-dh 3167266 3168675 8
+i@-h 3171096 3172581 8
+i@-b 3175062 3176395 8
+i@-d 3178567 3179976 9
+i@-g 3182281 3183766 9
+i@-p 3186227 3187636 7
+i@-t 3190028 3191437 8
+i@-k 3193673 3195082 8
+u@-r 3197349 3198986 9
+u@-w 3201540 3203025 9
+u@-y 3205558 3207119 8
+u@-l 3209734 3211371 10
+u@-ll 3214368 3215929 8
+u@-m 3218267 3219828 9
+u@-n 3222417 3224130 9
+u@-ng 3227062 3228775 8
+u@-s 3231619 3233408 8
+u@-sh 3236613 3238630 10
+u@-f 3242151 3243864 9
+u@-th 3246820 3248533 9
+u@-z 3251549 3253262 11
+u@-zh 3256603 3258240 12
+u@-v 3261406 3263119 11
+u@-dh 3266197 3267834 9
+u@-h 3270858 3272571 11
+u@-b 3275564 3277125 11
+u@-d 3279699 3281260 12
+u@-g 3283770 3285255 10
+u@-p 3287709 3289346 10
+u@-t 3292000 3293333 9
+u@-k 3295412 3296897 9
+@-r 3299330 3300511 2
+@-w 3302361 3303313 2
+@-y 3304700 3305804 3
+@-l 3307515 3308696 3
+@-m 3310574 3311678 1
+@-n 3313291 3314395 1
+@-ng 3316017 3317045 2
+@-p 3318484 3319588 1
+@-t 3321309 3322337 3
+@-k 3323783 3324811 1
+@-b 3326326 3327354 2
+@-d 3328903 3329931 2
+@-g 3331370 3332398 3
+@-sh 3333874 3335359 1
+@-f 3337847 3339332 2
+@-th 3341838 3343323 3
+@-z 3345812 3347145 3
+@-zh 3349515 3350848 4
+@-v 3353150 3354407 2
+@-dh 3356560 3357741 2
+@-h 3359753 3361238 3
+ii-uh 3363810 3365295 6
+ii-e 3367631 3369040 4
+ii-i 3371280 3372689 5
+ii-o 3374835 3376244 4
+ii-u 3378456 3379789 4
+ii-a 3381899 3383308 4
+ii-ii 3385581 3387142 6
+ii-@@ 3389703 3391340 5
+ii-aa 3393945 3395658 3
+ii-oo 3398519 3400156 4
+ii-uu 3402994 3404403 3
+ii-ei 3406768 3408253 3
+ii-ai 3410681 3412318 3
+ii-oi 3415202 3416763 3
+ii-au 3419459 3421020 2
+ii-ou 3423782 3425267 4
+ii-e@ 3427779 3429416 2
+ii-i@ 3432297 3434086 6
+ii-u@ 3437240 3438953 3
+@@-uh 3441922 3443255 7
+@@-e 3445461 3446870 5
+@@-i 3449284 3450541 5
+@@-o 3452667 3454000 6
+@@-u 3456237 3457494 6
+@@-a 3459664 3461073 5
+@@-ii 3463420 3464829 5
+@@-@@ 3467231 3468792 6
+@@-aa 3471537 3473098 5
+@@-oo 3475969 3477530 4
+@@-uu 3480391 3481876 6
+@@-ei 3484574 3486059 4
+@@-ai 3488811 3490372 4
+@@-oi 3493277 3494762 5
+@@-au 3497538 3499175 4
+@@-ou 3502296 3503781 5
+@@-e@ 3506520 3508309 5
+@@-i@ 3511729 3513290 2
+@@-u@ 3516122 3517835 6
+aa-uh 3520881 3522366 8
+aa-e 3525165 3526726 5
+aa-i 3529694 3531027 5
+aa-o 3533357 3534842 6
+aa-u 3537695 3539104 6
+aa-a 3541634 3543119 6
+aa-ii 3545888 3547373 5
+aa-@@ 3550123 3551836 5
+aa-aa 3555218 3556855 7
+aa-oo 3560038 3561827 7
+aa-uu 3565234 3566871 5
+aa-ei 3570014 3571499 5
+aa-ai 3574239 3575876 6
+aa-oi 3578967 3580528 4
+aa-au 3583535 3585172 5
+aa-ou 3588344 3589905 6
+aa-e@ 3593018 3594883 3
+aa-i@ 3598564 3600277 4
+aa-u@ 3603443 3605232 5
+oo-uh 3608648 3610057 5
+oo-e 3612590 3614227 4
+oo-i 3617262 3618595 5
+oo-o 3620931 3622340 6
+oo-u 3624959 3626368 7
+oo-a 3628825 3630310 5
+oo-ii 3632990 3634475 5
+oo-@@ 3637042 3638755 6
+oo-aa 3641816 3643605 5
+oo-oo 3647043 3648832 7
+oo-uu 3652199 3653988 7
+oo-ei 3657098 3658735 5
+oo-ai 3661616 3663253 5
+oo-oi 3666203 3667840 5
+oo-au 3670895 3672608 6
+oo-ou 3675681 3677394 7
+oo-e@ 3680537 3682326 3
+oo-i@ 3685474 3687491 6
+oo-u@ 3691213 3693078 6
+uu-uh 3696621 3698106 4
+uu-e 3700714 3702123 4
+uu-i 3704628 3705885 4
+uu-o 3708071 3709480 4
+uu-u 3712041 3713374 5
+uu-a 3715624 3717033 4
+uu-ii 3719405 3720738 3
+uu-@@ 3722964 3724525 5
+uu-aa 3727286 3728999 5
+uu-oo 3732198 3733759 5
+uu-uu 3736623 3738108 5
+uu-ei 3740757 3742242 3
+uu-ai 3744764 3746401 4
+uu-oi 3749295 3750932 4
+uu-au 3753850 3755487 3
+uu-ou 3758434 3760071 3
+uu-e@ 3763063 3764776 4
+uu-i@ 3767868 3769505 3
+uu-u@ 3772439 3774152 5
+ei-uh 3777341 3778598 5
+ei-e 3780678 3782087 6
+ei-i 3784608 3786017 6
+ei-o 3788454 3789863 4
+ei-u 3792392 3793725 4
+ei-a 3796024 3797433 5
+ei-ii 3799950 3801435 4
+ei-@@ 3803938 3805499 4
+ei-aa 3808369 3810082 4
+ei-oo 3813267 3814828 4
+ei-uu 3817701 3819186 2
+ei-ei 3821815 3823300 5
+ei-ai 3826101 3827738 3
+ei-oi 3830714 3832275 3
+ei-au 3835171 3836808 4
+ei-ou 3839797 3841358 4
+ei-e@ 3844298 3846011 5
+ei-i@ 3849129 3850918 6
+ei-u@ 3854197 3855682 4
+ai-uh 3858433 3859918 6
+ai-e 3862611 3864020 6
+ai-i 3866610 3867943 5
+ai-o 3870282 3871767 7
+ai-u 3874445 3875930 7
+ai-a 3878684 3880169 7
+ai-ii 3882857 3884342 5
+ai-@@ 3886939 3888576 6
+ai-aa 3891643 3893356 5
+ai-oo 3896521 3898158 4
+ai-uu 3901129 3902690 3
+ai-ei 3905501 3907138 6
+ai-ai 3910182 3911743 5
+ai-oi 3914676 3916389 6
+ai-au 3919431 3921068 4
+ai-ou 3924085 3925646 4
+ai-e@ 3928618 3930407 7
+ai-i@ 3933860 3935497 5
+ai-u@ 3938530 3940167 5
+oi-uh 3943286 3944695 6
+oi-e 3947156 3948565 6
+oi-i 3951039 3952372 5
+oi-o 3954667 3956152 6
+oi-u 3958850 3960183 6
+oi-a 3962397 3963806 4
+oi-ii 3966320 3967653 4
+oi-@@ 3969930 3971491 5
+oi-aa 3974341 3975902 4
+oi-oo 3978810 3980447 4
+oi-uu 3983401 3984962 5
+oi-ei 3987911 3989548 5
+oi-ai 3992540 3994101 4
+oi-oi 3997049 3998686 6
+oi-au 4001792 4003429 3
+oi-ou 4006474 4007959 3
+oi-e@ 4010656 4012293 4
+oi-i@ 4015349 4017062 6
+oi-u@ 4020287 4021924 4
+au-uh 4025004 4026413 7
+au-e 4028738 4030299 6
+au-i 4033084 4034417 6
+au-o 4036887 4038372 6
+au-u 4041040 4042525 5
+au-a 4045184 4046745 7
+au-ii 4049524 4051085 7
+au-@@ 4053950 4055435 4
+au-aa 4058165 4059802 6
+au-oo 4062784 4064497 5
+au-uu 4067758 4069167 5
+au-ei 4071672 4073309 6
+au-ai 4076362 4078075 7
+au-oi 4081261 4082974 7
+au-au 4086208 4087921 7
+au-ou 4091237 4092874 6
+au-e@ 4095946 4097659 4
+au-i@ 4100894 4102683 5
+au-u@ 4106033 4107822 6
+ou-uh 4111133 4112466 4
+ou-e 4114803 4116212 5
+ou-i 4118861 4120270 5
+ou-o 4122699 4124108 7
+ou-u 4126599 4127932 6
+ou-a 4130282 4131767 5
+ou-ii 4134414 4135899 5
+ou-@@ 4138542 4140103 6
+ou-aa 4143024 4144661 3
+ou-oo 4147693 4149330 6
+ou-uu 4152318 4153955 6
+ou-ei 4156889 4158374 3
+ou-ai 4161154 4162715 4
+ou-oi 4165634 4167195 5
+ou-au 4170202 4171763 3
+ou-ou 4174741 4176226 5
+ou-e@ 4179033 4180898 5
+ou-i@ 4183940 4185653 5
+ou-u@ 4188578 4190215 7
+@-uh 4192936 4194269 4
+@-e 4196615 4198252 6
+@-i 4201217 4202778 7
+i-@ 4205574 4206602 3
+@-o 4208008 4209493 3
+@-u 4212070 4213555 5
+@-a 4216177 4217586 3
+@-ii 4220078 4221335 4
+ii-@ 4223797 4224825 4
+@-@@ 4226430 4227991 4
+@@-@ 4230884 4232065 4
+@-aa 4234048 4235533 4
+aa-@ 4238209 4239542 6
+@-oo 4241797 4243510 3
+oo-@ 4246738 4247995 6
+@-uu 4250024 4251357 3
+uu-@ 4253797 4255054 5
+@-ei 4257111 4258596 5
+ei-@ 4261329 4262586 5
+@-ai 4264686 4266095 4
+ai-@ 4268774 4270107 7
+@-oi 4272344 4273448 2
+oi-@ 4275288 4276621 6
+@-au 4278841 4280402 5
+au-@ 4283414 4284747 6
+@-ou 4287010 4288419 3
+ou-@ 4291064 4292245 5
+@-e@ 4294146 4296011 7
+e@-# 4299624 4302021 20
+@-i@ 4307089 4308726 3
+i@-# 4311863 4314108 19
+@-u@ 4318912 4320549 3
+u@-# 4323625 4325718 16
+@-@ 4330038 4331066 3
+l-r 4332654 4333530 1
+l-w 4334786 4335814 3
+l-y 4337523 4338627 2
+l-l 4340451 4341327 2
+l-m 4342600 4343628 2
+l-n 4345279 4346231 2
+l-p 4347765 4348717 2
+l-t 4350202 4351154 2
+l-k 4352653 4353681 2
+l-b 4355331 4356283 2
+l-d 4357932 4358808 1
+l-g 4360201 4361153 1
+l-s 4362629 4363733 2
+l-sh 4365548 4366576 1
+l-f 4368336 4369364 3
+l-th 4370918 4372022 2
+l-z 4373825 4374777 2
+l-zh 4376317 4377269 2
+l-v 4378805 4379757 2
+l-dh 4381355 4382307 3
+l-ch 4383919 4384795 1
+l-jh 4386123 4386999 2
+l-h 4388414 4389442 2
+m-r 4391146 4392174 4
+m-w 4393748 4394776 4
+m-y 4396397 4397425 2
+m-l 4399082 4400034 2
+m-m 4401445 4402397 2
+m-n 4403968 4404844 2
+m-p 4406180 4406980 2
+m-t 4408201 4409077 3
+m-k 4410434 4411310 2
+m-b 4412583 4413383 2
+m-d 4414568 4415444 3
+m-g 4416782 4417734 3
+m-s 4419223 4420327 3
+m-sh 4422134 4423238 3
+m-f 4425108 4426136 2
+m-th 4427837 4428865 1
+m-z 4430496 4431448 2
+m-zh 4433042 4434070 3
+m-v 4435912 4436940 4
+m-dh 4438695 4439723 4
+m-ch 4441463 4442415 4
+m-jh 4443829 4444629 2
+m-h 4445759 4446635 1
+n-r 4448120 4449072 4
+n-w 4450503 4451607 4
+n-y 4453405 4454357 1
+n-l 4455878 4456830 3
+n-m 4458277 4459305 3
+n-n 4460972 4461924 3
+n-p 4463398 4464350 3
+n-t 4465831 4466631 2
+n-k 4467789 4468665 2
+n-b 4469989 4470941 2
+n-d 4472527 4473479 3
+n-g 4475070 4475946 3
+n-s 4477318 4478270 2
+n-sh 4479832 4481013 2
+n-f 4483005 4484109 1
+n-th 4485718 4486822 2
+n-z 4488595 4489547 2
+n-zh 4491140 4492092 2
+n-v 4493580 4494456 2
+n-dh 4495911 4496863 2
+n-ch 4498461 4499261 2
+n-jh 4500361 4501161 3
+n-h 4502380 4503408 1
+ng-r 4504813 4505841 4
+ng-w 4507473 4508425 3
+ng-y 4509910 4510938 3
+ng-l 4512572 4513753 5
+ng-m 4515762 4516790 3
+ng-n 4518495 4519523 3
+ng-p 4521202 4522306 4
+ng-t 4524108 4525060 4
+ng-k 4526403 4527279 2
+ng-b 4528599 4529551 3
+ng-d 4531145 4532097 4
+ng-g 4533649 4534601 3
+ng-s 4536166 4537270 2
+ng-sh 4539158 4540262 3
+ng-f 4542171 4543428 4
+ng-th 4545609 4546790 4
+ng-z 4548596 4549700 4
+ng-zh 4551599 4552703 4
+ng-v 4554764 4555792 4
+ng-dh 4557710 4558738 4
+ng-ch 4560592 4561544 4
+ng-jh 4563081 4564033 4
+ng-h 4565610 4566562 3
+p-r 4568131 4569464 6
+p-w 4571602 4573087 9
+p-y 4575623 4577032 7
+p-l 4579277 4580838 9
+p-m 4583421 4584678 5
+p-n 4586632 4587660 3
+p-p 4589206 4590539 4
+p-t 4592741 4593769 3
+p-k 4595239 4596267 3
+p-b 4597795 4599052 3
+p-d 4601064 4602245 3
+p-g 4604096 4605353 5
+p-s 4607455 4609016 8
+p-sh 4611697 4613182 7
+p-f 4615635 4616968 4
+p-th 4619119 4620832 10
+p-z 4623767 4625024 6
+p-zh 4627215 4628396 4
+p-v 4630503 4631684 6
+p-dh 4633942 4635046 4
+p-ch 4636841 4638022 5
+p-jh 4639827 4641008 5
+p-h 4643018 4644122 3
+t-r 4645785 4646966 5
+t-w 4648776 4650185 8
+t-y 4652508 4653460 2
+t-l 4654832 4655936 4
+t-m 4657634 4658662 4
+t-n 4660191 4661143 3
+t-p 4662573 4663525 3
+t-t 4664891 4666148 4
+t-k 4668181 4668981 3
+t-b 4669974 4670926 2
+t-d 4672324 4673276 2
+t-g 4674631 4675583 3
+t-s 4676888 4678221 4
+t-sh 4680370 4681551 3
+t-f 4683404 4684585 3
+t-th 4686452 4687633 4
+t-z 4689473 4690654 2
+t-zh 4692455 4693407 2
+t-v 4694957 4695985 3
+t-dh 4697704 4698656 3
+t-ch 4700152 4701028 2
+t-jh 4702229 4703105 1
+t-h 4704450 4705478 2
+k-r 4706996 4708253 4
+k-w 4710314 4711418 2
+k-y 4713093 4714274 4
+k-l 4716143 4717247 3
+k-m 4718926 4720259 6
+k-n 4722352 4723761 7
+k-p 4726057 4727085 4
+k-t 4728622 4729650 4
+k-k 4731131 4732083 2
+k-b 4733415 4734443 2
+k-d 4735955 4737212 2
+k-g 4739167 4740424 3
+k-s 4742426 4743607 2
+k-sh 4745436 4746617 3
+k-f 4748478 4749659 3
+k-th 4751489 4752746 4
+k-z 4754775 4755879 3
+k-zh 4757594 4758851 4
+k-v 4760879 4761983 2
+k-dh 4763715 4764743 3
+k-ch 4766356 4767232 2
+k-jh 4768405 4769281 2
+k-h 4770594 4771698 3
+b-r 4773342 4774370 2
+b-w 4776034 4776986 2
+b-y 4778454 4779558 3
+b-l 4781278 4782154 1
+b-m 4783440 4784392 2
+b-n 4785908 4787012 4
+b-p 4788752 4789628 2
+b-t 4790822 4791698 2
+b-k 4792879 4793755 2
+b-b 4794932 4795960 2
+b-d 4797444 4798320 2
+b-g 4799795 4800595 2
+b-s 4801764 4802945 2
+b-sh 4804770 4805874 2
+b-f 4807623 4808651 1
+b-th 4810281 4811385 2
+b-z 4813182 4814058 1
+b-zh 4815506 4816306 0
+b-v 4817555 4818583 2
+b-dh 4820378 4821254 0
+b-ch 4822663 4823615 3
+b-jh 4824997 4825873 2
+b-h 4827256 4828208 2
+d-r 4829596 4830624 2
+d-w 4832362 4833466 3
+d-y 4835290 4836318 2
+d-l 4838024 4839128 3
+d-m 4840973 4842001 3
+d-n 4843634 4844662 3
+d-p 4846279 4847231 3
+d-t 4848578 4849454 3
+d-k 4850612 4851488 2
+d-b 4852695 4853495 1
+d-d 4854569 4855445 1
+d-g 4856827 4857627 1
+d-s 4858823 4859927 2
+d-sh 4861593 4862697 1
+d-f 4864324 4865505 3
+d-th 4867313 4868341 1
+d-z 4869814 4870766 1
+d-zh 4872450 4873402 1
+d-v 4875115 4875915 1
+d-dh 4877221 4878325 2
+d-ch 4880177 4881129 1
+d-jh 4882567 4883291 1
+d-h 4884338 4885290 0
+g-r 4886782 4887886 3
+g-w 4889652 4890756 3
+g-y 4892537 4893565 2
+g-l 4895178 4896282 2
+g-m 4898151 4899103 2
+g-n 4900408 4901589 4
+g-p 4903474 4904502 3
+g-t 4906048 4907000 4
+g-k 4908312 4909416 4
+g-b 4911090 4912042 3
+g-d 4913440 4914316 2
+g-g 4915636 4916436 1
+g-s 4917630 4918811 3
+g-sh 4920724 4921981 3
+g-f 4924016 4925120 2
+g-th 4926780 4927961 3
+g-z 4929804 4930832 2
+g-zh 4932490 4933594 2
+g-v 4935542 4936494 1
+g-dh 4938103 4939207 1
+g-ch 4941227 4942179 4
+g-jh 4943536 4944488 3
+g-h 4945934 4946962 2
+s-r 4948532 4949789 4
+s-w 4951809 4952990 3
+s-y 4954904 4956085 4
+s-l 4957904 4959008 4
+s-m 4960664 4961768 3
+s-n 4963458 4964639 4
+s-p 4966462 4967719 4
+s-t 4969750 4970778 4
+s-k 4972292 4973244 2
+s-b 4974608 4975636 2
+s-d 4977181 4978362 3
+s-g 4980263 4981215 2
+s-s 4982816 4983997 4
+s-sh 4985851 4987032 2
+s-f 4988885 4990066 4
+s-th 4991874 4993055 4
+s-z 4994927 4996184 6
+s-zh 4998205 4999386 5
+s-v 5001296 5002477 3
+s-dh 5004505 5005609 3
+s-ch 5007277 5008153 3
+s-jh 5009313 5010189 2
+s-h 5011340 5012292 3
+sh-r 5013612 5014716 4
+sh-w 5016307 5017488 3
+sh-y 5019342 5020446 3
+sh-l 5022070 5023174 4
+sh-m 5024948 5026129 4
+sh-n 5028035 5029139 3
+sh-p 5030857 5031885 3
+sh-t 5033425 5034377 2
+sh-k 5035738 5036842 4
+sh-b 5038536 5039412 1
+sh-d 5040662 5041766 3
+sh-g 5043490 5044518 2
+sh-s 5046106 5047287 4
+sh-sh 5049116 5050220 3
+sh-f 5051910 5053091 4
+sh-th 5054914 5056018 3
+sh-z 5057691 5058872 3
+sh-zh 5060783 5062116 4
+sh-v 5064289 5065546 4
+sh-dh 5067702 5068959 4
+sh-ch 5071117 5072069 3
+sh-jh 5073429 5074381 3
+sh-h 5075786 5076814 3
+f-r 5078277 5079381 4
+f-w 5081028 5082132 4
+f-y 5083795 5085052 4
+f-l 5086967 5088071 3
+f-m 5089692 5090949 3
+f-n 5092895 5093999 3
+f-p 5095601 5096629 3
+f-t 5098170 5099198 3
+f-k 5100663 5101615 3
+f-b 5102964 5104145 2
+f-d 5106277 5107305 3
+f-g 5108854 5109806 2
+f-s 5111222 5112403 2
+f-sh 5114226 5115407 2
+f-f 5117205 5118233 3
+f-th 5119778 5120882 2
+f-z 5122570 5123827 2
+f-zh 5125881 5127138 2
+f-v 5129178 5130282 4
+f-dh 5132056 5133237 4
+f-ch 5135063 5135863 1
+f-jh 5136875 5137979 2
+f-h 5139712 5140664 2
+th-r 5142065 5143169 3
+th-w 5144769 5145950 4
+th-y 5147760 5148941 3
+th-l 5150750 5151854 4
+th-m 5153509 5154613 3
+th-n 5156311 5157568 5
+th-p 5159563 5160667 3
+th-t 5162344 5163448 3
+th-k 5165130 5166387 5
+th-b 5168368 5169549 2
+th-d 5171435 5172387 3
+th-g 5173809 5174761 3
+th-s 5176157 5177338 2
+th-sh 5179160 5180264 3
+th-f 5181913 5183017 3
+th-th 5184728 5185985 5
+th-z 5187968 5189149 2
+th-zh 5191045 5192302 2
+th-v 5194301 5195558 3
+th-dh 5197706 5198887 4
+th-ch 5200929 5201805 2
+th-jh 5202997 5204178 4
+th-h 5206010 5207114 3
+z-r 5208776 5209728 1
+z-w 5211275 5212379 3
+z-y 5214124 5215381 4
+z-l 5217413 5218441 3
+z-m 5219938 5220966 2
+z-n 5222651 5223603 2
+z-p 5225056 5226008 3
+z-t 5227331 5228207 3
+z-k 5229363 5230391 3
+z-b 5231874 5232902 3
+z-d 5234525 5235325 2
+z-g 5236547 5237347 2
+z-s 5238404 5239661 4
+z-sh 5241606 5242787 2
+z-f 5244636 5245817 3
+z-th 5247678 5249011 5
+z-z 5251187 5252139 2
+z-zh 5253731 5254835 2
+z-v 5256578 5257682 3
+z-dh 5259671 5260699 2
+z-ch 5262548 5263424 2
+z-jh 5264583 5265459 3
+z-h 5266614 5267718 2
+zh-r 5269456 5270484 3
+zh-w 5272043 5272919 1
+zh-y 5274295 5275476 6
+zh-l 5277329 5278357 3
+zh-m 5279843 5280947 4
+zh-n 5282610 5283714 3
+zh-p 5285355 5286459 3
+zh-t 5288120 5289148 3
+zh-k 5290700 5291652 2
+zh-b 5292971 5293999 2
+zh-d 5295772 5296800 2
+zh-g 5298601 5299477 2
+zh-s 5300747 5301928 3
+zh-sh 5303800 5304828 2
+zh-f 5306357 5307538 4
+zh-th 5309329 5310510 4
+zh-z 5312391 5313495 3
+zh-zh 5315277 5316305 3
+zh-v 5317927 5318955 2
+zh-dh 5320764 5322097 3
+zh-ch 5324306 5325258 3
+zh-jh 5326611 5327563 3
+zh-h 5329050 5330078 2
+v-r 5331591 5332619 3
+v-w 5334275 5335379 4
+v-y 5337154 5338258 3
+v-l 5339922 5340950 3
+v-m 5342614 5343642 3
+v-n 5345287 5346315 3
+v-p 5347923 5349027 3
+v-t 5350708 5351660 3
+v-k 5353005 5353957 3
+v-b 5355270 5356298 3
+v-d 5358099 5359051 3
+v-g 5360555 5361431 3
+v-s 5362687 5363868 3
+v-sh 5365774 5366878 2
+v-f 5368609 5369713 1
+v-th 5371524 5372781 4
+v-z 5374835 5375863 2
+v-zh 5377630 5378811 3
+v-v 5380968 5381996 3
+v-dh 5383835 5385092 3
+v-ch 5387349 5388225 2
+v-jh 5389506 5390382 1
+v-h 5391820 5392848 3
+dh-r 5394528 5395785 7
+dh-w 5397913 5399170 5
+dh-y 5401354 5402535 3
+dh-l 5404455 5405788 8
+dh-m 5408014 5409195 4
+dh-n 5411012 5412193 4
+dh-p 5414067 5415095 4
+dh-t 5416655 5417683 4
+dh-k 5419231 5420107 3
+dh-b 5421310 5422262 3
+dh-d 5423943 5424819 3
+dh-g 5426211 5427163 4
+dh-s 5428657 5429838 2
+dh-sh 5431657 5432838 3
+dh-f 5434713 5435970 4
+dh-th 5437976 5439080 3
+dh-z 5440775 5441879 2
+dh-zh 5443826 5444854 1
+dh-v 5446575 5447679 3
+dh-dh 5449523 5450551 2
+dh-ch 5452389 5453417 3
+dh-jh 5454930 5455882 2
+dh-h 5457427 5458379 3
+ch-r 5459971 5461760 11
+ch-w 5464981 5466846 13
+ch-y 5470081 5472022 14
+ch-l 5475538 5477175 9
+ch-m 5479949 5481586 8
+ch-n 5484381 5486018 9
+ch-p 5488878 5490515 10
+ch-t 5493356 5494841 9
+ch-k 5497322 5498807 7
+ch-b 5501262 5502823 7
+ch-d 5505751 5507388 10
+ch-g 5510147 5511632 8
+ch-s 5514106 5515743 8
+ch-sh 5518584 5520069 7
+ch-f 5522548 5524185 9
+ch-th 5526950 5528739 11
+ch-z 5531886 5533447 7
+ch-zh 5536136 5537545 7
+ch-v 5539963 5541448 8
+ch-dh 5543981 5545770 10
+ch-ch 5548944 5550353 8
+ch-jh 5552695 5554180 8
+ch-h 5556624 5558185 9
+jh-r 5560933 5562570 11
+jh-w 5565435 5567072 11
+jh-y 5570068 5571629 10
+jh-l 5574439 5576152 11
+jh-m 5579276 5580837 9
+jh-n 5583661 5585222 8
+jh-p 5588025 5589434 8
+jh-t 5591853 5593338 9
+jh-k 5595907 5597164 6
+jh-b 5599170 5600503 5
+jh-d 5603229 5604638 8
+jh-g 5607030 5608515 8
+jh-s 5611180 5612817 7
+jh-sh 5615746 5617307 7
+jh-f 5620095 5621732 10
+jh-th 5624547 5626336 12
+jh-z 5629533 5630942 6
+jh-zh 5633540 5634797 5
+jh-v 5636981 5638314 6
+jh-dh 5640642 5642127 6
+jh-ch 5644893 5646302 9
+jh-jh 5648608 5650017 8
+jh-h 5652413 5653822 7
+#-@ 5656246 5657503 3
+#-@@ 5659430 5660763 3
+#-a 5662883 5664216 3
+#-aa 5666398 5667807 3
+#-ai 5670158 5671643 3
+#-au 5674045 5675530 3
+#-e 5678006 5679263 3
+#-e@ 5681180 5682741 2
+#-ei 5685218 5686703 3
+#-i 5689131 5690312 3
+#-i@ 5692109 5693670 3
+#-ii 5696213 5697546 3
+#-o 5699637 5700970 4
+#-oi 5703000 5704409 3
+#-oo 5706749 5708386 5
+#-ou 5711155 5712640 3
+#-u 5715044 5716301 3
+#-u@ 5718279 5719840 3
+#-uh 5722289 5723546 3
+#-uu 5725494 5726903 4
+@@-# 5729178 5730739 10
+aa-# 5733795 5735812 15
+aa-ng 5740013 5741346 6
+ai-# 5743760 5745929 17
+au-# 5750602 5752619 15
+b-# 5756947 5758128 5
+ch-# 5760001 5762322 20
+dh-# 5766537 5768174 9
+ei-# 5770931 5772948 15
+f-# 5777177 5779118 13
+ii-# 5782531 5784320 12
+jh-# 5787816 5790213 22
+k-# 5794724 5795905 4
+m-# 5797752 5799085 7
+n-# 5801449 5802782 7
+ng-# 5805200 5806913 12
+oi-# 5810108 5812277 18
+oo-# 5816900 5818765 13
+ou-# 5822714 5824731 14
+s-# 5829115 5830676 11
+sh-# 5833326 5835191 14
+t-# 5838433 5839766 7
+th-# 5841897 5843230 9
+uu-# 5845361 5847530 17
+v-# 5852103 5853360 6
+z-# 5855333 5856970 11
+zh-# 5859775 5861184 9
+d-# 5863462 5864719 6
+g-# 5866726 5867830 4
+@-# 5869475 5870960 8
+#-b 5873674 5874474 2
+#-ch 5875483 5876359 1
+#-d 5877514 5878390 1
+#-dh 5879543 5880724 3
+#-f 5882813 5884070 3
+#-g 5886043 5886767 2
+#-h 5887728 5888680 1
+#-jh 5890033 5890909 2
+#-k 5892099 5892899 2
+#-l 5893924 5895105 3
+#-m 5896948 5898129 3
+#-n 5899984 5901241 4
+#-p 5903202 5904002 1
+#-r 5905032 5906136 2
+#-s 5907857 5909494 4
+#-sh 5912280 5913461 2
+#-t 5915283 5916083 0
+#-th 5917111 5918444 4
+#-v 5920566 5921747 3
+#-w 5923688 5924869 3
+#-y 5926861 5928042 3
+#-z 5929987 5931244 3
+#-zh 5933428 5934685 3
+aa-b 5936823 5938536 9
+aa-ch 5941375 5942860 9
+aa-d 5945215 5946700 10
+aa-dh 5948958 5950595 10
+aa-f 5953385 5955174 10
+aa-g 5957995 5959556 10
+aa-h 5962069 5963782 11
+aa-jh 5966568 5967977 8
+aa-k 5970121 5971986 10
+aa-l 5974864 5976425 9
+aa-m 5978841 5980478 9
+aa-n 5983132 5984845 11
+aa-p 5987537 5989174 7
+aa-r 5991847 5993332 9
+aa-s 5995655 5997444 11
+aa-sh 6000198 6002063 11
+aa-t 6004857 6006418 10
+aa-th 6008662 6010375 9
+aa-v 6013208 6014921 12
+aa-w 6017848 6019409 10
+aa-y 6021909 6023546 9
+aa-z 6026101 6027890 12
+aa-zh 6030882 6032823 11
+@-s 6035561 6036742 1
+p-# 6038559 6039892 8
+l-# 6042029 6043438 8
+p_-_r 6045956 6047137 6
+_p_-_r 6048914 6049790 2
+p_-_w 6050889 6052374 9
+_p_-_w 6054762 6055790 4
+p_-_y 6057328 6058585 7
+_p_-_y 6060535 6061639 5
+p_-_l 6063276 6064761 10
+_p_-_l 6067141 6068169 5
+t_-_r 6069730 6071215 7
+_t_-_r 6073629 6074657 4
+t_-_w 6076014 6077347 7
+_t_-_w 6079400 6080352 3
+t_-_y 6081671 6083080 8
+_t_-_y 6085254 6086358 5
+t_-_l 6087913 6089170 7
+_t_-_l 6091084 6092112 4
+k_-_r 6093533 6094942 8
+_k_-_r 6097179 6098207 3
+k_-_w 6099616 6101101 9
+_k_-_w 6103454 6104482 3
+k_-_y 6105914 6107247 7
+_k_-_y 6109395 6110423 4
+k_-_l 6111835 6113168 8
+_k_-_l 6115196 6116224 5
+b_-_r 6117633 6118661 3
+b_-_w 6120253 6121510 6
+b_-_y 6123520 6124548 4
+b_-_l 6126120 6127148 3
+d_-_r 6128621 6129725 4
+d_-_w 6131553 6132657 4
+d_-_y 6134424 6135452 3
+d_-_l 6136907 6137935 4
+g_-_r 6139617 6140798 4
+g_-_w 6142594 6143546 3
+g_-_y 6144913 6145941 4
+g_-_l 6147463 6148491 4
+s_-_w 6150037 6151218 5
+s_-_y 6153108 6154365 7
+s_-_l 6156254 6157663 8
+s_-_m 6159926 6161183 7
+s_-_n 6163447 6164780 7
+s_-_p 6166923 6168180 5
+s_-_t 6170187 6171291 5
+s_-_k 6172937 6174270 6
+_p-uh 6176384 6177336 1
+_p-e 6178476 6179657 3
+_p-i 6181217 6182321 3
+_p-o 6183795 6184899 2
+_p-u 6186352 6187533 4
+_p-a 6189087 6190191 2
+_p-ii 6191619 6192952 2
+_p-@@ 6194811 6196296 3
+_p-aa 6198494 6200131 3
+_p-oo 6202656 6204217 3
+_p-uu 6206553 6208114 4
+_p-ei 6210351 6211912 3
+_p-ai 6214209 6215922 4
+_p-oi 6218532 6220245 5
+_p-au 6222937 6224574 3
+_p-ou 6227065 6228550 4
+_p-e@ 6230742 6232379 3
+_p-i@ 6234919 6236252 1
+_p-u@ 6238251 6239964 4
+_t-uh 6242498 6243602 2
+_t-e 6245106 6246287 3
+_t-i 6247928 6249032 4
+_t-o 6250477 6251734 5
+_t-u 6253619 6254723 3
+_t-a 6256192 6257373 3
+_t-ii 6259062 6260395 3
+_t-@@ 6262372 6263476 3
+_t-aa 6265115 6266600 2
+_t-oo 6268917 6270402 4
+_t-uu 6272648 6274133 5
+_t-ei 6276298 6277783 3
+_t-ai 6279974 6281535 3
+_t-oi 6283980 6285237 3
+_t-au 6287002 6288411 2
+_t-ou 6290622 6292031 4
+_t-e@ 6294104 6295665 3
+_t-i@ 6297785 6299346 3
+_t-u@ 6301587 6303224 4
+_k-uh 6305576 6306757 3
+_k-e 6308368 6309625 3
+_k-i 6311374 6312555 3
+_k-o 6314110 6315214 3
+_k-u 6316674 6317931 4
+_k-a 6319653 6320757 1
+_k-ii 6322147 6323328 3
+_k-@@ 6324870 6326203 2
+_k-aa 6328003 6329412 2
+_k-oo 6331636 6333045 4
+_k-uu 6335197 6336606 4
+_k-ei 6338658 6339991 2
+_k-ai 6341814 6343223 4
+_k-oi 6345316 6346497 4
+_k-au 6348184 6349593 3
+_k-ou 6351626 6352959 3
+_k-e@ 6354884 6356217 2
+_k-i@ 6358148 6359481 3
+_k-u@ 6361269 6362830 3
+p$-uh 6365120 6366681 9
+p$-e 6369251 6371192 12
+p$-i 6374427 6376064 9
+p$-o 6378646 6380663 13
+p$-u 6384078 6386399 18
+p$-a 6390480 6392497 16
+p$-ii 6396037 6398358 15
+p$-@@ 6402339 6404432 11
+p$-aa 6407893 6410366 16
+p$-oo 6414737 6417210 16
+p$-uu 6421545 6423866 15
+p$-ei 6427847 6430320 16
+p$-ai 6434818 6436683 12
+p$-oi 6439896 6442521 20
+p$-au 6447220 6449997 18
+p$-ou 6454946 6457647 19
+p$-e@ 6462435 6464452 10
+p$-i@ 6467913 6470082 14
+p$-u@ 6473902 6477135 24
+t$-uh 6482970 6485063 13
+t$-e 6488688 6490933 16
+t$-i 6494866 6496807 12
+t$-o 6500045 6501910 11
+t$-u 6505005 6506870 13
+t$-a 6509973 6512142 15
+t$-ii 6515935 6518256 16
+t$-@@ 6522238 6524635 14
+t$-aa 6528747 6531144 15
+t$-oo 6535381 6537626 14
+t$-uu 6541468 6543561 12
+t$-ei 6547005 6549174 13
+t$-ai 6552932 6555405 19
+t$-oi 6559808 6562205 18
+t$-au 6566466 6568483 11
+t$-ou 6571915 6574540 19
+t$-e@ 6579221 6581846 17
+t$-i@ 6586583 6589208 15
+t$-u@ 6593669 6596446 17
+k$-uh 6601199 6603368 16
+k$-e 6607109 6609126 12
+k$-i 6612504 6614825 19
+k$-o 6618977 6621450 20
+k$-u 6625835 6628080 17
+k$-a 6631901 6634146 16
+k$-ii 6637948 6640573 19
+k$-@@ 6645229 6648006 20
+k$-aa 6653027 6655804 21
+k$-oo 6660814 6662983 13
+k$-uu 6666723 6668892 13
+k$-ei 6672604 6674697 14
+k$-ai 6678344 6680361 14
+k$-oi 6683852 6686097 16
+k$-au 6690118 6692439 15
+k$-ou 6696573 6699426 22
+k$-e@ 6704594 6706839 12
+k$-i@ 6710750 6713603 23
+k$-u@ 6718797 6721574 18
+b$-uh 6726602 6728543 13
+b$-e 6731846 6734395 22
+b$-i 6739063 6741916 27
+b$-o 6747279 6750360 28
+b$-u 6756191 6758664 21
+b$-a 6763286 6766215 25
+b$-ii 6771626 6774631 27
+b$-@@ 6780304 6782549 14
+b$-aa 6786647 6788740 12
+b$-oo 6792488 6794505 11
+b$-uu 6798093 6800338 15
+b$-ei 6804513 6807822 29
+b$-ai 6814189 6816662 17
+b$-oi 6821211 6824596 31
+b$-au 6831065 6833842 22
+b$-ou 6839113 6842498 29
+b$-e@ 6849080 6851857 21
+b$-i@ 6857316 6860701 30
+b$-u@ 6867277 6870054 21
+d$-uh 6875415 6877432 15
+d$-e 6881202 6883827 22
+d$-i 6888819 6891216 19
+d$-o 6895858 6897723 10
+d$-u 6900980 6903225 19
+d$-a 6907599 6909996 19
+d$-ii 6914443 6917372 25
+d$-@@ 6922762 6925387 20
+d$-aa 6930357 6933286 22
+d$-oo 6938835 6941004 14
+d$-uu 6944898 6947675 23
+d$-ei 6952976 6955905 24
+d$-ai 6961538 6964391 26
+d$-oi 6969719 6972724 28
+d$-au 6978449 6981454 24
+d$-ou 6987249 6990178 23
+d$-e@ 6995812 6999045 26
+d$-i@ 7005218 7008223 25
+d$-u@ 7014052 7017209 26
+g$-uh 7023272 7025517 17
+g$-e 7029485 7031730 17
+g$-i 7035754 7038303 23
+g$-o 7043007 7046088 29
+g$-u 7051939 7054640 24
+g$-a 7059769 7062318 21
+g$-ii 7067073 7070078 25
+g$-@@ 7075566 7078799 27
+g$-aa 7084946 7088407 29
+g$-oo 7094979 7098212 26
+g$-uu 7104294 7107299 26
+g$-ei 7112867 7116024 27
+g$-ai 7121933 7125318 29
+g$-oi 7131702 7135163 31
+g$-au 7141846 7144699 23
+g$-ou 7150036 7153269 28
+g$-e@ 7159463 7162088 18
+g$-i@ 7167006 7169555 20
+g$-u@ 7174258 7177035 18
+p$-@ 7182174 7184039 15
+t$-@ 7187423 7188984 10
+k$-@ 7191722 7193359 11
+b$-@ 7196152 7197637 9
+d$-@ 7200216 7202613 22
+g$-@ 7207055 7209300 20
+uh-$b 7213506 7214839 4
+uh-$d 7216615 7217872 5
+uh-$g 7219910 7221091 4
+uh-$p 7222913 7224322 4
+uh-$k 7226411 7227744 4
+e-$b 7229824 7231081 6
+e-$d 7232962 7234143 5
+e-$g 7235997 7237254 6
+e-$p 7239270 7240603 4
+e-$k 7242645 7243902 5
+i-$b 7245892 7247073 4
+i-$d 7248864 7249968 4
+i-$g 7251577 7252605 4
+i-$p 7254043 7255376 5
+i-$k 7257286 7258543 4
+u-$b 7260307 7261411 5
+u-$d 7263208 7264312 4
+u-$g 7265932 7267036 5
+u-$p 7268678 7270011 4
+u-$k 7272104 7273361 5
+a-$b 7275208 7276465 7
+a-$d 7278522 7279703 6
+a-$g 7281551 7282884 6
+a-$p 7285110 7286367 4
+a-$k 7288299 7289632 5
+ii-$b 7291723 7293132 7
+ii-$d 7295479 7296888 7
+ii-$g 7299109 7300290 5
+ii-$p 7302171 7303656 5
+ii-$k 7306158 7307567 6
+@@-$b 7309778 7311491 10
+@@-$d 7314405 7315814 9
+@@-$g 7318094 7319579 8
+@@-$p 7322063 7323700 8
+@@-$k 7326340 7327825 7
+oo-$b 7330203 7331612 8
+oo-$d 7333981 7335466 8
+oo-$g 7337948 7339357 8
+oo-$p 7341679 7343088 6
+oo-$k 7345360 7346769 7
+uu-$b 7349100 7350357 7
+uu-$d 7352274 7353683 8
+uu-$g 7355988 7357245 7
+uu-$p 7359162 7360799 8
+uu-$k 7363462 7364795 6
+ei-$b 7366893 7368302 8
+ei-$d 7370671 7372080 9
+ei-$g 7374426 7375607 7
+ei-$p 7377447 7379008 7
+ei-$k 7381504 7382913 7
+ai-$b 7385165 7386726 9
+ai-$d 7389508 7390917 9
+ai-$g 7393478 7394887 10
+ai-$p 7397182 7398743 7
+ai-$k 7401368 7402777 8
+oi-$b 7405066 7406551 8
+oi-$d 7409054 7410615 9
+oi-$g 7413264 7414749 10
+oi-$p 7417153 7418638 8
+oi-$k 7421050 7422687 9
+au-$b 7425437 7426922 9
+au-$d 7429456 7430865 8
+au-$g 7433275 7434760 9
+au-$p 7437327 7438964 8
+au-$k 7441614 7443175 8
+ou-$b 7445788 7447273 8
+ou-$d 7449933 7451266 6
+ou-$g 7453563 7454896 7
+ou-$p 7457097 7458658 7
+ou-$k 7461167 7462500 6
+e@-$b 7464533 7466094 8
+e@-$d 7469115 7470600 9
+e@-$g 7473375 7474936 8
+e@-$p 7477780 7479417 7
+e@-$k 7482348 7484213 9
+i@-$b 7487593 7489078 8
+i@-$d 7491759 7493244 9
+i@-$g 7495901 7497538 10
+i@-$p 7500522 7502235 8
+i@-$k 7505257 7507046 9
+u@-$b 7510167 7511880 11
+u@-$d 7515159 7516872 11
+u@-$g 7519967 7521832 13
+u@-$p 7525340 7527433 11
+u@-$k 7531275 7533292 11
+EST_File Track
+DataType binary
+NumFrames 11
+ByteOrder 10
+NumChannels 17
+BreaksPresent true
+CommentChar ;
+
+Channel_0 lpc_0
+Channel_1 track1
+Channel_2 track2
+Channel_3 track3
+Channel_4 track4
+Channel_5 track5
+Channel_6 track6
+Channel_7 track7
+Channel_8 track8
+Channel_9 track9
+Channel_10 track10
+Channel_11 track11
+Channel_12 track12
+Channel_13 track13
+Channel_14 track14
+Channel_15 track15
+Channel_16 lpc_N
+EST_Header_End
+<"`? H'D?ą?<%7o?w»UQ>P0QY<6I='x-4(W*>㾀Ǹ<ռ