Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- CosyVoice-ttsfrd/.gitattributes +39 -0
- CosyVoice-ttsfrd/README.md +227 -0
- CosyVoice-ttsfrd/asset/dingding.png +0 -0
- CosyVoice-ttsfrd/configuration.json +1 -0
- CosyVoice-ttsfrd/resource/festival/Sable.v0_2.dtd +137 -0
- CosyVoice-ttsfrd/resource/festival/Singing.v0_1.dtd +34 -0
- CosyVoice-ttsfrd/resource/festival/VCLocalRules +8 -0
- CosyVoice-ttsfrd/resource/festival/apml.scm +551 -0
- CosyVoice-ttsfrd/resource/festival/apml_f2bf0lr.scm +530 -0
- CosyVoice-ttsfrd/resource/festival/apml_kaldurtreeZ.scm +996 -0
- CosyVoice-ttsfrd/resource/festival/cart_aux.scm +200 -0
- CosyVoice-ttsfrd/resource/festival/clunits.scm +287 -0
- CosyVoice-ttsfrd/resource/festival/cmusphinx2_phones.scm +119 -0
- CosyVoice-ttsfrd/resource/festival/cslush.scm +79 -0
- CosyVoice-ttsfrd/resource/festival/cstr.scm +121 -0
- CosyVoice-ttsfrd/resource/festival/darpa_phones.scm +115 -0
- CosyVoice-ttsfrd/resource/festival/dicts/cmu/COPYING +35 -0
- CosyVoice-ttsfrd/resource/festival/dicts/cmu/allowables.scm +102 -0
- CosyVoice-ttsfrd/resource/festival/display.scm +69 -0
- CosyVoice-ttsfrd/resource/festival/duration.scm +196 -0
- CosyVoice-ttsfrd/resource/festival/email-mode.scm +89 -0
- CosyVoice-ttsfrd/resource/festival/engmorph.scm +151 -0
- CosyVoice-ttsfrd/resource/festival/engmorphsyn.scm +170 -0
- CosyVoice-ttsfrd/resource/festival/f2bdurtreeZ.scm +869 -0
- CosyVoice-ttsfrd/resource/festival/f2bf0lr.scm +314 -0
- CosyVoice-ttsfrd/resource/festival/festival.el +282 -0
- CosyVoice-ttsfrd/resource/festival/festival.scm +633 -0
- CosyVoice-ttsfrd/resource/festival/festtest.scm +72 -0
- CosyVoice-ttsfrd/resource/festival/fringe.scm +108 -0
- CosyVoice-ttsfrd/resource/festival/gswdurtreeZ.scm +947 -0
- CosyVoice-ttsfrd/resource/festival/hts.scm +522 -0
- CosyVoice-ttsfrd/resource/festival/init.scm +157 -0
- CosyVoice-ttsfrd/resource/festival/intonation.scm +187 -0
- CosyVoice-ttsfrd/resource/festival/java.scm +39 -0
- CosyVoice-ttsfrd/resource/festival/languages.scm +122 -0
- CosyVoice-ttsfrd/resource/festival/lts.scm +212 -0
- CosyVoice-ttsfrd/resource/festival/module_description.scm +117 -0
- CosyVoice-ttsfrd/resource/festival/mrpa_allophones.scm +111 -0
- CosyVoice-ttsfrd/resource/festival/mrpa_durs.scm +136 -0
- CosyVoice-ttsfrd/resource/festival/mrpa_phones.scm +114 -0
- CosyVoice-ttsfrd/resource/festival/ogimarkup-mode.scm +191 -0
- CosyVoice-ttsfrd/resource/festival/pauses.scm +242 -0
- CosyVoice-ttsfrd/resource/festival/postlex.scm +587 -0
- CosyVoice-ttsfrd/resource/festival/sable-latin.ent +171 -0
- CosyVoice-ttsfrd/resource/festival/sable-mode.scm +560 -0
- CosyVoice-ttsfrd/resource/festival/scfg_wsj_wp20.gram +523 -0
- CosyVoice-ttsfrd/resource/festival/sec.B.hept.ngrambin +0 -0
- CosyVoice-ttsfrd/resource/festival/sec.ts20.quad.ngrambin +0 -0
- CosyVoice-ttsfrd/resource/festival/siteinit.scm +65 -0
- CosyVoice-ttsfrd/resource/festival/speech.properties +2 -0
CosyVoice-ttsfrd/.gitattributes
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.db* filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.ark* filter=lfs diff=lfs merge=lfs -text
|
30 |
+
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
|
31 |
+
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
|
32 |
+
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*.gguf* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.ggml filter=lfs diff=lfs merge=lfs -text
|
37 |
+
*.llamafile* filter=lfs diff=lfs merge=lfs -text
|
38 |
+
resource.zip filter=lfs diff=lfs merge=lfs -text
|
39 |
+
resource.tar filter=lfs diff=lfs merge=lfs -text
|
CosyVoice-ttsfrd/README.md
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[](https://github.com/Akshay090/svg-banners)
|
2 |
+
|
3 |
+
## 👉🏻 CosyVoice 👈🏻
|
4 |
+
**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)
|
5 |
+
|
6 |
+
**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)
|
7 |
+
|
8 |
+
## Highlight🔥
|
9 |
+
|
10 |
+
**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.
|
11 |
+
### Multilingual
|
12 |
+
- **Supported Language**: Chinese, English, Japanese, Korean, Chinese dialects (Cantonese, Sichuanese, Shanghainese, Tianjinese, Wuhanese, etc.)
|
13 |
+
- **Crosslingual & Mixlingual**:Support zero-shot voice cloning for cross-lingual and code-switching scenarios.
|
14 |
+
### Ultra-Low Latency
|
15 |
+
- **Bidirectional Streaming Support**: CosyVoice 2.0 integrates offline and streaming modeling technologies.
|
16 |
+
- **Rapid First Packet Synthesis**: Achieves latency as low as 150ms while maintaining high-quality audio output.
|
17 |
+
### High Accuracy
|
18 |
+
- **Improved Pronunciation**: Reduces pronunciation errors by 30% to 50% compared to CosyVoice 1.0.
|
19 |
+
- **Benchmark Achievements**: Attains the lowest character error rate on the hard test set of the Seed-TTS evaluation set.
|
20 |
+
### Strong Stability
|
21 |
+
- **Consistency in Timbre**: Ensures reliable voice consistency for zero-shot and cross-language speech synthesis.
|
22 |
+
- **Cross-language Synthesis**: Marked improvements compared to version 1.0.
|
23 |
+
### Natural Experience
|
24 |
+
- **Enhanced Prosody and Sound Quality**: Improved alignment of synthesized audio, raising MOS evaluation scores from 5.4 to 5.53.
|
25 |
+
- **Emotional and Dialectal Flexibility**: Now supports more granular emotional controls and accent adjustments.
|
26 |
+
|
27 |
+
## Roadmap
|
28 |
+
|
29 |
+
- [x] 2024/12
|
30 |
+
|
31 |
+
- [x] 25hz cosyvoice 2.0 released
|
32 |
+
|
33 |
+
- [x] 2024/09
|
34 |
+
|
35 |
+
- [x] 25hz cosyvoice base model
|
36 |
+
- [x] 25hz cosyvoice voice conversion model
|
37 |
+
|
38 |
+
- [x] 2024/08
|
39 |
+
|
40 |
+
- [x] Repetition Aware Sampling(RAS) inference for llm stability
|
41 |
+
- [x] Streaming inference mode support, including kv cache and sdpa for rtf optimization
|
42 |
+
|
43 |
+
- [x] 2024/07
|
44 |
+
|
45 |
+
- [x] Flow matching training support
|
46 |
+
- [x] WeTextProcessing support when ttsfrd is not available
|
47 |
+
- [x] Fastapi server and client
|
48 |
+
|
49 |
+
|
50 |
+
## Install
|
51 |
+
|
52 |
+
**Clone and install**
|
53 |
+
|
54 |
+
- Clone the repo
|
55 |
+
``` sh
|
56 |
+
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
|
57 |
+
# If you failed to clone submodule due to network failures, please run following command until success
|
58 |
+
cd CosyVoice
|
59 |
+
git submodule update --init --recursive
|
60 |
+
```
|
61 |
+
|
62 |
+
- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html
|
63 |
+
- Create Conda env:
|
64 |
+
|
65 |
+
``` sh
|
66 |
+
conda create -n cosyvoice python=3.10
|
67 |
+
conda activate cosyvoice
|
68 |
+
# pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platform.
|
69 |
+
conda install -y -c conda-forge pynini==2.1.5
|
70 |
+
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
|
71 |
+
|
72 |
+
# If you encounter sox compatibility issues
|
73 |
+
# ubuntu
|
74 |
+
sudo apt-get install sox libsox-dev
|
75 |
+
# centos
|
76 |
+
sudo yum install sox sox-devel
|
77 |
+
```
|
78 |
+
|
79 |
+
**Model download**
|
80 |
+
|
81 |
+
We strongly recommend that you download our pretrained `CosyVoice2-0.5B` `CosyVoice-300M` `CosyVoice-300M-SFT` `CosyVoice-300M-Instruct` model and `CosyVoice-ttsfrd` resource.
|
82 |
+
|
83 |
+
``` python
|
84 |
+
# SDK模型下载
|
85 |
+
from modelscope import snapshot_download
|
86 |
+
snapshot_download('iic/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
|
87 |
+
snapshot_download('iic/CosyVoice-300M', local_dir='pretrained_models/CosyVoice-300M')
|
88 |
+
snapshot_download('iic/CosyVoice-300M-25Hz', local_dir='pretrained_models/CosyVoice-300M-25Hz')
|
89 |
+
snapshot_download('iic/CosyVoice-300M-SFT', local_dir='pretrained_models/CosyVoice-300M-SFT')
|
90 |
+
snapshot_download('iic/CosyVoice-300M-Instruct', local_dir='pretrained_models/CosyVoice-300M-Instruct')
|
91 |
+
snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
92 |
+
```
|
93 |
+
|
94 |
+
``` sh
|
95 |
+
# git模型下载,请确保已安装git lfs
|
96 |
+
mkdir -p pretrained_models
|
97 |
+
git clone https://www.modelscope.cn/iic/CosyVoice2-0.5B.git pretrained_models/CosyVoice2-0.5B
|
98 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-300M.git pretrained_models/CosyVoice-300M
|
99 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-300M-25Hz.git pretrained_models/CosyVoice-300M-25Hz
|
100 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git pretrained_models/CosyVoice-300M-SFT
|
101 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git pretrained_models/CosyVoice-300M-Instruct
|
102 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git pretrained_models/CosyVoice-ttsfrd
|
103 |
+
```
|
104 |
+
|
105 |
+
Optionally, you can unzip `ttsfrd` resouce and install `ttsfrd` package for better text normalization performance.
|
106 |
+
|
107 |
+
Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use WeTextProcessing by default.
|
108 |
+
|
109 |
+
``` sh
|
110 |
+
cd pretrained_models/CosyVoice-ttsfrd/
|
111 |
+
unzip resource.zip -d .
|
112 |
+
pip install ttsfrd_dependency-0.1-py3-none-any.whl
|
113 |
+
pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl
|
114 |
+
```
|
115 |
+
|
116 |
+
**Basic Usage**
|
117 |
+
|
118 |
+
We strongly recommend using `CosyVoice2-0.5B` for better performance.
|
119 |
+
Follow code below for detailed usage of each model.
|
120 |
+
|
121 |
+
``` python
|
122 |
+
import sys
|
123 |
+
sys.path.append('third_party/Matcha-TTS')
|
124 |
+
from cosyvoice.cli.cosyvoice import CosyVoice, CosyVoice2
|
125 |
+
from cosyvoice.utils.file_utils import load_wav
|
126 |
+
import torchaudio
|
127 |
+
```
|
128 |
+
|
129 |
+
**CosyVoice2 Usage**
|
130 |
+
```python
|
131 |
+
cosyvoice = CosyVoice2('pretrained_models/CosyVoice2-0.5B', load_jit=False, load_trt=False, fp16=False)
|
132 |
+
|
133 |
+
# NOTE if you want to reproduce the results on https://funaudiollm.github.io/cosyvoice2, please add text_frontend=False during inference
|
134 |
+
# zero_shot usage
|
135 |
+
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
136 |
+
for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
|
137 |
+
torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
138 |
+
|
139 |
+
# fine grained control, for supported control, check cosyvoice/tokenizer/tokenizer.py#L248
|
140 |
+
for i, j in enumerate(cosyvoice.inference_cross_lingual('在他讲述那个荒诞故事的过程中,他突然[laughter]停下来,因为他自己也被逗笑了[laughter]。', prompt_speech_16k, stream=False)):
|
141 |
+
torchaudio.save('fine_grained_control_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
142 |
+
|
143 |
+
# instruct usage
|
144 |
+
for i, j in enumerate(cosyvoice.inference_instruct2('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '用四川话说这句话', prompt_speech_16k, stream=False)):
|
145 |
+
torchaudio.save('instruct_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
146 |
+
```
|
147 |
+
|
148 |
+
**CosyVoice Usage**
|
149 |
+
```python
|
150 |
+
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-SFT', load_jit=False, load_trt=False, fp16=False)
|
151 |
+
# sft usage
|
152 |
+
print(cosyvoice.list_available_spks())
|
153 |
+
# change stream=True for chunk stream inference
|
154 |
+
for i, j in enumerate(cosyvoice.inference_sft('你好,我是通义生成式语音大模型,请问有什么可以帮您的吗?', '中文女', stream=False)):
|
155 |
+
torchaudio.save('sft_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
156 |
+
|
157 |
+
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M') # or change to pretrained_models/CosyVoice-300M-25Hz for 25Hz inference
|
158 |
+
# zero_shot usage, <|zh|><|en|><|jp|><|yue|><|ko|> for Chinese/English/Japanese/Cantonese/Korean
|
159 |
+
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
160 |
+
for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
|
161 |
+
torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
162 |
+
# cross_lingual usage
|
163 |
+
prompt_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
|
164 |
+
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)):
|
165 |
+
torchaudio.save('cross_lingual_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
166 |
+
# vc usage
|
167 |
+
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
168 |
+
source_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
|
169 |
+
for i, j in enumerate(cosyvoice.inference_vc(source_speech_16k, prompt_speech_16k, stream=False)):
|
170 |
+
torchaudio.save('vc_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
171 |
+
|
172 |
+
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-Instruct')
|
173 |
+
# instruct usage, support <laughter></laughter><strong></strong>[laughter][breath]
|
174 |
+
for i, j in enumerate(cosyvoice.inference_instruct('在面对挑战时,他展现了非凡的<strong>勇气</strong>与<strong>智慧</strong>。', '中文男', 'Theo \'Crimson\', is a fiery, passionate rebel leader. Fights with fervor for justice, but struggles with impulsiveness.', stream=False)):
|
175 |
+
torchaudio.save('instruct_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
176 |
+
```
|
177 |
+
|
178 |
+
**Start web demo**
|
179 |
+
|
180 |
+
You can use our web demo page to get familiar with CosyVoice quickly.
|
181 |
+
|
182 |
+
Please see the demo website for details.
|
183 |
+
|
184 |
+
``` python
|
185 |
+
# change iic/CosyVoice-300M-SFT for sft inference, or iic/CosyVoice-300M-Instruct for instruct inference
|
186 |
+
python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M
|
187 |
+
```
|
188 |
+
|
189 |
+
**Advanced Usage**
|
190 |
+
|
191 |
+
For advanced user, we have provided train and inference scripts in `examples/libritts/cosyvoice/run.sh`.
|
192 |
+
|
193 |
+
**Build for deployment**
|
194 |
+
|
195 |
+
Optionally, if you want service deployment,
|
196 |
+
you can run following steps.
|
197 |
+
|
198 |
+
``` sh
|
199 |
+
cd runtime/python
|
200 |
+
docker build -t cosyvoice:v1.0 .
|
201 |
+
# change iic/CosyVoice-300M to iic/CosyVoice-300M-Instruct if you want to use instruct inference
|
202 |
+
# for grpc usage
|
203 |
+
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"
|
204 |
+
cd grpc && python3 client.py --port 50000 --mode <sft|zero_shot|cross_lingual|instruct>
|
205 |
+
# for fastapi usage
|
206 |
+
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"
|
207 |
+
cd fastapi && python3 client.py --port 50000 --mode <sft|zero_shot|cross_lingual|instruct>
|
208 |
+
```
|
209 |
+
|
210 |
+
## Discussion & Communication
|
211 |
+
|
212 |
+
You can directly discuss on [Github Issues](https://github.com/FunAudioLLM/CosyVoice/issues).
|
213 |
+
|
214 |
+
You can also scan the QR code to join our official Dingding chat group.
|
215 |
+
|
216 |
+
<img src="./asset/dingding.png" width="250px">
|
217 |
+
|
218 |
+
## Acknowledge
|
219 |
+
|
220 |
+
1. We borrowed a lot of code from [FunASR](https://github.com/modelscope/FunASR).
|
221 |
+
2. We borrowed a lot of code from [FunCodec](https://github.com/modelscope/FunCodec).
|
222 |
+
3. We borrowed a lot of code from [Matcha-TTS](https://github.com/shivammehta25/Matcha-TTS).
|
223 |
+
4. We borrowed a lot of code from [AcademiCodec](https://github.com/yangdongchao/AcademiCodec).
|
224 |
+
5. We borrowed a lot of code from [WeNet](https://github.com/wenet-e2e/wenet).
|
225 |
+
|
226 |
+
## Disclaimer
|
227 |
+
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.
|
CosyVoice-ttsfrd/asset/dingding.png
ADDED
![]() |
CosyVoice-ttsfrd/configuration.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"framework":"Pytorch","task":"text-to-speech"}
|
CosyVoice-ttsfrd/resource/festival/Sable.v0_2.dtd
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- <!DOCTYPE sable SYSTEM "Sable.v0_2.dtd" [ -->
|
2 |
+
<!--;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-->
|
3 |
+
<!-- -->
|
4 |
+
<!-- Centre for Speech Technology Research -->
|
5 |
+
<!-- University of Edinburgh, UK -->
|
6 |
+
<!-- Copyright (c) 1998 -->
|
7 |
+
<!-- All Rights Reserved. -->
|
8 |
+
<!-- -->
|
9 |
+
<!-- Permission is hereby granted, free of charge, to use and distribute -->
|
10 |
+
<!-- this software and its documentation without restriction, including -->
|
11 |
+
<!-- without limitation the rights to use, copy, modify, merge, publish, -->
|
12 |
+
<!-- distribute, sublicense, and/or sell copies of this work, and to -->
|
13 |
+
<!-- permit persons to whom this work is furnished to do so, subject to -->
|
14 |
+
<!-- the following conditions: -->
|
15 |
+
<!-- 1. The code must retain the above copyright notice, this list of -->
|
16 |
+
<!-- conditions and the following disclaimer. -->
|
17 |
+
<!-- 2. Any modifications must be clearly marked as such. -->
|
18 |
+
<!-- 3. Original authors' names are not deleted. -->
|
19 |
+
<!-- 4. The authors' names are not used to endorse or promote products -->
|
20 |
+
<!-- derived from this software without specific prior written -->
|
21 |
+
<!-- permission. -->
|
22 |
+
<!-- -->
|
23 |
+
<!-- THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK -->
|
24 |
+
<!-- DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -->
|
25 |
+
<!-- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -->
|
26 |
+
<!-- SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE -->
|
27 |
+
<!-- FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -->
|
28 |
+
<!-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -->
|
29 |
+
<!-- AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -->
|
30 |
+
<!-- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -->
|
31 |
+
<!-- THIS SOFTWARE. -->
|
32 |
+
<!-- -->
|
33 |
+
<!-- -->
|
34 |
+
<!-- An early draft of SABLE 0.1 (Jan 8th 1998) -->
|
35 |
+
<!-- (Alan W Black [email protected]) -->
|
36 |
+
<!-- This not an official DTD just one that allows a mock up of the -->
|
37 |
+
<!-- system for Festival-1.2.1 and later -->
|
38 |
+
<!-- -->
|
39 |
+
<!-- Modified to be XML compliant April 2nd 1998 -->
|
40 |
+
<!-- -->
|
41 |
+
<!-- Modified for SABLE 0.2 (August 15, 1998) -->
|
42 |
+
<!-- (Richard Sproat [email protected]) -->
|
43 |
+
<!-- -->
|
44 |
+
<!-- Note that in order to use this as both an XML and SGML DTD, we need -->
|
45 |
+
<!-- to declare OMITTAG NO in the accompanying sable.decl for SGML. -->
|
46 |
+
<!-- This means that end tags are REQUIRED for a sable document to be -->
|
47 |
+
<!-- conformant, even when viewed as an SGML document. -->
|
48 |
+
|
49 |
+
<!ENTITY % baseelements "EMPH |
|
50 |
+
BREAK |
|
51 |
+
PITCH |
|
52 |
+
RATE |
|
53 |
+
VOLUME |
|
54 |
+
AUDIO |
|
55 |
+
ENGINE |
|
56 |
+
MARKER |
|
57 |
+
PRON |
|
58 |
+
SAYAS |
|
59 |
+
LANGUAGE |
|
60 |
+
SPEAKER |
|
61 |
+
DIV">
|
62 |
+
|
63 |
+
<!ELEMENT SABLE (#PCDATA| %baseelements; )*>
|
64 |
+
|
65 |
+
<!-- The non-hierarchical ones -->
|
66 |
+
<!ELEMENT BREAK EMPTY >
|
67 |
+
<!ATTLIST BREAK
|
68 |
+
LEVEL (large|medium|small|none|NUMBER) "medium"
|
69 |
+
TYPE (quest|excl|period|comma) #IMPLIED
|
70 |
+
MSEC CDATA #IMPLIED
|
71 |
+
MARK CDATA #IMPLIED>
|
72 |
+
<!ELEMENT AUDIO EMPTY >
|
73 |
+
<!ATTLIST AUDIO
|
74 |
+
SRC CDATA #IMPLIED
|
75 |
+
MODE (background|insertion) "insertion"
|
76 |
+
LEVEL CDATA #IMPLIED
|
77 |
+
MARK CDATA #IMPLIED>
|
78 |
+
<!ELEMENT MARKER EMPTY >
|
79 |
+
<!ATTLIST MARKER
|
80 |
+
MARK CDATA #IMPLIED>
|
81 |
+
|
82 |
+
<!-- The non-nestable ones -->
|
83 |
+
|
84 |
+
<!ELEMENT PRON (#PCDATA) >
|
85 |
+
<!ATTLIST PRON IPA CDATA #IMPLIED
|
86 |
+
SUB CDATA #IMPLIED
|
87 |
+
ORIGIN CDATA #IMPLIED
|
88 |
+
MARK CDATA #IMPLIED>
|
89 |
+
<!ELEMENT SAYAS (#PCDATA) >
|
90 |
+
<!ATTLIST SAYAS MODE (literal|date|time|phone|net|postal|currency|math|fraction|measure|ordinal|cardinal|name) #REQUIRED
|
91 |
+
MODETYPE (DMY|MDY|YMD|YM|MY|MD|HM|HMS|EMAIL|URL) #IMPLIED
|
92 |
+
MARK CDATA #IMPLIED>
|
93 |
+
|
94 |
+
<!-- The nestable ones -->
|
95 |
+
|
96 |
+
<!ELEMENT EMPH ( #PCDATA | %baseelements; )*>
|
97 |
+
<!ATTLIST EMPH LEVEL (Strong|Moderate|None|Reduced|NUMBER) "moderate"
|
98 |
+
MARK CDATA #IMPLIED>
|
99 |
+
<!ELEMENT PITCH ( #PCDATA | %baseelements; )*>
|
100 |
+
<!ATTLIST PITCH BASE CDATA "0%"
|
101 |
+
MIDDLE CDATA "0%"
|
102 |
+
RANGE CDATA "0%"
|
103 |
+
MARK CDATA #IMPLIED>
|
104 |
+
<!ELEMENT RATE ( #PCDATA | %baseelements; )*>
|
105 |
+
<!ATTLIST RATE SPEED CDATA "0%"
|
106 |
+
MARK CDATA #IMPLIED>
|
107 |
+
<!ELEMENT VOLUME ( #PCDATA | %baseelements; )*>
|
108 |
+
<!ATTLIST VOLUME LEVEL CDATA "medium"
|
109 |
+
MARK CDATA #IMPLIED>
|
110 |
+
<!ELEMENT ENGINE ( #PCDATA | %baseelements; )*>
|
111 |
+
<!ATTLIST ENGINE ID CDATA #IMPLIED
|
112 |
+
DATA CDATA #IMPLIED
|
113 |
+
MARK CDATA #IMPLIED>
|
114 |
+
|
115 |
+
<!ELEMENT LANGUAGE ( #PCDATA | %baseelements; )*>
|
116 |
+
<!ATTLIST LANGUAGE ID CDATA #IMPLIED
|
117 |
+
CODE CDATA #IMPLIED
|
118 |
+
MARK CDATA #IMPLIED>
|
119 |
+
<!ELEMENT SPEAKER ( #PCDATA | %baseelements; )*>
|
120 |
+
<!ATTLIST SPEAKER GENDER (male|female) #IMPLIED
|
121 |
+
AGE (older|middle|younger|teen|child) #IMPLIED
|
122 |
+
NAME CDATA #IMPLIED
|
123 |
+
MARK CDATA #IMPLIED>
|
124 |
+
|
125 |
+
<!ELEMENT DIV ( #PCDATA | %baseelements; )*>
|
126 |
+
<!ATTLIST DIV TYPE (sentence|paragraph) #IMPLIED
|
127 |
+
MARK CDATA #IMPLIED>
|
128 |
+
|
129 |
+
<!-- Character entities for latin 1 -->
|
130 |
+
|
131 |
+
<!ENTITY % ISOlat1 PUBLIC
|
132 |
+
"-//SABLE//ENTITIES Added Latin 1 for SABLE//EN"
|
133 |
+
"sable-latin.ent" >
|
134 |
+
%ISOlat1;
|
135 |
+
|
136 |
+
|
137 |
+
|
CosyVoice-ttsfrd/resource/festival/Singing.v0_1.dtd
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- <!DOCTYPE singing SYSTEM "Singing.v0_1.dtd" [ -->
|
2 |
+
|
3 |
+
<!ENTITY % baseelements "PITCH |
|
4 |
+
DURATION
|
5 |
+
">
|
6 |
+
|
7 |
+
<!ELEMENT SINGING (#PCDATA| %baseelements; )*>
|
8 |
+
<!ATTLIST SINGING BPM CDATA "120"
|
9 |
+
MARK CDATA #IMPLIED>
|
10 |
+
|
11 |
+
<!ELEMENT PITCH ( #PCDATA | %baseelements; )*>
|
12 |
+
<!ATTLIST PITCH FREQ CDATA "X"
|
13 |
+
NOTE CDATA "X"
|
14 |
+
MARK CDATA #IMPLIED>
|
15 |
+
|
16 |
+
<!ELEMENT DURATION ( #PCDATA | %baseelements; )*>
|
17 |
+
<!ATTLIST DURATION SECONDS CDATA "X"
|
18 |
+
BEATS CDATA "X"
|
19 |
+
MARK CDATA #IMPLIED>
|
20 |
+
|
21 |
+
<!ELEMENT REST ( #PCDATA | %baseelements; )*>
|
22 |
+
<!ATTLIST REST SECONDS CDATA "X"
|
23 |
+
BEATS CDATA "X"
|
24 |
+
MARK CDATA #IMPLIED>
|
25 |
+
|
26 |
+
<!-- Character entities for latin 1 -->
|
27 |
+
|
28 |
+
<!ENTITY % ISOlat1 PUBLIC
|
29 |
+
"-//SINGING//ENTITIES Added Latin 1 for SINGING//EN"
|
30 |
+
"sable-latin.ent" >
|
31 |
+
%ISOlat1;
|
32 |
+
|
33 |
+
|
34 |
+
|
CosyVoice-ttsfrd/resource/festival/VCLocalRules
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
SIOD = siod.scm web.scm cstr.scm fringe.scm
|
2 |
+
|
3 |
+
.copy_from_est: $(SIOD)
|
4 |
+
|
5 |
+
$(SIOD) :
|
6 |
+
@echo 'Copy $@ from EST/lib/siod'
|
7 |
+
-del $@
|
8 |
+
copy $(EST)\lib\siod\$@ $@
|
CosyVoice-ttsfrd/resource/festival/apml.scm
ADDED
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 2002 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Rob Clark
|
34 |
+
;;; Date: July 2002
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;
|
37 |
+
;; Sets up the current voice to synthesise from APML.
|
38 |
+
;;
|
39 |
+
;;
|
40 |
+
|
41 |
+
(require 'apml_f2bf0lr)
|
42 |
+
(require 'apml_kaldurtreeZ)
|
43 |
+
|
44 |
+
;; Default pitch settings (if unspecified in current voice.)
|
45 |
+
|
46 |
+
(defvar apml_default_pitch_mean 170 )
|
47 |
+
(defvar apml_default_pitch_standard_deviation 34 )
|
48 |
+
|
49 |
+
;; apml sythesis wrappers.
|
50 |
+
|
51 |
+
(define (apml_client_synth apml)
|
52 |
+
"(apml_client_synth apml)
|
53 |
+
Synthesise apml and return waveform(s) to client."
|
54 |
+
(utt.send.wave.client (apml_synth apml)))
|
55 |
+
|
56 |
+
(define (apml_synth apml)
|
57 |
+
"(apml_synth xml)
|
58 |
+
Synthesis an apml string."
|
59 |
+
(let ((tmpfile (make_tmp_filename))
|
60 |
+
utt)
|
61 |
+
(string_to_file tmpfile apml)
|
62 |
+
(set! utt (apml_file_synth tmpfile))
|
63 |
+
(delete-file tmpfile)
|
64 |
+
utt))
|
65 |
+
|
66 |
+
(define (apml_file_synth filename)
|
67 |
+
"(apml_file_synth filename)
|
68 |
+
Synthesis an apml file."
|
69 |
+
(let ((utt (Utterance Tokens nil)))
|
70 |
+
(utt.load utt filename)
|
71 |
+
(utt.synth utt)))
|
72 |
+
|
73 |
+
(define (string_to_file file s)
|
74 |
+
"(string_to_file file string)
|
75 |
+
Write string to file."
|
76 |
+
(let ((fd))
|
77 |
+
(set! fd (fopen file "wb"))
|
78 |
+
(format fd "%s" s)
|
79 |
+
(fclose fd)))
|
80 |
+
|
81 |
+
|
82 |
+
;;;
|
83 |
+
;;; Phrasing.
|
84 |
+
;;;
|
85 |
+
|
86 |
+
;; phrasing CART.
|
87 |
+
;
|
88 |
+
; It has been decided that by default, only punctuation should affect
|
89 |
+
; phrasing (and subsequently pauses)
|
90 |
+
;
|
91 |
+
(set! apml_phrase_tree
|
92 |
+
'
|
93 |
+
((lisp_apml_punc in ("?" "." ":")) ; big punctuation
|
94 |
+
((BB))
|
95 |
+
((lisp_apml_punc in ("'" "\"" "," ";")) ; else little punctuation
|
96 |
+
((B))
|
97 |
+
((lisp_apml_last_word is 1)
|
98 |
+
((BB)) ; need a BB at the end!
|
99 |
+
((NB)))))) ; else nothing
|
100 |
+
|
101 |
+
;; feature functions for phrasing
|
102 |
+
(define (apml_punc word)
|
103 |
+
(item.feat (item.relation.parent word 'Token) 'punc))
|
104 |
+
|
105 |
+
(define (apml_last_word word)
|
106 |
+
(if (item.next word)
|
107 |
+
"0" "1"))
|
108 |
+
|
109 |
+
|
110 |
+
;;;
|
111 |
+
;;; Pauses
|
112 |
+
;;;
|
113 |
+
|
114 |
+
;; feature functions for pauses
|
115 |
+
(define (apml_is_pause word)
|
116 |
+
(if (item.relation (item.relation.parent word 'Token) 'Pause)
|
117 |
+
t
|
118 |
+
nil))
|
119 |
+
|
120 |
+
(define (apml_pause word)
|
121 |
+
(if (item.relation word 'Pause)
|
122 |
+
(item.feat (item.relation.parent (item.relation.parent word 'Token) 'Pause) "sec")
|
123 |
+
0))
|
124 |
+
|
125 |
+
(define (Apml_Pauses utt)
|
126 |
+
"(Pauses UTT)
|
127 |
+
Predict pause insertion for apml."
|
128 |
+
(let ((words (utt.relation.items utt 'Word)) lastword tpname)
|
129 |
+
(if words
|
130 |
+
(begin
|
131 |
+
(insert_initial_pause utt) ;; always have a start pause
|
132 |
+
(set! lastword (car (last words)))
|
133 |
+
(mapcar
|
134 |
+
(lambda (w)
|
135 |
+
(let ((pbreak (item.feat w "pbreak"))
|
136 |
+
(emph (item.feat w "R:Token.parent.EMPH")))
|
137 |
+
(cond
|
138 |
+
((apml_is_pause w)
|
139 |
+
(insert_pause utt w))
|
140 |
+
((or (string-equal "B" pbreak)
|
141 |
+
(string-equal "BB" pbreak))
|
142 |
+
(insert_pause utt w))
|
143 |
+
((equal? w lastword)
|
144 |
+
(insert_pause utt w)))))
|
145 |
+
words)
|
146 |
+
;; The embarassing bit. Remove any words labelled as punc or fpunc
|
147 |
+
(mapcar
|
148 |
+
(lambda (w)
|
149 |
+
(let ((pos (item.feat w "pos")))
|
150 |
+
(if (or (string-equal "punc" pos)
|
151 |
+
(string-equal "fpunc" pos))
|
152 |
+
(let ((pbreak (item.feat w "pbreak"))
|
153 |
+
(wp (item.relation w 'Phrase)))
|
154 |
+
(if (and (string-matches pbreak "BB?")
|
155 |
+
(item.relation.prev w 'Word))
|
156 |
+
(item.set_feat
|
157 |
+
(item.relation.prev w 'Word) "pbreak" pbreak))
|
158 |
+
(item.relation.remove w 'Word)
|
159 |
+
;; can't refer to w as we've just deleted it
|
160 |
+
(item.relation.remove wp 'Phrase)))))
|
161 |
+
words)))
|
162 |
+
utt))
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
;;;
|
167 |
+
;;; Intonation.
|
168 |
+
;;;
|
169 |
+
|
170 |
+
;; Accent prediction (well transfer really).
|
171 |
+
;;
|
172 |
+
;; We treat L+H* L-H% on a single syllable as a special case.
|
173 |
+
|
174 |
+
(set! apml_accent_cart
|
175 |
+
'
|
176 |
+
((lisp_apml_accent is "Hstar")
|
177 |
+
((H*))
|
178 |
+
((lisp_apml_accent is "Lstar")
|
179 |
+
((L*))
|
180 |
+
((lisp_apml_LHLH is "LHLH")
|
181 |
+
((L+H*L-H%))
|
182 |
+
((lisp_apml_accent is "LplusHstar")
|
183 |
+
((L+H*))
|
184 |
+
((lisp_apml_accent is "LstarplusH")
|
185 |
+
((L*+H))
|
186 |
+
((NONE))))))))
|
187 |
+
|
188 |
+
(set! apml_boundary_cart
|
189 |
+
'
|
190 |
+
((lisp_apml_boundary is "LL")
|
191 |
+
((L-L%))
|
192 |
+
((lisp_apml_LHLH is "LHLH")
|
193 |
+
((NONE)) ; this is dealt with by the accent feature
|
194 |
+
((lisp_apml_boundary is "LH")
|
195 |
+
((L-H%))
|
196 |
+
((lisp_apml_boundary is "HH")
|
197 |
+
((H-H%))
|
198 |
+
((lisp_apml_boundary is "HL")
|
199 |
+
((H-L%))
|
200 |
+
((NONE))))))))
|
201 |
+
|
202 |
+
;; feature functions.
|
203 |
+
(define (apml_accent syl)
|
204 |
+
(let ((token (item.relation.parent (item.relation.parent syl 'SylStructure) 'Token)))
|
205 |
+
(if (and (eq (item.feat syl 'stress) 1)
|
206 |
+
(item.relation.parent token 'Emphasis))
|
207 |
+
(item.feat (item.relation.parent token 'Emphasis) 'x-pitchaccent)
|
208 |
+
0)))
|
209 |
+
|
210 |
+
(define (apml_boundary syl)
|
211 |
+
(let ((token (item.relation.parent (item.relation.parent syl 'SylStructure) 'Token)))
|
212 |
+
(if (and (> (item.feat syl 'syl_break) 0)
|
213 |
+
(item.relation.parent token 'Boundary))
|
214 |
+
(item.feat (item.relation.parent token 'Boundary) 'type)
|
215 |
+
0)))
|
216 |
+
|
217 |
+
(define (apml_LHLH syl)
|
218 |
+
(let ((accent (apml_accent syl))
|
219 |
+
(boundary (apml_boundary syl)))
|
220 |
+
(if (and (string-equal accent "LplusHstar")
|
221 |
+
(string-equal boundary "LH"))
|
222 |
+
"LHLH"
|
223 |
+
0)))
|
224 |
+
|
225 |
+
|
226 |
+
(define (apml_seg_is_LHLH_vowel seg)
|
227 |
+
(if (and (string-equal (apml_LHLH (item.relation.parent seg 'SylStructure))
|
228 |
+
"LHLH")
|
229 |
+
(string-equal (item.feat seg 'ph_vc) "+"))
|
230 |
+
"LHLH"
|
231 |
+
0))
|
232 |
+
|
233 |
+
|
234 |
+
;;;; feature functions:
|
235 |
+
|
236 |
+
(define (apml_tgtype syl)
|
237 |
+
(let ((l (apml_boundl (item.relation.parent syl 'SylStructure)))
|
238 |
+
(r (apml_boundr (item.relation.parent syl 'SylStructure))))
|
239 |
+
(if (eq (item.feat syl 'accented) 0)
|
240 |
+
0 ; this is a quirk related to the way the models were trained
|
241 |
+
(cond
|
242 |
+
((eq l 0)
|
243 |
+
1)
|
244 |
+
((eq r 1)
|
245 |
+
3)
|
246 |
+
(t 2)))))
|
247 |
+
|
248 |
+
|
249 |
+
(define (apml_iecount syl)
|
250 |
+
(if (eq (item.feat syl 'accented) 0)
|
251 |
+
0 ; this is a quirk related to the way the models were trained
|
252 |
+
(+ (item.feat syl 'asyl_in) 1)))
|
253 |
+
|
254 |
+
;; suport functions.
|
255 |
+
(define (apml_boundl word)
|
256 |
+
"(apml_boundl word)
|
257 |
+
Number of boundaries in this performative to the left of this word."
|
258 |
+
(let ((w (item.prev word))
|
259 |
+
(c 0))
|
260 |
+
(while (and w (apml_same_p w word))
|
261 |
+
(if (item.relation.parent (item.relation.parent w 'Token) 'Boundary)
|
262 |
+
(set! c (+ c 1)))
|
263 |
+
(set! w (item.prev w)))
|
264 |
+
c))
|
265 |
+
|
266 |
+
(define (apml_boundr word)
|
267 |
+
"(apml_boundr word)
|
268 |
+
Number of boundaries in this performative to the right of this word."
|
269 |
+
(let ((w word)
|
270 |
+
(c 0))
|
271 |
+
(while (and w (apml_same_p w word))
|
272 |
+
(if (item.relation.parent (item.relation.parent w 'Token) 'Boundary)
|
273 |
+
(set! c (+ c 1)))
|
274 |
+
(set! w (item.next w)))
|
275 |
+
c))
|
276 |
+
|
277 |
+
(define (apml_same_p w1 w2)
|
278 |
+
"(apml_same_p w1 w2)
|
279 |
+
Are these two words in the same performative?"
|
280 |
+
(let ((p1 (item.relation.parent (item.relation.parent w1 'Token) 'SemStructure))
|
281 |
+
(p2 (item.relation.parent (item.relation.parent w1 'Token) 'SemStructure)))
|
282 |
+
(if (and (item.parent p1) (item.parent p2)) ; not true if theme/rheme omitted.
|
283 |
+
(equal? (item.parent p1) (item.parent p2))
|
284 |
+
(equal? p1 p2))))
|
285 |
+
|
286 |
+
;;;
|
287 |
+
;;; segment timings
|
288 |
+
;;;
|
289 |
+
|
290 |
+
(define (apml_seg_times utt)
|
291 |
+
"(apml_seg_times utt)
|
292 |
+
Output the segment timings for an apml utterance."
|
293 |
+
(let ((segs (utt.relation.items utt 'Segment)))
|
294 |
+
(mapcar
|
295 |
+
(lambda (x)
|
296 |
+
(format t "%s %s\n" (item.name x) (item.feat x 'end)))
|
297 |
+
segs)
|
298 |
+
t))
|
299 |
+
|
300 |
+
;;;
|
301 |
+
;;; Additional functions for f0model.
|
302 |
+
;;;
|
303 |
+
|
304 |
+
|
305 |
+
(define (find_hstar_left syl)
|
306 |
+
"(find_hstar_left syl)
|
307 |
+
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*"
|
308 |
+
(let ((count 0))
|
309 |
+
;; if this syllable has a pitch event
|
310 |
+
(if (or (not (string-equal (item.feat syl 'tobi_accent) "NONE"))
|
311 |
+
(not (string-equal (item.feat syl 'tobi_endtone) "NONE")))
|
312 |
+
0)
|
313 |
+
(while (and syl
|
314 |
+
(string-equal (item.feat syl 'tobi_accent) "NONE")
|
315 |
+
(string-equal (item.feat syl 'tobi_endtone) "NONE"))
|
316 |
+
(set! count (+ count 1))
|
317 |
+
(set! syl (item.prev syl)))
|
318 |
+
(cond
|
319 |
+
;; run out of syllables before finding accent
|
320 |
+
((null syl)
|
321 |
+
0)
|
322 |
+
((string-equal (item.feat syl 'tobi_accent) "H*")
|
323 |
+
count)
|
324 |
+
(t 0))))
|
325 |
+
|
326 |
+
(define (find_ll_right syl)
|
327 |
+
"(find_ll_right syl)
|
328 |
+
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%."
|
329 |
+
(let ((count 0))
|
330 |
+
;; if this syllable has a pitch event
|
331 |
+
(if (or (not (string-equal (item.feat syl 'tobi_accent) "NONE"))
|
332 |
+
(not (string-equal (item.feat syl 'tobi_endtone) "NONE")))
|
333 |
+
0)
|
334 |
+
(while (and syl
|
335 |
+
(string-equal (item.feat syl 'tobi_accent) "NONE")
|
336 |
+
(string-equal (item.feat syl 'tobi_endtone) "NONE"))
|
337 |
+
(set! count (+ count 1))
|
338 |
+
(set! syl (item.next syl)))
|
339 |
+
(cond
|
340 |
+
;; run out of syllables before finding boundary
|
341 |
+
((null syl)
|
342 |
+
0)
|
343 |
+
((string-equal (item.feat syl 'tobi_endtone) "L-L%")
|
344 |
+
count)
|
345 |
+
(t 0))))
|
346 |
+
|
347 |
+
(define (l_spread syl)
|
348 |
+
"(l_spread syl)
|
349 |
+
Proportion of pitch lowering required due to L- spreading backwards."
|
350 |
+
(let ((l (find_hstar_left syl))
|
351 |
+
(r (find_ll_right syl)))
|
352 |
+
(cond
|
353 |
+
((or (eq l 0)
|
354 |
+
(eq r 0))
|
355 |
+
0)
|
356 |
+
(t
|
357 |
+
(/ r (- (+ l r) 1))))))
|
358 |
+
|
359 |
+
|
360 |
+
;;;
|
361 |
+
;;; Debuging and other useful stuff.
|
362 |
+
;;;
|
363 |
+
|
364 |
+
|
365 |
+
|
366 |
+
(define (apml_print_semstruct utt)
|
367 |
+
"(apml_print_semstruct utt)
|
368 |
+
Pretty print APML semantic structure."
|
369 |
+
(let ((i (utt.relation.first utt 'SemStructure)))
|
370 |
+
(while (not (null i))
|
371 |
+
(apml_pss_item 0 i)
|
372 |
+
(apml_pss_daughters 1 (item.daughters i))
|
373 |
+
(set! i (item.next i)))))
|
374 |
+
|
375 |
+
(define (apml_pss_daughters depth list)
|
376 |
+
(mapcar
|
377 |
+
(lambda (x)
|
378 |
+
(apml_pss_item depth x)
|
379 |
+
(apml_pss_daughters (+ depth 1) (item.daughters x))
|
380 |
+
)
|
381 |
+
list))
|
382 |
+
|
383 |
+
|
384 |
+
(define (apml_pss_item depth item)
|
385 |
+
(let ((c 0))
|
386 |
+
(while (< c depth)
|
387 |
+
(format t " ")
|
388 |
+
(set! c (+ c 1)))
|
389 |
+
(format t "%s\n" (item.name item))))
|
390 |
+
|
391 |
+
|
392 |
+
(define (apml_print_words utt)
|
393 |
+
"(apml_print_words utt)
|
394 |
+
Pretty print APML words with associated accents."
|
395 |
+
(mapcar
|
396 |
+
(lambda (x)
|
397 |
+
(format t "%s (" (item.name x))
|
398 |
+
(apml_pww_accent x)
|
399 |
+
(apml_pww_boundary x)
|
400 |
+
(apml_pww_pause x)
|
401 |
+
(format t ")\n"))
|
402 |
+
(utt.relation.items utt 'Word))
|
403 |
+
t)
|
404 |
+
|
405 |
+
(define (apml_pww_accent item)
|
406 |
+
(let ((p (item.relation.parent (item.relation.parent item 'Token) 'Emphasis)))
|
407 |
+
(if p (apml_ppw_list (item.features p)))))
|
408 |
+
|
409 |
+
(define (apml_pww_boundary item)
|
410 |
+
(let ((p (item.relation.parent (item.relation.parent item 'Token) 'Boundary)))
|
411 |
+
(if p (apml_ppw_list (item.features p)))))
|
412 |
+
|
413 |
+
(define (apml_pww_pause item)
|
414 |
+
(let ((p (item.relation.parent (item.relation.parent item 'Token) 'Pause)))
|
415 |
+
(if p (apml_ppw_list (item.features p)))))
|
416 |
+
|
417 |
+
(define (apml_ppw_list l)
|
418 |
+
(mapcar
|
419 |
+
(lambda (x)
|
420 |
+
(format t " %s" x))
|
421 |
+
(flatten l)))
|
422 |
+
|
423 |
+
|
424 |
+
(define (apml_print_sylstructure utt filename)
|
425 |
+
"(apml_print_sylstructure utt filename)
|
426 |
+
Pretty print APML syllable structure. Filename t for stdout"
|
427 |
+
(let (fd)
|
428 |
+
(if (not (eq? filename t))
|
429 |
+
(set! fd (fopen filename "wb"))
|
430 |
+
(set! fd t))
|
431 |
+
(mapcar
|
432 |
+
(lambda (x)
|
433 |
+
(format fd "%s\n" (item.name x))
|
434 |
+
(apml_psyl fd x))
|
435 |
+
(utt.relation.items utt 'Word))
|
436 |
+
t))
|
437 |
+
|
438 |
+
(define (apml_psyl fd word)
|
439 |
+
(mapcar
|
440 |
+
(lambda (x)
|
441 |
+
(apml_psegs fd x)
|
442 |
+
(if (eq (item.feat x 'stress) 1)
|
443 |
+
(format fd " (1)"))
|
444 |
+
(if (item.relation.daughter1 x 'Intonation)
|
445 |
+
(begin
|
446 |
+
(let ((ie (item.relation.daughter1 x 'Intonation)))
|
447 |
+
(format fd " [")
|
448 |
+
(while ie
|
449 |
+
(format fd "%s" (item.name ie))
|
450 |
+
(set! ie (item.next ie))
|
451 |
+
(if ie (format t " ")))
|
452 |
+
(format fd "]"))))
|
453 |
+
(format fd "\n"))
|
454 |
+
(item.daughters (item.relation word 'SylStructure))))
|
455 |
+
|
456 |
+
(define (apml_psegs fd syl)
|
457 |
+
(let ((segs (item.daughters syl)))
|
458 |
+
(format fd " ")
|
459 |
+
(while segs
|
460 |
+
(format fd "%s" (item.name (car segs)))
|
461 |
+
(if (cdr segs)
|
462 |
+
(format fd "."))
|
463 |
+
(set! segs (cdr segs)))))
|
464 |
+
|
465 |
+
|
466 |
+
(define (apml_get_lr_params)
|
467 |
+
(let ((m 0)
|
468 |
+
(s 0))
|
469 |
+
(if (or (equal? (Parameter.get 'Int_Target_Method) Int_Targets_LR)
|
470 |
+
(equal? (Parameter.get 'Int_Target_Method) Int_Targets_5_LR))
|
471 |
+
(begin
|
472 |
+
(set! m (car (cdr (car int_lr_params))))
|
473 |
+
(set! s (car (cdr (car (cdr int_lr_params))))))
|
474 |
+
(begin
|
475 |
+
(set! m apml_default_pitch_mean)
|
476 |
+
(set! s apml_default_pitch_standard_deviation)))
|
477 |
+
(list m s)))
|
478 |
+
|
479 |
+
|
480 |
+
|
481 |
+
|
482 |
+
(define (apml_initialise)
|
483 |
+
"(apml_initialise)
|
484 |
+
Set up the current voice for apml use."
|
485 |
+
(if (not (string-matches current-voice ".*multisyn.*")) ; nothing if multisyn
|
486 |
+
(cond
|
487 |
+
((or (string-equal (Parameter.get 'Language) "americanenglish")
|
488 |
+
(string-equal (Parameter.get 'Language) "britishenglish"))
|
489 |
+
(begin
|
490 |
+
(format t "Initialising APML for English.\n")
|
491 |
+
;; Phrasing.
|
492 |
+
(Parameter.set 'Phrase_Method 'cart_tree)
|
493 |
+
(set! phrase_cart_tree apml_phrase_tree)
|
494 |
+
;; Pauses.
|
495 |
+
;;(set! duration_cart_tree apml_kal_duration_cart_tree)
|
496 |
+
;;(set! duration_ph_info apml_kal_durs)
|
497 |
+
;;(Parameter.set 'Pause_Method Apml_Pauses)
|
498 |
+
;; Lexicon.
|
499 |
+
;;;; We now assume the lexicon you have already set is suitable,
|
500 |
+
;;;; You probably want to ensure this is "apmlcmu" or "unilex"
|
501 |
+
;;(if (not (member_string "apmlcmu" (lex.list)))
|
502 |
+
;; (load (path-append lexdir "apmlcmu/apmlcmulex.scm")))
|
503 |
+
;;(lex.select "apmlcmu")
|
504 |
+
;; Add other lex entries here:
|
505 |
+
;;(lex.add.entry '("minerals" nil (((m ih n) 1) ((er) 0) ((ax l z) 0))))
|
506 |
+
;;(lex.add.entry '("fibre" nil (((f ay b) 1) ((er) 0))))
|
507 |
+
;;(lex.add.entry '("dont" v (((d ow n t) 1))))
|
508 |
+
;;(lex.add.entry '("pectoris" nil (((p eh k) 2) ((t ao r) 1) ((ih s) 0))))
|
509 |
+
;;(lex.add.entry '("sideeffects" nil (((s ay d) 1) ((ax f) 0) ((eh k t s) 2))))
|
510 |
+
|
511 |
+
;; Intonation events.
|
512 |
+
(set! int_accent_cart_tree apml_accent_cart)
|
513 |
+
(set! int_tone_cart_tree apml_boundary_cart)
|
514 |
+
(Parameter.set 'Int_Method Intonation_Tree)
|
515 |
+
;; Intonation f0 contour.
|
516 |
+
(set! f0_lr_start apml_f2b_f0_lr_start)
|
517 |
+
(set! f0_lr_left apml_f2b_f0_lr_left)
|
518 |
+
(set! f0_lr_mid apml_f2b_f0_lr_mid)
|
519 |
+
(set! f0_lr_right apml_f2b_f0_lr_right)
|
520 |
+
(set! f0_lr_end apml_f2b_f0_lr_end)
|
521 |
+
(set! int_lr_params
|
522 |
+
(list (list 'target_f0_mean (car (apml_get_lr_params)))
|
523 |
+
(list 'target_f0_std (car (cdr (apml_get_lr_params))))
|
524 |
+
(list 'model_f0_mean 170)
|
525 |
+
(list 'model_f0_std 40)))
|
526 |
+
(Parameter.set 'Int_Target_Method Int_Targets_5_LR)
|
527 |
+
nil))
|
528 |
+
((string-equal (Parameter.get 'Language) "italian")
|
529 |
+
(begin
|
530 |
+
(format t "Initialising APML for Italian.\n")
|
531 |
+
;; Phrasing.
|
532 |
+
(Parameter.set 'Phrase_Method 'cart_tree)
|
533 |
+
(set! phrase_cart_tree apml_phrase_tree)
|
534 |
+
;; Intonation events.
|
535 |
+
(set! int_accent_cart_tree apml_accent_cart)
|
536 |
+
(set! int_tone_cart_tree apml_boundary_cart)
|
537 |
+
(Parameter.set 'Int_Method Intonation_Tree)
|
538 |
+
;; Intonation f0 contour.
|
539 |
+
(set! f0_lr_start apml_f2b_f0_lr_start)
|
540 |
+
(set! f0_lr_mid apml_f2b_f0_lr_mid)
|
541 |
+
(set! f0_lr_end apml_f2b_f0_lr_end)
|
542 |
+
(set! int_lr_params
|
543 |
+
(list (list 'target_f0_mean (car (apml_get_lr_params)))
|
544 |
+
(list 'target_f0_std (car (cdr (apml_get_lr_params))))
|
545 |
+
(list 'model_f0_mean 170)
|
546 |
+
(list 'model_f0_std 34)))
|
547 |
+
(Parameter.set 'Int_Target_Method Int_Targets_LR)
|
548 |
+
nil))
|
549 |
+
(t nil))))
|
550 |
+
|
551 |
+
(provide 'apml)
|
CosyVoice-ttsfrd/resource/festival/apml_f2bf0lr.scm
ADDED
@@ -0,0 +1,530 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 2002 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Rob Clark
|
34 |
+
;;; Date: July 2002
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;
|
37 |
+
;; APML.f0 trees.
|
38 |
+
;;
|
39 |
+
;;
|
40 |
+
|
41 |
+
(set! apml_f2b_f0_lr_start
|
42 |
+
'(
|
43 |
+
( Intercept 163.9871 )
|
44 |
+
( pp.lisp_apml_tgtype -3.1750 (1) )
|
45 |
+
( p.lisp_apml_tgtype 5.0332 (1) )
|
46 |
+
( lisp_apml_tgtype 0.0000 (1) )
|
47 |
+
( n.lisp_apml_tgtype 17.7799 (1) )
|
48 |
+
( nn.lisp_apml_tgtype 13.6845 (1) )
|
49 |
+
( pp.lisp_apml_tgtype 0.0000 (2) )
|
50 |
+
( p.lisp_apml_tgtype 0.0000 (2) )
|
51 |
+
( lisp_apml_tgtype 0.0000 (2) )
|
52 |
+
( n.lisp_apml_tgtype 0.0000 (2) )
|
53 |
+
( nn.lisp_apml_tgtype 0.0000 (2) )
|
54 |
+
( pp.lisp_apml_tgtype 0.0000 (3) )
|
55 |
+
( p.lisp_apml_tgtype 0.0000 (3) )
|
56 |
+
( lisp_apml_tgtype -9.7245 (3) )
|
57 |
+
( n.lisp_apml_tgtype 0.0000 (3) )
|
58 |
+
( nn.lisp_apml_tgtype -2.4009 (3) )
|
59 |
+
( pp.lisp_apml_iecount 0.0000 )
|
60 |
+
( p.lisp_apml_iecount -0.4484 )
|
61 |
+
( lisp_apml_iecount 0.0000 )
|
62 |
+
( n.lisp_apml_iecount -2.0165 )
|
63 |
+
( nn.lisp_apml_iecount 0.0000 )
|
64 |
+
( pp.tobi_accent 0.0000 (H*) )
|
65 |
+
( p.tobi_accent 11.1239 (H*) )
|
66 |
+
( tobi_accent 21.5164 (H*) )
|
67 |
+
( n.tobi_accent -2.5990 (H*) )
|
68 |
+
( nn.tobi_accent -6.5307 (H*) )
|
69 |
+
( pp.tobi_accent 0.0000 (L*) )
|
70 |
+
( p.tobi_accent -10.0000 (L*) )
|
71 |
+
( tobi_accent -5.0000 (L*) )
|
72 |
+
( n.tobi_accent -10.6798 (L*) )
|
73 |
+
( nn.tobi_accent -5.6561 (L*) )
|
74 |
+
( pp.tobi_accent 5.3577 (L*+H) )
|
75 |
+
( p.tobi_accent 60.0000 (L*+H) )
|
76 |
+
( tobi_accent -5.0000 (L*+H) )
|
77 |
+
( n.tobi_accent 0.0000 (L*+H) )
|
78 |
+
( nn.tobi_accent 0.0000 (L*+H) )
|
79 |
+
( pp.tobi_accent 0.0000 (L+H*) )
|
80 |
+
( p.tobi_accent 11.1200 (L+H*) )
|
81 |
+
( tobi_accent 21.5200 (L+H*) )
|
82 |
+
( n.tobi_accent -2.6000 (L+H*) )
|
83 |
+
( nn.tobi_accent -6.5300 (L+H*) )
|
84 |
+
( pp.tobi_endtone 0.0000 (L-L%) )
|
85 |
+
( p.tobi_endtone -0.6164 (L-L%) )
|
86 |
+
( tobi_endtone -50 (L-L%) )
|
87 |
+
( n.tobi_endtone -10.8729 (L-L%) )
|
88 |
+
( nn.tobi_endtone -7.6522 (L-L%) )
|
89 |
+
( pp.tobi_endtone 0.7583 (L-H%) )
|
90 |
+
( p.tobi_endtone 0.0000 (L-H%) )
|
91 |
+
( tobi_endtone -20.0000 (L-H%) )
|
92 |
+
( n.tobi_endtone -11.8935 (L-H%) )
|
93 |
+
( nn.tobi_endtone -7.2012 (L-H%) )
|
94 |
+
( pp.tobi_endtone 0.0000 (H-L%) )
|
95 |
+
( p.tobi_endtone 0.0000 (H-L%) )
|
96 |
+
( tobi_endtone 4.0790 (H-L%) )
|
97 |
+
( n.tobi_endtone -19.3463 (H-L%) )
|
98 |
+
( nn.tobi_endtone -29.3615 (H-L%) )
|
99 |
+
( pp.tobi_endtone 0.0000 (H-H%) )
|
100 |
+
( p.tobi_endtone 0.0000 (H-H%) )
|
101 |
+
( tobi_endtone 0.0000 (H-H%) )
|
102 |
+
( n.tobi_endtone 0.0000 (H-H%) )
|
103 |
+
( nn.tobi_endtone 0.0000 (H-H%) )
|
104 |
+
( pp.tobi_endtone 0.0000 (L-) )
|
105 |
+
( p.tobi_endtone -15.1702 (L-) )
|
106 |
+
( tobi_endtone 0.0000 (L-) )
|
107 |
+
( n.tobi_endtone -14.5562 (L-) )
|
108 |
+
( nn.tobi_endtone 0.0000 (L-) )
|
109 |
+
( pp.tobi_endtone -13.5046 (H-) )
|
110 |
+
( p.tobi_endtone 0.0000 (H-) )
|
111 |
+
( tobi_endtone 6.3377 (H-) )
|
112 |
+
( n.tobi_endtone -6.8631 (H-) )
|
113 |
+
( nn.tobi_endtone 0.0000 (H-) )
|
114 |
+
( p.tobi_accent 60.0000 (L+H*L-H%) )
|
115 |
+
( tobi_accent -60.0000 (L+H*L-H%) )
|
116 |
+
( n.tobi_accent 0.0000 (L+H*L-H%) )
|
117 |
+
( pp.syl_break 0.0000 )
|
118 |
+
( p.syl_break 0.0000 )
|
119 |
+
( syl_break 0.6417 )
|
120 |
+
( n.syl_break 1.3532 )
|
121 |
+
( nn.syl_break 1.0724 )
|
122 |
+
( pp.stress 0.0000 )
|
123 |
+
( p.stress -0.6193 )
|
124 |
+
( stress 2.4121 )
|
125 |
+
( n.stress 0.0000 )
|
126 |
+
( nn.stress 2.5478 )
|
127 |
+
( syl_in -1.4373 )
|
128 |
+
( syl_out 0.4181 )
|
129 |
+
( ssyl_in 0.0000 )
|
130 |
+
( ssyl_out 0.6125 )
|
131 |
+
( asyl_in 0.0000 )
|
132 |
+
( asyl_out 0.9906 )
|
133 |
+
( last_accent 0.0000 )
|
134 |
+
( next_accent -0.3700 )
|
135 |
+
( sub_phrases 0.0000 )
|
136 |
+
( lisp_l_spread -60.0000 )
|
137 |
+
))
|
138 |
+
|
139 |
+
(set! apml_f2b_f0_lr_left
|
140 |
+
'(
|
141 |
+
( Intercept 162.1173 )
|
142 |
+
( pp.lisp_apml_tgtype -1.5875 (1) )
|
143 |
+
( p.lisp_apml_tgtype 4.8101 (1) )
|
144 |
+
( lisp_apml_tgtype 12.8265 (1) )
|
145 |
+
( n.lisp_apml_tgtype 16.3027 (1) )
|
146 |
+
( nn.lisp_apml_tgtype 13.3225 (1) )
|
147 |
+
( pp.lisp_apml_tgtype 0.0000 (2) )
|
148 |
+
( p.lisp_apml_tgtype 1.7434 (2) )
|
149 |
+
( lisp_apml_tgtype 6.7783 (2) )
|
150 |
+
( n.lisp_apml_tgtype 0.6679 (2) )
|
151 |
+
( nn.lisp_apml_tgtype 0.0000 (2) )
|
152 |
+
( pp.lisp_apml_tgtype 1.6494 (3) )
|
153 |
+
( p.lisp_apml_tgtype 1.2861 (3) )
|
154 |
+
( lisp_apml_tgtype -2.0724 (3) )
|
155 |
+
( n.lisp_apml_tgtype 0.0000 (3) )
|
156 |
+
( nn.lisp_apml_tgtype -1.2004 (3) )
|
157 |
+
( pp.lisp_apml_iecount 0.0000 )
|
158 |
+
( p.lisp_apml_iecount -0.5857 )
|
159 |
+
( lisp_apml_iecount 0.0000 )
|
160 |
+
( n.lisp_apml_iecount -2.3543 )
|
161 |
+
( nn.lisp_apml_iecount 0.0000 )
|
162 |
+
( pp.tobi_accent 0.0000 (H*) )
|
163 |
+
( p.tobi_accent 8.5867 (H*) )
|
164 |
+
( tobi_accent 21.2169 (H*) )
|
165 |
+
( n.tobi_accent -1.2995 (H*) )
|
166 |
+
( nn.tobi_accent -6.5056 (H*) )
|
167 |
+
( pp.tobi_accent 0.0000 (L*) )
|
168 |
+
( p.tobi_accent -7.5000 (L*) )
|
169 |
+
( tobi_accent -25.0000 (L*) )
|
170 |
+
( n.tobi_accent -8.3939 (L*) )
|
171 |
+
( nn.tobi_accent -4.5688 (L*) )
|
172 |
+
( pp.tobi_accent 2.6789 (L*+H) )
|
173 |
+
( p.tobi_accent 45.0000 (L*+H) )
|
174 |
+
( tobi_accent -17.5000 (L*+H) )
|
175 |
+
( n.tobi_accent -1.3600 (L*+H) )
|
176 |
+
( nn.tobi_accent 0.0000 (L*+H) )
|
177 |
+
( pp.tobi_accent 0.0000 (L+H*) )
|
178 |
+
( p.tobi_accent 8.5850 (L+H*) )
|
179 |
+
( tobi_accent 21.2200 (L+H*) )
|
180 |
+
( n.tobi_accent -1.3000 (L+H*) )
|
181 |
+
( nn.tobi_accent -6.5050 (L+H*) )
|
182 |
+
( pp.tobi_endtone 1.8117 (L-L%) )
|
183 |
+
( p.tobi_endtone -0.1681 (L-L%) )
|
184 |
+
( tobi_endtone -70 (L-L%) )
|
185 |
+
( n.tobi_endtone -8.9334 (L-L%) )
|
186 |
+
( nn.tobi_endtone -8.4034 (L-L%) )
|
187 |
+
( pp.tobi_endtone 1.2099 (L-H%) )
|
188 |
+
( p.tobi_endtone 1.1220 (L-H%) )
|
189 |
+
( tobi_endtone -10.0000 (L-H%) )
|
190 |
+
( n.tobi_endtone -5.9467 (L-H%) )
|
191 |
+
( nn.tobi_endtone -6.9072 (L-H%) )
|
192 |
+
( pp.tobi_endtone 0.0000 (H-L%) )
|
193 |
+
( p.tobi_endtone 0.0000 (H-L%) )
|
194 |
+
( tobi_endtone 2.0395 (H-L%) )
|
195 |
+
( n.tobi_endtone -12.3940 (H-L%) )
|
196 |
+
( nn.tobi_endtone -24.2593 (H-L%) )
|
197 |
+
( pp.tobi_endtone 0.0000 (H-H%) )
|
198 |
+
( p.tobi_endtone 0.0000 (H-H%) )
|
199 |
+
( tobi_endtone 0.0000 (H-H%) )
|
200 |
+
( n.tobi_endtone 0.0000 (H-H%) )
|
201 |
+
( nn.tobi_endtone 16.1076 (H-H%) )
|
202 |
+
( pp.tobi_endtone -1.8913 (L-) )
|
203 |
+
( p.tobi_endtone -15.5650 (L-) )
|
204 |
+
( tobi_endtone -18.3620 (L-) )
|
205 |
+
( n.tobi_endtone -9.8322 (L-) )
|
206 |
+
( nn.tobi_endtone -1.8182 (L-) )
|
207 |
+
( pp.tobi_endtone -13.4429 (H-) )
|
208 |
+
( p.tobi_endtone 0.0000 (H-) )
|
209 |
+
( tobi_endtone 1.9053 (H-) )
|
210 |
+
( n.tobi_endtone -3.4315 (H-) )
|
211 |
+
( nn.tobi_endtone 0.0000 (H-) )
|
212 |
+
( p.tobi_accent 0.0000 (L+H*L-H%) )
|
213 |
+
( tobi_accent 10.0000 (L+H*L-H%) )
|
214 |
+
( n.tobi_accent 0.0000 (L+H*L-H%) )
|
215 |
+
( pp.syl_break 0.3501 )
|
216 |
+
( p.syl_break -0.8121 )
|
217 |
+
( syl_break 0.3209 )
|
218 |
+
( n.syl_break 0.7486 )
|
219 |
+
( nn.syl_break 0.8182 )
|
220 |
+
( pp.stress -0.9778 )
|
221 |
+
( p.stress -0.3096 )
|
222 |
+
( stress 2.7752 )
|
223 |
+
( n.stress 0.9976 )
|
224 |
+
( nn.stress 2.7343 )
|
225 |
+
( syl_in -1.9845 )
|
226 |
+
( syl_out 0.7142 )
|
227 |
+
( ssyl_in 1.0376 )
|
228 |
+
( ssyl_out 0.3062 )
|
229 |
+
( asyl_in 0.0000 )
|
230 |
+
( asyl_out 0.4953 )
|
231 |
+
( last_accent 0.0000 )
|
232 |
+
( next_accent 0.1084 )
|
233 |
+
( sub_phrases 0.0000 )
|
234 |
+
( lisp_l_spread -60.0000 )
|
235 |
+
))
|
236 |
+
|
237 |
+
(set! apml_f2b_f0_lr_mid
|
238 |
+
'(
|
239 |
+
( Intercept 160.2474 )
|
240 |
+
( pp.lisp_apml_tgtype 0.0000 (1) )
|
241 |
+
( p.lisp_apml_tgtype 4.5869 (1) )
|
242 |
+
( lisp_apml_tgtype 25.6530 (1) )
|
243 |
+
( n.lisp_apml_tgtype 14.8255 (1) )
|
244 |
+
( nn.lisp_apml_tgtype 12.9605 (1) )
|
245 |
+
( pp.lisp_apml_tgtype 0.0000 (2) )
|
246 |
+
( p.lisp_apml_tgtype 3.4867 (2) )
|
247 |
+
( lisp_apml_tgtype 13.5566 (2) )
|
248 |
+
( n.lisp_apml_tgtype 1.3359 (2) )
|
249 |
+
( nn.lisp_apml_tgtype 0.0000 (2) )
|
250 |
+
( pp.lisp_apml_tgtype 3.2989 (3) )
|
251 |
+
( p.lisp_apml_tgtype 2.5723 (3) )
|
252 |
+
( lisp_apml_tgtype 5.5798 (3) )
|
253 |
+
( n.lisp_apml_tgtype 0.0000 (3) )
|
254 |
+
( nn.lisp_apml_tgtype 0.0000 (3) )
|
255 |
+
( pp.lisp_apml_iecount 0.0000 )
|
256 |
+
( p.lisp_apml_iecount -0.7231 )
|
257 |
+
( lisp_apml_iecount 0.0000 )
|
258 |
+
( n.lisp_apml_iecount -2.6922 )
|
259 |
+
( nn.lisp_apml_iecount 0.0000 )
|
260 |
+
( pp.tobi_accent 0.0000 (H*) )
|
261 |
+
( p.tobi_accent 6.0496 (H*) )
|
262 |
+
( tobi_accent 20.9174 (H*) )
|
263 |
+
( n.tobi_accent 0.0000 (H*) )
|
264 |
+
( nn.tobi_accent -6.4804 (H*) )
|
265 |
+
( pp.tobi_accent 0.0000 (L*) )
|
266 |
+
( p.tobi_accent -5.0000 (L*) )
|
267 |
+
( tobi_accent -45.0000 (L*) )
|
268 |
+
( n.tobi_accent -6.1079 (L*) )
|
269 |
+
( nn.tobi_accent -3.4815 (L*) )
|
270 |
+
( pp.tobi_accent 0.0000 (L*+H) )
|
271 |
+
( p.tobi_accent 30.0000 (L*+H) )
|
272 |
+
( tobi_accent -30.0000 (L*+H) )
|
273 |
+
( n.tobi_accent -2.7200 (L*+H) )
|
274 |
+
( nn.tobi_accent 0.0000 (L*+H) )
|
275 |
+
( pp.tobi_accent 0.0000 (L+H*) )
|
276 |
+
( p.tobi_accent 6.0500 (L+H*) )
|
277 |
+
( tobi_accent 20.9200 (L+H*) )
|
278 |
+
( n.tobi_accent 0.0000 (L+H*) )
|
279 |
+
( nn.tobi_accent -6.4800 (L+H*) )
|
280 |
+
( pp.tobi_endtone 3.6235 (L-L%) )
|
281 |
+
( p.tobi_endtone 0.2801 (L-L%) )
|
282 |
+
( tobi_endtone -80 (L-L%) )
|
283 |
+
( n.tobi_endtone -6.9938 (L-L%) )
|
284 |
+
( nn.tobi_endtone -9.1546 (L-L%) )
|
285 |
+
( pp.tobi_endtone 1.6616 (L-H%) )
|
286 |
+
( p.tobi_endtone 2.2441 (L-H%) )
|
287 |
+
( tobi_endtone 0.0000 (L-H%) )
|
288 |
+
( n.tobi_endtone 0.0000 (L-H%) )
|
289 |
+
( nn.tobi_endtone -6.6132 (L-H%) )
|
290 |
+
( pp.tobi_endtone 0.0000 (H-L%) )
|
291 |
+
( p.tobi_endtone 0.0000 (H-L%) )
|
292 |
+
( tobi_endtone 0.0000 (H-L%) )
|
293 |
+
( n.tobi_endtone -5.4416 (H-L%) )
|
294 |
+
( nn.tobi_endtone -19.1570 (H-L%) )
|
295 |
+
( pp.tobi_endtone 0.0000 (H-H%) )
|
296 |
+
( p.tobi_endtone 0.0000 (H-H%) )
|
297 |
+
( tobi_endtone 0.0000 (H-H%) )
|
298 |
+
( n.tobi_endtone 0.0000 (H-H%) )
|
299 |
+
( nn.tobi_endtone 32.2151 (H-H%) )
|
300 |
+
( pp.tobi_endtone -3.7825 (L-) )
|
301 |
+
( p.tobi_endtone -15.9598 (L-) )
|
302 |
+
( tobi_endtone -36.7241 (L-) )
|
303 |
+
( n.tobi_endtone -5.1082 (L-) )
|
304 |
+
( nn.tobi_endtone -3.6363 (L-) )
|
305 |
+
( pp.tobi_endtone -13.3813 (H-) )
|
306 |
+
( p.tobi_endtone 0.0000 (H-) )
|
307 |
+
( tobi_endtone -2.5270 (H-) )
|
308 |
+
( n.tobi_endtone 0.0000 (H-) )
|
309 |
+
( nn.tobi_endtone 0.0000 (H-) )
|
310 |
+
( p.tobi_accent 0.0000 (L+H*L-H%) )
|
311 |
+
( tobi_accent 40.0000 (L+H*L-H%) )
|
312 |
+
( n.tobi_accent 0.0000 (L+H*L-H%) )
|
313 |
+
( pp.syl_break 0.7003 )
|
314 |
+
( p.syl_break -1.6241 )
|
315 |
+
( syl_break 0.0000 )
|
316 |
+
( n.syl_break 0.1439 )
|
317 |
+
( nn.syl_break 0.5640 )
|
318 |
+
( pp.stress -1.9556 )
|
319 |
+
( p.stress 0.0000 )
|
320 |
+
( stress 3.1383 )
|
321 |
+
( n.stress 1.9952 )
|
322 |
+
( nn.stress 2.9208 )
|
323 |
+
( syl_in -2.5317 )
|
324 |
+
( syl_out 1.0103 )
|
325 |
+
( ssyl_in 2.0751 )
|
326 |
+
( ssyl_out 0.0000 )
|
327 |
+
( asyl_in 0.0000 )
|
328 |
+
( asyl_out 0.0000 )
|
329 |
+
( last_accent 0.0000 )
|
330 |
+
( next_accent 0.5869 )
|
331 |
+
( sub_phrases 0.0000 )
|
332 |
+
( lisp_l_spread -60.0000 )
|
333 |
+
))
|
334 |
+
|
335 |
+
(set! apml_f2b_f0_lr_right
|
336 |
+
'(
|
337 |
+
( Intercept 162.6687 )
|
338 |
+
( pp.lisp_apml_tgtype -4.0459 (1) )
|
339 |
+
( p.lisp_apml_tgtype 3.0601 (1) )
|
340 |
+
( lisp_apml_tgtype 27.8166 (1) )
|
341 |
+
( n.lisp_apml_tgtype 7.4127 (1) )
|
342 |
+
( nn.lisp_apml_tgtype 11.3458 (1) )
|
343 |
+
( pp.lisp_apml_tgtype -3.8091 (2) )
|
344 |
+
( p.lisp_apml_tgtype 1.7434 (2) )
|
345 |
+
( lisp_apml_tgtype 17.1672 (2) )
|
346 |
+
( n.lisp_apml_tgtype 0.6679 (2) )
|
347 |
+
( nn.lisp_apml_tgtype 0.0000 (2) )
|
348 |
+
( pp.lisp_apml_tgtype 1.6494 (3) )
|
349 |
+
( p.lisp_apml_tgtype 1.2861 (3) )
|
350 |
+
( lisp_apml_tgtype 9.5674 (3) )
|
351 |
+
( n.lisp_apml_tgtype -3.1085 (3) )
|
352 |
+
( nn.lisp_apml_tgtype 0.0000 (3) )
|
353 |
+
( pp.lisp_apml_iecount 0.0000 )
|
354 |
+
( p.lisp_apml_iecount -0.7829 )
|
355 |
+
( lisp_apml_iecount -0.5447 )
|
356 |
+
( n.lisp_apml_iecount -1.3461 )
|
357 |
+
( nn.lisp_apml_iecount -0.7178 )
|
358 |
+
( pp.tobi_accent 0.7904 (H*) )
|
359 |
+
( p.tobi_accent 3.0248 (H*) )
|
360 |
+
( tobi_accent 14.1116 (H*) )
|
361 |
+
( n.tobi_accent 0.0000 (H*) )
|
362 |
+
( nn.tobi_accent -3.2402 (H*) )
|
363 |
+
( pp.tobi_accent 0.0000 (L*) )
|
364 |
+
( p.tobi_accent -2.5000 (L*) )
|
365 |
+
( tobi_accent -32.5000 (L*) )
|
366 |
+
( n.tobi_accent -3.0539 (L*) )
|
367 |
+
( nn.tobi_accent -1.7408 (L*) )
|
368 |
+
( pp.tobi_accent 0.0000 (L*+H) )
|
369 |
+
( p.tobi_accent 17.5000 (L*+H) )
|
370 |
+
( tobi_accent -9.0000 (L*+H) )
|
371 |
+
( n.tobi_accent -2.8025 (L*+H) )
|
372 |
+
( nn.tobi_accent -0.5455 (L*+H) )
|
373 |
+
( pp.tobi_accent 0.7900 (L+H*) )
|
374 |
+
( p.tobi_accent 3.0250 (L+H*) )
|
375 |
+
( tobi_accent 14.1150 (L+H*) )
|
376 |
+
( n.tobi_accent 0.0000 (L+H*) )
|
377 |
+
( nn.tobi_accent -3.2400 (L+H*) )
|
378 |
+
( pp.tobi_endtone 5.7534 (L-L%) )
|
379 |
+
( p.tobi_endtone 0.1401 (L-L%) )
|
380 |
+
( tobi_endtone -65 (L-L%) )
|
381 |
+
( n.tobi_endtone -11.1795 (L-L%) )
|
382 |
+
( nn.tobi_endtone -7.8158 (L-L%) )
|
383 |
+
( pp.tobi_endtone 4.4276 (L-H%) )
|
384 |
+
( p.tobi_endtone 1.1220 (L-H%) )
|
385 |
+
( tobi_endtone 20.0000 (L-H%) )
|
386 |
+
( n.tobi_endtone -6.8995 (L-H%) )
|
387 |
+
( nn.tobi_endtone -6.1219 (L-H%) )
|
388 |
+
( pp.tobi_endtone 2.4327 (H-L%) )
|
389 |
+
( p.tobi_endtone 0.0000 (H-L%) )
|
390 |
+
( tobi_endtone -7.5781 (H-L%) )
|
391 |
+
( n.tobi_endtone -2.7208 (H-L%) )
|
392 |
+
( nn.tobi_endtone -14.4838 (H-L%) )
|
393 |
+
( pp.tobi_endtone 0.0000 (H-H%) )
|
394 |
+
( p.tobi_endtone 0.0000 (H-H%) )
|
395 |
+
( tobi_endtone 0.0000 (H-H%) )
|
396 |
+
( n.tobi_endtone 0.0000 (H-H%) )
|
397 |
+
( nn.tobi_endtone 16.1076 (H-H%) )
|
398 |
+
( pp.tobi_endtone -1.8913 (L-) )
|
399 |
+
( p.tobi_endtone -15.5651 (L-) )
|
400 |
+
( tobi_endtone -40.2021 (L-) )
|
401 |
+
( n.tobi_endtone -2.5541 (L-) )
|
402 |
+
( nn.tobi_endtone -2.2224 (L-) )
|
403 |
+
( pp.tobi_endtone -6.6906 (H-) )
|
404 |
+
( p.tobi_endtone -3.5483 (H-) )
|
405 |
+
( tobi_endtone -1.2635 (H-) )
|
406 |
+
( n.tobi_endtone 0.0000 (H-) )
|
407 |
+
( nn.tobi_endtone 0.0000 (H-) )
|
408 |
+
( p.tobi_accent 0.0000 (L+H*L-H%) )
|
409 |
+
( tobi_accent -40.0000 (L+H*L-H%) )
|
410 |
+
( n.tobi_accent 0.0000 (L+H*L-H%) )
|
411 |
+
( pp.syl_break 0.3501 )
|
412 |
+
( p.syl_break -1.0003 )
|
413 |
+
( syl_break -1.5536 )
|
414 |
+
( n.syl_break 0.0720 )
|
415 |
+
( nn.syl_break 0.5989 )
|
416 |
+
( pp.stress -0.9778 )
|
417 |
+
( p.stress -0.8046 )
|
418 |
+
( stress 1.2124 )
|
419 |
+
( n.stress 3.9715 )
|
420 |
+
( nn.stress 2.3914 )
|
421 |
+
( syl_in -2.3468 )
|
422 |
+
( syl_out 0.9792 )
|
423 |
+
( ssyl_in 2.0463 )
|
424 |
+
( ssyl_out 0.0000 )
|
425 |
+
( asyl_in -0.1460 )
|
426 |
+
( asyl_out 0.0000 )
|
427 |
+
( last_accent -1.0992 )
|
428 |
+
( next_accent 0.2935 )
|
429 |
+
( sub_phrases 0.0000 )
|
430 |
+
( lisp_l_spread -60.0000 )
|
431 |
+
))
|
432 |
+
|
433 |
+
(set! apml_f2b_f0_lr_end
|
434 |
+
'(
|
435 |
+
( Intercept 165.0901 )
|
436 |
+
( pp.lisp_apml_tgtype -8.0918 (1) )
|
437 |
+
( p.lisp_apml_tgtype 1.5332 (1) )
|
438 |
+
( lisp_apml_tgtype 29.9802 (1) )
|
439 |
+
( n.lisp_apml_tgtype 0.0000 (1) )
|
440 |
+
( nn.lisp_apml_tgtype 9.7312 (1) )
|
441 |
+
( pp.lisp_apml_tgtype -7.6181 (2) )
|
442 |
+
( p.lisp_apml_tgtype 0.0000 (2) )
|
443 |
+
( lisp_apml_tgtype 20.7778 (2) )
|
444 |
+
( n.lisp_apml_tgtype 0.0000 (2) )
|
445 |
+
( nn.lisp_apml_tgtype 0.0000 (2) )
|
446 |
+
( pp.lisp_apml_tgtype 0.0000 (3) )
|
447 |
+
( p.lisp_apml_tgtype 0.0000 (3) )
|
448 |
+
( lisp_apml_tgtype 13.5550 (3) )
|
449 |
+
( n.lisp_apml_tgtype -6.2170 (3) )
|
450 |
+
( nn.lisp_apml_tgtype 0.0000 (3) )
|
451 |
+
( pp.lisp_apml_iecount 0.0000 )
|
452 |
+
( p.lisp_apml_iecount -0.8428 )
|
453 |
+
( lisp_apml_iecount -1.0894 )
|
454 |
+
( n.lisp_apml_iecount 0.0000 )
|
455 |
+
( nn.lisp_apml_iecount -1.4355 )
|
456 |
+
( pp.tobi_accent 1.5807 (H*) )
|
457 |
+
( p.tobi_accent 0.0000 (H*) )
|
458 |
+
( tobi_accent 7.3057 (H*) )
|
459 |
+
( n.tobi_accent 0.0000 (H*) )
|
460 |
+
( nn.tobi_accent 0.0000 (H*) )
|
461 |
+
( pp.tobi_accent 0.0000 (L*) )
|
462 |
+
( p.tobi_accent 0.0000 (L*) )
|
463 |
+
( tobi_accent -20.0000 (L*) )
|
464 |
+
( n.tobi_accent 0.0000 (L*) )
|
465 |
+
( nn.tobi_accent 0.0000 (L*) )
|
466 |
+
( pp.tobi_accent 0.0000 (L*+H) )
|
467 |
+
( p.tobi_accent 5.0000 (L*+H) )
|
468 |
+
( tobi_accent 12.0000 (L*+H) )
|
469 |
+
( n.tobi_accent -2.8850 (L*+H) )
|
470 |
+
( nn.tobi_accent -1.0910 (L*+H) )
|
471 |
+
( pp.tobi_accent 1.5800 (L+H*) )
|
472 |
+
( p.tobi_accent 0.0000 (L+H*) )
|
473 |
+
( tobi_accent 7.3100 (L+H*) )
|
474 |
+
( n.tobi_accent 0.0000 (L+H*) )
|
475 |
+
( nn.tobi_accent 0.0000 (L+H*) )
|
476 |
+
( pp.tobi_endtone 7.8833 (L-L%) )
|
477 |
+
( p.tobi_endtone 0.0000 (L-L%) )
|
478 |
+
( tobi_endtone -80 (L-L%) )
|
479 |
+
( n.tobi_endtone -35 (L-L%) )
|
480 |
+
( nn.tobi_endtone -6.4769 (L-L%) )
|
481 |
+
( pp.tobi_endtone 7.1936 (L-H%) )
|
482 |
+
( p.tobi_endtone 0.0000 (L-H%) )
|
483 |
+
( tobi_endtone 40.0000 (L-H%) )
|
484 |
+
( n.tobi_endtone -13.7990 (L-H%) )
|
485 |
+
( nn.tobi_endtone -5.6305 (L-H%) )
|
486 |
+
( pp.tobi_endtone 4.8654 (H-L%) )
|
487 |
+
( p.tobi_endtone 0.0000 (H-L%) )
|
488 |
+
( tobi_endtone -15.1561 (H-L%) )
|
489 |
+
( n.tobi_endtone 0.0000 (H-L%) )
|
490 |
+
( nn.tobi_endtone -9.8107 (H-L%) )
|
491 |
+
( pp.tobi_endtone 0.0000 (H-H%) )
|
492 |
+
( p.tobi_endtone 0.0000 (H-H%) )
|
493 |
+
( tobi_endtone 0.0000 (H-H%) )
|
494 |
+
( n.tobi_endtone 0.0000 (H-H%) )
|
495 |
+
( nn.tobi_endtone 0.0000 (H-H%) )
|
496 |
+
( pp.tobi_endtone 0.0000 (L-) )
|
497 |
+
( p.tobi_endtone -15.1705 (L-) )
|
498 |
+
( tobi_endtone -43.6801 (L-) )
|
499 |
+
( n.tobi_endtone 0.0000 (L-) )
|
500 |
+
( nn.tobi_endtone -0.8085 (L-) )
|
501 |
+
( pp.tobi_endtone 0.0000 (H-) )
|
502 |
+
( p.tobi_endtone -7.0967 (H-) )
|
503 |
+
( tobi_endtone 0.0000 (H-) )
|
504 |
+
( n.tobi_endtone 0.0000 (H-) )
|
505 |
+
( nn.tobi_endtone 0.0000 (H-) )
|
506 |
+
( p.tobi_accent 0.0000 (L+H*L-H%) )
|
507 |
+
( tobi_accent 60.0000 (L+H*L-H%) )
|
508 |
+
( n.tobi_accent -60.0000 (L+H*L-H%) )
|
509 |
+
( pp.syl_break 0.0000 )
|
510 |
+
( p.syl_break -0.3765 )
|
511 |
+
( syl_break -3.1072 )
|
512 |
+
( n.syl_break 0.0000 )
|
513 |
+
( nn.syl_break 0.6338 )
|
514 |
+
( pp.stress 0.0000 )
|
515 |
+
( p.stress -1.6093 )
|
516 |
+
( stress -0.7136 )
|
517 |
+
( n.stress 5.9479 )
|
518 |
+
( nn.stress 1.8619 )
|
519 |
+
( syl_in -2.1619 )
|
520 |
+
( syl_out 0.9481 )
|
521 |
+
( ssyl_in 2.0175 )
|
522 |
+
( ssyl_out 0.0000 )
|
523 |
+
( asyl_in -0.2919 )
|
524 |
+
( asyl_out 0.0000 )
|
525 |
+
( last_accent -2.1984 )
|
526 |
+
( next_accent 0.0000 )
|
527 |
+
( sub_phrases 0.0000 )
|
528 |
+
( lisp_l_spread -60.0000 )
|
529 |
+
))
|
530 |
+
|
CosyVoice-ttsfrd/resource/festival/apml_kaldurtreeZ.scm
ADDED
@@ -0,0 +1,996 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; A tree to predict zcore durations build from f2b
|
35 |
+
;;; doesn't use actual phonemes so it can have better generalizations
|
36 |
+
;;;
|
37 |
+
;;; Basically copied from ked
|
38 |
+
;;;
|
39 |
+
|
40 |
+
(set! apml_kal_durs
|
41 |
+
'(
|
42 |
+
(uh 0.067 0.025)
|
43 |
+
(hh 0.061 0.028)
|
44 |
+
(ao 0.138 0.046)
|
45 |
+
(hv 0.053 0.020)
|
46 |
+
(v 0.051 0.019)
|
47 |
+
(ih 0.058 0.023)
|
48 |
+
(el 0.111 0.043)
|
49 |
+
(ey 0.132 0.042)
|
50 |
+
(em 0.080 0.033)
|
51 |
+
(jh 0.094 0.024)
|
52 |
+
(w 0.054 0.023)
|
53 |
+
(uw 0.107 0.044)
|
54 |
+
(ae 0.120 0.036)
|
55 |
+
(en 0.117 0.056)
|
56 |
+
(k 0.089 0.034)
|
57 |
+
(y 0.048 0.025)
|
58 |
+
(axr 0.147 0.035)
|
59 |
+
; (l 0.056 0.026)
|
60 |
+
(l 0.066 0.026)
|
61 |
+
(ng 0.064 0.024)
|
62 |
+
(zh 0.071 0.030)
|
63 |
+
(z 0.079 0.034)
|
64 |
+
(brth 0.246 0.046)
|
65 |
+
(m 0.069 0.028)
|
66 |
+
(iy 0.097 0.041)
|
67 |
+
(n 0.059 0.025)
|
68 |
+
(ah 0.087 0.031)
|
69 |
+
(er 0.086 0.010)
|
70 |
+
(b 0.069 0.024)
|
71 |
+
(pau 0.200 0.1)
|
72 |
+
(aw 0.166 0.053)
|
73 |
+
(p 0.088 0.030)
|
74 |
+
(ch 0.115 0.025)
|
75 |
+
(ow 0.134 0.039)
|
76 |
+
(dh 0.031 0.016)
|
77 |
+
(nx 0.049 0.100)
|
78 |
+
(d 0.048 0.021)
|
79 |
+
(ax 0.046 0.024)
|
80 |
+
(h# 0.060 0.083)
|
81 |
+
(r 0.053 0.031)
|
82 |
+
(eh 0.095 0.036)
|
83 |
+
(ay 0.137 0.047)
|
84 |
+
(oy 0.183 0.050)
|
85 |
+
(f 0.095 0.033)
|
86 |
+
(sh 0.108 0.031)
|
87 |
+
(s 0.102 0.037)
|
88 |
+
(g 0.064 0.021)
|
89 |
+
(dx 0.031 0.016)
|
90 |
+
(th 0.093 0.050)
|
91 |
+
(aa 0.094 0.037)
|
92 |
+
(t 0.070 0.020)
|
93 |
+
)
|
94 |
+
)
|
95 |
+
|
96 |
+
(set! apml_kal_duration_cart_tree
|
97 |
+
'
|
98 |
+
((name is pau)
|
99 |
+
((emph_sil is +)
|
100 |
+
((0.0 -0.5))
|
101 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.2)
|
102 |
+
((0.0 0.0))
|
103 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.4)
|
104 |
+
((0.0 2.0))
|
105 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.6)
|
106 |
+
((0.0 4.0))
|
107 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 0.8)
|
108 |
+
((0.0 6.0))
|
109 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 1.0)
|
110 |
+
((0.0 8.0))
|
111 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 1.5)
|
112 |
+
((0.0 13.0))
|
113 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 2.0)
|
114 |
+
((0.0 18.0))
|
115 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 2.5)
|
116 |
+
((0.0 23.0))
|
117 |
+
((p.R:SylStructure.parent.parent.lisp_apml_pause = 3.0)
|
118 |
+
((0.0 28.0))
|
119 |
+
((p.R:SylStructure.parent.parent.pbreak is BB)
|
120 |
+
((0.0 2.0))
|
121 |
+
((0.0 0.0)))))))))))))
|
122 |
+
((R:SylStructure.parent.accented is 0)
|
123 |
+
((n.ph_ctype is 0)
|
124 |
+
((p.ph_vlng is 0)
|
125 |
+
((R:SylStructure.parent.syl_codasize < 1.5)
|
126 |
+
((p.ph_ctype is n)
|
127 |
+
((ph_ctype is f)
|
128 |
+
((0.559208 -0.783163))
|
129 |
+
((1.05215 -0.222704)))
|
130 |
+
((ph_ctype is s)
|
131 |
+
((R:SylStructure.parent.syl_break is 2)
|
132 |
+
((0.589948 0.764459))
|
133 |
+
((R:SylStructure.parent.asyl_in < 0.7)
|
134 |
+
((1.06385 0.567944))
|
135 |
+
((0.691943 0.0530272))))
|
136 |
+
((ph_vlng is l)
|
137 |
+
((pp.ph_vfront is 1)
|
138 |
+
((1.06991 0.766486))
|
139 |
+
((R:SylStructure.parent.syl_break is 1)
|
140 |
+
((0.69665 0.279248))
|
141 |
+
((0.670353 0.0567774))))
|
142 |
+
((p.ph_ctype is s)
|
143 |
+
((seg_onsetcoda is coda)
|
144 |
+
((0.828638 -0.038356))
|
145 |
+
((ph_ctype is f)
|
146 |
+
((0.7631 -0.545853))
|
147 |
+
((0.49329 -0.765994))))
|
148 |
+
((R:SylStructure.parent.parent.gpos is det)
|
149 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
150 |
+
((R:SylStructure.parent.sub_phrases < 1)
|
151 |
+
((0.811686 0.160195))
|
152 |
+
((0.799015 0.713958)))
|
153 |
+
((0.731599 -0.215472)))
|
154 |
+
((ph_ctype is r)
|
155 |
+
((0.673487 0.092772))
|
156 |
+
((R:SylStructure.parent.asyl_in < 1)
|
157 |
+
((0.745273 0.00132813))
|
158 |
+
((0.75457 -0.334898)))))))))
|
159 |
+
((pos_in_syl < 0.5)
|
160 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
161 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
162 |
+
((0.902446 -0.041618))
|
163 |
+
((R:SylStructure.parent.sub_phrases < 2.3)
|
164 |
+
((0.900629 0.262952))
|
165 |
+
((1.18474 0.594794))))
|
166 |
+
((seg_onset_stop is 0)
|
167 |
+
((R:SylStructure.parent.position_type is mid)
|
168 |
+
((0.512323 -0.760444))
|
169 |
+
((R:SylStructure.parent.syl_out < 6.8)
|
170 |
+
((pp.ph_vlng is a)
|
171 |
+
((0.640575 -0.450449))
|
172 |
+
((ph_ctype is f)
|
173 |
+
((R:SylStructure.parent.sub_phrases < 1.3)
|
174 |
+
((0.862876 -0.296956))
|
175 |
+
((R:SylStructure.parent.syl_out < 2.4)
|
176 |
+
((0.803215 0.0422868))
|
177 |
+
((0.877856 -0.154465))))
|
178 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
179 |
+
((R:SylStructure.parent.syl_out < 1.2)
|
180 |
+
((0.567081 -0.264199))
|
181 |
+
((0.598043 -0.541738)))
|
182 |
+
((0.676843 -0.166623)))))
|
183 |
+
((0.691678 -0.57173))))
|
184 |
+
((R:SylStructure.parent.parent.gpos is cc)
|
185 |
+
((1.15995 0.313289))
|
186 |
+
((pp.ph_vfront is 1)
|
187 |
+
((0.555993 0.0695819))
|
188 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
189 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
190 |
+
((0.721635 -0.367088))
|
191 |
+
((0.71919 -0.194887)))
|
192 |
+
((0.547052 -0.0637491)))))))
|
193 |
+
((ph_ctype is s)
|
194 |
+
((R:SylStructure.parent.syl_break is 0)
|
195 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
196 |
+
((0.650007 -0.333421))
|
197 |
+
((0.846301 -0.165383)))
|
198 |
+
((0.527756 -0.516332)))
|
199 |
+
((R:SylStructure.parent.syl_break is 0)
|
200 |
+
((p.ph_ctype is s)
|
201 |
+
((0.504414 -0.779112))
|
202 |
+
((0.812498 -0.337611)))
|
203 |
+
((pos_in_syl < 1.4)
|
204 |
+
((0.513041 -0.745807))
|
205 |
+
((p.ph_ctype is s)
|
206 |
+
((0.350582 -1.04907))
|
207 |
+
((0.362 -0.914974))))))))
|
208 |
+
((R:SylStructure.parent.syl_break is 0)
|
209 |
+
((ph_ctype is n)
|
210 |
+
((R:SylStructure.parent.position_type is initial)
|
211 |
+
((pos_in_syl < 1.2)
|
212 |
+
((0.580485 0.172658))
|
213 |
+
((0.630973 -0.101423)))
|
214 |
+
((0.577937 -0.360092)))
|
215 |
+
((R:SylStructure.parent.syl_out < 2.9)
|
216 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
217 |
+
((R:SylStructure.parent.position_type is initial)
|
218 |
+
((0.896092 0.764189))
|
219 |
+
((R:SylStructure.parent.sub_phrases < 3.6)
|
220 |
+
((ph_ctype is s)
|
221 |
+
((0.877362 0.555132))
|
222 |
+
((0.604511 0.369882)))
|
223 |
+
((0.799982 0.666966))))
|
224 |
+
((seg_onsetcoda is coda)
|
225 |
+
((p.ph_vlng is a)
|
226 |
+
((R:SylStructure.parent.last_accent < 0.4)
|
227 |
+
((0.800736 0.240634))
|
228 |
+
((0.720606 0.486176)))
|
229 |
+
((1.18173 0.573811)))
|
230 |
+
((0.607147 0.194468))))
|
231 |
+
((ph_ctype is r)
|
232 |
+
((0.88377 0.499383))
|
233 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
234 |
+
((R:SylStructure.parent.position_type is initial)
|
235 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
236 |
+
((0.62798 0.0737318))
|
237 |
+
((0.787334 0.331014)))
|
238 |
+
((ph_ctype is s)
|
239 |
+
((0.808368 0.0929299))
|
240 |
+
((0.527948 -0.0443271))))
|
241 |
+
((seg_coda_fric is 0)
|
242 |
+
((p.ph_vlng is a)
|
243 |
+
((0.679745 0.517681))
|
244 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
245 |
+
((0.759979 0.128316))
|
246 |
+
((0.775233 0.361383))))
|
247 |
+
((R:SylStructure.parent.last_accent < 1.3)
|
248 |
+
((0.696255 0.054136))
|
249 |
+
((0.632425 0.246742))))))))
|
250 |
+
((pos_in_syl < 0.3)
|
251 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
252 |
+
((0.847602 0.621547))
|
253 |
+
((ph_ctype is s)
|
254 |
+
((0.880645 0.501679))
|
255 |
+
((R:SylStructure.parent.sub_phrases < 3.3)
|
256 |
+
((R:SylStructure.parent.sub_phrases < 0.3)
|
257 |
+
((0.901014 -0.042049))
|
258 |
+
((0.657493 0.183226)))
|
259 |
+
((0.680126 0.284799)))))
|
260 |
+
((ph_ctype is s)
|
261 |
+
((p.ph_vlng is s)
|
262 |
+
((0.670033 -0.820934))
|
263 |
+
((0.863306 -0.348735)))
|
264 |
+
((ph_ctype is n)
|
265 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
266 |
+
((0.656966 -0.40092))
|
267 |
+
((0.530966 -0.639366)))
|
268 |
+
((seg_coda_fric is 0)
|
269 |
+
((1.04153 0.364857))
|
270 |
+
((pos_in_syl < 1.2)
|
271 |
+
((R:SylStructure.parent.syl_out < 3.4)
|
272 |
+
((0.81503 -0.00768613))
|
273 |
+
((0.602665 -0.197753)))
|
274 |
+
((0.601844 -0.394632)))))))))
|
275 |
+
((n.ph_ctype is f)
|
276 |
+
((pos_in_syl < 1.5)
|
277 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
278 |
+
((pos_in_syl < 0.1)
|
279 |
+
((1.63863 0.938841))
|
280 |
+
((R:SylStructure.parent.position_type is initial)
|
281 |
+
((0.897722 -0.0796637))
|
282 |
+
((nn.ph_vheight is 0)
|
283 |
+
((0.781081 0.480026))
|
284 |
+
((0.779711 0.127175)))))
|
285 |
+
((ph_ctype is r)
|
286 |
+
((p.ph_ctype is s)
|
287 |
+
((0.581329 -0.708767))
|
288 |
+
((0.564366 -0.236212)))
|
289 |
+
((ph_vlng is a)
|
290 |
+
((p.ph_ctype is r)
|
291 |
+
((0.70992 -0.273389))
|
292 |
+
((R:SylStructure.parent.parent.gpos is in)
|
293 |
+
((0.764696 0.0581338))
|
294 |
+
((nn.ph_vheight is 0)
|
295 |
+
((0.977737 0.721904))
|
296 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
297 |
+
((pp.ph_vfront is 0)
|
298 |
+
((0.586708 0.0161206))
|
299 |
+
((0.619949 0.227372)))
|
300 |
+
((0.707285 0.445569))))))
|
301 |
+
((ph_ctype is n)
|
302 |
+
((R:SylStructure.parent.syl_break is 1)
|
303 |
+
((nn.ph_vfront is 2)
|
304 |
+
((0.430295 -0.120097))
|
305 |
+
((0.741371 0.219042)))
|
306 |
+
((0.587492 0.321245)))
|
307 |
+
((p.ph_ctype is n)
|
308 |
+
((0.871586 0.134075))
|
309 |
+
((p.ph_ctype is r)
|
310 |
+
((0.490751 -0.466418))
|
311 |
+
((R:SylStructure.parent.syl_codasize < 1.3)
|
312 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
313 |
+
((p.ph_ctype is s)
|
314 |
+
((0.407452 -0.425925))
|
315 |
+
((0.644771 -0.542809)))
|
316 |
+
((0.688772 -0.201899)))
|
317 |
+
((ph_vheight is 1)
|
318 |
+
((nn.ph_vheight is 0)
|
319 |
+
((0.692018 0.209018))
|
320 |
+
((0.751345 -0.178136)))
|
321 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
322 |
+
((R:SylStructure.parent.asyl_in < 1.5)
|
323 |
+
((0.599633 -0.235593))
|
324 |
+
((0.60042 0.126118)))
|
325 |
+
((p.ph_vlng is a)
|
326 |
+
((0.7148 -0.174812))
|
327 |
+
((R:SylStructure.parent.parent.gpos is content)
|
328 |
+
((0.761296 -0.231509))
|
329 |
+
((0.813081 -0.536405)))))))))))))
|
330 |
+
((ph_ctype is n)
|
331 |
+
((0.898844 0.163343))
|
332 |
+
((p.ph_vlng is s)
|
333 |
+
((seg_coda_fric is 0)
|
334 |
+
((0.752921 -0.45528))
|
335 |
+
((0.890079 -0.0998025)))
|
336 |
+
((ph_ctype is f)
|
337 |
+
((0.729376 -0.930547))
|
338 |
+
((ph_ctype is s)
|
339 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
340 |
+
((0.745052 -0.634119))
|
341 |
+
((0.521502 -0.760176)))
|
342 |
+
((R:SylStructure.parent.syl_break is 1)
|
343 |
+
((0.766575 -0.121355))
|
344 |
+
((0.795616 -0.557509))))))))
|
345 |
+
((p.ph_vlng is 0)
|
346 |
+
((p.ph_ctype is r)
|
347 |
+
((ph_vlng is 0)
|
348 |
+
((0.733659 -0.402734))
|
349 |
+
((R:SylStructure.parent.sub_phrases < 1.5)
|
350 |
+
((ph_vlng is s)
|
351 |
+
((0.326176 -0.988478))
|
352 |
+
((n.ph_ctype is s)
|
353 |
+
((0.276471 -0.802536))
|
354 |
+
((0.438283 -0.900628))))
|
355 |
+
((nn.ph_vheight is 0)
|
356 |
+
((ph_vheight is 2)
|
357 |
+
((0.521 -0.768992))
|
358 |
+
((0.615436 -0.574918)))
|
359 |
+
((ph_vheight is 1)
|
360 |
+
((0.387376 -0.756359))
|
361 |
+
((pos_in_syl < 0.3)
|
362 |
+
((0.417235 -0.808937))
|
363 |
+
((0.384043 -0.93315)))))))
|
364 |
+
((ph_vlng is a)
|
365 |
+
((ph_ctype is 0)
|
366 |
+
((n.ph_ctype is s)
|
367 |
+
((p.ph_ctype is f)
|
368 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
369 |
+
((0.415908 -0.428493))
|
370 |
+
((pos_in_syl < 0.1)
|
371 |
+
((0.790441 0.0211071))
|
372 |
+
((0.452465 -0.254485))))
|
373 |
+
((p.ph_ctype is s)
|
374 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
375 |
+
((0.582447 -0.389966))
|
376 |
+
((0.757648 0.185781)))
|
377 |
+
((R:SylStructure.parent.sub_phrases < 1.4)
|
378 |
+
((0.628965 0.422551))
|
379 |
+
((0.713613 0.145576)))))
|
380 |
+
((seg_onset_stop is 0)
|
381 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
382 |
+
((pp.ph_vfront is 1)
|
383 |
+
((0.412363 -0.62319))
|
384 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
385 |
+
((0.729259 -0.317324))
|
386 |
+
((0.441633 -0.591051))))
|
387 |
+
((R:SylStructure.parent.syl_break is 1)
|
388 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
389 |
+
((0.457728 -0.405607))
|
390 |
+
((0.532411 -0.313148)))
|
391 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
392 |
+
((1.14175 0.159416))
|
393 |
+
((0.616396 -0.254651)))))
|
394 |
+
((R:SylStructure.parent.position_type is initial)
|
395 |
+
((0.264181 -0.799896))
|
396 |
+
((0.439801 -0.551309)))))
|
397 |
+
((R:SylStructure.parent.position_type is final)
|
398 |
+
((0.552027 -0.707084))
|
399 |
+
((0.585661 -0.901874))))
|
400 |
+
((ph_ctype is s)
|
401 |
+
((pos_in_syl < 1.2)
|
402 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
403 |
+
((pp.ph_vfront is 1)
|
404 |
+
((0.607449 0.196466))
|
405 |
+
((0.599662 0.00382414)))
|
406 |
+
((0.64109 -0.12859)))
|
407 |
+
((pp.ph_vfront is 1)
|
408 |
+
((0.720484 -0.219339))
|
409 |
+
((0.688707 -0.516734))))
|
410 |
+
((ph_vlng is s)
|
411 |
+
((n.ph_ctype is s)
|
412 |
+
((R:SylStructure.parent.parent.gpos is content)
|
413 |
+
((R:SylStructure.parent.position_type is single)
|
414 |
+
((0.659206 0.159445))
|
415 |
+
((R:SylStructure.parent.parent.word_numsyls < 3.5)
|
416 |
+
((R:SylStructure.parent.sub_phrases < 2)
|
417 |
+
((0.447186 -0.419103))
|
418 |
+
((0.631822 -0.0928561)))
|
419 |
+
((0.451623 -0.576116))))
|
420 |
+
((ph_vheight is 3)
|
421 |
+
((0.578626 -0.64583))
|
422 |
+
((0.56636 -0.4665))))
|
423 |
+
((R:SylStructure.parent.parent.gpos is in)
|
424 |
+
((0.771516 -0.217292))
|
425 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
426 |
+
((0.688571 -0.304382))
|
427 |
+
((R:SylStructure.parent.parent.gpos is content)
|
428 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
429 |
+
((n.ph_ctype is n)
|
430 |
+
((0.556085 -0.572203))
|
431 |
+
((0.820173 -0.240338)))
|
432 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.2)
|
433 |
+
((0.595398 -0.588171))
|
434 |
+
((0.524737 -0.95797))))
|
435 |
+
((R:SylStructure.parent.sub_phrases < 3.9)
|
436 |
+
((0.371492 -0.959427))
|
437 |
+
((0.440479 -0.845747)))))))
|
438 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
439 |
+
((p.ph_ctype is f)
|
440 |
+
((0.524088 -0.482247))
|
441 |
+
((nn.ph_vheight is 1)
|
442 |
+
((0.587666 -0.632362))
|
443 |
+
((ph_vlng is l)
|
444 |
+
((R:SylStructure.parent.position_type is final)
|
445 |
+
((0.513286 -0.713117))
|
446 |
+
((0.604613 -0.924308)))
|
447 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
448 |
+
((0.577997 -0.891342))
|
449 |
+
((0.659804 -1.15252))))))
|
450 |
+
((pp.ph_vlng is s)
|
451 |
+
((ph_ctype is f)
|
452 |
+
((0.813383 -0.599624))
|
453 |
+
((0.984027 -0.0771909)))
|
454 |
+
((p.ph_ctype is f)
|
455 |
+
((R:SylStructure.parent.parent.gpos is in)
|
456 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
457 |
+
((0.313572 -1.03242))
|
458 |
+
((0.525854 -0.542799)))
|
459 |
+
((R:SylStructure.parent.syl_out < 2.8)
|
460 |
+
((0.613007 -0.423979))
|
461 |
+
((0.570258 -0.766379))))
|
462 |
+
((R:SylStructure.parent.syl_break is 1)
|
463 |
+
((R:SylStructure.parent.parent.gpos is to)
|
464 |
+
((0.364585 -0.792895))
|
465 |
+
((ph_vlng is l)
|
466 |
+
((0.69143 -0.276816))
|
467 |
+
((0.65673 -0.523721))))
|
468 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
469 |
+
((R:SylStructure.parent.position_type is initial)
|
470 |
+
((0.682096 -0.488102))
|
471 |
+
((0.406364 -0.731758)))
|
472 |
+
((0.584694 -0.822229)))))))))))
|
473 |
+
((n.ph_ctype is r)
|
474 |
+
((R:SylStructure.parent.position_type is initial)
|
475 |
+
((p.ph_vlng is a)
|
476 |
+
((0.797058 1.02334))
|
477 |
+
((ph_ctype is s)
|
478 |
+
((1.0548 0.536277))
|
479 |
+
((0.817253 0.138201))))
|
480 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
481 |
+
((R:SylStructure.parent.syl_out < 3.3)
|
482 |
+
((0.884574 -0.23471))
|
483 |
+
((0.772063 -0.525292)))
|
484 |
+
((nn.ph_vfront is 1)
|
485 |
+
((1.25254 0.417485))
|
486 |
+
((0.955557 -0.0781996)))))
|
487 |
+
((pp.ph_vfront is 0)
|
488 |
+
((ph_ctype is f)
|
489 |
+
((n.ph_ctype is s)
|
490 |
+
((R:SylStructure.parent.parent.gpos is content)
|
491 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
492 |
+
((0.583506 -0.56941))
|
493 |
+
((0.525949 -0.289362)))
|
494 |
+
((0.749316 -0.0921038)))
|
495 |
+
((p.ph_vlng is s)
|
496 |
+
((0.734234 0.139463))
|
497 |
+
((0.680119 -0.0708717))))
|
498 |
+
((ph_vlng is s)
|
499 |
+
((ph_vheight is 1)
|
500 |
+
((0.908712 -0.618971))
|
501 |
+
((0.55344 -0.840495)))
|
502 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
|
503 |
+
((pos_in_syl < 1.2)
|
504 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
505 |
+
((0.838715 0.00913392))
|
506 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
507 |
+
((ph_vheight is 2)
|
508 |
+
((0.555513 -0.512523))
|
509 |
+
((R:SylStructure.parent.position_type is initial)
|
510 |
+
((0.758711 0.121704))
|
511 |
+
((0.737555 -0.25637))))
|
512 |
+
((R:SylStructure.parent.syl_out < 3.1)
|
513 |
+
((n.ph_ctype is s)
|
514 |
+
((0.611756 -0.474522))
|
515 |
+
((1.05437 -0.247206)))
|
516 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
517 |
+
((R:SylStructure.parent.position_type is final)
|
518 |
+
((0.567761 -0.597866))
|
519 |
+
((0.785599 -0.407765)))
|
520 |
+
((0.575598 -0.741256))))))
|
521 |
+
((ph_ctype is s)
|
522 |
+
((n.ph_ctype is s)
|
523 |
+
((0.661069 -1.08426))
|
524 |
+
((0.783184 -0.39789)))
|
525 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
526 |
+
((R:SylStructure.parent.sub_phrases < 2.6)
|
527 |
+
((0.511323 -0.666011))
|
528 |
+
((0.691878 -0.499492)))
|
529 |
+
((ph_ctype is r)
|
530 |
+
((0.482131 -0.253186))
|
531 |
+
((0.852955 -0.372832))))))
|
532 |
+
((0.854447 -0.0936489)))))
|
533 |
+
((R:SylStructure.parent.position_type is final)
|
534 |
+
((0.685939 -0.249982))
|
535 |
+
((R:SylStructure.parent.syl_out < 3.2)
|
536 |
+
((0.989843 0.18086))
|
537 |
+
((0.686805 -0.0402908)))))))))
|
538 |
+
((R:SylStructure.parent.syl_out < 2.4)
|
539 |
+
((R:SylStructure.parent.syl_out < 0.2)
|
540 |
+
((seg_onsetcoda is coda)
|
541 |
+
((ph_ctype is s)
|
542 |
+
((R:SylStructure.parent.syl_break is 4)
|
543 |
+
((pp.ph_vlng is 0)
|
544 |
+
((0.959737 1.63203))
|
545 |
+
((1.20714 0.994933)))
|
546 |
+
((n.ph_ctype is 0)
|
547 |
+
((R:SylStructure.parent.syl_break is 2)
|
548 |
+
((0.864809 0.214457))
|
549 |
+
((0.874278 0.730381)))
|
550 |
+
((pp.ph_vfront is 0)
|
551 |
+
((seg_coda_fric is 0)
|
552 |
+
((1.20844 -0.336221))
|
553 |
+
((1.01357 0.468302)))
|
554 |
+
((0.658106 -0.799121)))))
|
555 |
+
((n.ph_ctype is f)
|
556 |
+
((ph_ctype is f)
|
557 |
+
((1.26332 0.0300613))
|
558 |
+
((ph_vlng is d)
|
559 |
+
((1.02719 1.1649))
|
560 |
+
((ph_ctype is 0)
|
561 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
562 |
+
((1.14048 2.2668))
|
563 |
+
((ph_vheight is 1)
|
564 |
+
((1.15528 1.50375))
|
565 |
+
((1.42406 2.07927))))
|
566 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
567 |
+
((0.955892 1.10243))
|
568 |
+
((R:SylStructure.parent.syl_break is 2)
|
569 |
+
((1.32682 1.8432))
|
570 |
+
((1.27582 1.59853)))))))
|
571 |
+
((n.ph_ctype is 0)
|
572 |
+
((ph_ctype is n)
|
573 |
+
((R:SylStructure.parent.syl_break is 2)
|
574 |
+
((1.45399 1.12927))
|
575 |
+
((1.05543 0.442376)))
|
576 |
+
((R:SylStructure.parent.syl_break is 4)
|
577 |
+
((R:SylStructure.parent.position_type is final)
|
578 |
+
((ph_ctype is f)
|
579 |
+
((1.46434 1.76508))
|
580 |
+
((0.978055 0.7486)))
|
581 |
+
((1.2395 2.30826)))
|
582 |
+
((ph_ctype is 0)
|
583 |
+
((0.935325 1.69917))
|
584 |
+
((nn.ph_vfront is 1)
|
585 |
+
((1.20456 1.31128))
|
586 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
587 |
+
((nn.ph_vheight is 0)
|
588 |
+
((1.16907 0.212421))
|
589 |
+
((0.952091 0.653094)))
|
590 |
+
((p.ph_ctype is 0)
|
591 |
+
((1.05502 1.25802))
|
592 |
+
((0.818731 0.777568))))))))
|
593 |
+
((ph_ctype is f)
|
594 |
+
((p.ph_ctype is 0)
|
595 |
+
((1.03918 0.163941))
|
596 |
+
((0.737545 -0.167063)))
|
597 |
+
((R:SylStructure.parent.position_type is final)
|
598 |
+
((n.ph_ctype is n)
|
599 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
600 |
+
((R:SylStructure.parent.sub_phrases < 2.8)
|
601 |
+
((0.826207 -0.000859005))
|
602 |
+
((0.871119 0.273433)))
|
603 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
604 |
+
((1.17405 1.05694))
|
605 |
+
((0.858394 0.244916))))
|
606 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
607 |
+
((p.ph_ctype is 0)
|
608 |
+
((1.14092 1.21187))
|
609 |
+
((R:SylStructure.parent.syl_break is 2)
|
610 |
+
((1.02653 0.59865))
|
611 |
+
((0.94248 1.1634))))
|
612 |
+
((seg_coda_fric is 0)
|
613 |
+
((1.07441 0.292935))
|
614 |
+
((1.15736 0.92574)))))
|
615 |
+
((ph_vlng is s)
|
616 |
+
((R:SylStructure.parent.syl_break is 2)
|
617 |
+
((1.34638 1.23484))
|
618 |
+
((0.951514 2.02008)))
|
619 |
+
((ph_ctype is 0)
|
620 |
+
((p.ph_ctype is r)
|
621 |
+
((0.806106 0.697089))
|
622 |
+
((R:SylStructure.parent.syl_break is 2)
|
623 |
+
((1.10891 0.992197))
|
624 |
+
((1.04657 1.51093))))
|
625 |
+
((1.18165 0.520952)))))))))
|
626 |
+
((p.ph_vlng is 0)
|
627 |
+
((pos_in_syl < 0.7)
|
628 |
+
((R:SylStructure.parent.position_type is final)
|
629 |
+
((ph_ctype is r)
|
630 |
+
((0.966357 0.185827))
|
631 |
+
((ph_ctype is s)
|
632 |
+
((0.647163 0.0332298))
|
633 |
+
((0.692972 -0.534917))))
|
634 |
+
((ph_ctype is s)
|
635 |
+
((0.881521 0.575107))
|
636 |
+
((p.ph_ctype is f)
|
637 |
+
((0.8223 -0.111275))
|
638 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
639 |
+
((0.969188 0.09447))
|
640 |
+
((0.894438 0.381947))))))
|
641 |
+
((p.ph_ctype is f)
|
642 |
+
((0.479748 -0.490108))
|
643 |
+
((0.813125 -0.201268))))
|
644 |
+
((ph_ctype is s)
|
645 |
+
((0.908566 1.20397))
|
646 |
+
((R:SylStructure.parent.last_accent < 1.2)
|
647 |
+
((0.88078 0.636568))
|
648 |
+
((0.978087 1.07763))))))
|
649 |
+
((pos_in_syl < 1.3)
|
650 |
+
((R:SylStructure.parent.syl_break is 0)
|
651 |
+
((pos_in_syl < 0.1)
|
652 |
+
((R:SylStructure.parent.position_type is initial)
|
653 |
+
((p.ph_ctype is n)
|
654 |
+
((0.801651 -0.0163359))
|
655 |
+
((ph_ctype is s)
|
656 |
+
((n.ph_ctype is r)
|
657 |
+
((0.893307 1.07253))
|
658 |
+
((p.ph_vlng is 0)
|
659 |
+
((0.92651 0.525806))
|
660 |
+
((0.652444 0.952792))))
|
661 |
+
((p.ph_vlng is 0)
|
662 |
+
((seg_onsetcoda is coda)
|
663 |
+
((0.820151 0.469117))
|
664 |
+
((p.ph_ctype is f)
|
665 |
+
((0.747972 -0.0716448))
|
666 |
+
((ph_ctype is f)
|
667 |
+
((0.770882 0.457137))
|
668 |
+
((0.840905 0.102492)))))
|
669 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
670 |
+
((0.667824 0.697337))
|
671 |
+
((0.737967 0.375114))))))
|
672 |
+
((ph_vheight is 1)
|
673 |
+
((0.624353 0.410671))
|
674 |
+
((R:SylStructure.parent.asyl_in < 0.8)
|
675 |
+
((0.647905 -0.331055))
|
676 |
+
((p.ph_ctype is s)
|
677 |
+
((0.629039 -0.240616))
|
678 |
+
((0.749277 -0.0191273))))))
|
679 |
+
((ph_vheight is 3)
|
680 |
+
((p.ph_ctype is s)
|
681 |
+
((0.626922 0.556537))
|
682 |
+
((0.789357 0.153892)))
|
683 |
+
((seg_onsetcoda is coda)
|
684 |
+
((n.ph_ctype is 0)
|
685 |
+
((R:SylStructure.parent.parent.word_numsyls < 3.4)
|
686 |
+
((0.744714 0.123242))
|
687 |
+
((0.742039 0.295753)))
|
688 |
+
((seg_coda_fric is 0)
|
689 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
690 |
+
((ph_vheight is 1)
|
691 |
+
((0.549715 -0.341018))
|
692 |
+
((0.573641 -0.00893114)))
|
693 |
+
((nn.ph_vfront is 2)
|
694 |
+
((0.67099 -0.744625))
|
695 |
+
((0.664438 -0.302803))))
|
696 |
+
((p.ph_vlng is 0)
|
697 |
+
((0.630028 0.113815))
|
698 |
+
((0.632794 -0.128733)))))
|
699 |
+
((ph_ctype is r)
|
700 |
+
((0.367169 -0.854509))
|
701 |
+
((0.94334 -0.216179))))))
|
702 |
+
((n.ph_ctype is f)
|
703 |
+
((ph_vlng is 0)
|
704 |
+
((1.3089 0.46195))
|
705 |
+
((R:SylStructure.parent.syl_codasize < 1.3)
|
706 |
+
((1.07673 0.657169))
|
707 |
+
((pp.ph_vlng is 0)
|
708 |
+
((0.972319 1.08222))
|
709 |
+
((1.00038 1.46257)))))
|
710 |
+
((p.ph_vlng is l)
|
711 |
+
((1.03617 0.785204))
|
712 |
+
((p.ph_vlng is a)
|
713 |
+
((R:SylStructure.parent.position_type is final)
|
714 |
+
((1.00681 0.321168))
|
715 |
+
((0.928115 0.950834)))
|
716 |
+
((ph_vlng is 0)
|
717 |
+
((pos_in_syl < 0.1)
|
718 |
+
((R:SylStructure.parent.position_type is final)
|
719 |
+
((0.863682 -0.167374))
|
720 |
+
((nn.ph_vheight is 0)
|
721 |
+
((p.ph_ctype is f)
|
722 |
+
((0.773591 -0.00374425))
|
723 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
724 |
+
((0.951802 0.228448))
|
725 |
+
((1.02282 0.504252))))
|
726 |
+
((1.09721 0.736476))))
|
727 |
+
((R:SylStructure.parent.position_type is final)
|
728 |
+
((1.04302 0.0590974))
|
729 |
+
((0.589208 -0.431535))))
|
730 |
+
((n.ph_ctype is 0)
|
731 |
+
((1.27879 1.00642))
|
732 |
+
((ph_vlng is s)
|
733 |
+
((R:SylStructure.parent.asyl_in < 1.4)
|
734 |
+
((0.935787 0.481652))
|
735 |
+
((0.9887 0.749861)))
|
736 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
737 |
+
((R:SylStructure.parent.position_type is final)
|
738 |
+
((0.921307 0.0696307))
|
739 |
+
((0.83675 0.552212)))
|
740 |
+
((0.810076 -0.0479225))))))))))
|
741 |
+
((ph_ctype is s)
|
742 |
+
((n.ph_ctype is s)
|
743 |
+
((0.706959 -1.0609))
|
744 |
+
((p.ph_ctype is n)
|
745 |
+
((0.850614 -0.59933))
|
746 |
+
((n.ph_ctype is r)
|
747 |
+
((0.665947 0.00698725))
|
748 |
+
((n.ph_ctype is 0)
|
749 |
+
((R:SylStructure.parent.position_type is initial)
|
750 |
+
((0.762889 -0.0649044))
|
751 |
+
((0.723956 -0.248899)))
|
752 |
+
((R:SylStructure.parent.sub_phrases < 1.4)
|
753 |
+
((0.632957 -0.601987))
|
754 |
+
((0.889114 -0.302401)))))))
|
755 |
+
((ph_ctype is f)
|
756 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
757 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
758 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
759 |
+
((0.865267 0.164636))
|
760 |
+
((0.581827 -0.0989051)))
|
761 |
+
((nn.ph_vfront is 2)
|
762 |
+
((0.684459 -0.316836))
|
763 |
+
((0.778854 -0.0961191))))
|
764 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
765 |
+
((p.ph_ctype is s)
|
766 |
+
((0.837964 -0.429437))
|
767 |
+
((0.875304 -0.0652743)))
|
768 |
+
((0.611071 -0.635089))))
|
769 |
+
((p.ph_ctype is r)
|
770 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
771 |
+
((0.762012 0.0139361))
|
772 |
+
((0.567983 -0.454845)))
|
773 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
774 |
+
((ph_ctype is l)
|
775 |
+
((1.18845 0.809091))
|
776 |
+
((R:SylStructure.parent.position_type is initial)
|
777 |
+
((ph_ctype is n)
|
778 |
+
((0.773548 -0.277092))
|
779 |
+
((1.01586 0.281001)))
|
780 |
+
((p.ph_ctype is 0)
|
781 |
+
((1.06831 0.699145))
|
782 |
+
((0.924189 0.241873)))))
|
783 |
+
((R:SylStructure.parent.syl_break is 0)
|
784 |
+
((ph_ctype is n)
|
785 |
+
((0.592321 -0.470784))
|
786 |
+
((0.778688 -0.072112)))
|
787 |
+
((n.ph_ctype is s)
|
788 |
+
((1.08848 0.0733489))
|
789 |
+
((1.25674 0.608371))))))))))
|
790 |
+
((pos_in_syl < 0.7)
|
791 |
+
((p.ph_vlng is 0)
|
792 |
+
((R:SylStructure.parent.position_type is mid)
|
793 |
+
((ph_ctype is 0)
|
794 |
+
((ph_vheight is 2)
|
795 |
+
((0.456225 -0.293282))
|
796 |
+
((0.561529 -0.0816115)))
|
797 |
+
((0.6537 -0.504024)))
|
798 |
+
((ph_ctype is s)
|
799 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
800 |
+
((1.31586 0.98395))
|
801 |
+
((R:SylStructure.parent.position_type is single)
|
802 |
+
((0.816869 0.634789))
|
803 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
804 |
+
((1.05578 0.479029))
|
805 |
+
((R:SylStructure.parent.asyl_in < 0.4)
|
806 |
+
((1.11813 0.143214))
|
807 |
+
((0.87178 0.406834))))))
|
808 |
+
((n.ph_ctype is n)
|
809 |
+
((R:SylStructure.parent.last_accent < 0.6)
|
810 |
+
((0.838154 -0.415599))
|
811 |
+
((0.924024 0.110288)))
|
812 |
+
((seg_onsetcoda is coda)
|
813 |
+
((nn.ph_vfront is 2)
|
814 |
+
((0.670096 0.0314187))
|
815 |
+
((n.ph_ctype is f)
|
816 |
+
((1.00363 0.693893))
|
817 |
+
((R:SylStructure.parent.syl_out < 6)
|
818 |
+
((0.772363 0.215675))
|
819 |
+
((0.920313 0.574068)))))
|
820 |
+
((R:SylStructure.parent.position_type is final)
|
821 |
+
((0.673837 -0.458142))
|
822 |
+
((R:SylStructure.parent.sub_phrases < 2.8)
|
823 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
824 |
+
((0.894817 0.304628))
|
825 |
+
((ph_ctype is n)
|
826 |
+
((0.787302 -0.23094))
|
827 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
828 |
+
((ph_ctype is f)
|
829 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
830 |
+
((1.12278 0.326954))
|
831 |
+
((0.802236 -0.100616)))
|
832 |
+
((0.791255 -0.0919132)))
|
833 |
+
((0.95233 0.219053)))))
|
834 |
+
((R:SylStructure.parent.position_type is initial)
|
835 |
+
((ph_ctype is f)
|
836 |
+
((1.0616 0.216118))
|
837 |
+
((0.703216 -0.00834086)))
|
838 |
+
((ph_ctype is f)
|
839 |
+
((1.22277 0.761763))
|
840 |
+
((0.904811 0.332721))))))))))
|
841 |
+
((ph_vheight is 0)
|
842 |
+
((p.ph_vlng is s)
|
843 |
+
((0.873379 0.217178))
|
844 |
+
((n.ph_ctype is r)
|
845 |
+
((0.723915 1.29451))
|
846 |
+
((n.ph_ctype is 0)
|
847 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
848 |
+
((R:SylStructure.parent.sub_phrases < 4)
|
849 |
+
((seg_coda_fric is 0)
|
850 |
+
((p.ph_vlng is l)
|
851 |
+
((0.849154 0.945261))
|
852 |
+
((0.633261 0.687498)))
|
853 |
+
((0.728546 0.403076)))
|
854 |
+
((0.850962 1.00255)))
|
855 |
+
((0.957999 1.09113)))
|
856 |
+
((0.85771 0.209045)))))
|
857 |
+
((ph_vheight is 2)
|
858 |
+
((0.803401 -0.0544067))
|
859 |
+
((0.681353 0.256045)))))
|
860 |
+
((n.ph_ctype is f)
|
861 |
+
((ph_ctype is s)
|
862 |
+
((p.ph_vlng is 0)
|
863 |
+
((0.479307 -0.9673))
|
864 |
+
((0.700477 -0.351397)))
|
865 |
+
((ph_ctype is f)
|
866 |
+
((0.73467 -0.6233))
|
867 |
+
((R:SylStructure.parent.syl_break is 0)
|
868 |
+
((p.ph_ctype is s)
|
869 |
+
((0.56282 0.266234))
|
870 |
+
((p.ph_ctype is r)
|
871 |
+
((0.446203 -0.302281))
|
872 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
873 |
+
((ph_ctype is 0)
|
874 |
+
((0.572016 -0.0102436))
|
875 |
+
((0.497358 -0.274514)))
|
876 |
+
((0.545477 0.0482177)))))
|
877 |
+
((ph_vlng is s)
|
878 |
+
((0.805269 0.888495))
|
879 |
+
((ph_ctype is n)
|
880 |
+
((0.869854 0.653018))
|
881 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
882 |
+
((0.735031 0.0612886))
|
883 |
+
((0.771859 0.346637))))))))
|
884 |
+
((R:SylStructure.parent.syl_codasize < 1.4)
|
885 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
886 |
+
((R:SylStructure.parent.position_type is initial)
|
887 |
+
((0.743458 0.0411808))
|
888 |
+
((1.13068 0.613305)))
|
889 |
+
((pos_in_syl < 1.2)
|
890 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
891 |
+
((1.11481 0.175467))
|
892 |
+
((0.937893 -0.276407)))
|
893 |
+
((0.74264 -0.550878))))
|
894 |
+
((pos_in_syl < 3.4)
|
895 |
+
((seg_onsetcoda is coda)
|
896 |
+
((ph_ctype is r)
|
897 |
+
((n.ph_ctype is s)
|
898 |
+
((0.714319 -0.240328))
|
899 |
+
((p.ph_ctype is 0)
|
900 |
+
((0.976987 0.330352))
|
901 |
+
((1.1781 -0.0816682))))
|
902 |
+
((ph_ctype is l)
|
903 |
+
((n.ph_ctype is 0)
|
904 |
+
((1.39137 0.383533))
|
905 |
+
((0.725585 -0.324515)))
|
906 |
+
((ph_vheight is 3)
|
907 |
+
((ph_vlng is d)
|
908 |
+
((0.802626 -0.62487))
|
909 |
+
((n.ph_ctype is r)
|
910 |
+
((0.661091 -0.513869))
|
911 |
+
((R:SylStructure.parent.position_type is initial)
|
912 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
913 |
+
((0.482285 0.207874))
|
914 |
+
((0.401601 -0.0204711)))
|
915 |
+
((0.733755 0.397372)))))
|
916 |
+
((n.ph_ctype is r)
|
917 |
+
((p.ph_ctype is 0)
|
918 |
+
((pos_in_syl < 1.2)
|
919 |
+
((0.666325 0.271734))
|
920 |
+
((nn.ph_vheight is 0)
|
921 |
+
((0.642401 -0.261466))
|
922 |
+
((0.783684 -0.00956571))))
|
923 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
924 |
+
((0.692225 -0.381895))
|
925 |
+
((0.741921 -0.0898767))))
|
926 |
+
((nn.ph_vfront is 2)
|
927 |
+
((ph_ctype is s)
|
928 |
+
((0.697527 -1.12626))
|
929 |
+
((n.ph_ctype is s)
|
930 |
+
((ph_vlng is 0)
|
931 |
+
((R:SylStructure.parent.sub_phrases < 2.4)
|
932 |
+
((0.498719 -0.906926))
|
933 |
+
((0.635342 -0.625651)))
|
934 |
+
((0.45886 -0.385089)))
|
935 |
+
((0.848596 -0.359702))))
|
936 |
+
((p.ph_vlng is a)
|
937 |
+
((p.ph_ctype is 0)
|
938 |
+
((0.947278 0.216904))
|
939 |
+
((0.637933 -0.394349)))
|
940 |
+
((p.ph_ctype is r)
|
941 |
+
((R:SylStructure.parent.syl_break is 0)
|
942 |
+
((0.529903 -0.860573))
|
943 |
+
((0.581378 -0.510488)))
|
944 |
+
((ph_vlng is 0)
|
945 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
946 |
+
((seg_onset_stop is 0)
|
947 |
+
((R:SylStructure.parent.syl_break is 0)
|
948 |
+
((p.ph_vlng is d)
|
949 |
+
((0.768363 0.0108428))
|
950 |
+
((ph_ctype is s)
|
951 |
+
((0.835756 -0.035054))
|
952 |
+
((ph_ctype is f)
|
953 |
+
((p.ph_vlng is s)
|
954 |
+
((0.602016 -0.179727))
|
955 |
+
((0.640126 -0.297341)))
|
956 |
+
((0.674628 -0.542602)))))
|
957 |
+
((ph_ctype is s)
|
958 |
+
((0.662261 -0.60496))
|
959 |
+
((0.662088 -0.432058))))
|
960 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
961 |
+
((0.582448 -0.389079))
|
962 |
+
((ph_ctype is s)
|
963 |
+
((0.60413 -0.73564))
|
964 |
+
((0.567153 -0.605444)))))
|
965 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
966 |
+
((0.761115 -0.827377))
|
967 |
+
((ph_ctype is n)
|
968 |
+
((0.855183 -0.275338))
|
969 |
+
((R:SylStructure.parent.syl_break is 0)
|
970 |
+
((0.788288 -0.802801))
|
971 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
972 |
+
((0.686134 -0.371234))
|
973 |
+
((0.840184 -0.772883)))))))
|
974 |
+
((pos_in_syl < 1.2)
|
975 |
+
((R:SylStructure.parent.syl_break is 0)
|
976 |
+
((n.ph_ctype is n)
|
977 |
+
((0.423592 -0.655006))
|
978 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
979 |
+
((0.595269 -0.303751))
|
980 |
+
((0.478433 -0.456882))))
|
981 |
+
((0.688133 -0.133182)))
|
982 |
+
((seg_onset_stop is 0)
|
983 |
+
((1.27464 0.114442))
|
984 |
+
((0.406837 -0.167545))))))))))))
|
985 |
+
((ph_ctype is r)
|
986 |
+
((0.462874 -0.87695))
|
987 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
988 |
+
((0.645442 -0.640572))
|
989 |
+
((0.673717 -0.321322)))))
|
990 |
+
((0.61008 -0.925472))))))))
|
991 |
+
;; RMSE 0.8085 Correlation is 0.5899 Mean (abs) Error 0.6024 (0.5393)
|
992 |
+
|
993 |
+
|
994 |
+
))
|
995 |
+
|
996 |
+
(provide 'apml_kaldurtreeZ)
|
CosyVoice-ttsfrd/resource/festival/cart_aux.scm
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996-2011 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Some functions for manipulating decision trees
|
35 |
+
;;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
|
38 |
+
(define (cart_prune_tree_thresh tree threshold default)
|
39 |
+
"(prune_cart_tree_thresh TREE THRESHOLD DEFAULT)
|
40 |
+
Prune the classification tree TREE so that all tail nodes with
|
41 |
+
a prediction probabality less than THRESHOLD and changed to return
|
42 |
+
DEFAULT instead. This may be used when different mistakes have actually
|
43 |
+
different penalites hence some control of the defaults need to be
|
44 |
+
controlled."
|
45 |
+
(cond
|
46 |
+
((cdr tree) ;; a question
|
47 |
+
(list
|
48 |
+
(car tree)
|
49 |
+
(cart_prune_tree_thresh (car (cdr tree)) threshold default)
|
50 |
+
(cart_prune_tree_thresh (car (cdr (cdr tree))) threshold default)))
|
51 |
+
((< (cart_class_probability (car tree)) threshold)
|
52 |
+
(list (list (list threshold default) default)))
|
53 |
+
(t ;; leave asis
|
54 |
+
tree)))
|
55 |
+
|
56 |
+
(define (cart_class_probability class)
|
57 |
+
"(cart_class_probability CLASS)
|
58 |
+
Returns the probability of the best class in the cart leaf node CLASS.
|
59 |
+
If CLASS simple has a value and now probabilities the probabilities
|
60 |
+
it assume to be 1.0."
|
61 |
+
(let ((val 0.0))
|
62 |
+
(set! val (assoc (car (last class)) class))
|
63 |
+
(if val
|
64 |
+
(car (cdr val))
|
65 |
+
1.0)))
|
66 |
+
|
67 |
+
(define (cart_class_prune_merge tree)
|
68 |
+
"(cart_class_prune_merge tree)
|
69 |
+
Prune all sub trees which are pure. That is they all predict the
|
70 |
+
same class. This can happen when some other pruning technique
|
71 |
+
as modified a sub-tree now making it pure."
|
72 |
+
(let ((pure (cart_tree_pure tree)))
|
73 |
+
(cond
|
74 |
+
(pure pure)
|
75 |
+
((cdr tree);; a question
|
76 |
+
(list
|
77 |
+
(car tree)
|
78 |
+
(cart_class_prune_merge (car (cdr tree)))
|
79 |
+
(cart_class_prune_merge (car (cdr (cdr tree))))))
|
80 |
+
(t;; a leaf leave asis
|
81 |
+
tree))))
|
82 |
+
|
83 |
+
(define (cart_tree_pure tree)
|
84 |
+
"(cart_tree_pure tree)
|
85 |
+
Returns a probability density function if all nodes in this tree
|
86 |
+
predict the same class and nil otherwise"
|
87 |
+
(cond
|
88 |
+
((cdr tree)
|
89 |
+
(let ((left (cart_tree_pure (car (cdr tree))))
|
90 |
+
(right (cart_tree_pure (car (cdr (cdr tree))))))
|
91 |
+
(cond
|
92 |
+
((not left) nil)
|
93 |
+
((not right) nil)
|
94 |
+
((equal? (car (last left)) (car (last right)))
|
95 |
+
left)
|
96 |
+
(t
|
97 |
+
nil))))
|
98 |
+
(t ;; its a leaf, so of couse its pure
|
99 |
+
tree)))
|
100 |
+
|
101 |
+
(define (cart_simplify_tree tree map)
|
102 |
+
"(cart_simplify_tree TREE)
|
103 |
+
Simplify a CART tree by reducing probability density functions to
|
104 |
+
simple single clasifications (no probabilities). This removes valuable
|
105 |
+
information from the tree but makes them smaller easier to read by humans
|
106 |
+
and faster to read by machines. Also the classes may be mapped by the assoc
|
107 |
+
list in map. The bright ones amongst you will note this could be
|
108 |
+
better and merge 'is' operators into 'in' operators in some situations
|
109 |
+
especially if you are ignoring actual probability distributions."
|
110 |
+
(cond
|
111 |
+
((cdr tree)
|
112 |
+
(list
|
113 |
+
(car tree)
|
114 |
+
(cart_simplify_tree (car (cdr tree)) map)
|
115 |
+
(cart_simplify_tree (car (cdr (cdr tree))) map)))
|
116 |
+
(t
|
117 |
+
(let ((class (car (last (car tree)))))
|
118 |
+
(if (assoc class map)
|
119 |
+
(list (cdr (assoc class map)))
|
120 |
+
(list (last (car tree))))))))
|
121 |
+
|
122 |
+
(define (cart_simplify_tree2 tree)
|
123 |
+
"(cart_simplify_tree2 TREE)
|
124 |
+
Simplify a CART tree by reducing probability density functions to
|
125 |
+
only non-zero probabilities."
|
126 |
+
(cond
|
127 |
+
((cdr tree)
|
128 |
+
(list
|
129 |
+
(car tree)
|
130 |
+
(cart_simplify_tree2 (car (cdr tree)))
|
131 |
+
(cart_simplify_tree2 (car (cdr (cdr tree))))))
|
132 |
+
(t
|
133 |
+
(list
|
134 |
+
(cart_remove_zero_probs (car tree))))))
|
135 |
+
|
136 |
+
(define (cart_remove_zero_probs pdf)
|
137 |
+
"(cart_remove_zero_probs pdf)
|
138 |
+
Removes zero probability classes in pdf, last in list
|
139 |
+
is best in class (as from cart leaf node)."
|
140 |
+
(cond
|
141 |
+
((null (cdr pdf)) pdf)
|
142 |
+
((equal? 0 (car (cdr (car pdf))))
|
143 |
+
(cart_remove_zero_probs (cdr pdf)))
|
144 |
+
(t
|
145 |
+
(cons
|
146 |
+
(car pdf)
|
147 |
+
(cart_remove_zero_probs (cdr pdf))))))
|
148 |
+
|
149 |
+
(define (cart_interpret_debug i tree)
|
150 |
+
"(cart_interpret_debug i tree)
|
151 |
+
In comparing output between different implementations (flite vs festival)
|
152 |
+
This prints out the details as it interprets the tree."
|
153 |
+
(cond
|
154 |
+
((cdr tree) ;; question
|
155 |
+
(format t "%s %s %s\n" (car (car tree)) (upcase (cadr (car tree)))
|
156 |
+
(car (cddr (car tree))))
|
157 |
+
(set! a (item.feat i (car (car tree))))
|
158 |
+
(format t "%s\n" a)
|
159 |
+
(cond
|
160 |
+
((string-equal "is" (cadr (car tree)))
|
161 |
+
(if (string-equal a (car (cddr (car tree))))
|
162 |
+
(begin
|
163 |
+
(format t " YES\n")
|
164 |
+
(cart_interpret_debug i (car (cdr tree))))
|
165 |
+
(begin
|
166 |
+
(format t " NO\n")
|
167 |
+
(cart_interpret_debug i (car (cddr tree))))))
|
168 |
+
((string-equal "<" (cadr (car tree)))
|
169 |
+
(if (< (parse-number a) (parse-number (car (cddr (car tree)))))
|
170 |
+
(begin
|
171 |
+
(format t " YES\n")
|
172 |
+
(cart_interpret_debug i (car (cdr tree))))
|
173 |
+
(begin
|
174 |
+
(format t " NO\n")
|
175 |
+
(cart_interpret_debug i (car (cddr tree))))))
|
176 |
+
(t
|
177 |
+
(format t "unknown q type %l\n" (car tree)))))
|
178 |
+
(t ;; leaf
|
179 |
+
(car tree)
|
180 |
+
)))
|
181 |
+
|
182 |
+
;;;
|
183 |
+
;;; Prediction tree for OLS trees
|
184 |
+
;;; applies OLS coefficients from appropriate leaf of tree
|
185 |
+
;;;
|
186 |
+
(define (ols_tree_predict i tree)
|
187 |
+
;; Surprisingly simple function does the necessary work
|
188 |
+
(let ((p (wagon i tree)))
|
189 |
+
(apply
|
190 |
+
+
|
191 |
+
(cons
|
192 |
+
(cadr (car (car p))) ;; Intercept
|
193 |
+
(mapcar
|
194 |
+
(lambda (fp)
|
195 |
+
;; get feature value and multiple by coefficent
|
196 |
+
(* (parse-number (item.feat i (car fp))) (cadr fp)))
|
197 |
+
(cdr (car p)))))))
|
198 |
+
|
199 |
+
(provide 'cart_aux)
|
200 |
+
|
CosyVoice-ttsfrd/resource/festival/clunits.scm
ADDED
@@ -0,0 +1,287 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Carnegie Mellon University and ;;
|
4 |
+
;;; Centre for Speech Technology Research ;;
|
5 |
+
;;; University of Edinburgh, UK ;;
|
6 |
+
;;; Copyright (c) 1998-2001 ;;
|
7 |
+
;;; All Rights Reserved. ;;
|
8 |
+
;;; ;;
|
9 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
10 |
+
;;; this software and its documentation without restriction, including ;;
|
11 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
12 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
13 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
14 |
+
;;; the following conditions: ;;
|
15 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
16 |
+
;;; conditions and the following disclaimer. ;;
|
17 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
18 |
+
;;; 3. Original authors' names are not deleted. ;;
|
19 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
20 |
+
;;; derived from this software without specific prior written ;;
|
21 |
+
;;; permission. ;;
|
22 |
+
;;; ;;
|
23 |
+
;;; THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE ;;
|
24 |
+
;;; CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO ;;
|
25 |
+
;;; THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ;;
|
26 |
+
;;; AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE ;;
|
27 |
+
;;; MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, ;;
|
28 |
+
;;; INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ;;
|
29 |
+
;;; RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ;;
|
30 |
+
;;; OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;;
|
31 |
+
;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;;
|
32 |
+
;;; ;;
|
33 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
34 |
+
;;;
|
35 |
+
;;; Cluster Unit selection support (Black and Taylor Eurospeech '97)
|
36 |
+
;;;
|
37 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
38 |
+
;;;
|
39 |
+
;;; Run-time support, selection and synthesis and some debugging functions
|
40 |
+
;;;
|
41 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
42 |
+
|
43 |
+
(require_module 'clunits)
|
44 |
+
|
45 |
+
(defvar cluster_synth_pre_hooks nil)
|
46 |
+
(defvar cluster_synth_post_hooks nil)
|
47 |
+
|
48 |
+
(defvar clunits_time time) ;; some old voices might use this
|
49 |
+
|
50 |
+
(defSynthType Cluster
|
51 |
+
(apply_hooks cluster_synth_pre_hooks utt)
|
52 |
+
(Clunits_Select utt)
|
53 |
+
(Clunits_Get_Units utt)
|
54 |
+
(Clunits_Join_Units utt)
|
55 |
+
(apply_hooks cluster_synth_post_hooks utt)
|
56 |
+
utt
|
57 |
+
)
|
58 |
+
|
59 |
+
(define (Clunits_Join_Units utt)
|
60 |
+
"(Clunits_Join_Units utt)
|
61 |
+
Join the preselected and gotten units into a waveform."
|
62 |
+
(let ((join_method (get_param 'join_method clunits_params 'simple)))
|
63 |
+
;; Choice of function to put them together
|
64 |
+
(cond
|
65 |
+
((string-equal join_method 'windowed)
|
66 |
+
(Clunits_Windowed_Wave utt)
|
67 |
+
(clunits::fix_segs_durs utt))
|
68 |
+
((string-equal join_method 'smoothedjoin)
|
69 |
+
(Clunits_SmoothedJoin_Wave utt)
|
70 |
+
(clunits::fix_segs_durs utt))
|
71 |
+
((string-equal join_method 'none)
|
72 |
+
t)
|
73 |
+
((string-equal join_method 'modified_lpc)
|
74 |
+
(defvar UniSyn_module_hooks nil)
|
75 |
+
(Param.def "unisyn.window_name" "hanning")
|
76 |
+
(Param.def "unisyn.window_factor" 1.0)
|
77 |
+
(Parameter.def 'us_sigpr 'lpc)
|
78 |
+
(mapcar
|
79 |
+
(lambda (u s)
|
80 |
+
(item.set_feat s "source_end" (item.feat u "end")))
|
81 |
+
(utt.relation.items utt 'Unit)
|
82 |
+
(utt.relation.items utt 'Segment))
|
83 |
+
(us_unit_concat utt)
|
84 |
+
(if (not (member 'f0 (utt.relationnames utt)))
|
85 |
+
(targets_to_f0 utt))
|
86 |
+
(if (utt.relation.last utt 'Segment)
|
87 |
+
(set! pm_end (+ (item.feat (utt.relation.last utt 'Segment) "end")
|
88 |
+
0.02))
|
89 |
+
(set! pm_end 0.02))
|
90 |
+
(us_f0_to_pitchmarks utt 'f0 'TargetCoef pm_end)
|
91 |
+
(us_mapping utt 'segment_single)
|
92 |
+
(us_generate_wave utt (Parameter.get 'us_sigpr)
|
93 |
+
'analysis_period))
|
94 |
+
((string-equal join_method 'smoothed_lpc)
|
95 |
+
; (format t "smoothed_lpc\n")
|
96 |
+
(defvar UniSyn_module_hooks nil)
|
97 |
+
(Param.def "unisyn.window_name" "hanning")
|
98 |
+
(Param.def "unisyn.window_factor" 1.0)
|
99 |
+
(Parameter.def 'us_sigpr 'lpc)
|
100 |
+
(mapcar
|
101 |
+
(lambda (u s)
|
102 |
+
(item.set_feat s "source_end" (item.feat u "end"))
|
103 |
+
(item.set_feat s "unit_duration"
|
104 |
+
(- (item.feat u "seg_end") (item.feat u "seg_start")))
|
105 |
+
)
|
106 |
+
(utt.relation.items utt 'Unit)
|
107 |
+
(utt.relation.items utt 'Segment))
|
108 |
+
(us_unit_concat utt)
|
109 |
+
(mapcar
|
110 |
+
(lambda (u s)
|
111 |
+
(item.set_feat s "num_frames" (item.feat u "num_frames")))
|
112 |
+
(utt.relation.items utt 'Unit)
|
113 |
+
(utt.relation.items utt 'Segment))
|
114 |
+
(if (not (member 'f0 (utt.relationnames utt)))
|
115 |
+
(targets_to_f0 utt))
|
116 |
+
(if (utt.relation.last utt 'Segment)
|
117 |
+
(set! pm_end (+ (item.feat (utt.relation.last utt 'Segment) "end")
|
118 |
+
0.02))
|
119 |
+
(set! pm_end 0.02))
|
120 |
+
(us_f0_to_pitchmarks utt 'f0 'TargetCoef pm_end)
|
121 |
+
(cl_mapping utt clunits_params)
|
122 |
+
(us_generate_wave utt (Parameter.get 'us_sigpr)
|
123 |
+
'analysis_period))
|
124 |
+
(t
|
125 |
+
(Clunits_Simple_Wave utt)))
|
126 |
+
utt
|
127 |
+
)
|
128 |
+
)
|
129 |
+
|
130 |
+
(define (clunits::units_selected utt filename)
|
131 |
+
"(clunits::units_selected utt filename)
|
132 |
+
Output selected unitsfile indexes for each unit in the given utterance.
|
133 |
+
Results saved in given file name, or stdout if filename is \"-\"."
|
134 |
+
(let ((fd (if (string-equal filename "-")
|
135 |
+
t
|
136 |
+
(fopen filename "w")))
|
137 |
+
(end 0)
|
138 |
+
(sample_rate
|
139 |
+
(cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
|
140 |
+
(format fd "#\n")
|
141 |
+
(mapcar
|
142 |
+
(lambda (s)
|
143 |
+
(let ((dur (/ (- (item.feat s "samp_end")
|
144 |
+
(item.feat s "samp_start"))
|
145 |
+
sample_rate))
|
146 |
+
(start (/ (item.feat s "samp_start") sample_rate)))
|
147 |
+
(set! end (+ end dur))
|
148 |
+
(format fd "%f 125 %s ; %s %10s %f %f %f\n"
|
149 |
+
end
|
150 |
+
(string-before (item.name s) "_")
|
151 |
+
(item.name s)
|
152 |
+
(item.feat s "fileid")
|
153 |
+
(item.feat s "unit_start")
|
154 |
+
(item.feat s "unit_middle")
|
155 |
+
(item.feat s "unit_end"))
|
156 |
+
))
|
157 |
+
(utt.relation.items utt 'Unit))
|
158 |
+
(if (not (string-equal filename "-"))
|
159 |
+
(fclose fd))
|
160 |
+
t))
|
161 |
+
|
162 |
+
(define (clunits::units_segs utt filename)
|
163 |
+
"(clunits::units_segs utt filename)
|
164 |
+
Svaes the unit selections (alone) for display."
|
165 |
+
(let ((fd (if (string-equal filename "-")
|
166 |
+
t
|
167 |
+
(fopen filename "w")))
|
168 |
+
(end 0)
|
169 |
+
(sample_rate
|
170 |
+
(cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
|
171 |
+
(format fd "#\n")
|
172 |
+
(mapcar
|
173 |
+
(lambda (s)
|
174 |
+
(let ((dur (/ (- (item.feat s "samp_end")
|
175 |
+
(item.feat s "samp_start"))
|
176 |
+
sample_rate))
|
177 |
+
(start (/ (item.feat s "samp_start") sample_rate)))
|
178 |
+
(set! end (+ end dur))
|
179 |
+
(format fd "%f 125 %s \n"
|
180 |
+
end
|
181 |
+
(string-before (item.name s) "_")
|
182 |
+
; (item.name s)
|
183 |
+
)
|
184 |
+
))
|
185 |
+
(utt.relation.items utt 'Unit))
|
186 |
+
(if (not (string-equal filename "-"))
|
187 |
+
(fclose fd))
|
188 |
+
t))
|
189 |
+
|
190 |
+
(define (clunits::fix_segs_durs utt)
|
191 |
+
"(clunits::fix_segs_durs utt)
|
192 |
+
Takes the actual unit times and places then back on the segs."
|
193 |
+
(let ((end 0)
|
194 |
+
(sample_rate
|
195 |
+
(cadr (assoc 'sample_rate (wave.info (utt.wave utt))))))
|
196 |
+
(mapcar
|
197 |
+
(lambda (u s)
|
198 |
+
(let ((dur (/ (- (item.feat u "samp_end")
|
199 |
+
(item.feat u "samp_start"))
|
200 |
+
sample_rate))
|
201 |
+
(seg_start (/ (- (item.feat u "samp_seg_start")
|
202 |
+
(item.feat u "samp_start"))
|
203 |
+
sample_rate)))
|
204 |
+
(if (item.prev s)
|
205 |
+
(item.set_feat (item.prev s) "end"
|
206 |
+
(+ (item.feat s "p.end") seg_start)))
|
207 |
+
(set! end (+ end dur))
|
208 |
+
(item.set_feat s "end" end)))
|
209 |
+
(utt.relation.items utt 'Unit)
|
210 |
+
(utt.relation.items utt 'Segment)
|
211 |
+
)
|
212 |
+
utt))
|
213 |
+
|
214 |
+
(define (clunits::display utt)
|
215 |
+
"(clunits::display utt)
|
216 |
+
Display utterance with emulabel. Note this saves files in
|
217 |
+
scratch/wav/ and scratch/lab/."
|
218 |
+
(let ((id "cl01"))
|
219 |
+
(utt.save.wave utt (format nil "scratch/wav/%s.wav" id))
|
220 |
+
(utt.save.segs utt (format nil "scratch/lab/%s.lab" id))
|
221 |
+
(system "cd scratch; emulabel ../etc/emu_lab cl01 &")
|
222 |
+
t))
|
223 |
+
|
224 |
+
; (define (clunits::debug_resynth_units utt)
|
225 |
+
; "(clunits::debug_resynth_units utt)
|
226 |
+
; Check each of the units in utt against the related label
|
227 |
+
; files and re-synth with any given new boundaries. Note this is
|
228 |
+
; will only work if the segment still overlaps with its original and
|
229 |
+
; also note that with a rebuild of the clunits db a complete different
|
230 |
+
; set of units may be selected for this utterance."
|
231 |
+
; (let ()
|
232 |
+
; (mapcar
|
233 |
+
; (lambda (unit)
|
234 |
+
; (clunits::check_unit_boundaries unit))
|
235 |
+
; (utt.relation.items utt 'Unit))
|
236 |
+
; ;; This can't be done like this ...
|
237 |
+
; (Clunits_Get_Units utt) ;; get unit signal/track stuff
|
238 |
+
; (Clunits_Join_Units utt) ;; make a complete waveform
|
239 |
+
; (apply_hooks cluster_synth_post_hooks utt)
|
240 |
+
; utt)
|
241 |
+
; )
|
242 |
+
|
243 |
+
(define (clunits::join_parameters utt)
|
244 |
+
"(clunits::join_parameters utt)
|
245 |
+
Join selected paremeters (rather than the signal), used in F0 and
|
246 |
+
Articulatory selection."
|
247 |
+
(let ((params nil)
|
248 |
+
(num_channels 0)
|
249 |
+
(num_frames 0 ))
|
250 |
+
|
251 |
+
(mapcar
|
252 |
+
(lambda (unit)
|
253 |
+
(set! num_frames
|
254 |
+
(+ num_frames
|
255 |
+
(track.num_frames (item.feat unit "coefs"))))
|
256 |
+
(set! num_channels (track.num_channels (item.feat unit "coefs")))
|
257 |
+
(format t "coounting %d %d\n" num_frames num_channels)
|
258 |
+
)
|
259 |
+
(utt.relation.items utt 'Unit))
|
260 |
+
|
261 |
+
(set! params (track.resize nil 0 num_channels))
|
262 |
+
|
263 |
+
(mapcar
|
264 |
+
(lambda (unit)
|
265 |
+
(set! frames 0)
|
266 |
+
(format t "inserting \n")
|
267 |
+
(format t "%l %l %l %l %l\n"
|
268 |
+
params (track.num_frames params)
|
269 |
+
(item.feat unit "coefs") 0
|
270 |
+
(track.num_frames (item.feat unit "coefs")))
|
271 |
+
(track.insert
|
272 |
+
params (track.num_frames params)
|
273 |
+
(item.feat unit "coefs") 0
|
274 |
+
(track.num_frames (item.feat unit "coefs")))
|
275 |
+
)
|
276 |
+
(utt.relation.items utt 'Unit))
|
277 |
+
|
278 |
+
(utt.relation.create utt "AllCoefs")
|
279 |
+
(set! coefs_item (utt.relation.append utt "AllCoefs"))
|
280 |
+
(item.set_feat coefs_item "name" "AllCoefs")
|
281 |
+
(item.set_feat coefs_item "AllCoefs" params)
|
282 |
+
|
283 |
+
utt
|
284 |
+
))
|
285 |
+
|
286 |
+
|
287 |
+
(provide 'clunits)
|
CosyVoice-ttsfrd/resource/festival/cmusphinx2_phones.scm
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;;
|
3 |
+
;;; Carnegie Mellon University ;;;
|
4 |
+
;;; and Alan W Black and Kevin Lenzo ;;;
|
5 |
+
;;; Copyright (c) 1998-2000 ;;;
|
6 |
+
;;; All Rights Reserved. ;;;
|
7 |
+
;;; ;;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;;
|
13 |
+
;;; the following conditions: ;;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;;
|
15 |
+
;;; conditions and the following disclaimer. ;;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;;
|
19 |
+
;;; derived from this software without specific prior written ;;;
|
20 |
+
;;; permission. ;;;
|
21 |
+
;;; ;;;
|
22 |
+
;;; CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ;;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;;
|
25 |
+
;;; SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ;;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;;
|
30 |
+
;;; THIS SOFTWARE. ;;;
|
31 |
+
;;; ;;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
34 |
+
;;;
|
35 |
+
;;; A definition of the cmusphinx2 phone set used in the BU RADIO FM
|
36 |
+
;;; corpus, some people call this the darpa set. This one
|
37 |
+
;;; has the closures removed
|
38 |
+
;;;
|
39 |
+
|
40 |
+
(defPhoneSet
|
41 |
+
cmusphinx2
|
42 |
+
;;; Phone Features
|
43 |
+
(;; vowel or consonant
|
44 |
+
(vc + -)
|
45 |
+
;; vowel length: short long dipthong schwa
|
46 |
+
(vlng s l d a 0)
|
47 |
+
;; vowel height: high mid low
|
48 |
+
(vheight 1 2 3 0)
|
49 |
+
;; vowel frontness: front mid back
|
50 |
+
(vfront 1 2 3 0)
|
51 |
+
;; lip rounding
|
52 |
+
(vrnd + - 0)
|
53 |
+
;; consonant type: stop fricative affricate nasal lateral approximant
|
54 |
+
(ctype s f a n l r 0)
|
55 |
+
;; place of articulation: labial alveolar palatal labio-dental
|
56 |
+
;; dental velar glottal
|
57 |
+
(cplace l a p b d v g 0)
|
58 |
+
;; consonant voicing
|
59 |
+
(cvox + - 0)
|
60 |
+
)
|
61 |
+
;; Phone set members
|
62 |
+
(
|
63 |
+
|
64 |
+
;; Note these features were set by awb so they are wrong !!!
|
65 |
+
|
66 |
+
; phone vc vl vh vf vr ct cp cv
|
67 |
+
(AA + l 3 3 - 0 0 0) ;; father
|
68 |
+
(AE + s 3 1 - 0 0 0) ;; fat
|
69 |
+
(AH + s 2 2 - 0 0 0) ;; but
|
70 |
+
(AO + l 3 3 + 0 0 0) ;; lawn
|
71 |
+
(AW + d 3 2 - 0 0 0) ;; how
|
72 |
+
(AX + a 2 2 - 0 0 0) ;; about
|
73 |
+
(AXR + a 2 2 - r a +)
|
74 |
+
(AY + d 3 2 - 0 0 0) ;; hide
|
75 |
+
(B - 0 0 0 0 s l +)
|
76 |
+
(CH - 0 0 0 0 a p -)
|
77 |
+
(D - 0 0 0 0 s a +)
|
78 |
+
(DH - 0 0 0 0 f d +)
|
79 |
+
(DX - 0 0 0 0 s a +)
|
80 |
+
(EH + s 2 1 - 0 0 0) ;; get
|
81 |
+
(ER + a 2 2 - r 0 0)
|
82 |
+
(EY + d 2 1 - 0 0 0) ;; gate
|
83 |
+
(F - 0 0 0 0 f b -)
|
84 |
+
(G - 0 0 0 0 s v +)
|
85 |
+
(HH - 0 0 0 0 f g -)
|
86 |
+
(IH + s 1 1 - 0 0 0) ;; bit
|
87 |
+
(IY + l 1 1 - 0 0 0) ;; beet
|
88 |
+
(JH - 0 0 0 0 a p +)
|
89 |
+
(K - 0 0 0 0 s v -)
|
90 |
+
(L - 0 0 0 0 l a +)
|
91 |
+
(M - 0 0 0 0 n l +)
|
92 |
+
(N - 0 0 0 0 n a +)
|
93 |
+
(NG - 0 0 0 0 n v +)
|
94 |
+
(OW + d 2 3 + 0 0 0) ;; lone
|
95 |
+
(OY + d 2 3 + 0 0 0) ;; toy
|
96 |
+
(P - 0 0 0 0 s l -)
|
97 |
+
(R - 0 0 0 0 r a +)
|
98 |
+
(S - 0 0 0 0 f a -)
|
99 |
+
(SH - 0 0 0 0 f p -)
|
100 |
+
(T - 0 0 0 0 s a -)
|
101 |
+
(TH - 0 0 0 0 f d -)
|
102 |
+
(UH + s 1 3 + 0 0 0) ;; full
|
103 |
+
(UW + l 1 3 + 0 0 0) ;; fool
|
104 |
+
(V - 0 0 0 0 f b +)
|
105 |
+
(W - 0 0 0 0 r l +)
|
106 |
+
(Y - 0 0 0 0 r p +)
|
107 |
+
(Z - 0 0 0 0 f a +)
|
108 |
+
(ZH - 0 0 0 0 f p +)
|
109 |
+
(SIL - 0 0 0 0 0 0 -) ; added
|
110 |
+
)
|
111 |
+
)
|
112 |
+
|
113 |
+
(PhoneSet.silences '(SIL))
|
114 |
+
|
115 |
+
(provide 'cmusphinx2_phones)
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
|
CosyVoice-ttsfrd/resource/festival/cslush.scm
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Functions specific to using Festival in cslush part of the OGI toolkit
|
35 |
+
;;; The OGI toolkit is a complete dialog building system with speech
|
36 |
+
;;; recognition and synthesis (Festival) it is available for free for
|
37 |
+
;;; research purposes from
|
38 |
+
;;; http://www.cse.ogi.edu/CSLU/toolkit/toolkit.html
|
39 |
+
;;;
|
40 |
+
;;; Note this cslush interface requires you to compile festival
|
41 |
+
;;; with tcl (7.6)
|
42 |
+
;;;
|
43 |
+
;;; The functions replace the C++ level functions Jacques H. de Villiers
|
44 |
+
;;; <[email protected]> from CSLU wrote for the previous version
|
45 |
+
;;;
|
46 |
+
|
47 |
+
(if (not (member 'tcl *modules*))
|
48 |
+
(error "cslush: can't load cslush, TCL not supported in this installation of Festival."))
|
49 |
+
|
50 |
+
(define (cslush.getwave utt)
|
51 |
+
"(cslush.getwave UTT)
|
52 |
+
Extract wave memory info, pass this to wave import in CSLUsh."
|
53 |
+
(format nil "%s %s %s"
|
54 |
+
(utt.wave.info utt 'data_addr)
|
55 |
+
(utt.wave.info utt 'num_samples)
|
56 |
+
(utt.wave.info utt 'sample_rate)))
|
57 |
+
|
58 |
+
(define (cslush.getphone utt)
|
59 |
+
"(cslush.getphone UTT)
|
60 |
+
Return segment names a single string of phones, for use to pass to
|
61 |
+
TCL."
|
62 |
+
(let ((phones ""))
|
63 |
+
(mapcar
|
64 |
+
(lambda (s)
|
65 |
+
(if (string-equal phones "")
|
66 |
+
(set! phones (format nil "%s" (utt.streamitem.feat utt s 'name)))
|
67 |
+
(set! phones (format nil "%s %s"
|
68 |
+
phones (utt.streamitem.feat utt s 'name)))))
|
69 |
+
(utt.stream utt 'Segment))
|
70 |
+
phones))
|
71 |
+
|
72 |
+
(define (cslush TCLCOMMAND)
|
73 |
+
"(cslush TCLCOMMAND)
|
74 |
+
Pass TCLCOMMAND to TCL interpreter, returns what TCL returns as a
|
75 |
+
string."
|
76 |
+
(tcl_eval TCLCOMMAND))
|
77 |
+
|
78 |
+
|
79 |
+
(provide 'cslush)
|
CosyVoice-ttsfrd/resource/festival/cstr.scm
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
6 |
+
;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
|
7 |
+
;;;
|
8 |
+
;;; The master copy of this file is in ../../speech_tools/lib/siod/cstr.scm
|
9 |
+
;;; and is copied here at build time.
|
10 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
24 |
+
;;; ;;
|
25 |
+
;;; Centre for Speech Technology Research ;;
|
26 |
+
;;; University of Edinburgh, UK ;;
|
27 |
+
;;; Copyright (c) 1996,1997 ;;
|
28 |
+
;;; All Rights Reserved. ;;
|
29 |
+
;;; ;;
|
30 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
31 |
+
;;; this software and its documentation without restriction, including ;;
|
32 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
33 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
34 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
35 |
+
;;; the following conditions: ;;
|
36 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
37 |
+
;;; conditions and the following disclaimer. ;;
|
38 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
39 |
+
;;; 3. Original authors' names are not deleted. ;;
|
40 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
41 |
+
;;; derived from this software without specific prior written ;;
|
42 |
+
;;; permission. ;;
|
43 |
+
;;; ;;
|
44 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
45 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
46 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
47 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
48 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
49 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
50 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
51 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
52 |
+
;;; THIS SOFTWARE. ;;
|
53 |
+
;;; ;;
|
54 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
55 |
+
;;;
|
56 |
+
;;; CSTR siod extensions.
|
57 |
+
|
58 |
+
;(defvar Parameter nil
|
59 |
+
; "Parameter
|
60 |
+
; An assoc-list of parameters and values for various parts of the speech
|
61 |
+
; synthesis system. This is used by the functions Parameter.set
|
62 |
+
; Parameter.def and Parameter.get as well as internal C++ functions.")
|
63 |
+
|
64 |
+
(defvar Param (feats.make)
|
65 |
+
"Param
|
66 |
+
A feature set for arbitrary parameters for modules.")
|
67 |
+
|
68 |
+
(define (Param.set name val)
|
69 |
+
"(Param.set NAME VAL)
|
70 |
+
Set parameter NAME to VAL (deleting any previous setting)"
|
71 |
+
(feats.set Param name val))
|
72 |
+
|
73 |
+
(define (Parameter.set name val)
|
74 |
+
"(Parameter.set NAME VAL)
|
75 |
+
Set parameter NAME to VAL (deleting any previous setting). This is
|
76 |
+
an old function and you should use Param.set instead."
|
77 |
+
(Param.set name val)
|
78 |
+
val
|
79 |
+
)
|
80 |
+
|
81 |
+
(define (Parameter.def name val)
|
82 |
+
"(Parameter.def NAME VAL)
|
83 |
+
Set parameter NAME to VAL if not already set. This is an OLD function
|
84 |
+
you shold use Param.def instead."
|
85 |
+
(Param.def name val)
|
86 |
+
)
|
87 |
+
|
88 |
+
(define (Param.def name val)
|
89 |
+
"(Param.def NAME VAL)
|
90 |
+
Set parameter NAME to VAL if not already set"
|
91 |
+
(if (not (feats.present Param name))
|
92 |
+
(feats.set Param name val)))
|
93 |
+
|
94 |
+
(define (Parameter.get name)
|
95 |
+
"(Parameter.get NAME)
|
96 |
+
Get parameter NAME's value (nil if unset). This is an OLD function
|
97 |
+
and may not exist in later versions (or change functionality). This
|
98 |
+
function (unlike Param.get) may return sylbols (rather than strings
|
99 |
+
if the val doesn't contain whitespace (to allow older functions to
|
100 |
+
still work."
|
101 |
+
(let ((val (Param.get name)))
|
102 |
+
(if (and (eq? 'string (typeof val))
|
103 |
+
(not (string-matches val ".*[ \t\r\n].*")))
|
104 |
+
(intern val)
|
105 |
+
val))
|
106 |
+
)
|
107 |
+
|
108 |
+
(define (Param.get name)
|
109 |
+
"(Param.get NAME)
|
110 |
+
Get parameter NAME's value (nil if unset)"
|
111 |
+
(feats.get Param name))
|
112 |
+
|
113 |
+
(define (get_param name params default)
|
114 |
+
"(get_param name params default)
|
115 |
+
Get named parameters in params returning default if its not present."
|
116 |
+
(let ((pair (assoc name params)))
|
117 |
+
(if pair
|
118 |
+
(car (cdr pair))
|
119 |
+
default)))
|
120 |
+
|
121 |
+
(provide 'cstr)
|
CosyVoice-ttsfrd/resource/festival/darpa_phones.scm
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1999 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Alan W Black
|
34 |
+
;;; Date: April 1999
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;;
|
37 |
+
;;; (yet another) darpa definition
|
38 |
+
;;;
|
39 |
+
|
40 |
+
(require 'phoneset)
|
41 |
+
|
42 |
+
(set! darpa_fs (cadr
|
43 |
+
(defPhoneSet
|
44 |
+
darpa
|
45 |
+
(Features
|
46 |
+
(vowel (syllabic + -)
|
47 |
+
(length long short diphthong schwa)
|
48 |
+
(height high mid low)
|
49 |
+
(front front mid back)
|
50 |
+
(round + -))
|
51 |
+
(consonant
|
52 |
+
(syllabic + -)
|
53 |
+
(manner stop affricate fricative approximant nasal)
|
54 |
+
(place alveolar dental labial palatal velar)
|
55 |
+
(voicing + -))
|
56 |
+
(silence
|
57 |
+
(syllabic -)))
|
58 |
+
(Phones
|
59 |
+
;; type syl length height front round
|
60 |
+
(aa vowel + long low back -)
|
61 |
+
(ae vowel + short low front -)
|
62 |
+
(ah vowel + short mid mid -)
|
63 |
+
(ao vowel + long low front +)
|
64 |
+
(aw vowel + diphthong low mid -)
|
65 |
+
(ax vowel + schwa mid mid -)
|
66 |
+
(axr vowel + schwa mid mid -)
|
67 |
+
(ay vowel + diphthong low mid -)
|
68 |
+
(eh vowel + short mid front -)
|
69 |
+
(ey vowel + diphthong mid front -)
|
70 |
+
(ih vowel + short high front -)
|
71 |
+
(iy vowel + long high front -)
|
72 |
+
(ow vowel + diphthong mid back +)
|
73 |
+
(oy vowel + diphthong mid back +)
|
74 |
+
(uh vowel + short high back +)
|
75 |
+
(uw vowel + long high back +)
|
76 |
+
;; type syl manner place voicing
|
77 |
+
(b consonant - stop labial +)
|
78 |
+
(ch consonant - affricate alveolar -)
|
79 |
+
(d consonant - stop alveolar +)
|
80 |
+
(dh consonant - fricative dental +)
|
81 |
+
(dx consonant - stop alveolar +)
|
82 |
+
(el consonant + approximant alveolar +)
|
83 |
+
(em consonant + nasal labial +)
|
84 |
+
(en consonant + stop alveolar +)
|
85 |
+
(er consonant + approximant alveolar +)
|
86 |
+
(f consonant - fricative labial -)
|
87 |
+
(g consonant - stop velar +)
|
88 |
+
(hh consonant - fricative velar -)
|
89 |
+
(jh consonant - affricate alveolar +)
|
90 |
+
(k consonant - stop velar -)
|
91 |
+
(l consonant - approximant alveolar +)
|
92 |
+
(m consonant - nasal labial +)
|
93 |
+
(n consonant - nasal alveolar +)
|
94 |
+
(nx consonant - nasal alveolar +)
|
95 |
+
(ng consonant - nasal velar +)
|
96 |
+
(p consonant - stop labial -)
|
97 |
+
(r consonant - approximant alveolar +)
|
98 |
+
(s consonant - fricative alveolar -)
|
99 |
+
(sh consonant - fricative palatal -)
|
100 |
+
(t consonant - stop alveolar -)
|
101 |
+
(th consonant - fricative dental -)
|
102 |
+
(v consonant - fricative labial +)
|
103 |
+
(w consonant - approximant velar +)
|
104 |
+
(y consonant - approximant palatal +)
|
105 |
+
(z consonant - fricative alveolar +)
|
106 |
+
(zh consonant - fricative palatal +)
|
107 |
+
(pau silence -)
|
108 |
+
; (sil silence -)
|
109 |
+
))))
|
110 |
+
|
111 |
+
(provide 'darpa_phones)
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
CosyVoice-ttsfrd/resource/festival/dicts/cmu/COPYING
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
This directory contains an American English Lexicon and letter to
|
3 |
+
sournd rules based on CMUDICT 0.4. This distribution falls under
|
4 |
+
the following copyright. CMUDICT falls under a simialr free licence
|
5 |
+
that has no commercial restrictions.
|
6 |
+
|
7 |
+
Centre for Speech Technology Research
|
8 |
+
University of Edinburgh, UK
|
9 |
+
Copyright (c) 1996,1997
|
10 |
+
All Rights Reserved.
|
11 |
+
|
12 |
+
Permission is hereby granted, free of charge, to use and distribute
|
13 |
+
this software and its documentation without restriction, including
|
14 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
15 |
+
distribute, sublicense, and/or sell copies of this work, and to
|
16 |
+
permit persons to whom this work is furnished to do so, subject to
|
17 |
+
the following conditions:
|
18 |
+
1. The code must retain the above copyright notice, this list of
|
19 |
+
conditions and the following disclaimer.
|
20 |
+
2. Any modifications must be clearly marked as such.
|
21 |
+
3. Original authors' names are not deleted.
|
22 |
+
4. The authors' names are not used to endorse or promote products
|
23 |
+
derived from this software without specific prior written
|
24 |
+
permission.
|
25 |
+
|
26 |
+
THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK
|
27 |
+
DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
28 |
+
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
|
29 |
+
SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE
|
30 |
+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
31 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
32 |
+
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
33 |
+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
34 |
+
THIS SOFTWARE.
|
35 |
+
|
CosyVoice-ttsfrd/resource/festival/dicts/cmu/allowables.scm
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(require 'lts_build)
|
2 |
+
(set! allowables
|
3 |
+
'((a _epsilon_ aa aa1 aa0
|
4 |
+
ax ax1 ax0
|
5 |
+
eh eh1 eh0
|
6 |
+
ah ah1 ah0
|
7 |
+
ae ae1 ae0
|
8 |
+
ey ey1 ey0
|
9 |
+
ay ay1 ay0
|
10 |
+
er er1 er0
|
11 |
+
y-ax0 y-ah1 y-ah0
|
12 |
+
aw aw1 aw0
|
13 |
+
ao ao1 ao0
|
14 |
+
ih ih1 ih0
|
15 |
+
w-ax0 w-ah1 w-ah0
|
16 |
+
ow ow1 ow0
|
17 |
+
w-ey w-ey1 ey0
|
18 |
+
iy iy1 iy0)
|
19 |
+
(b _epsilon_ b p )
|
20 |
+
(c _epsilon_ k ch s sh t-s )
|
21 |
+
(d _epsilon_ d t jh)
|
22 |
+
(e _epsilon_ ih ih1 ih0
|
23 |
+
ax ax1 ax0
|
24 |
+
iy iy1 iy0
|
25 |
+
er er1 er0
|
26 |
+
ax ah1 ah0
|
27 |
+
eh eh1 eh0
|
28 |
+
ey ey1 ey0
|
29 |
+
uw uw1 uw0
|
30 |
+
ay ay1 ay0
|
31 |
+
ow ow1 ow0
|
32 |
+
y-uw y-uw1 y-uw0
|
33 |
+
oy oy1 oy0
|
34 |
+
aa aa1 aa0)
|
35 |
+
(f _epsilon_ f )
|
36 |
+
(g _epsilon_ g jh zh k f)
|
37 |
+
(h _epsilon_ hh )
|
38 |
+
(i _epsilon_ iy iy1 iy0
|
39 |
+
ax ax1 ax0
|
40 |
+
ih ih1 ih0
|
41 |
+
ah ah1 ah0
|
42 |
+
ax ah1 ah0
|
43 |
+
ay ay1 ay0
|
44 |
+
y
|
45 |
+
aa aa1 aa0
|
46 |
+
ae ae1 ae0
|
47 |
+
w-ax0 w-ah1 w-ah0
|
48 |
+
eh eh1 eh0
|
49 |
+
er er0 er1 )
|
50 |
+
(j _epsilon_ jh y hh zh)
|
51 |
+
(k _epsilon_ k )
|
52 |
+
(l _epsilon_ l ax-l y ax0-l)
|
53 |
+
(m _epsilon_ m ax-m m-ax0 ax0-m m-ax0
|
54 |
+
m-ae m-ae1 m-ae0
|
55 |
+
m-ih m-ih0 )
|
56 |
+
(n _epsilon_ n ng n-y)
|
57 |
+
(o _epsilon_ ax ax0 ah1 ah0
|
58 |
+
ao ao1 ao0
|
59 |
+
ow ow1 ow0
|
60 |
+
uw uw1 uw0
|
61 |
+
er er1 er0
|
62 |
+
aa aa1 aa0
|
63 |
+
aw aw1 aw0
|
64 |
+
oy oy1 oy0
|
65 |
+
uh uh1 uh0
|
66 |
+
w
|
67 |
+
w-ax0 w-ah1 w-ah0
|
68 |
+
aa aa1 aa0
|
69 |
+
ih ih1 ih0
|
70 |
+
ae ae1 ae0)
|
71 |
+
(p _epsilon_ p f)
|
72 |
+
(q _epsilon_ k )
|
73 |
+
(r _epsilon_ r er1 er er0 )
|
74 |
+
(s _epsilon_ s sh z zh ch)
|
75 |
+
(t _epsilon_ t th sh ch dh d s zh)
|
76 |
+
(u _epsilon_
|
77 |
+
ax ax0
|
78 |
+
ah ah1 ah0
|
79 |
+
uw uw1 uw0
|
80 |
+
er er1 er0
|
81 |
+
uh uh1 uh0
|
82 |
+
y-uw y-uw1 y-uw0
|
83 |
+
ax-w ah1-w ah0-w
|
84 |
+
y-er y-er1 y-er0
|
85 |
+
y-ax y-ax0 y-ah1 y-ah0
|
86 |
+
w
|
87 |
+
ih ih1 ih0
|
88 |
+
ao ao1 ao0
|
89 |
+
eh eh1 eh0
|
90 |
+
y-uh y-uh1 y-uh0 )
|
91 |
+
(v _epsilon_ v f)
|
92 |
+
(w _epsilon_ w v f)
|
93 |
+
(x _epsilon_ k-s g-z ng-z k-sh z g-zh zh)
|
94 |
+
(y _epsilon_
|
95 |
+
iy iy1 iy0
|
96 |
+
ih ih1 ih0
|
97 |
+
ay ay1 ay0
|
98 |
+
y
|
99 |
+
ax ax0 ah1 ah0)
|
100 |
+
(z _epsilon_ z t-s zh s)
|
101 |
+
(# #)))
|
102 |
+
|
CosyVoice-ttsfrd/resource/festival/display.scm
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Alan W Black
|
34 |
+
;;; Date: December 1996
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;; An xwaves display function for utterances
|
37 |
+
;;;
|
38 |
+
;;; Requires Xwaves to be running, saves labels etc and sends
|
39 |
+
;;; messages to Xwaves to display the utterance.
|
40 |
+
;;;
|
41 |
+
;;; This can be a model for other display functions.
|
42 |
+
;;;
|
43 |
+
|
44 |
+
(define (display utt)
|
45 |
+
"(display utt)
|
46 |
+
Display an utterance's waveform, F0 and segment labels in Xwaves.
|
47 |
+
Xwaves must be running on the current machine, with a labeller for
|
48 |
+
this to work."
|
49 |
+
(let ((tmpname (make_tmp_filename)))
|
50 |
+
(utt.save.wave utt (string-append tmpname ".wav"))
|
51 |
+
(utt.save.segs utt (string-append tmpname ".lab"))
|
52 |
+
(utt.save.f0 utt (string-append tmpname ".f0"))
|
53 |
+
(system (format nil "send_xwaves make file %s name %s height 150"
|
54 |
+
(string-append tmpname ".f0") tmpname))
|
55 |
+
(system (format nil "send_xwaves make name %s file %s height 200"
|
56 |
+
tmpname (string-append tmpname ".wav")))
|
57 |
+
(system (format nil "send_xwaves send make file %s name %s color 125"
|
58 |
+
(string-append tmpname ".lab") tmpname))
|
59 |
+
(system (format nil "send_xwaves send activate name %s fields 1"
|
60 |
+
tmpname))
|
61 |
+
(system (format nil "send_xwaves %s align file %s"
|
62 |
+
tmpname (string-append tmpname ".wav"))))
|
63 |
+
)
|
64 |
+
|
65 |
+
(provide 'display)
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
CosyVoice-ttsfrd/resource/festival/duration.scm
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Basic Duration module which will call appropriate duration
|
35 |
+
;;; (C++) modules based on set parameter
|
36 |
+
;;;
|
37 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
38 |
+
|
39 |
+
;;; These modules should predict intonation events/labels
|
40 |
+
;;; based on information in the phrase and word streams
|
41 |
+
|
42 |
+
(define (Duration utt)
|
43 |
+
"(Duration utt)
|
44 |
+
Predict segmental durations using Duration_Method defined in Parameters.
|
45 |
+
Four methods are currently available: averages, Klatt rules, CART tree
|
46 |
+
based, and fixed duration."
|
47 |
+
(let ((rval (apply_method 'Duration_Method utt)))
|
48 |
+
(cond
|
49 |
+
(rval rval) ;; new style
|
50 |
+
;; 1.1.1 voices still use other names
|
51 |
+
((eq 'Averages (Parameter.get 'Duration_Method))
|
52 |
+
(Duration_Averages utt))
|
53 |
+
((eq 'Klatt (Parameter.get 'Duration_Method))
|
54 |
+
(Duration_Klatt utt))
|
55 |
+
((eq 'Tree_ZScores (Parameter.get 'Duration_Method))
|
56 |
+
(Duration_Tree_ZScores utt))
|
57 |
+
((eq 'Tree (Parameter.get 'Duration_Method))
|
58 |
+
(Duration_Tree utt))
|
59 |
+
(t
|
60 |
+
(Duration_Default utt)))))
|
61 |
+
|
62 |
+
(define (Duration_LogZScores utt)
|
63 |
+
"(Duration_LogZScores utt)
|
64 |
+
Predicts duration to segments using the CART tree in duration_logzscore_tree
|
65 |
+
and duration_logzscore_tree_silence which produces a zscore of the log
|
66 |
+
duration. The variable duration_logzscore_ph_info contains (log) means
|
67 |
+
and std for each phone in the set."
|
68 |
+
(let ((silence (car (car (cdr (assoc 'silences (PhoneSet.description))))))
|
69 |
+
ldurinfo)
|
70 |
+
(mapcar
|
71 |
+
(lambda (s)
|
72 |
+
(if (string-equal silence (item.name s))
|
73 |
+
(set! ldurinfo
|
74 |
+
(wagon s duration_logzscore_tree_silence))
|
75 |
+
(set! ldurinfo
|
76 |
+
(wagon s duration_logzscore_tree)))
|
77 |
+
(set! dur (exp (duration_unzscore
|
78 |
+
(item.name s)
|
79 |
+
(car (last ldurinfo))
|
80 |
+
duration_logzscore_ph_info)))
|
81 |
+
(set! dur (* dur (duration_find_stretch s)))
|
82 |
+
(item.set_feat
|
83 |
+
s "end" (+ dur (item.feat s "start_segment"))))
|
84 |
+
(utt.relation.items utt 'Segment))
|
85 |
+
utt))
|
86 |
+
|
87 |
+
(define (duration_unzscore phname zscore table)
|
88 |
+
"(duration_unzscore phname zscore table)
|
89 |
+
Look up phname in table and convert xscore back to absolute domain."
|
90 |
+
(let ((phinfo (assoc phname table))
|
91 |
+
mean std)
|
92 |
+
(if phinfo
|
93 |
+
(begin
|
94 |
+
(set! mean (car (cdr phinfo)))
|
95 |
+
(set! std (car (cdr (cdr phinfo)))))
|
96 |
+
(begin
|
97 |
+
(format t "Duration: unzscore no info for %s\n" phname)
|
98 |
+
(set! mean 0.100)
|
99 |
+
(set! std 0.25)))
|
100 |
+
(+ mean (* zscore std))))
|
101 |
+
|
102 |
+
(define (duration_find_stretch seg)
|
103 |
+
"(duration_find_stretch utt seg)
|
104 |
+
Find any relavant duration stretch."
|
105 |
+
(let ((global (Parameter.get 'Duration_Stretch))
|
106 |
+
(local (item.feat
|
107 |
+
seg "R:SylStructure.parent.parent.R:Token.parent.dur_stretch")))
|
108 |
+
(if (or (not global)
|
109 |
+
(equal? global 0.0))
|
110 |
+
(set! global 1.0))
|
111 |
+
(if (string-equal local 0.0)
|
112 |
+
(set! local 1.0))
|
113 |
+
(* global local)))
|
114 |
+
|
115 |
+
;; These provide lisp level functions, some of which have
|
116 |
+
;; been converted in C++ (in festival/src/modules/base/ff.cc)
|
117 |
+
(define (onset_has_ctype seg type)
|
118 |
+
;; "1" if onset contains ctype
|
119 |
+
(let ((syl (item.relation.parent seg 'SylStructure)))
|
120 |
+
(if (not syl)
|
121 |
+
"0" ;; a silence
|
122 |
+
(let ((segs (item.relation.daughters syl 'SylStructure))
|
123 |
+
(v "0"))
|
124 |
+
(while (and segs
|
125 |
+
(not (string-equal
|
126 |
+
"+"
|
127 |
+
(item.feat (car segs) "ph_vc"))))
|
128 |
+
(if (string-equal
|
129 |
+
type
|
130 |
+
(item.feat (car segs) "ph_ctype"))
|
131 |
+
(set! v "1"))
|
132 |
+
(set! segs (cdr segs)))
|
133 |
+
v))))
|
134 |
+
|
135 |
+
(define (coda_has_ctype seg type)
|
136 |
+
;; "1" if coda contains ctype
|
137 |
+
(let ((syl (item.relation.parent seg 'SylStructure)))
|
138 |
+
(if (not syl)
|
139 |
+
"0" ;; a silence
|
140 |
+
(let ((segs (reverse (item.relation.daughters
|
141 |
+
syl 'SylStructure)))
|
142 |
+
(v "0"))
|
143 |
+
(while (and segs
|
144 |
+
(not (string-equal
|
145 |
+
"+"
|
146 |
+
(item.feat (car segs) "ph_vc"))))
|
147 |
+
(if (string-equal
|
148 |
+
type
|
149 |
+
(item.feat (car segs) "ph_ctype"))
|
150 |
+
(set! v "1"))
|
151 |
+
(set! segs (cdr segs)))
|
152 |
+
v))))
|
153 |
+
|
154 |
+
(define (onset_stop seg)
|
155 |
+
(onset_has_ctype seg "s"))
|
156 |
+
(define (onset_fric seg)
|
157 |
+
(onset_has_ctype seg "f"))
|
158 |
+
(define (onset_nasal seg)
|
159 |
+
(onset_has_ctype seg "n"))
|
160 |
+
(define (onset_glide seg)
|
161 |
+
(let ((l (onset_has_ctype seg "l")))
|
162 |
+
(if (string-equal l "0")
|
163 |
+
(onset_has_ctype seg "r")
|
164 |
+
"1")))
|
165 |
+
(define (coda_stop seg)
|
166 |
+
(coda_has_ctype seg "s"))
|
167 |
+
(define (coda_fric seg)
|
168 |
+
(coda_has_ctype seg "f"))
|
169 |
+
(define (coda_nasal seg)
|
170 |
+
(coda_has_ctype seg "n"))
|
171 |
+
(define (coda_glide seg)
|
172 |
+
(let ((l (coda_has_ctype seg "l")))
|
173 |
+
(if (string-equal l "0")
|
174 |
+
(coda_has_ctype seg "r")
|
175 |
+
"1")))
|
176 |
+
|
177 |
+
(define (Unisyn_Duration utt)
|
178 |
+
"(UniSyn_Duration utt)
|
179 |
+
predicts Segment durations is some speficied way but holds the
|
180 |
+
result in a way necessary for other Unisyn code."
|
181 |
+
(let ((end 0))
|
182 |
+
(mapcar
|
183 |
+
(lambda (s)
|
184 |
+
(item.get_utt s)
|
185 |
+
(let ((dur (wagon_predict s duration_cart_tree)))
|
186 |
+
(set! dur (* (Parameter.get 'Duration_Stretch) dur))
|
187 |
+
(set! end (+ dur end))
|
188 |
+
(item.set_feat s "target_dur" dur)
|
189 |
+
(item.set_function s "start" "unisyn_start")
|
190 |
+
(item.set_feat s "end" end)
|
191 |
+
(item.set_feat s "dur" dur)
|
192 |
+
))
|
193 |
+
(utt.relation.items utt 'Segment))
|
194 |
+
utt))
|
195 |
+
|
196 |
+
(provide 'duration)
|
CosyVoice-ttsfrd/resource/festival/email-mode.scm
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; An example tts text mode for reading email messages, this includes
|
35 |
+
;;; support for extracting the interesting headers from the message
|
36 |
+
;;; and for dealing with quoted text. Its all very primitive and
|
37 |
+
;;; will easily be confused but its here just as an example
|
38 |
+
;;;
|
39 |
+
|
40 |
+
(define (email_init_func)
|
41 |
+
"(email_init_func)
|
42 |
+
Called on starting email text mode."
|
43 |
+
(voice_rab_diphone)
|
44 |
+
(set! email_previous_t2w_func token_to_words)
|
45 |
+
(set! english_token_to_words email_token_to_words)
|
46 |
+
(set! token_to_words english_token_to_words)
|
47 |
+
(set! email_in_quote nil))
|
48 |
+
|
49 |
+
(define (email_exit_func)
|
50 |
+
"(email_exit_func)
|
51 |
+
Called on exit email text mode."
|
52 |
+
(set! english_token_to_words email_previous_t2w_func)
|
53 |
+
(set! token_to_words english_token_to_words))
|
54 |
+
|
55 |
+
(define (email_token_to_words token name)
|
56 |
+
"(email_token_to_words utt token name)
|
57 |
+
Email spcific token to word rules."
|
58 |
+
(cond
|
59 |
+
((string-matches name "<.*@.*>")
|
60 |
+
(append
|
61 |
+
(email_previous_t2w_func token
|
62 |
+
(string-after (string-before name "@") "<"))
|
63 |
+
(cons
|
64 |
+
"at"
|
65 |
+
(email_previous_t2w_func token
|
66 |
+
(string-before (string-after name "@") ">")))))
|
67 |
+
((and (string-matches name ">")
|
68 |
+
(string-matches (item.feat token "whitespace")
|
69 |
+
"[ \t\n]*\n *"))
|
70 |
+
(voice_cmu_us_awb_cg)
|
71 |
+
nil ;; return nothing to say
|
72 |
+
)
|
73 |
+
(t ;; for all other cases
|
74 |
+
(if (string-matches (item.feat token "whitespace")
|
75 |
+
".*\n[ \n]*")
|
76 |
+
(voice_rab_diphone))
|
77 |
+
(email_previous_t2w_func token name))))
|
78 |
+
|
79 |
+
(set! tts_text_modes
|
80 |
+
(cons
|
81 |
+
(list
|
82 |
+
'email ;; mode name
|
83 |
+
(list ;; email mode params
|
84 |
+
(list 'init_func email_init_func)
|
85 |
+
(list 'exit_func email_exit_func)
|
86 |
+
'(filter "email_filter")))
|
87 |
+
tts_text_modes))
|
88 |
+
|
89 |
+
(provide 'email-mode)
|
CosyVoice-ttsfrd/resource/festival/engmorph.scm
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Alan W Black
|
34 |
+
;;; Date: December 1997
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;;
|
37 |
+
;;; THIS IS EXPERIMENTAL AND DOES *NOT* WORK
|
38 |
+
;;;
|
39 |
+
;;; Koskenniemi-style context rewrite rules for English Morphographemics
|
40 |
+
;;; Basically splits words into their (potential) morphemes.
|
41 |
+
;;;
|
42 |
+
;;; Based (roughly) on the rules in "Computational Morphology"
|
43 |
+
;;; Ritchie et al. MIT Press 1992.
|
44 |
+
;;;
|
45 |
+
;;; This is not a Scheme file and can't be loaded and evaluated
|
46 |
+
;;; It is designed for use with the wfst tools in the speech tools
|
47 |
+
;;; e.g. wfst_build -type kk -o engmorph.wfst -detmin engmorph.scm
|
48 |
+
;;;
|
49 |
+
|
50 |
+
(KKrules
|
51 |
+
engmorph
|
52 |
+
(Alphabets
|
53 |
+
;; Input Alphabet
|
54 |
+
(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 #)
|
55 |
+
;; Output Alphabet
|
56 |
+
(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 + #)
|
57 |
+
)
|
58 |
+
(Sets
|
59 |
+
(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)
|
60 |
+
)
|
61 |
+
(Rules
|
62 |
+
;; The basic rules
|
63 |
+
( a => nil --- nil)
|
64 |
+
( b => nil --- nil)
|
65 |
+
( c => nil --- nil)
|
66 |
+
( d => nil --- nil)
|
67 |
+
( e => nil --- nil)
|
68 |
+
( f => nil --- nil)
|
69 |
+
( g => nil --- nil)
|
70 |
+
( h => nil --- nil)
|
71 |
+
( i => nil --- nil)
|
72 |
+
( j => nil --- nil)
|
73 |
+
( k => nil --- nil)
|
74 |
+
( l => nil --- nil)
|
75 |
+
( m => nil --- nil)
|
76 |
+
( n => nil --- nil)
|
77 |
+
( o => nil --- nil)
|
78 |
+
( p => nil --- nil)
|
79 |
+
( q => nil --- nil)
|
80 |
+
( r => nil --- nil)
|
81 |
+
( s => nil --- nil)
|
82 |
+
( t => nil --- nil)
|
83 |
+
( u => nil --- nil)
|
84 |
+
( v => nil --- nil)
|
85 |
+
( w => nil --- nil)
|
86 |
+
( x => nil --- nil)
|
87 |
+
( y => nil --- nil)
|
88 |
+
( z => nil --- nil)
|
89 |
+
( # => nil --- nil)
|
90 |
+
; ( _epsilon_/+ => (or LET _epsilon_/e ) --- (LET))
|
91 |
+
( _epsilon_/+ => (or LET _epsilon_/e) --- nil)
|
92 |
+
|
93 |
+
;; The rules that do interesting things
|
94 |
+
|
95 |
+
;; Epenthesis
|
96 |
+
;; churches -> church+s
|
97 |
+
;; boxes -> box+s
|
98 |
+
(e/+ <=> (or (s h) (or s x z) (i/y) (c h))
|
99 |
+
---
|
100 |
+
(s))
|
101 |
+
;; Gemination
|
102 |
+
(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 )
|
103 |
+
---
|
104 |
+
((or a e i o u)))
|
105 |
+
(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 )
|
106 |
+
---
|
107 |
+
((or a e i o u)))
|
108 |
+
(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 )
|
109 |
+
---
|
110 |
+
((or a e i o u)))
|
111 |
+
(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 )
|
112 |
+
---
|
113 |
+
((or a e i o u)))
|
114 |
+
(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 )
|
115 |
+
---
|
116 |
+
((or a e i o u)))
|
117 |
+
(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 )
|
118 |
+
---
|
119 |
+
((or a e i o u)))
|
120 |
+
(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 )
|
121 |
+
---
|
122 |
+
((or a e i o u)))
|
123 |
+
(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 )
|
124 |
+
---
|
125 |
+
((or a e i o u)))
|
126 |
+
(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 )
|
127 |
+
---
|
128 |
+
((or a e i o u)))
|
129 |
+
(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 )
|
130 |
+
---
|
131 |
+
((or a e i o u)))
|
132 |
+
(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 )
|
133 |
+
---
|
134 |
+
((or a e i o u)))
|
135 |
+
(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 )
|
136 |
+
---
|
137 |
+
((or a e i o u)))
|
138 |
+
;; tries->try+s
|
139 |
+
( i/y <=> ((or b c d f g h j k l m n p q r s t v w x z))
|
140 |
+
---
|
141 |
+
((or ( e/+ s )
|
142 |
+
( _epsilon_/+ (or a d e f h i l m n o p s w y)))))
|
143 |
+
;; Elision
|
144 |
+
;; moved -> move+ed
|
145 |
+
(_epsilon_/e <=>
|
146 |
+
((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))
|
147 |
+
---
|
148 |
+
( _epsilon_/+ (or a e i o u )))
|
149 |
+
|
150 |
+
)
|
151 |
+
)
|
CosyVoice-ttsfrd/resource/festival/engmorphsyn.scm
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; Author: Alan W Black
|
34 |
+
;;; Date: December 1997
|
35 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
36 |
+
;;;
|
37 |
+
;;; THIS IS EXPERIMENTAL AND DOES *NOT* WORK
|
38 |
+
;;;
|
39 |
+
;;;
|
40 |
+
;;; An English morpho-syntax finite-state grammar
|
41 |
+
;;; This is used for morphological decomposition of unknown words
|
42 |
+
;;; specifically (only) words that are not found in the lexicon.
|
43 |
+
;;; This idea is that when an unknown word is found an attempt is made
|
44 |
+
;;; to see if it contains any well known morphological inflections or
|
45 |
+
;;; derivations, if so a better use of LTS can be made on the root, of
|
46 |
+
;;; none are found this
|
47 |
+
;;;
|
48 |
+
;;;
|
49 |
+
;;; Based on "Analysis of Unknown Words through Morphological
|
50 |
+
;;; Decomposition", Black, van de Plassche, Willians, European ACL 91.
|
51 |
+
;;; with the anyword matcher from a question by Lauri Karttunen after
|
52 |
+
;;; the talk.
|
53 |
+
;;;
|
54 |
+
;;; The suffixes and finite-state morph-syntax grammar is based
|
55 |
+
;;; (very roughly) on the rules in "Computational Morphology"
|
56 |
+
;;; Ritchie et al. MIT Press 1992.
|
57 |
+
;;;
|
58 |
+
;;; Can be compiled with
|
59 |
+
;;; wfst_build -type rg -o engmorphsyn.wfst -detmin engmorphsyn.scm
|
60 |
+
;;;
|
61 |
+
;;; The result can be combined with the morphographemic rules
|
62 |
+
;;; with
|
63 |
+
;;; wfst_build -type compose engmorph.wfst engmorphsyn.wfst -detmin -o engstemmer.wfst
|
64 |
+
;;;
|
65 |
+
;;; echo "# b o x e/+ s #" | wfst_run -wfst engstemmer.wfst -recog
|
66 |
+
;;; state 0 #/# -> 1
|
67 |
+
;;; state 1 b/b -> 3
|
68 |
+
;;; state 3 o/o -> 17
|
69 |
+
;;; state 17 x/x -> 14
|
70 |
+
;;; state 14 e/+ -> 36
|
71 |
+
;;; state 36 s/s -> 34
|
72 |
+
;;; state 34 #/# -> 16
|
73 |
+
;;; OK.
|
74 |
+
;;; echo "# b o x e s #" | wfst_run -wfst engstemmer.wfst -recog
|
75 |
+
;;; state 0 #/# -> 1
|
76 |
+
;;; state 1 b/b -> 3
|
77 |
+
;;; state 3 o/o -> 17
|
78 |
+
;;; state 17 x/x -> 14
|
79 |
+
;;; state 14 e/e -> 22
|
80 |
+
;;; state 22 s/s -> -1
|
81 |
+
|
82 |
+
(RegularGrammar
|
83 |
+
engsuffixmorphosyntax
|
84 |
+
;; Sets
|
85 |
+
(
|
86 |
+
(V a e i o u y)
|
87 |
+
(C b c d f g h j k l m n p q r s t v w x y z)
|
88 |
+
)
|
89 |
+
;; Rules
|
90 |
+
|
91 |
+
(
|
92 |
+
;; A word *must* have a suffix to be recognized
|
93 |
+
(Word -> # Syls Suffix )
|
94 |
+
(Word -> # Syls End )
|
95 |
+
|
96 |
+
;; This matches any string of characters that contains at least one vowel
|
97 |
+
(Syls -> Syl Syls )
|
98 |
+
(Syls -> Syl )
|
99 |
+
(Syl -> Cs V Cs )
|
100 |
+
(Cs -> C Cs )
|
101 |
+
(Cs -> )
|
102 |
+
|
103 |
+
(Suffix -> VerbSuffix )
|
104 |
+
(Suffix -> NounSuffix )
|
105 |
+
(Suffix -> AdjSuffix )
|
106 |
+
(VerbSuffix -> VerbFinal End )
|
107 |
+
(VerbSuffix -> VerbtoNoun NounSuffix )
|
108 |
+
(VerbSuffix -> VerbtoNoun End )
|
109 |
+
(VerbSuffix -> VerbtoAdj AdjSuffix )
|
110 |
+
(VerbSuffix -> VerbtoAdj End )
|
111 |
+
(NounSuffix -> NounFinal End )
|
112 |
+
(NounSuffix -> NountoNoun NounSuffix )
|
113 |
+
(NounSuffix -> NountoNoun End )
|
114 |
+
(NounSuffix -> NountoAdj AdjSuffix )
|
115 |
+
(NounSuffix -> NountoAdj End )
|
116 |
+
(NounSuffix -> NountoVerb VerbSuffix )
|
117 |
+
(NounSuffix -> NountoVerb End )
|
118 |
+
(AdjSuffix -> AdjFinal End )
|
119 |
+
(AdjSuffix -> AdjtoAdj AdjSuffix)
|
120 |
+
(AdjSuffix -> AdjtoAdj End)
|
121 |
+
(AdjSuffix -> AdjtoAdv End) ;; isn't any Adv to anything
|
122 |
+
|
123 |
+
(End -> # ) ;; word boundary symbol *always* present
|
124 |
+
|
125 |
+
(VerbFinal -> + e d)
|
126 |
+
(VerbFinal -> + i n g)
|
127 |
+
(VerbFinal -> + s)
|
128 |
+
|
129 |
+
(VerbtoNoun -> + e r)
|
130 |
+
(VerbtoNoun -> + e s s)
|
131 |
+
(VerbtoNoun -> + a t i o n)
|
132 |
+
(VerbtoNoun -> + i n g)
|
133 |
+
(VerbtoNoun -> + m e n t)
|
134 |
+
|
135 |
+
(VerbtoAdj -> + a b l e)
|
136 |
+
|
137 |
+
(NounFinal -> + s)
|
138 |
+
|
139 |
+
(NountoNoun -> + i s m)
|
140 |
+
(NountoNoun -> + i s t)
|
141 |
+
(NountoNoun -> + s h i p)
|
142 |
+
|
143 |
+
(NountoAdj -> + l i k e)
|
144 |
+
(NountoAdj -> + l e s s)
|
145 |
+
(NountoAdj -> + i s h)
|
146 |
+
(NountoAdj -> + o u s)
|
147 |
+
|
148 |
+
(NountoVerb -> + i f y)
|
149 |
+
(NountoVerb -> + i s e)
|
150 |
+
(NountoVerb -> + i z e)
|
151 |
+
|
152 |
+
(AdjFinal -> + e r)
|
153 |
+
(AdjFinal -> + e s t)
|
154 |
+
|
155 |
+
(AdjtoAdj -> + i s h)
|
156 |
+
(AdjtoAdv -> + l y)
|
157 |
+
(AdjtoNoun -> + n e s s)
|
158 |
+
(AdjtoVerb -> + i s e)
|
159 |
+
(AdjtoVerb -> + i z e)
|
160 |
+
|
161 |
+
)
|
162 |
+
)
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
|
169 |
+
|
170 |
+
|
CosyVoice-ttsfrd/resource/festival/f2bdurtreeZ.scm
ADDED
@@ -0,0 +1,869 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; First attempt at a tree to learn durations. Although
|
35 |
+
;;; it was trained from F2B and the radio phone set should
|
36 |
+
;;; work for others that are decalred with the same phone
|
37 |
+
;;; features
|
38 |
+
;;;
|
39 |
+
|
40 |
+
;; in ancient items (not on independent data)
|
41 |
+
;; RMSE 0.821086 Correlation is 0.573693 Mean (abs) Error 0.612327 (0.547034)
|
42 |
+
|
43 |
+
;; on independent test data
|
44 |
+
;; RMSE 0.8054 Correlation is 0.5327 Mean (abs) Error 0.6073 (0.5290)
|
45 |
+
|
46 |
+
(set! f2b_duration_cart_tree
|
47 |
+
'
|
48 |
+
((name is #)
|
49 |
+
((emph_sil is +)
|
50 |
+
((0.0 -0.5))
|
51 |
+
((R:Segment.p.R:SylStructure.parent.parent.pbreak is BB)
|
52 |
+
((0.0 2.0))
|
53 |
+
((0.0 0.0))))
|
54 |
+
((R:SylStructure.parent.accented is 0)
|
55 |
+
((R:Segment.p.ph_ctype is 0)
|
56 |
+
((R:Segment.n.ph_cplace is 0)
|
57 |
+
((ph_ctype is n)
|
58 |
+
((R:SylStructure.parent.position_type is initial)
|
59 |
+
((ph_cplace is a)
|
60 |
+
((0.675606 -0.068741))
|
61 |
+
((0.674321 0.204279)))
|
62 |
+
((ph_cplace is l)
|
63 |
+
((0.688993 -0.124997))
|
64 |
+
((R:SylStructure.parent.syl_out < 10)
|
65 |
+
((0.610881 -0.394451))
|
66 |
+
((0.664504 -0.603196)))))
|
67 |
+
((ph_ctype is r)
|
68 |
+
((lisp_onset_glide is 0)
|
69 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
70 |
+
((0.949991 0.619256))
|
71 |
+
((1.05066 0.979668)))
|
72 |
+
((0.858728 0.457972)))
|
73 |
+
((R:SylStructure.parent.position_type is single)
|
74 |
+
((syl_initial is 0)
|
75 |
+
((ph_ctype is s)
|
76 |
+
((0.692981 -0.788933))
|
77 |
+
((0.834878 -0.116988)))
|
78 |
+
((R:SylStructure.parent.syl_out < 9.4)
|
79 |
+
((0.777932 0.357818))
|
80 |
+
((0.852909 0.115478))))
|
81 |
+
((R:Segment.n.ph_vrnd is +)
|
82 |
+
((ph_ctype is s)
|
83 |
+
((0.81305 0.87399))
|
84 |
+
((0.65978 0.418928)))
|
85 |
+
((R:SylStructure.parent.position_type is final)
|
86 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.3)
|
87 |
+
((0.71613 -0.2888))
|
88 |
+
((0.642029 0.0624649)))
|
89 |
+
((R:Segment.nn.ph_cplace is a)
|
90 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
91 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
92 |
+
((R:SylStructure.parent.position_type is initial)
|
93 |
+
((0.854092 0.384456))
|
94 |
+
((0.769274 0.10705)))
|
95 |
+
((lisp_coda_stop is 0)
|
96 |
+
((0.571763 0.0755348))
|
97 |
+
((0.632928 -0.11117))))
|
98 |
+
((lisp_coda_stop is 0)
|
99 |
+
((R:SylStructure.parent.syl_out < 8.6)
|
100 |
+
((0.555092 0.30006))
|
101 |
+
((0.552673 -0.0263481)))
|
102 |
+
((0.903186 0.519185))))
|
103 |
+
((R:Segment.nn.ph_cplace is p)
|
104 |
+
((0.563915 0.204967))
|
105 |
+
((R:Segment.nn.ph_cvox is -)
|
106 |
+
((ph_ctype is s)
|
107 |
+
((0.67653 0.227681))
|
108 |
+
((0.550623 0.435079)))
|
109 |
+
((R:SylStructure.parent.position_type is initial)
|
110 |
+
((0.93428 0.732003))
|
111 |
+
((0.84114 0.423214)))))))))))
|
112 |
+
((R:Segment.n.ph_ctype is s)
|
113 |
+
((ph_ctype is s)
|
114 |
+
((0.693376 -1.02719))
|
115 |
+
((R:Segment.n.ph_cplace is v)
|
116 |
+
((ph_ctype is r)
|
117 |
+
((0.539799 -0.344524))
|
118 |
+
((0.858576 0.154275)))
|
119 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
|
120 |
+
((lisp_onset_glide is 0)
|
121 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
122 |
+
((ph_ctype is n)
|
123 |
+
((R:Segment.nn.ph_cplace is a)
|
124 |
+
((0.64604 -0.643797))
|
125 |
+
((0.739746 -0.450649)))
|
126 |
+
((ph_ctype is f)
|
127 |
+
((0.657043 -0.462107))
|
128 |
+
((0.798438 -0.19569))))
|
129 |
+
((R:SylStructure.parent.syl_out < 8.4)
|
130 |
+
((lisp_coda_stop is 0)
|
131 |
+
((0.766789 -0.0484781))
|
132 |
+
((0.717203 -0.322113)))
|
133 |
+
((R:SylStructure.parent.position_type is single)
|
134 |
+
((0.508168 -0.412874))
|
135 |
+
((0.703458 -0.291121)))))
|
136 |
+
((0.574827 -0.65022)))
|
137 |
+
((0.801765 -0.120813)))))
|
138 |
+
((ph_ctype is n)
|
139 |
+
((R:Segment.n.ph_ctype is f)
|
140 |
+
((R:Segment.n.ph_cplace is b)
|
141 |
+
((0.797652 0.623764))
|
142 |
+
((R:Segment.n.ph_cplace is a)
|
143 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
144 |
+
((0.675567 0.288251))
|
145 |
+
((0.854197 0.626272)))
|
146 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
147 |
+
((0.660394 -0.225466))
|
148 |
+
((0.65275 0.0487195)))))
|
149 |
+
((R:Segment.n.ph_ctype is n)
|
150 |
+
((0.685613 -0.512227))
|
151 |
+
((0.736366 -0.104066))))
|
152 |
+
((R:Segment.n.ph_ctype is r)
|
153 |
+
((R:SylStructure.parent.position_type is initial)
|
154 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.1)
|
155 |
+
((0.98185 0.152471))
|
156 |
+
((0.851907 0.788208)))
|
157 |
+
((ph_ctype is f)
|
158 |
+
((0.76106 0.406474))
|
159 |
+
((R:Segment.n.ph_cplace is a)
|
160 |
+
((1.01348 -0.0422549))
|
161 |
+
((0.786777 -0.714839)))))
|
162 |
+
((ph_cplace is b)
|
163 |
+
((R:SylStructure.parent.syl_out < 10.4)
|
164 |
+
((0.799025 0.0992277))
|
165 |
+
((0.851068 -0.115896)))
|
166 |
+
((R:Segment.n.ph_cplace is p)
|
167 |
+
((0.669855 -0.655488))
|
168 |
+
((ph_ctype is r)
|
169 |
+
((R:Segment.n.ph_cplace is a)
|
170 |
+
((1.00772 0.130892))
|
171 |
+
((0.635981 -0.35826)))
|
172 |
+
((R:Segment.n.ph_ctype is l)
|
173 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
174 |
+
((0.746089 -0.286007))
|
175 |
+
((0.89158 0.154432)))
|
176 |
+
((R:Segment.n.ph_cplace is b)
|
177 |
+
((1.04971 -0.0449782))
|
178 |
+
((R:SylStructure.parent.syl_out < 9.8)
|
179 |
+
((R:Segment.n.ph_ctype is f)
|
180 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
181 |
+
((1.4144 0.143658))
|
182 |
+
((0.781116 -0.281483)))
|
183 |
+
((ph_vlng is 0)
|
184 |
+
((0.755959 -0.33462))
|
185 |
+
((0.81024 -0.615287))))
|
186 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
187 |
+
((0.7426 -0.24342))
|
188 |
+
((R:Segment.n.ph_ctype is f)
|
189 |
+
((R:Segment.n.ph_cplace is a)
|
190 |
+
((R:SylStructure.parent.position_type is single)
|
191 |
+
((0.578639 -0.322097))
|
192 |
+
((0.55826 -0.663238)))
|
193 |
+
((0.616575 -0.713688)))
|
194 |
+
((0.759572 -0.314116))))))))))))))
|
195 |
+
((R:Segment.n.ph_ctype is f)
|
196 |
+
((ph_ctype is 0)
|
197 |
+
((R:Segment.p.ph_ctype is r)
|
198 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.2)
|
199 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
200 |
+
((0.733193 -0.180968))
|
201 |
+
((0.563111 -0.467934)))
|
202 |
+
((0.426244 -0.758137)))
|
203 |
+
((ph_vlng is a)
|
204 |
+
((R:Segment.n.ph_cplace is b)
|
205 |
+
((R:Segment.nn.ph_cvox is +)
|
206 |
+
((0.680234 0.059855))
|
207 |
+
((R:SylStructure.parent.position_type is single)
|
208 |
+
((0.980851 0.443893))
|
209 |
+
((0.715307 0.112865))))
|
210 |
+
((R:Segment.p.ph_cplace is a)
|
211 |
+
((0.851224 0.695863))
|
212 |
+
((R:Segment.nn.ph_cvox is -)
|
213 |
+
((0.75892 0.195772))
|
214 |
+
((0.630633 0.478738)))))
|
215 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
216 |
+
((R:Segment.n.ph_cplace is b)
|
217 |
+
((R:Segment.nn.ph_cplace is 0)
|
218 |
+
((0.815979 -0.477579))
|
219 |
+
((0.851491 -0.168622)))
|
220 |
+
((R:SylStructure.parent.position_type is single)
|
221 |
+
((R:Segment.nn.ph_cvox is +)
|
222 |
+
((1.14265 0.717697))
|
223 |
+
((0.814726 0.291482)))
|
224 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
225 |
+
((0.512322 -0.0749096))
|
226 |
+
((0.488216 0.112774)))))
|
227 |
+
((R:SylStructure.parent.position_type is final)
|
228 |
+
((0.693071 -0.200708))
|
229 |
+
((R:Segment.p.ph_cvox is +)
|
230 |
+
((0.489147 -0.378728))
|
231 |
+
((0.695396 -0.525028)))))))
|
232 |
+
((ph_vlng is s)
|
233 |
+
((0.464234 -0.162706))
|
234 |
+
((R:Segment.p.ph_cvox is +)
|
235 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.2)
|
236 |
+
((0.566845 -0.616918))
|
237 |
+
((0.92747 -0.26777)))
|
238 |
+
((0.632833 -0.858295)))))
|
239 |
+
((R:Segment.n.ph_vrnd is 0)
|
240 |
+
((R:Segment.p.ph_ctype is r)
|
241 |
+
((ph_vlng is 0)
|
242 |
+
((0.845308 -0.23426))
|
243 |
+
((R:SylStructure.parent.syl_out < 4.8)
|
244 |
+
((R:Segment.n.ph_ctype is n)
|
245 |
+
((0.484602 -0.850587))
|
246 |
+
((0.535398 -0.586652)))
|
247 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
248 |
+
((ph_vlng is a)
|
249 |
+
((0.368898 -0.799533))
|
250 |
+
((lisp_coda_stop is 0)
|
251 |
+
((0.387923 -1.11431))
|
252 |
+
((0.407377 -0.859849))))
|
253 |
+
((R:Segment.n.ph_cplace is a)
|
254 |
+
((ph_vlng is a)
|
255 |
+
((0.382367 -0.787669))
|
256 |
+
((0.522121 -0.687376)))
|
257 |
+
((0.361185 -0.853639))))))
|
258 |
+
((ph_vlng is a)
|
259 |
+
((ph_ctype is 0)
|
260 |
+
((R:Segment.n.ph_ctype is s)
|
261 |
+
((R:Segment.p.ph_cvox is +)
|
262 |
+
((R:Segment.p.ph_cplace is d)
|
263 |
+
((0.502849 -0.232866))
|
264 |
+
((R:SylStructure.parent.position_type is initial)
|
265 |
+
((0.641714 -0.0545426))
|
266 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.6)
|
267 |
+
((0.613913 0.373746))
|
268 |
+
((R:Segment.n.ph_cplace is v)
|
269 |
+
((0.581158 0.310101))
|
270 |
+
((0.628758 -0.068165))))))
|
271 |
+
((R:SylStructure.parent.position_type is mid)
|
272 |
+
((0.459281 -0.553794))
|
273 |
+
((0.728208 -0.138806))))
|
274 |
+
((R:Segment.p.ph_cplace is v)
|
275 |
+
((0.32179 -0.728364))
|
276 |
+
((R:Segment.p.ph_cplace is l)
|
277 |
+
((0.562971 -0.550272))
|
278 |
+
((R:SylStructure.parent.position_type is initial)
|
279 |
+
((0.937298 -0.0246324))
|
280 |
+
((R:Segment.p.ph_cvox is +)
|
281 |
+
((R:Segment.n.ph_ctype is n)
|
282 |
+
((R:Segment.n.ph_cplace is a)
|
283 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
284 |
+
((0.434029 -0.404793))
|
285 |
+
((1.05548 -0.103717)))
|
286 |
+
((0.408372 -0.556145)))
|
287 |
+
((0.712335 -0.118776)))
|
288 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
289 |
+
((0.379593 -0.658075))
|
290 |
+
((0.549207 -0.494876))))))))
|
291 |
+
((R:SylStructure.parent.position_type is final)
|
292 |
+
((0.597124 -0.649729))
|
293 |
+
((0.628822 -1.03743))))
|
294 |
+
((ph_ctype is s)
|
295 |
+
((R:Segment.n.ph_ctype is r)
|
296 |
+
((R:SylStructure.parent.syl_out < 8.4)
|
297 |
+
((0.760328 0.31651))
|
298 |
+
((0.738363 -0.0177161)))
|
299 |
+
((R:Segment.n.ph_ctype is l)
|
300 |
+
((0.649328 -0.108791))
|
301 |
+
((0.594945 -0.712753))))
|
302 |
+
((ph_vlng is s)
|
303 |
+
((R:Segment.n.ph_ctype is s)
|
304 |
+
((R:Segment.n.ph_cplace is v)
|
305 |
+
((R:Segment.nn.ph_cplace is a)
|
306 |
+
((0.583211 0.0724331))
|
307 |
+
((0.434605 -0.229857)))
|
308 |
+
((R:Segment.p.ph_cplace is a)
|
309 |
+
((R:SylStructure.parent.position_type is single)
|
310 |
+
((0.785502 -0.00061573))
|
311 |
+
((0.544995 -0.432984)))
|
312 |
+
((R:Segment.nn.ph_cplace is 0)
|
313 |
+
((0.507071 -0.715041))
|
314 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
315 |
+
((0.506404 -0.573733))
|
316 |
+
((0.62466 -0.3356))))))
|
317 |
+
((R:Segment.p.ph_cplace is l)
|
318 |
+
((0.571756 -0.819693))
|
319 |
+
((lisp_coda_stop is 0)
|
320 |
+
((R:SylStructure.parent.position_type is initial)
|
321 |
+
((0.906891 -0.352911))
|
322 |
+
((R:Segment.n.ph_ctype is r)
|
323 |
+
((0.620335 -0.445714))
|
324 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.5)
|
325 |
+
((R:Segment.p.ph_cvox is +)
|
326 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
327 |
+
((0.484057 -0.781483))
|
328 |
+
((0.653917 -0.615429)))
|
329 |
+
((0.754814 -0.531845)))
|
330 |
+
((0.493988 -0.881596)))))
|
331 |
+
((0.792979 -0.32648)))))
|
332 |
+
((R:Segment.p.ph_cvox is +)
|
333 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
334 |
+
((lisp_coda_stop is 0)
|
335 |
+
((0.913526 -0.195111))
|
336 |
+
((0.56564 -0.64867)))
|
337 |
+
((R:SylStructure.parent.position_type is single)
|
338 |
+
((R:Segment.n.ph_cplace is a)
|
339 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
340 |
+
((0.790882 -0.488954))
|
341 |
+
((0.780221 -0.185138)))
|
342 |
+
((0.487794 -0.691338)))
|
343 |
+
((R:Segment.p.ph_ctype is n)
|
344 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
345 |
+
((0.595729 -0.771698))
|
346 |
+
((0.57908 -1.06592)))
|
347 |
+
((R:Segment.pp.ph_vfront is 0)
|
348 |
+
((0.591417 -0.784735))
|
349 |
+
((0.486298 -0.436971))))))
|
350 |
+
((ph_vlng is 0)
|
351 |
+
((0.629869 -0.960652))
|
352 |
+
((R:Segment.n.ph_ctype is r)
|
353 |
+
((R:Segment.nn.ph_cplace is 0)
|
354 |
+
((0.591783 -0.671576))
|
355 |
+
((R:Segment.nn.ph_cvox is +)
|
356 |
+
((0.365135 -0.822844))
|
357 |
+
((0.428573 -0.988434))))
|
358 |
+
((lisp_coda_stop is 0)
|
359 |
+
((R:Segment.p.ph_cplace is a)
|
360 |
+
((R:Segment.n.ph_cplace is a)
|
361 |
+
((0.428189 -0.730057))
|
362 |
+
((0.337443 -0.861764)))
|
363 |
+
((0.57354 -0.494602)))
|
364 |
+
((0.497606 -0.414451))))))))))
|
365 |
+
((ph_vlng is l)
|
366 |
+
((R:Segment.pp.ph_vfront is 1)
|
367 |
+
((0.937199 0.833877))
|
368 |
+
((R:SylStructure.parent.syl_out < 12.7)
|
369 |
+
((0.729202 0.344121))
|
370 |
+
((0.71086 0.101855))))
|
371 |
+
((syl_initial is 0)
|
372 |
+
((R:Segment.p.ph_ctype is r)
|
373 |
+
((R:Segment.nn.ph_cplace is a)
|
374 |
+
((0.844815 0.175273))
|
375 |
+
((0.662523 -0.297527)))
|
376 |
+
((ph_vlng is 0)
|
377 |
+
((R:Segment.p.ph_ctype is s)
|
378 |
+
((R:SylStructure.parent.syl_out < 14.6)
|
379 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
380 |
+
((0.665332 -0.610529))
|
381 |
+
((0.42276 -0.848942)))
|
382 |
+
((0.427946 -0.980726)))
|
383 |
+
((R:SylStructure.parent.position_type is single)
|
384 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
385 |
+
((0.523367 -0.825038))
|
386 |
+
((0.635654 -0.535303)))
|
387 |
+
((R:SylStructure.parent.position_type is final)
|
388 |
+
((0.515996 -0.707614))
|
389 |
+
((ph_cplace is a)
|
390 |
+
((lisp_coda_stop is 0)
|
391 |
+
((0.689738 0.0446601))
|
392 |
+
((0.698347 -0.268593)))
|
393 |
+
((R:Segment.nn.ph_cplace is a)
|
394 |
+
((0.706504 -0.659172))
|
395 |
+
((0.775589 -0.201769)))))))
|
396 |
+
((0.79472 -0.0539192))))
|
397 |
+
((ph_ctype is s)
|
398 |
+
((R:SylStructure.parent.position_type is single)
|
399 |
+
((R:Segment.p.ph_ctype is f)
|
400 |
+
((0.641302 0.532411))
|
401 |
+
((R:Segment.n.ph_vrnd is +)
|
402 |
+
((0.800655 0.325651))
|
403 |
+
((0.894711 0.0487864))))
|
404 |
+
((R:SylStructure.parent.position_type is initial)
|
405 |
+
((R:Segment.nn.ph_cplace is a)
|
406 |
+
((0.618082 -0.0190591))
|
407 |
+
((0.733637 0.156329)))
|
408 |
+
((ph_cplace is a)
|
409 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.3)
|
410 |
+
((0.372869 -0.0827845))
|
411 |
+
((0.494988 0.0882778)))
|
412 |
+
((0.593526 -0.335404)))))
|
413 |
+
((R:Segment.p.ph_cvox is +)
|
414 |
+
((R:Segment.p.ph_ctype is n)
|
415 |
+
((R:SylStructure.parent.syl_out < 5.4)
|
416 |
+
((1.0207 -0.152517))
|
417 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
418 |
+
((0.711277 -0.513467))
|
419 |
+
((0.509207 -0.726794))))
|
420 |
+
((ph_cplace is g)
|
421 |
+
((0.545188 -0.568352))
|
422 |
+
((R:Segment.p.ph_cplace is a)
|
423 |
+
((ph_ctype is n)
|
424 |
+
((0.61149 -0.325094))
|
425 |
+
((R:SylStructure.parent.position_type is single)
|
426 |
+
((R:Segment.p.ph_ctype is r)
|
427 |
+
((0.525282 0.395446))
|
428 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
429 |
+
((0.85778 0.0760293))
|
430 |
+
((0.704055 0.290369))))
|
431 |
+
((R:Segment.pp.ph_vfront is 0)
|
432 |
+
((0.590093 0.136983))
|
433 |
+
((0.734563 -0.0570759)))))
|
434 |
+
((R:Segment.pp.ph_vfront is 2)
|
435 |
+
((0.519485 -0.477174))
|
436 |
+
((0.707546 -0.13584))))))
|
437 |
+
((R:SylStructure.parent.position_type is single)
|
438 |
+
((R:Segment.p.ph_ctype is f)
|
439 |
+
((0.797877 0.00462775))
|
440 |
+
((R:Segment.pp.ph_vfront is 1)
|
441 |
+
((0.852184 -0.259914))
|
442 |
+
((0.65313 -0.492506))))
|
443 |
+
((R:SylStructure.parent.position_type is initial)
|
444 |
+
((0.662516 -0.45585))
|
445 |
+
((lisp_onset_glide is 0)
|
446 |
+
((0.652534 -0.652428))
|
447 |
+
((0.482818 -0.885728))))))))))))
|
448 |
+
((syl_initial is 0)
|
449 |
+
((ph_cplace is 0)
|
450 |
+
((R:SylStructure.parent.position_type is single)
|
451 |
+
((R:Segment.n.ph_ctype is f)
|
452 |
+
((R:Segment.p.ph_cplace is a)
|
453 |
+
((R:Segment.n.ph_cplace is a)
|
454 |
+
((R:Segment.pp.ph_vfront is 0)
|
455 |
+
((1.06157 1.30945))
|
456 |
+
((1.12041 1.85843)))
|
457 |
+
((1.05622 0.921414)))
|
458 |
+
((R:Segment.nn.ph_cvox is -)
|
459 |
+
((1.03073 0.916168))
|
460 |
+
((1.06857 0.452851))))
|
461 |
+
((R:Segment.p.ph_ctype is r)
|
462 |
+
((R:Segment.n.ph_cplace is v)
|
463 |
+
((1.22144 0.672433))
|
464 |
+
((R:Segment.p.ph_cplace is l)
|
465 |
+
((0.859749 -0.315152))
|
466 |
+
((R:Segment.nn.ph_cvox is -)
|
467 |
+
((0.89862 0.131037))
|
468 |
+
((0.760033 -0.121252)))))
|
469 |
+
((R:SylStructure.parent.syl_out < 8.8)
|
470 |
+
((R:SylStructure.parent.syl_out < 0.8)
|
471 |
+
((1.06821 1.63716))
|
472 |
+
((R:Segment.n.ph_cplace is a)
|
473 |
+
((R:Segment.p.ph_cvox is +)
|
474 |
+
((1.04477 0.581686))
|
475 |
+
((R:Segment.nn.ph_cvox is +)
|
476 |
+
((0.769059 0.301576))
|
477 |
+
((0.953428 0.0764058))))
|
478 |
+
((R:Segment.p.ph_cplace is a)
|
479 |
+
((1.01367 0.507761))
|
480 |
+
((1.2827 0.945031)))))
|
481 |
+
((R:Segment.n.ph_cplace is l)
|
482 |
+
((0.618397 -0.0873608))
|
483 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
484 |
+
((R:Segment.p.ph_cvox is +)
|
485 |
+
((0.817182 0.477262))
|
486 |
+
((0.792181 -0.0592145)))
|
487 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
488 |
+
((R:SylStructure.parent.syl_out < 16)
|
489 |
+
((0.995411 0.497843))
|
490 |
+
((0.784087 0.152266)))
|
491 |
+
((1.11816 0.716352))))))))
|
492 |
+
((R:Segment.n.ph_ctype is f)
|
493 |
+
((R:SylStructure.parent.position_type is final)
|
494 |
+
((1.35724 1.06028))
|
495 |
+
((R:Segment.p.ph_ctype is r)
|
496 |
+
((R:SylStructure.parent.syl_out < 8.6)
|
497 |
+
((0.511716 -0.0833005))
|
498 |
+
((0.492142 -0.30212)))
|
499 |
+
((R:Segment.n.ph_cplace is b)
|
500 |
+
((0.53059 0.00266551))
|
501 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.3)
|
502 |
+
((ph_vlng is l)
|
503 |
+
((0.433396 0.821463))
|
504 |
+
((0.66915 0.415614)))
|
505 |
+
((0.501369 0.154721))))))
|
506 |
+
((R:SylStructure.parent.position_type is final)
|
507 |
+
((R:Segment.n.ph_ctype is s)
|
508 |
+
((1.03896 0.524706))
|
509 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
510 |
+
((1.15147 0.428386))
|
511 |
+
((R:Segment.p.ph_cplace is a)
|
512 |
+
((0.919929 0.0314637))
|
513 |
+
((0.716168 -0.366629)))))
|
514 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 4)
|
515 |
+
((0.816778 0.408786))
|
516 |
+
((lisp_onset_glide is 0)
|
517 |
+
((R:Segment.p.ph_ctype is n)
|
518 |
+
((R:Segment.n.ph_ctype is s)
|
519 |
+
((0.532911 -0.153851))
|
520 |
+
((0.633518 -0.762353)))
|
521 |
+
((R:Segment.p.ph_cvox is -)
|
522 |
+
((R:Segment.p.ph_cplace is g)
|
523 |
+
((0.618376 -0.593197))
|
524 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
525 |
+
((R:Segment.pp.ph_vfront is 0)
|
526 |
+
((R:Segment.n.ph_ctype is n)
|
527 |
+
((0.554085 -0.058903))
|
528 |
+
((R:Segment.p.ph_cplace is a)
|
529 |
+
((0.59842 -0.174458))
|
530 |
+
((0.585539 -0.349335))))
|
531 |
+
((0.500857 -0.416613)))
|
532 |
+
((R:SylStructure.parent.syl_out < 7)
|
533 |
+
((0.616683 -0.00213272))
|
534 |
+
((0.631444 -0.141773)))))
|
535 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
536 |
+
((0.5198 -0.151901))
|
537 |
+
((ph_vlng is s)
|
538 |
+
((0.677428 0.203522))
|
539 |
+
((0.780789 0.375429))))))
|
540 |
+
((R:Segment.nn.ph_cplace is a)
|
541 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
542 |
+
((0.594604 -0.27832))
|
543 |
+
((0.736114 -0.422756)))
|
544 |
+
((R:Segment.p.ph_cplace is a)
|
545 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
546 |
+
((0.512186 -0.732785))
|
547 |
+
((0.550759 -0.506471)))
|
548 |
+
((0.47297 -0.791841)))))))))
|
549 |
+
((R:Segment.p.ph_ctype is 0)
|
550 |
+
((R:SylStructure.parent.position_type is final)
|
551 |
+
((lisp_coda_stop is 0)
|
552 |
+
((ph_ctype is f)
|
553 |
+
((R:Segment.nn.ph_cplace is 0)
|
554 |
+
((1.00978 0.366105))
|
555 |
+
((0.80682 -0.0827529)))
|
556 |
+
((R:Segment.n.ph_cplace is a)
|
557 |
+
((R:Segment.nn.ph_cvox is -)
|
558 |
+
((1.07097 1.77503))
|
559 |
+
((1.14864 1.14754)))
|
560 |
+
((R:Segment.n.ph_vrnd is -)
|
561 |
+
((0.883474 0.286471))
|
562 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
563 |
+
((1.22264 0.884142))
|
564 |
+
((1.03401 0.658192))))))
|
565 |
+
((ph_cplace is a)
|
566 |
+
((R:SylStructure.parent.syl_out < 6.4)
|
567 |
+
((R:SylStructure.parent.syl_out < 0.6)
|
568 |
+
((1.07956 0.602849))
|
569 |
+
((1.12301 0.0555897)))
|
570 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
571 |
+
((0.898888 -0.17527))
|
572 |
+
((0.940932 0.274301))))
|
573 |
+
((1.10093 -0.68098))))
|
574 |
+
((R:Segment.n.ph_ctype is s)
|
575 |
+
((ph_cplace is v)
|
576 |
+
((0.639932 -1.33353))
|
577 |
+
((R:SylStructure.parent.position_type is single)
|
578 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
579 |
+
((lisp_coda_stop is 0)
|
580 |
+
((0.822882 -0.131692))
|
581 |
+
((0.971957 -0.385365)))
|
582 |
+
((R:Segment.nn.ph_cvox is -)
|
583 |
+
((1.06611 0.183678))
|
584 |
+
((lisp_coda_stop is 0)
|
585 |
+
((0.967183 0.0925019))
|
586 |
+
((0.876026 -0.230108)))))
|
587 |
+
((ph_ctype is f)
|
588 |
+
((R:SylStructure.parent.syl_out < 13)
|
589 |
+
((0.589198 -0.655594))
|
590 |
+
((0.476651 -0.926625)))
|
591 |
+
((R:SylStructure.parent.syl_out < 5)
|
592 |
+
((0.682936 -0.227662))
|
593 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
594 |
+
((R:Segment.nn.ph_cplace is a)
|
595 |
+
((0.447309 -0.700998))
|
596 |
+
((0.626113 -0.468853)))
|
597 |
+
((0.657893 -0.383607)))))))
|
598 |
+
((ph_ctype is r)
|
599 |
+
((R:Segment.nn.ph_cvox is -)
|
600 |
+
((1.15158 1.15233))
|
601 |
+
((R:Segment.n.ph_vrnd is -)
|
602 |
+
((1.05554 0.533749))
|
603 |
+
((0.955478 0.0841894))))
|
604 |
+
((ph_ctype is l)
|
605 |
+
((R:Segment.n.ph_ctype is 0)
|
606 |
+
((R:Segment.nn.ph_cplace is a)
|
607 |
+
((0.766431 0.28943))
|
608 |
+
((1.48633 1.09574)))
|
609 |
+
((R:SylStructure.parent.position_type is single)
|
610 |
+
((1.01777 0.474653))
|
611 |
+
((0.545859 -0.402743))))
|
612 |
+
((R:SylStructure.parent.syl_out < 4.8)
|
613 |
+
((R:Segment.n.ph_vc is +)
|
614 |
+
((ph_ctype is n)
|
615 |
+
((0.776645 -0.433859))
|
616 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
617 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
618 |
+
((0.776179 0.23435))
|
619 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.2)
|
620 |
+
((0.744272 -0.0859672))
|
621 |
+
((0.782605 0.115647))))
|
622 |
+
((0.626541 -0.167615))))
|
623 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
624 |
+
((1.28499 0.864144))
|
625 |
+
((ph_cplace is a)
|
626 |
+
((0.926103 0.0435837))
|
627 |
+
((0.839172 -0.189514)))))
|
628 |
+
((R:Segment.n.ph_ctype is n)
|
629 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.1)
|
630 |
+
((0.973489 -0.203415))
|
631 |
+
((0.777589 -0.849733)))
|
632 |
+
((ph_ctype is n)
|
633 |
+
((R:SylStructure.parent.position_type is initial)
|
634 |
+
((R:Segment.n.ph_vc is +)
|
635 |
+
((0.743482 -0.53384))
|
636 |
+
((0.619309 -0.0987861)))
|
637 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
638 |
+
((1.15555 0.0786295))
|
639 |
+
((1.06689 0.681662))))
|
640 |
+
((R:Segment.n.ph_ctype is r)
|
641 |
+
((R:SylStructure.parent.syl_out < 8.9)
|
642 |
+
((0.752079 -0.237421))
|
643 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
644 |
+
((0.664182 -0.041521))
|
645 |
+
((0.772712 0.103499))))
|
646 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
647 |
+
((R:SylStructure.parent.position_type is mid)
|
648 |
+
((R:SylStructure.parent.parent.word_numsyls < 3.3)
|
649 |
+
((0.715944 -0.275113))
|
650 |
+
((0.675729 0.202848)))
|
651 |
+
((R:Segment.n.ph_vrnd is -)
|
652 |
+
((R:SylStructure.parent.syl_out < 8.3)
|
653 |
+
((ph_ctype is s)
|
654 |
+
((0.82747 -0.116723))
|
655 |
+
((0.689586 -0.303909)))
|
656 |
+
((R:SylStructure.parent.syl_out < 17.7)
|
657 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
658 |
+
((0.659686 -0.621268))
|
659 |
+
((ph_cplace is a)
|
660 |
+
((0.861741 -0.285324))
|
661 |
+
((0.507102 -0.444082))))
|
662 |
+
((0.850664 -0.269084))))
|
663 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
664 |
+
((0.878643 -0.255833))
|
665 |
+
((0.98882 0.115252)))))
|
666 |
+
((ph_cplace is a)
|
667 |
+
((R:SylStructure.parent.syl_out < 13)
|
668 |
+
((0.850625 -0.289333))
|
669 |
+
((0.788154 -0.44844)))
|
670 |
+
((0.70482 -0.630276))))))))))))
|
671 |
+
((R:Segment.p.ph_ctype is l)
|
672 |
+
((R:SylStructure.parent.position_type is single)
|
673 |
+
((0.873748 -0.21639))
|
674 |
+
((lisp_coda_stop is 0)
|
675 |
+
((0.71002 0.428132))
|
676 |
+
((0.703501 0.015833))))
|
677 |
+
((ph_vlng is 0)
|
678 |
+
((R:Segment.p.ph_ctype is r)
|
679 |
+
((R:SylStructure.parent.position_type is initial)
|
680 |
+
((0.907151 -0.494409))
|
681 |
+
((ph_ctype is s)
|
682 |
+
((0.782539 -0.398555))
|
683 |
+
((R:Segment.p.ph_cplace is 0)
|
684 |
+
((0.767435 -0.298857))
|
685 |
+
((0.767046 0.151217)))))
|
686 |
+
((ph_cplace is a)
|
687 |
+
((R:Segment.n.ph_ctype is r)
|
688 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
689 |
+
((0.689367 0.0195991))
|
690 |
+
((0.64446 -0.256648)))
|
691 |
+
((R:Segment.n.ph_vc is +)
|
692 |
+
((ph_ctype is s)
|
693 |
+
((R:Segment.nn.ph_cvox is +)
|
694 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
695 |
+
((0.59482 -0.214443))
|
696 |
+
((0.745691 0.0292177)))
|
697 |
+
((0.523103 -0.391245)))
|
698 |
+
((R:Segment.p.ph_cvox is +)
|
699 |
+
((R:Segment.p.ph_cplace is a)
|
700 |
+
((0.524304 -0.428306))
|
701 |
+
((0.605117 -0.165604)))
|
702 |
+
((R:Segment.p.ph_ctype is f)
|
703 |
+
((0.491251 -0.455353))
|
704 |
+
((lisp_coda_stop is 0)
|
705 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
706 |
+
((0.175021 -1.02136))
|
707 |
+
((0.264113 -0.976809)))
|
708 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
709 |
+
((0.704803 -0.716976))
|
710 |
+
((0.300317 -0.924727)))))))
|
711 |
+
((ph_ctype is f)
|
712 |
+
((R:SylStructure.parent.syl_out < 13)
|
713 |
+
((R:Segment.n.ph_ctype is s)
|
714 |
+
((0.731994 -0.711044))
|
715 |
+
((0.768008 -0.415076)))
|
716 |
+
((0.691821 -0.803284)))
|
717 |
+
((R:Segment.nn.ph_cplace is 0)
|
718 |
+
((R:Segment.n.ph_cplace is a)
|
719 |
+
((0.569567 -0.993506))
|
720 |
+
((0.689849 -0.761696)))
|
721 |
+
((0.386818 -1.14744))))))
|
722 |
+
((R:Segment.p.seg_onsetcoda is coda)
|
723 |
+
((R:Segment.p.ph_cplace is a)
|
724 |
+
((0.746337 -0.866206))
|
725 |
+
((0.532751 -1.22185)))
|
726 |
+
((ph_cplace is l)
|
727 |
+
((0.74942 -0.820648))
|
728 |
+
((0.685988 -0.298146))))))
|
729 |
+
((0.812766 0.17291))))))
|
730 |
+
((R:SylStructure.parent.position_type is mid)
|
731 |
+
((ph_ctype is r)
|
732 |
+
((0.577775 -0.54714))
|
733 |
+
((R:Segment.n.ph_ctype is f)
|
734 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
735 |
+
((0.370448 0.00076407))
|
736 |
+
((0.460385 0.20631)))
|
737 |
+
((R:Segment.p.ph_cvox is -)
|
738 |
+
((ph_vlng is 0)
|
739 |
+
((0.615959 -0.57434))
|
740 |
+
((0.50852 -0.197814)))
|
741 |
+
((R:Segment.n.ph_ctype is 0)
|
742 |
+
((1.34281 0.477163))
|
743 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
744 |
+
((0.59975 -0.1342))
|
745 |
+
((0.640294 -0.32653)))))))
|
746 |
+
((R:Segment.n.ph_ctype is f)
|
747 |
+
((R:SylStructure.parent.position_type is initial)
|
748 |
+
((0.758739 0.311943))
|
749 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
750 |
+
((R:Segment.p.ph_ctype is f)
|
751 |
+
((1.28746 1.99771))
|
752 |
+
((R:Segment.pp.ph_vfront is 1)
|
753 |
+
((1.42474 1.76925))
|
754 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
755 |
+
((0.979414 1.37583))
|
756 |
+
((1.00321 1.06671)))))
|
757 |
+
((1.15222 0.852004))))
|
758 |
+
((R:Segment.p.ph_ctype is 0)
|
759 |
+
((R:Segment.n.ph_ctype is s)
|
760 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
761 |
+
((0.664807 -0.0880262))
|
762 |
+
((0.573589 0.217234)))
|
763 |
+
((ph_ctype is s)
|
764 |
+
((ph_cplace is l)
|
765 |
+
((0.800348 0.66579))
|
766 |
+
((ph_cplace is a)
|
767 |
+
((0.859133 1.46854))
|
768 |
+
((R:SylStructure.parent.position_type is single)
|
769 |
+
((0.692229 1.23671))
|
770 |
+
((0.552426 0.923928)))))
|
771 |
+
((R:SylStructure.parent.syl_out < 9.2)
|
772 |
+
((R:SylStructure.parent.position_type is single)
|
773 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
774 |
+
((1.01673 1.26824))
|
775 |
+
((0.848274 0.92375)))
|
776 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 1)
|
777 |
+
((R:Segment.nn.ph_cplace is a)
|
778 |
+
((0.788163 0.818855))
|
779 |
+
((0.822028 1.01227)))
|
780 |
+
((0.8365 0.483313))))
|
781 |
+
((lisp_coda_stop is 0)
|
782 |
+
((R:Segment.nn.ph_cvox is +)
|
783 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
784 |
+
((0.807795 0.670829))
|
785 |
+
((0.773774 0.435486)))
|
786 |
+
((0.849529 0.103561)))
|
787 |
+
((0.858848 0.763836))))))
|
788 |
+
((R:Segment.n.ph_vrnd is -)
|
789 |
+
((ph_vlng is 0)
|
790 |
+
((R:SylStructure.parent.position_type is final)
|
791 |
+
((ph_cplace is a)
|
792 |
+
((R:Segment.nn.ph_cvox is -)
|
793 |
+
((0.691915 -0.42124))
|
794 |
+
((R:Segment.p.ph_cplace is a)
|
795 |
+
((0.773696 0.354001))
|
796 |
+
((0.65495 -0.14321))))
|
797 |
+
((0.610433 -0.479739)))
|
798 |
+
((R:Segment.p.ph_ctype is r)
|
799 |
+
((R:SylStructure.parent.R:Syllable.n.syl_break is 0)
|
800 |
+
((0.560921 0.384674))
|
801 |
+
((0.895267 0.746476)))
|
802 |
+
((R:Segment.p.ph_ctype is l)
|
803 |
+
((0.704694 0.568012))
|
804 |
+
((R:Segment.p.ph_cplace is b)
|
805 |
+
((1.34739 0.539049))
|
806 |
+
((R:Segment.p.ph_ctype is s)
|
807 |
+
((R:SylStructure.parent.syl_out < 12.9)
|
808 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
809 |
+
((0.807285 0.151429))
|
810 |
+
((0.988033 0.383763)))
|
811 |
+
((0.878655 0.102291)))
|
812 |
+
((ph_ctype is n)
|
813 |
+
((0.759582 -0.315096))
|
814 |
+
((R:SylStructure.parent.syl_out < 8.8)
|
815 |
+
((R:Segment.pp.ph_vfront is 0)
|
816 |
+
((0.846546 0.000647117))
|
817 |
+
((R:Segment.pp.ph_vfront is 1)
|
818 |
+
((0.586216 0.150701))
|
819 |
+
((0.793898 0.379041))))
|
820 |
+
((lisp_coda_stop is 0)
|
821 |
+
((ph_ctype is f)
|
822 |
+
((0.74736 -0.31103))
|
823 |
+
((0.715751 -0.00576581)))
|
824 |
+
((0.914486 0.17528))))))))))
|
825 |
+
((1.24204 0.908819)))
|
826 |
+
((ph_ctype is s)
|
827 |
+
((ph_cplace is a)
|
828 |
+
((0.864408 1.35528))
|
829 |
+
((R:Segment.n.seg_onsetcoda is coda)
|
830 |
+
((0.85602 0.344576))
|
831 |
+
((0.869622 0.659223))))
|
832 |
+
((R:Segment.nn.ph_cvox is -)
|
833 |
+
((R:Segment.n.ph_ctype is s)
|
834 |
+
((R:Segment.nn.ph_cplace is 0)
|
835 |
+
((0.942964 1.27475))
|
836 |
+
((0.978218 0.650268)))
|
837 |
+
((R:SylStructure.parent.syl_out < 3.9)
|
838 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
839 |
+
((1.32463 1.05026))
|
840 |
+
((0.896966 0.417727)))
|
841 |
+
((R:Segment.p.ph_cplace is a)
|
842 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 0)
|
843 |
+
((0.776698 0.195369))
|
844 |
+
((0.969518 0.432394)))
|
845 |
+
((0.799096 -0.0203318)))))
|
846 |
+
((ph_cplace is a)
|
847 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
848 |
+
((0.680861 -0.315846))
|
849 |
+
((R:SylStructure.parent.R:Syllable.nn.syl_break is 1)
|
850 |
+
((0.954393 0.0965487))
|
851 |
+
((0.884928 0.372884))))
|
852 |
+
((lisp_coda_stop is 0)
|
853 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
854 |
+
((R:SylStructure.parent.position_type is final)
|
855 |
+
((1.03696 0.565834))
|
856 |
+
((0.906661 0.277961)))
|
857 |
+
((R:SylStructure.parent.position_type is final)
|
858 |
+
((0.778429 -0.0967381))
|
859 |
+
((0.863993 0.314023))))
|
860 |
+
((R:Segment.p.ph_cplace is a)
|
861 |
+
((R:SylStructure.parent.R:Syllable.p.stress is 0)
|
862 |
+
((0.898898 0.571009))
|
863 |
+
((0.830278 0.787486)))
|
864 |
+
((1.1101 0.333888)))))))))))))
|
865 |
+
;; RMSE 0.7726 Correlation is 0.5943 Mean (abs) Error 0.5752 (0.5160)
|
866 |
+
|
867 |
+
))
|
868 |
+
|
869 |
+
(provide 'f2bdurtreeZ)
|
CosyVoice-ttsfrd/resource/festival/f2bf0lr.scm
ADDED
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; First attempt at a linear regression model to predict F0 values.
|
35 |
+
;;; This is an attempt to reimplement the work in Black and
|
36 |
+
;;; Hunt ICSLP96, though this model probably isn't as good.
|
37 |
+
;;;
|
38 |
+
|
39 |
+
;;;start
|
40 |
+
;;; R2 = 0.251, F(74, 12711) = 57.5, Prob>F = 0.000
|
41 |
+
;;; RMSE = 27.877
|
42 |
+
;;;mid
|
43 |
+
;;; R2 = 0.332, F(74, 12711) = 85.6, Prob>F = 0.000
|
44 |
+
;;; RMSE = 28.293
|
45 |
+
;;;end
|
46 |
+
;;; R2 = 0.292, F(74, 12711) = 70.8, Prob>F = 0.000
|
47 |
+
;;; RMSE = 27.139
|
48 |
+
|
49 |
+
(define (emph_syl syl)
|
50 |
+
(if (string-equal (item.feat syl "tobi_accent") "NONE")
|
51 |
+
0.0
|
52 |
+
(if (string-equal (item.feat
|
53 |
+
syl "R:SylStructure.parent.R:Token.parent.EMPH") "1")
|
54 |
+
2.0
|
55 |
+
0.0)))
|
56 |
+
|
57 |
+
(set! f2b_f0_lr_start
|
58 |
+
'(
|
59 |
+
( Intercept 160.584956 )
|
60 |
+
( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
|
61 |
+
( pp.tobi_accent 10.081770 (H*) )
|
62 |
+
( pp.tobi_accent 3.358613 (!H*) )
|
63 |
+
( pp.tobi_accent 4.144342 (*? X*? H*!H* * L+H* L+!H*) )
|
64 |
+
( pp.tobi_accent -1.111794 (L*) )
|
65 |
+
( pp.tobi_accent 19.646313 (L*+H L*+!H) )
|
66 |
+
( p.tobi_accent 32.081029 (H*) )
|
67 |
+
( p.tobi_accent 18.090033 (!H*) )
|
68 |
+
( p.tobi_accent 23.255280 (*? X*? H*!H* * L+H* L+!H*) )
|
69 |
+
( p.tobi_accent -9.623577 (L*) )
|
70 |
+
( p.tobi_accent 26.517095 (L*+H L*+!H) )
|
71 |
+
( tobi_accent 5.221081 (H*) )
|
72 |
+
( tobi_accent 10.159194 (!H*) )
|
73 |
+
( tobi_accent 3.645511 (*? X*? H*!H* * L+H* L+!H*) )
|
74 |
+
( tobi_accent -5.720030 (L*) )
|
75 |
+
( tobi_accent -6.355773 (L*+H L*+!H) )
|
76 |
+
( n.tobi_accent -5.691933 (H*) )
|
77 |
+
( n.tobi_accent 8.265606 (!H*) )
|
78 |
+
( n.tobi_accent 0.861427 (*? X*? H*!H* * L+H* L+!H*) )
|
79 |
+
( n.tobi_accent 1.270504 (L*) )
|
80 |
+
( n.tobi_accent 3.499418 (L*+H L*+!H) )
|
81 |
+
( nn.tobi_accent -3.785701 (H*) )
|
82 |
+
( nn.tobi_accent 7.013446 (!H*) )
|
83 |
+
( nn.tobi_accent 2.637494 (*? X*? H*!H* * L+H* L+!H*) )
|
84 |
+
( nn.tobi_accent -0.392176 (L*) )
|
85 |
+
( nn.tobi_accent -2.957502 (L*+H L*+!H) )
|
86 |
+
( pp.tobi_endtone -3.531153 (L-L%) )
|
87 |
+
( pp.tobi_endtone 0.131156 (L-) )
|
88 |
+
( pp.tobi_endtone 2.729199 (H-L% !H-L% -X?) )
|
89 |
+
( pp.tobi_endtone 8.258756 (L-H%) )
|
90 |
+
( pp.tobi_endtone 5.836487 (H-) )
|
91 |
+
( pp.tobi_endtone 11.213440 (!H- H-H%) )
|
92 |
+
( R:Syllable.p.tobi_endtone -28.081359 (L-L%) )
|
93 |
+
( R:Syllable.p.tobi_endtone -20.553145 (L-) )
|
94 |
+
( R:Syllable.p.tobi_endtone -5.442577 (H-L% !H-L% -X?) )
|
95 |
+
( R:Syllable.p.tobi_endtone -6.585836 (L-H%) )
|
96 |
+
( R:Syllable.p.tobi_endtone 8.537044 (H-) )
|
97 |
+
( R:Syllable.p.tobi_endtone 4.243342 (!H- H-H%) )
|
98 |
+
( tobi_endtone -9.333926 (L-L%) )
|
99 |
+
( tobi_endtone -0.346711 (L-) )
|
100 |
+
( tobi_endtone -0.507352 (H-L% !H-L% -X?) )
|
101 |
+
( tobi_endtone -0.937483 (L-H%) )
|
102 |
+
( tobi_endtone 9.472265 (H-) )
|
103 |
+
( tobi_endtone 14.256898 (!H- H-H%) )
|
104 |
+
( n.tobi_endtone -13.084253 (L-L%) )
|
105 |
+
( n.tobi_endtone -1.060688 (L-) )
|
106 |
+
( n.tobi_endtone -7.947205 (H-L% !H-L% -X?) )
|
107 |
+
( n.tobi_endtone -5.471592 (L-H%) )
|
108 |
+
( n.tobi_endtone -0.095669 (H-) )
|
109 |
+
( n.tobi_endtone 4.933708 (!H- H-H%) )
|
110 |
+
( nn.tobi_endtone -14.993470 (L-L%) )
|
111 |
+
( nn.tobi_endtone -3.784284 (L-) )
|
112 |
+
( nn.tobi_endtone -15.505132 (H-L% !H-L% -X?) )
|
113 |
+
( nn.tobi_endtone -11.352400 (L-H%) )
|
114 |
+
( nn.tobi_endtone -5.551627 (H-) )
|
115 |
+
( nn.tobi_endtone -0.661581 (!H- H-H%) )
|
116 |
+
( pp.old_syl_break -3.367677 )
|
117 |
+
( p.old_syl_break 0.641755 )
|
118 |
+
( old_syl_break -0.659002 )
|
119 |
+
( n.old_syl_break 1.217358 )
|
120 |
+
( nn.old_syl_break 2.974502 )
|
121 |
+
( pp.stress 1.588098 )
|
122 |
+
( p.stress 3.693430 )
|
123 |
+
( stress 2.009843 )
|
124 |
+
( n.stress 1.645560 )
|
125 |
+
( nn.stress 1.926870 )
|
126 |
+
( syl_in 1.048362 )
|
127 |
+
( syl_out 0.315553 )
|
128 |
+
( ssyl_in -2.096079 )
|
129 |
+
( ssyl_out 0.303531 )
|
130 |
+
( asyl_in -4.257915 )
|
131 |
+
( asyl_out -2.422424 )
|
132 |
+
( last_accent -0.397647 )
|
133 |
+
( next_accent -0.418613 )
|
134 |
+
( sub_phrases -5.472055 )
|
135 |
+
))
|
136 |
+
|
137 |
+
(set! f2b_f0_lr_mid
|
138 |
+
'(
|
139 |
+
( Intercept 169.183377 )
|
140 |
+
( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
|
141 |
+
( pp.tobi_accent 4.923247 (H*) )
|
142 |
+
( pp.tobi_accent 0.955474 (!H*) )
|
143 |
+
( pp.tobi_accent 1.193597 (*? X*? H*!H* * L+H* L+!H*) )
|
144 |
+
( pp.tobi_accent 1.501383 (L*) )
|
145 |
+
( pp.tobi_accent 7.992120 (L*+H L*+!H) )
|
146 |
+
( p.tobi_accent 16.603350 (H*) )
|
147 |
+
( p.tobi_accent 11.665814 (!H*) )
|
148 |
+
( p.tobi_accent 13.063298 (*? X*? H*!H* * L+H* L+!H*) )
|
149 |
+
( p.tobi_accent -2.288798 (L*) )
|
150 |
+
( p.tobi_accent 29.168430 (L*+H L*+!H) )
|
151 |
+
( tobi_accent 34.517868 (H*) )
|
152 |
+
( tobi_accent 22.349656 (!H*) )
|
153 |
+
( tobi_accent 23.551548 (*? X*? H*!H* * L+H* L+!H*) )
|
154 |
+
( tobi_accent -14.117284 (L*) )
|
155 |
+
( tobi_accent -5.978760 (L*+H L*+!H) )
|
156 |
+
( n.tobi_accent -1.914945 (H*) )
|
157 |
+
( n.tobi_accent 5.249441 (!H*) )
|
158 |
+
( n.tobi_accent -1.929947 (*? X*? H*!H* * L+H* L+!H*) )
|
159 |
+
( n.tobi_accent -3.287877 (L*) )
|
160 |
+
( n.tobi_accent -4.980375 (L*+H L*+!H) )
|
161 |
+
( nn.tobi_accent -6.147251 (H*) )
|
162 |
+
( nn.tobi_accent 8.408949 (!H*) )
|
163 |
+
( nn.tobi_accent 3.193500 (*? X*? H*!H* * L+H* L+!H*) )
|
164 |
+
( nn.tobi_accent 1.323099 (L*) )
|
165 |
+
( nn.tobi_accent 9.148058 (L*+H L*+!H) )
|
166 |
+
( pp.tobi_endtone 4.255273 (L-L%) )
|
167 |
+
( pp.tobi_endtone -1.033377 (L-) )
|
168 |
+
( pp.tobi_endtone 11.992045 (H-L% !H-L% -X?) )
|
169 |
+
( pp.tobi_endtone 6.989573 (L-H%) )
|
170 |
+
( pp.tobi_endtone 2.598854 (H-) )
|
171 |
+
( pp.tobi_endtone 12.178307 (!H- H-H%) )
|
172 |
+
( R:Syllable.p.tobi_endtone -4.397973 (L-L%) )
|
173 |
+
( R:Syllable.p.tobi_endtone -6.157077 (L-) )
|
174 |
+
( R:Syllable.p.tobi_endtone 5.530608 (H-L% !H-L% -X?) )
|
175 |
+
( R:Syllable.p.tobi_endtone 6.938086 (L-H%) )
|
176 |
+
( R:Syllable.p.tobi_endtone 6.162763 (H-) )
|
177 |
+
( R:Syllable.p.tobi_endtone 8.035727 (!H- H-H%) )
|
178 |
+
( tobi_endtone -19.357902 (L-L%) )
|
179 |
+
( tobi_endtone -13.877759 (L-) )
|
180 |
+
( tobi_endtone -6.176061 (H-L% !H-L% -X?) )
|
181 |
+
( tobi_endtone -7.328882 (L-H%) )
|
182 |
+
( tobi_endtone 12.694193 (H-) )
|
183 |
+
( tobi_endtone 30.923398 (!H- H-H%) )
|
184 |
+
( n.tobi_endtone -17.727785 (L-L%) )
|
185 |
+
( n.tobi_endtone -2.539592 (L-) )
|
186 |
+
( n.tobi_endtone -8.126830 (H-L% !H-L% -X?) )
|
187 |
+
( n.tobi_endtone -8.701685 (L-H%) )
|
188 |
+
( n.tobi_endtone -1.006439 (H-) )
|
189 |
+
( n.tobi_endtone 6.834498 (!H- H-H%) )
|
190 |
+
( nn.tobi_endtone -15.407530 (L-L%) )
|
191 |
+
( nn.tobi_endtone -2.974196 (L-) )
|
192 |
+
( nn.tobi_endtone -12.287673 (H-L% !H-L% -X?) )
|
193 |
+
( nn.tobi_endtone -7.621437 (L-H%) )
|
194 |
+
( nn.tobi_endtone -0.458837 (H-) )
|
195 |
+
( nn.tobi_endtone 3.170632 (!H- H-H%) )
|
196 |
+
( pp.old_syl_break -4.196950 )
|
197 |
+
( p.old_syl_break -5.176929 )
|
198 |
+
( old_syl_break 0.047922 )
|
199 |
+
( n.old_syl_break 2.153968 )
|
200 |
+
( nn.old_syl_break 2.577074 )
|
201 |
+
( pp.stress -2.368192 )
|
202 |
+
( p.stress 1.080493 )
|
203 |
+
( stress 1.135556 )
|
204 |
+
( n.stress 2.447219 )
|
205 |
+
( nn.stress 1.318122 )
|
206 |
+
( syl_in 0.291663 )
|
207 |
+
( syl_out -0.411814 )
|
208 |
+
( ssyl_in -1.643456 )
|
209 |
+
( ssyl_out 0.580589 )
|
210 |
+
( asyl_in -5.649243 )
|
211 |
+
( asyl_out 0.489823 )
|
212 |
+
( last_accent 0.216634 )
|
213 |
+
( next_accent 0.244134 )
|
214 |
+
( sub_phrases -5.758156 )
|
215 |
+
))
|
216 |
+
|
217 |
+
|
218 |
+
(set! f2b_f0_lr_end
|
219 |
+
'(
|
220 |
+
( Intercept 169.570381 )
|
221 |
+
( R:SylStructure.parent.R:Token.parent.EMPH 10.0 )
|
222 |
+
( pp.tobi_accent 3.594771 (H*) )
|
223 |
+
( pp.tobi_accent 0.432519 (!H*) )
|
224 |
+
( pp.tobi_accent 0.235664 (*? X*? H*!H* * L+H* L+!H*) )
|
225 |
+
( pp.tobi_accent 1.513892 (L*) )
|
226 |
+
( pp.tobi_accent 2.474823 (L*+H L*+!H) )
|
227 |
+
( p.tobi_accent 11.214208 (H*) )
|
228 |
+
( p.tobi_accent 9.619350 (!H*) )
|
229 |
+
( p.tobi_accent 9.084690 (*? X*? H*!H* * L+H* L+!H*) )
|
230 |
+
( p.tobi_accent 0.519202 (L*) )
|
231 |
+
( p.tobi_accent 26.593112 (L*+H L*+!H) )
|
232 |
+
( tobi_accent 25.217589 (H*) )
|
233 |
+
( tobi_accent 13.759851 (!H*) )
|
234 |
+
( tobi_accent 17.635192 (*? X*? H*!H* * L+H* L+!H*) )
|
235 |
+
( tobi_accent -12.149974 (L*) )
|
236 |
+
( tobi_accent 13.345913 (L*+H L*+!H) )
|
237 |
+
( n.tobi_accent 4.944848 (H*) )
|
238 |
+
( n.tobi_accent 7.398383 (!H*) )
|
239 |
+
( n.tobi_accent 1.683011 (*? X*? H*!H* * L+H* L+!H*) )
|
240 |
+
( n.tobi_accent -6.516900 (L*) )
|
241 |
+
( n.tobi_accent -6.768201 (L*+H L*+!H) )
|
242 |
+
( nn.tobi_accent -4.335797 (H*) )
|
243 |
+
( nn.tobi_accent 5.656462 (!H*) )
|
244 |
+
( nn.tobi_accent 0.263288 (*? X*? H*!H* * L+H* L+!H*) )
|
245 |
+
( nn.tobi_accent 1.022002 (L*) )
|
246 |
+
( nn.tobi_accent 6.702368 (L*+H L*+!H) )
|
247 |
+
( pp.tobi_endtone 10.274958 (L-L%) )
|
248 |
+
( pp.tobi_endtone 3.129947 (L-) )
|
249 |
+
( pp.tobi_endtone 15.476240 (H-L% !H-L% -X?) )
|
250 |
+
( pp.tobi_endtone 10.446935 (L-H%) )
|
251 |
+
( pp.tobi_endtone 6.104384 (H-) )
|
252 |
+
( pp.tobi_endtone 14.182688 (!H- H-H%) )
|
253 |
+
( R:Syllable.p.tobi_endtone 1.767454 (L-L%) )
|
254 |
+
( R:Syllable.p.tobi_endtone -1.040077 (L-) )
|
255 |
+
( R:Syllable.p.tobi_endtone 18.438093 (H-L% !H-L% -X?) )
|
256 |
+
( R:Syllable.p.tobi_endtone 8.750018 (L-H%) )
|
257 |
+
( R:Syllable.p.tobi_endtone 5.000340 (H-) )
|
258 |
+
( R:Syllable.p.tobi_endtone 10.913437 (!H- H-H%) )
|
259 |
+
( tobi_endtone -12.637935 (L-L%) )
|
260 |
+
( tobi_endtone -13.597961 (L-) )
|
261 |
+
( tobi_endtone -6.501965 (H-L% !H-L% -X?) )
|
262 |
+
( tobi_endtone 8.747483 (L-H%) )
|
263 |
+
( tobi_endtone 15.165833 (H-) )
|
264 |
+
( tobi_endtone 50.190326 (!H- H-H%) )
|
265 |
+
( n.tobi_endtone -16.965781 (L-L%) )
|
266 |
+
( n.tobi_endtone -5.222475 (L-) )
|
267 |
+
( n.tobi_endtone -7.358555 (H-L% !H-L% -X?) )
|
268 |
+
( n.tobi_endtone -7.833168 (L-H%) )
|
269 |
+
( n.tobi_endtone 4.701087 (H-) )
|
270 |
+
( n.tobi_endtone 10.349902 (!H- H-H%) )
|
271 |
+
( nn.tobi_endtone -15.369483 (L-L%) )
|
272 |
+
( nn.tobi_endtone -2.207161 (L-) )
|
273 |
+
( nn.tobi_endtone -9.363835 (H-L% !H-L% -X?) )
|
274 |
+
( nn.tobi_endtone -7.052374 (L-H%) )
|
275 |
+
( nn.tobi_endtone 2.207854 (H-) )
|
276 |
+
( nn.tobi_endtone 5.271546 (!H- H-H%) )
|
277 |
+
( pp.old_syl_break -4.745862 )
|
278 |
+
( p.old_syl_break -5.685178 )
|
279 |
+
( old_syl_break -2.633291 )
|
280 |
+
( n.old_syl_break 1.678340 )
|
281 |
+
( nn.old_syl_break 2.274729 )
|
282 |
+
( pp.stress -2.747198 )
|
283 |
+
( p.stress 0.306724 )
|
284 |
+
( stress -0.565613 )
|
285 |
+
( n.stress 2.838327 )
|
286 |
+
( nn.stress 1.285244 )
|
287 |
+
( syl_in 0.169955 )
|
288 |
+
( syl_out -1.045661 )
|
289 |
+
( ssyl_in -1.487774 )
|
290 |
+
( ssyl_out 0.752405 )
|
291 |
+
( asyl_in -5.081677 )
|
292 |
+
( asyl_out 3.016218 )
|
293 |
+
( last_accent 0.312900 )
|
294 |
+
( next_accent 0.837992 )
|
295 |
+
( sub_phrases -5.397805 )
|
296 |
+
|
297 |
+
))
|
298 |
+
|
299 |
+
;; groups
|
300 |
+
;; tobi_accent_1 25.217589 (H*) )
|
301 |
+
;; tobi_accent_2 13.759851 (!H*) )
|
302 |
+
;; tobi_accent_3 17.635192 (*? X*? H*!H* * L+H* L+!H*) )
|
303 |
+
;; tobi_accent_4 -12.149974 (L*) )
|
304 |
+
;; tobi_accent_5 13.345913 (L*+H L*+!H) )
|
305 |
+
|
306 |
+
;; tobi_endtone_1 10.274958 (L-L%) )
|
307 |
+
;; tobi_endtone_2 3.129947 (L-) )
|
308 |
+
;; tobi_endtone_3 15.476240 (H-L% !H-L% -X?) )
|
309 |
+
;; tobi_endtone_4 10.446935 (L-H%) )
|
310 |
+
;; tobi_endtone_5 6.104384 (H-) )
|
311 |
+
;; tobi_endtone_6 14.182688 (!H- H-H%) )
|
312 |
+
|
313 |
+
(provide 'f2bf0lr)
|
314 |
+
|
CosyVoice-ttsfrd/resource/festival/festival.el
ADDED
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;
|
2 |
+
;;; File: festival.el
|
3 |
+
;;; Emacs Lisp
|
4 |
+
;;;
|
5 |
+
;;; Alan W Black CSTR ([email protected]) June 1996
|
6 |
+
;;;
|
7 |
+
;;; Provide an emacs mode for interfacing to the festival speech
|
8 |
+
;;; synthesizer system
|
9 |
+
;;;
|
10 |
+
;;; I've looked at many examples from the emacs Lisp directory
|
11 |
+
;;; copying relevant bits from here and there, so this can only
|
12 |
+
;;; reasonably inherit the GNU licence (GPL)
|
13 |
+
;;;
|
14 |
+
;;; Setup:
|
15 |
+
;;; In your .emacs add the following 2 lines to get a Say menu:
|
16 |
+
;;;
|
17 |
+
;;; (autoload 'say-minor-mode "festival" "Menu for using Festival." t)
|
18 |
+
;;; (say-minor-mode t)
|
19 |
+
;;; (setq auto-mode-alist
|
20 |
+
;;; (append '(("\\.festivalrc$" . scheme-mode)) auto-mode-alist))
|
21 |
+
;;;
|
22 |
+
;;; The following gives you pretty colors in emacs-19 if you are into
|
23 |
+
;;; such things
|
24 |
+
;;; ;;; Some colors for scheme mode
|
25 |
+
;;; (hilit-set-mode-patterns
|
26 |
+
;;; '(scheme-mode)
|
27 |
+
;;; '(
|
28 |
+
;;; (";.*" nil comment)
|
29 |
+
;;; (hilit-string-find ?\\ string)
|
30 |
+
;;; ("^\\s *(def\\s +" "\\()\\|nil\\)" defun)
|
31 |
+
;;; ("^\\s *(defvar\\s +\\S +" nil decl)
|
32 |
+
;;; ("^\\s *(set\\s +\\S +" nil decl)
|
33 |
+
;;; ("^\\s *(defconst\\s +\\S +" nil define)
|
34 |
+
;;; ("^\\s *(\\(provide\\|require\\).*$" nil include)
|
35 |
+
;;; ("(\\(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)))
|
36 |
+
;;;
|
37 |
+
;;;
|
38 |
+
;;;--------------------------------------------------------------------
|
39 |
+
;;; Copyright (C) Alan W Black 1996
|
40 |
+
;;; This code is distributed in the hope that it will be useful,
|
41 |
+
;;; but WITHOUT ANY WARRANTY. No author or distributor accepts
|
42 |
+
;;; responsibility to anyone for the consequences of using this code
|
43 |
+
;;; or for whether it serves any particular purpose or works at all,
|
44 |
+
;;; unless explicitly stated in a written agreement.
|
45 |
+
;;;
|
46 |
+
;;; Everyone is granted permission to copy, modify and redistribute
|
47 |
+
;;; this code, but only under the conditions described in the GNU
|
48 |
+
;;; Emacs General Public License. A copy of this license is
|
49 |
+
;;; distrubuted with GNU Emacs so you can know your rights and
|
50 |
+
;;; responsibilities. It should be in a file named COPYING. Among
|
51 |
+
;;; other things, the copyright notice and this notice must be
|
52 |
+
;;; preserved on all copies.
|
53 |
+
;;;--------------------------------------------------------------------
|
54 |
+
;;;
|
55 |
+
|
56 |
+
(defvar festival-program-name "festival")
|
57 |
+
|
58 |
+
(defvar festival-process nil)
|
59 |
+
|
60 |
+
(defvar festival-tmp-file
|
61 |
+
(format "/tmp/festival-emacs-tmp-%s" (user-real-login-name))
|
62 |
+
"Filename to save input for Festivial.")
|
63 |
+
|
64 |
+
(defun festival-fast ()
|
65 |
+
(interactive)
|
66 |
+
(festival-send-command '(Parameter.set 'Duration.Stretch 0.8)))
|
67 |
+
(defun festival-slow ()
|
68 |
+
(interactive)
|
69 |
+
(festival-send-command '(Parameter.set 'Duration.Stretch 1.2)))
|
70 |
+
(defun festival-ndur ()
|
71 |
+
(interactive)
|
72 |
+
(festival-send-command '(Parameter.set 'Duration.Stretch 1.0)))
|
73 |
+
(defun festival-intro ()
|
74 |
+
(interactive)
|
75 |
+
(festival-send-command '(intro)))
|
76 |
+
|
77 |
+
(defun festival-gsw ()
|
78 |
+
(interactive)
|
79 |
+
(festival-send-command '(voice_gsw_diphone)))
|
80 |
+
(defun festival-rab ()
|
81 |
+
(interactive)
|
82 |
+
(festival-send-command '(voice_rab_diphone)))
|
83 |
+
(defun festival-ked ()
|
84 |
+
(interactive)
|
85 |
+
(festival-send-command '(voice_ked_diphone)))
|
86 |
+
(defun festival-kal ()
|
87 |
+
(interactive)
|
88 |
+
(festival-send-command '(voice_kal_diphone)))
|
89 |
+
(defun festival-don ()
|
90 |
+
(interactive)
|
91 |
+
(festival-send-command '(voice_don_diphone)))
|
92 |
+
(defun festival-welsh ()
|
93 |
+
(interactive)
|
94 |
+
(festival-send-command '(voice_welsh_hl)))
|
95 |
+
(defun festival-spanish ()
|
96 |
+
(interactive)
|
97 |
+
(festival-send-command '(voice_spanish_el)))
|
98 |
+
|
99 |
+
(defun festival-say-string (string)
|
100 |
+
"Send string to festival and have it said"
|
101 |
+
(interactive "sSay: ")
|
102 |
+
(festival-start-process)
|
103 |
+
(process-send-string festival-process
|
104 |
+
(concat "(SayText " (format "%S" string) ")
|
105 |
+
")))
|
106 |
+
|
107 |
+
(defun festival-send-command (cmd)
|
108 |
+
"Send command to festival"
|
109 |
+
(interactive "px")
|
110 |
+
(festival-start-process)
|
111 |
+
(process-send-string festival-process (format "%S
|
112 |
+
" cmd)))
|
113 |
+
|
114 |
+
(defun festival-process-status ()
|
115 |
+
(interactive)
|
116 |
+
(if festival-process
|
117 |
+
(message (format "Festival process status: %s"
|
118 |
+
(process-status festival-process)))
|
119 |
+
(message (format "Festival process status: NONE"))))
|
120 |
+
|
121 |
+
(defun festival-start-process ()
|
122 |
+
"Check status of process and start it if necessary"
|
123 |
+
(interactive )
|
124 |
+
(let ((process-connection-type t))
|
125 |
+
(if (and festival-process
|
126 |
+
(eq (process-status festival-process) 'run))
|
127 |
+
't
|
128 |
+
;;(festival-kill-festival t)
|
129 |
+
(message "Starting new synthesizer process...")
|
130 |
+
(sit-for 0)
|
131 |
+
(setq festival-process
|
132 |
+
(start-process "festival" (get-buffer-create "*festival*")
|
133 |
+
festival-program-name)))
|
134 |
+
))
|
135 |
+
|
136 |
+
(defun festival-kill-process ()
|
137 |
+
"Kill festival sub-process"
|
138 |
+
(interactive)
|
139 |
+
(if festival-process
|
140 |
+
(kill-process festival-process))
|
141 |
+
(setq festival-process nil)
|
142 |
+
(message "Festival process killed"))
|
143 |
+
|
144 |
+
(defun festival-send-string (string)
|
145 |
+
"Send given string to fesitval process."
|
146 |
+
(interactive)
|
147 |
+
(festival-start-process)
|
148 |
+
(process-send-string festival-process string))
|
149 |
+
|
150 |
+
(defun festival-say-region (reg-start reg-end)
|
151 |
+
"Send given region to festival for saying. This saves the region
|
152 |
+
as a file in /tmp and then tells festival to say that file. The
|
153 |
+
major mode is *not* passed as text mode name to Festival."
|
154 |
+
(interactive "r")
|
155 |
+
(write-region reg-start reg-end festival-tmp-file)
|
156 |
+
(festival-send-command (list 'tts festival-tmp-file nil)))
|
157 |
+
|
158 |
+
(defun festival-say-buffer ()
|
159 |
+
"Send given region to festival for saying. This saves the region
|
160 |
+
as a file in /tmp and then tells festival to say that file. The
|
161 |
+
major-mode is passed as a text mode to Festival."
|
162 |
+
(interactive)
|
163 |
+
(write-region (point-min) (point-max) festival-tmp-file)
|
164 |
+
;; Because there may by sgml-like sub-files mentioned
|
165 |
+
;; ensure festival tracks the buffer's default-directory
|
166 |
+
(festival-send-command (list 'cd (expand-file-name default-directory)))
|
167 |
+
(if (equal "-mode" (substring (format "%S" major-mode) -5 nil))
|
168 |
+
(if (equal "sgml" (substring (format "%S" major-mode) 0 -5))
|
169 |
+
(festival-send-command
|
170 |
+
(list 'tts festival-tmp-file "sable"))
|
171 |
+
(festival-send-command
|
172 |
+
(list 'tts festival-tmp-file
|
173 |
+
(substring (format "%S" major-mode) 0 -5))))
|
174 |
+
(festival-send-command (list 'tts festival-tmp-file nil))))
|
175 |
+
|
176 |
+
;;
|
177 |
+
;; say-minor-mode provides a menu offering various speech synthesis commands
|
178 |
+
;;
|
179 |
+
(defvar say-minor-mode nil)
|
180 |
+
|
181 |
+
(defun say-minor-mode (arg)
|
182 |
+
"Toggle say minor mode.
|
183 |
+
With arg, turn say-minor-mode on iff arg is positive."
|
184 |
+
(interactive "P")
|
185 |
+
(setq say-minor-mode
|
186 |
+
(if (if (null arg) (not say-minor-mode)
|
187 |
+
(> (prefix-numeric-value arg) 0))
|
188 |
+
t))
|
189 |
+
(force-mode-line-update))
|
190 |
+
|
191 |
+
(setq say-params-menu (make-sparse-keymap "Pitch/Duration"))
|
192 |
+
(fset 'say-params-menu (symbol-value 'say-params-menu))
|
193 |
+
(define-key say-params-menu [say-fast] '("Fast" . festival-fast))
|
194 |
+
(define-key say-params-menu [say-slow] '("Slow" . festival-slow))
|
195 |
+
(define-key say-params-menu [say-ndur] '("Normal Dur" . festival-ndur))
|
196 |
+
|
197 |
+
(setq say-lang-menu (make-sparse-keymap "Select language"))
|
198 |
+
(fset 'say-lang-menu (symbol-value 'say-lang-menu))
|
199 |
+
(define-key say-lang-menu [say-lang-spain1] '("Spanish el" . festival-spanish))
|
200 |
+
(define-key say-lang-menu [say-lang-welsh1] '("Welsh hl" . festival-welsh))
|
201 |
+
(define-key say-lang-menu [say-lang-eng5] '("English gsw" . festival-gsw))
|
202 |
+
(define-key say-lang-menu [say-lang-eng4] '("English don" . festival-don))
|
203 |
+
(define-key say-lang-menu [say-lang-eng3] '("English rab" . festival-rab))
|
204 |
+
(define-key say-lang-menu [say-lang-eng2] '("English ked" . festival-ked))
|
205 |
+
(define-key say-lang-menu [say-lang-eng1] '("English kal" . festival-kal))
|
206 |
+
;(define-key say-params-menu [say-set-dur-stretch]
|
207 |
+
; '("Set Duration Stretch" . festival-set-dur-stretch))
|
208 |
+
;(define-key say-params-menu [say-high] '("High" . festival-high))
|
209 |
+
;(define-key say-params-menu [say-low] '("Low" . festival-low))
|
210 |
+
;(define-key say-params-menu [say-npit] '("Normal Pitch" . festival-npit))
|
211 |
+
;(define-key say-params-menu [say-set-pitch-stretch]
|
212 |
+
; '("Set Pitch Stretch" . festival-set-pitch-stretch))
|
213 |
+
|
214 |
+
(setq say-minor-mode-map (make-sparse-keymap))
|
215 |
+
(setq say-menu (make-sparse-keymap "SAY"))
|
216 |
+
(define-key say-minor-mode-map [menu-bar SAY] (cons "Say" say-menu))
|
217 |
+
(define-key say-minor-mode-map [menu-bar SAY festival-intro] '("Festival Intro" . festival-intro))
|
218 |
+
(define-key say-minor-mode-map [menu-bar SAY festival-process-status] '("Festival status" . festival-process-status))
|
219 |
+
(define-key say-minor-mode-map [menu-bar SAY festival-kill-process] '("Kill Festival" . festival-kill-process))
|
220 |
+
(define-key say-minor-mode-map [menu-bar SAY festival-start-process] '("(Re)start Festival" . festival-start-process))
|
221 |
+
;;(define-key say-menu [separator-process] '("--"))
|
222 |
+
;;(define-key say-menu [params] '("Pitch/Durations" . say-params-menu))
|
223 |
+
(define-key say-menu [separator-buffers] '("--"))
|
224 |
+
(define-key say-menu [festival-send-command] '("Festival eval command" . festival-send-command))
|
225 |
+
(define-key say-menu [say-lang-menu] '("Select language" . say-lang-menu))
|
226 |
+
(define-key say-menu [festival-say-buffer] '("Say buffer" . festival-say-buffer))
|
227 |
+
(define-key say-menu [festival-say-region] '("Say region" . festival-say-region))
|
228 |
+
|
229 |
+
|
230 |
+
(setq minor-mode-map-alist
|
231 |
+
(cons
|
232 |
+
(cons 'say-minor-mode say-minor-mode-map)
|
233 |
+
minor-mode-map-alist))
|
234 |
+
|
235 |
+
(or (assq 'say-minor-mode minor-mode-alist)
|
236 |
+
(setq minor-mode-alist
|
237 |
+
(cons '(say-minor-mode "") minor-mode-alist)))
|
238 |
+
|
239 |
+
;;;
|
240 |
+
;;; A FESTIVAL inferior mode (copied from prolog.el)
|
241 |
+
;;;
|
242 |
+
(defvar inferior-festival-mode-map nil)
|
243 |
+
|
244 |
+
(defun inferior-festival-mode ()
|
245 |
+
"Major mode for interacting with an inferior FESTIVAL process.
|
246 |
+
|
247 |
+
The following commands are available:
|
248 |
+
\\{inferior-festival-mode-map}
|
249 |
+
|
250 |
+
Entry to this mode calls the value of `festival-mode-hook' with no arguments,
|
251 |
+
if that value is non-nil. Likewise with the value of `comint-mode-hook'.
|
252 |
+
`festival-mode-hook' is called after `comint-mode-hook'.
|
253 |
+
|
254 |
+
You can send text to the inferior FESTIVAL from other buffers
|
255 |
+
using the commands `send-region', `send-string'
|
256 |
+
|
257 |
+
Return at end of buffer sends line as input.
|
258 |
+
Return not at end copies rest of line to end and sends it.
|
259 |
+
\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
|
260 |
+
\\[comint-interrupt-subjob] interrupts the shell or its current subjob if any.
|
261 |
+
\\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal."
|
262 |
+
(interactive)
|
263 |
+
(require 'comint)
|
264 |
+
(comint-mode)
|
265 |
+
(setq major-mode 'inferior-festival-mode
|
266 |
+
mode-name "Inferior FESTIVAL"
|
267 |
+
comint-prompt-regexp "^festival> ")
|
268 |
+
(if inferior-festival-mode-map nil
|
269 |
+
(setq inferior-festival-mode-map (copy-keymap comint-mode-map))
|
270 |
+
(festival-mode-commands inferior-festival-mode-map))
|
271 |
+
(use-local-map inferior-festivalr-mode-map)
|
272 |
+
(run-hooks 'festival-mode-hook))
|
273 |
+
|
274 |
+
;;;###autoload
|
275 |
+
(defun run-festival ()
|
276 |
+
"Run an inferior FESTIVAL process, input and output via buffer *festival*."
|
277 |
+
(interactive)
|
278 |
+
(require 'comint)
|
279 |
+
(switch-to-buffer (make-comint "festival" festival-program-name))
|
280 |
+
(inferior-festival-mode))
|
281 |
+
|
282 |
+
(provide 'festival)
|
CosyVoice-ttsfrd/resource/festival/festival.scm
ADDED
@@ -0,0 +1,633 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; General Festival Scheme specific functions
|
34 |
+
;;; Including definitions of various standard variables.
|
35 |
+
|
36 |
+
;; will be set automatically on start-up
|
37 |
+
(defvar festival_version "unknown"
|
38 |
+
"festival_version
|
39 |
+
A string containing the current version number of the system.")
|
40 |
+
|
41 |
+
;; will be set automatically on start-up
|
42 |
+
(defvar festival_version_number '(x x x)
|
43 |
+
"festival_version_number
|
44 |
+
A list of major, minor and subminor version numbers of the current
|
45 |
+
system. e.g. (1 0 12).")
|
46 |
+
|
47 |
+
(define (apply_method method utt)
|
48 |
+
"(apply_method METHOD UTT)
|
49 |
+
Apply the appropriate function to utt defined in parameter."
|
50 |
+
(let ((method_val (Parameter.get method)))
|
51 |
+
(cond
|
52 |
+
((null method_val)
|
53 |
+
nil) ;; should be an error, but I'll let you off at present
|
54 |
+
((and (symbol? method_val) (symbol-bound? method_val))
|
55 |
+
(apply (symbol-value method_val) (list utt)))
|
56 |
+
((member (typeof method_val) '(subr closure))
|
57 |
+
(apply method_val (list utt)))
|
58 |
+
(t ;; again is probably an error
|
59 |
+
nil))))
|
60 |
+
|
61 |
+
(define (require_module l)
|
62 |
+
"(require_module l)
|
63 |
+
Check that certain compile-time modules are included in this installation.
|
64 |
+
l may be a single atom or list of atoms. Each item in l must appear in
|
65 |
+
*modules* otherwise an error is throw."
|
66 |
+
(if (consp l)
|
67 |
+
(mapcar require_module l)
|
68 |
+
(if (not (member_string l *modules*))
|
69 |
+
(error (format nil "module %s required, but not compiled in this installation\n" l))))
|
70 |
+
t)
|
71 |
+
|
72 |
+
;;; Feature Function Functions
|
73 |
+
(define (utt.features utt relname func_list)
|
74 |
+
"(utt.features UTT RELATIONNAME FUNCLIST)
|
75 |
+
Get vectors of feature values for each item in RELATIONNAME in UTT.
|
76 |
+
[see Features]"
|
77 |
+
(mapcar
|
78 |
+
(lambda (s)
|
79 |
+
(mapcar (lambda (f) (item.feat s f)) func_list))
|
80 |
+
(utt.relation.items utt relname)))
|
81 |
+
|
82 |
+
(define (utt.type utt)
|
83 |
+
"(utt.type UTT)
|
84 |
+
Returns the type of UTT."
|
85 |
+
(intern (utt.feat utt 'type)))
|
86 |
+
|
87 |
+
(define (utt.save.segs utt filename)
|
88 |
+
"(utt.save.segs UTT FILE)
|
89 |
+
Save segments of UTT in a FILE in xlabel format."
|
90 |
+
(let ((fd (fopen filename "w")))
|
91 |
+
(format fd "#\n")
|
92 |
+
(mapcar
|
93 |
+
(lambda (info)
|
94 |
+
(format fd "%2.4f 100 %s\n" (car info) (car (cdr info))))
|
95 |
+
(utt.features utt 'Segment '(segment_end name)))
|
96 |
+
(fclose fd)
|
97 |
+
utt))
|
98 |
+
|
99 |
+
(define (utt.save.words utt filename)
|
100 |
+
"(utt.save.words UTT FILE)
|
101 |
+
Save words of UTT in a FILE in xlabel format."
|
102 |
+
(let ((fd (fopen filename "w")))
|
103 |
+
(format fd "#\n")
|
104 |
+
(mapcar
|
105 |
+
(lambda (info)
|
106 |
+
(format fd "%2.4f 100 %s\n" (car info) (car (cdr info))))
|
107 |
+
(utt.features utt 'Word '(word_end name)))
|
108 |
+
(fclose fd)
|
109 |
+
utt))
|
110 |
+
|
111 |
+
(define (utt.resynth labfile f0file)
|
112 |
+
"(utt.resynth LABFILE F0FILE)
|
113 |
+
Resynthesize an utterance from a label file and F0 file (in any format
|
114 |
+
supported by the Speech Tool Library). This loads, synthesizes and
|
115 |
+
plays the utterance."
|
116 |
+
(let (u f0 f0_item)
|
117 |
+
(set! u (Utterance SegF0)) ; need some u to start with
|
118 |
+
(utt.relation.load u 'Segment labfile)
|
119 |
+
(utt.relation.create u 'f0)
|
120 |
+
(set! f0 (track.load f0file))
|
121 |
+
(set! f0_item (utt.relation.append u 'f0))
|
122 |
+
(item.set_feat f0_item "name" "f0")
|
123 |
+
(item.set_feat f0_item "f0" f0)
|
124 |
+
|
125 |
+
;; emulabel may have flipped pau to H#
|
126 |
+
(mapcar
|
127 |
+
(lambda (s)
|
128 |
+
(cond
|
129 |
+
((string-matches (item.name s) "[hH]#")
|
130 |
+
(item.set_feat s "name" "pau"))
|
131 |
+
((string-matches (item.name s) "#.*")
|
132 |
+
(item.set_feat s "name" (string-after (item.name s) "#")))))
|
133 |
+
(utt.relation.items u 'Segment))
|
134 |
+
|
135 |
+
(Wave_Synth u)
|
136 |
+
(utt.play u)
|
137 |
+
u))
|
138 |
+
|
139 |
+
(define (utt.relation.present utt relation)
|
140 |
+
"(utt.relation.present UTT RELATIONNAME)
|
141 |
+
Returns t if UTT caontains a relation called RELATIONNAME, nil otherwise."
|
142 |
+
(if (member_string relation (utt.relationnames utt))
|
143 |
+
t
|
144 |
+
nil))
|
145 |
+
|
146 |
+
(define (utt.relation.leafs utt relation)
|
147 |
+
"(utt.relation.leafs UTT RELATIONNAME)
|
148 |
+
Returns a list of all the leafs in this relation."
|
149 |
+
(let ((leafs nil))
|
150 |
+
(mapcar
|
151 |
+
(lambda (i)
|
152 |
+
(if (not (item.down (item.relation i relation)))
|
153 |
+
(set! leafs (cons i leafs))))
|
154 |
+
(utt.relation.items utt relation))
|
155 |
+
(reverse leafs)))
|
156 |
+
|
157 |
+
(define (utt.relation.first utt relation)
|
158 |
+
"(utt.relation.first UTT RELATIONNAME)
|
159 |
+
Returns a the first item in this relation."
|
160 |
+
(utt.relation utt relation))
|
161 |
+
|
162 |
+
(define (utt.relation.last utt relation)
|
163 |
+
"(utt.relation.last UTT RELATIONNAME)
|
164 |
+
Returns a the last item in this relation."
|
165 |
+
(let ((i (utt.relation.first utt relation)))
|
166 |
+
(while (item.next i)
|
167 |
+
(set! i (item.next i)))
|
168 |
+
i))
|
169 |
+
|
170 |
+
(define (item.feat.present item feat)
|
171 |
+
"(item.feat.present item feat)
|
172 |
+
nil if feat doesn't existing in this item, non-nil otherwise."
|
173 |
+
(and item (assoc_string feat (item.features item))))
|
174 |
+
|
175 |
+
(define (item.relation.append_daughter parent relname daughter)
|
176 |
+
"(item.relation.append_daughter parent relname daughter)
|
177 |
+
Make add daughter to parent as a new daughter in relname."
|
178 |
+
(item.append_daughter (item.relation parent relname) daughter))
|
179 |
+
|
180 |
+
(define (item.relation.insert si relname newsi direction)
|
181 |
+
"(item.relation.insert si relname newsi direction)
|
182 |
+
Insert newsi in relation relname with respect to direction. If
|
183 |
+
direction is ommited after is assumed, valid directions are after
|
184 |
+
before, above and below. Note you should use
|
185 |
+
item.relation.append_daughter for tree adjoining. newsi maybe
|
186 |
+
a item itself of a LISP description of one."
|
187 |
+
(item.insert
|
188 |
+
(item.relation si relname)
|
189 |
+
newsi
|
190 |
+
direction))
|
191 |
+
|
192 |
+
(define (item.relation.daughters parent relname)
|
193 |
+
"(item.relation.daughters parent relname)
|
194 |
+
Return a list of all daughters of parent by relname."
|
195 |
+
(let ((d1 (item.daughter1 (item.relation parent relname)))
|
196 |
+
(daughters))
|
197 |
+
(while d1
|
198 |
+
(set! daughters (cons d1 daughters))
|
199 |
+
(set! d1 (item.next d1)))
|
200 |
+
(reverse daughters)))
|
201 |
+
|
202 |
+
(define (item.daughters p)
|
203 |
+
"(item.daughters parent)
|
204 |
+
Return a list of all daughters of parent."
|
205 |
+
(item.relation.daughters p (item.relation.name p)))
|
206 |
+
|
207 |
+
(define (item.relation.parent si relname)
|
208 |
+
"(item.relation.parent item relname)
|
209 |
+
Return the parent of this item in this relation."
|
210 |
+
(item.parent (item.relation si relname)))
|
211 |
+
|
212 |
+
(define (item.relation.daughter1 si relname)
|
213 |
+
"(item.relation.daughter1 item relname)
|
214 |
+
Return the first daughter of this item in this relation."
|
215 |
+
(item.daughter1 (item.relation si relname)))
|
216 |
+
|
217 |
+
(define (item.relation.daughter2 si relname)
|
218 |
+
"(item.relation.daughter2 item relname)
|
219 |
+
Return the second daughter of this item in this relation."
|
220 |
+
(item.daughter2 (item.relation si relname)))
|
221 |
+
|
222 |
+
(define (item.relation.daughtern si relname)
|
223 |
+
"(item.relation.daughtern item relname)
|
224 |
+
Return the final daughter of this item in this relation."
|
225 |
+
(item.daughtern (item.relation si relname)))
|
226 |
+
|
227 |
+
(define (item.relation.next si relname)
|
228 |
+
"(item.relation.next item relname)
|
229 |
+
Return the next item in this relation."
|
230 |
+
(item.next (item.relation si relname)))
|
231 |
+
|
232 |
+
(define (item.relation.prev si relname)
|
233 |
+
"(item.relation.prev item relname)
|
234 |
+
Return the previous item in this relation."
|
235 |
+
(item.prev (item.relation si relname)))
|
236 |
+
|
237 |
+
(define (item.relation.first si relname)
|
238 |
+
"(item.relation.first item relname)
|
239 |
+
Return the most previous item from this item in this relation."
|
240 |
+
(let ((n (item.relation si relname)))
|
241 |
+
(while (item.prev n)
|
242 |
+
(set! n (item.prev n)))
|
243 |
+
n))
|
244 |
+
|
245 |
+
(define (item.leafs si)
|
246 |
+
"(item.relation.leafs item relname)
|
247 |
+
Return a list of the leafs of this item in this relation."
|
248 |
+
(let ((ls nil)
|
249 |
+
(pl (item.first_leaf si))
|
250 |
+
(ll (item.next_leaf (item.last_leaf si))))
|
251 |
+
(while (and pl (not (equal? pl ll)))
|
252 |
+
(set! ls (cons pl ls))
|
253 |
+
(set! pl (item.next_leaf pl)))
|
254 |
+
(reverse ls)))
|
255 |
+
|
256 |
+
(define (item.relation.leafs si relname)
|
257 |
+
"(item.relation.leafs item relname)
|
258 |
+
Return a list of the leafs of this item in this relation."
|
259 |
+
(item.leafs (item.relation si relname)))
|
260 |
+
|
261 |
+
(define (item.root s)
|
262 |
+
"(item.root s)
|
263 |
+
Follow parent link until s has no parent."
|
264 |
+
(cond
|
265 |
+
((item.parent s)
|
266 |
+
(item.root (item.parent s)))
|
267 |
+
(t s)))
|
268 |
+
|
269 |
+
(define (item.parent_to s relname)
|
270 |
+
"(item.parent_to s relname)
|
271 |
+
Find the first ancestor of s in its current relation that is also in
|
272 |
+
relname. s is treated as an ancestor of itself so if s is in relname
|
273 |
+
it is returned. The returned value is in will be in relation relname
|
274 |
+
or nil if there isn't one."
|
275 |
+
(cond
|
276 |
+
((null s) s)
|
277 |
+
((member_string relname (item.relations s))
|
278 |
+
(item.relation s relname))
|
279 |
+
(t (item.parent_to (item.parent s) relname))))
|
280 |
+
|
281 |
+
(define (item.daughter1_to s relname)
|
282 |
+
"(item.daughter1_to s relname)
|
283 |
+
Follow daughter1 links of s in its current relation until an item
|
284 |
+
is found that is also in relname, is s is in relname it is returned.
|
285 |
+
The return item is returned in relation relname, or nil if there is
|
286 |
+
nothing in relname."
|
287 |
+
(cond
|
288 |
+
((null s) s)
|
289 |
+
((member_string relname (item.relations s)) (item.relation s relname))
|
290 |
+
(t (item.daughter1_to (item.daughter1 s) relname))))
|
291 |
+
|
292 |
+
(define (item.daughtern_to s relname)
|
293 |
+
"(item.daughter1_to s relname)
|
294 |
+
Follow daughtern links of s in its current relation until an item
|
295 |
+
is found that is also in relname, is s is in relname it is returned.
|
296 |
+
The return item is returned in relation relname, or nil if there is
|
297 |
+
nothing in relname."
|
298 |
+
(cond
|
299 |
+
((null s) s)
|
300 |
+
((member_string relname (item.relations s)) (item.relation s relname))
|
301 |
+
(t (item.daughtern_to (item.daughtern s) relname))))
|
302 |
+
|
303 |
+
(define (item.name s)
|
304 |
+
"(item.name ITEM)
|
305 |
+
Returns the name of ITEM. [see Accessing an utterance]"
|
306 |
+
(item.feat s "name"))
|
307 |
+
|
308 |
+
(define (utt.wave utt)
|
309 |
+
"(utt.wave UTT)
|
310 |
+
Get waveform from wave (R:Wave.first.wave)."
|
311 |
+
(item.feat (utt.relation.first utt "Wave") "wave"))
|
312 |
+
|
313 |
+
(define (utt.wave.rescale . args)
|
314 |
+
"(utt.wave.rescale UTT FACTOR NORMALIZE)
|
315 |
+
Modify the gain of the waveform in UTT by GAIN. If NORMALIZE is
|
316 |
+
specified and non-nil the waveform is maximized first."
|
317 |
+
(wave.rescale (utt.wave (nth 0 args)) (nth 1 args) (nth 2 args))
|
318 |
+
(nth 0 args))
|
319 |
+
|
320 |
+
(define (utt.wave.resample utt rate)
|
321 |
+
"(utt.wave.resample UTT RATE)\
|
322 |
+
Resample waveform in UTT to RATE (if it is already at that rate it remains
|
323 |
+
unchanged)."
|
324 |
+
(wave.resample (utt.wave utt) rate)
|
325 |
+
utt)
|
326 |
+
|
327 |
+
(define (utt.import.wave . args)
|
328 |
+
"(utt.import.wave UTT FILENAME APPEND)
|
329 |
+
Load waveform in FILENAME into UTT in R:Wave.first.wave. If APPEND
|
330 |
+
is specified and non-nil append this to the current waveform."
|
331 |
+
(let ((utt (nth 0 args))
|
332 |
+
(filename (nth 1 args))
|
333 |
+
(append (nth 2 args)))
|
334 |
+
(if (and append (member 'Wave (utt.relationnames utt)))
|
335 |
+
(wave.append (utt.wave utt) (wave.load filename))
|
336 |
+
(begin
|
337 |
+
(utt.relation.create utt 'Wave)
|
338 |
+
(item.set_feat
|
339 |
+
(utt.relation.append utt 'Wave)
|
340 |
+
"wave"
|
341 |
+
(wave.load filename))))
|
342 |
+
utt))
|
343 |
+
|
344 |
+
(define (utt.save.wave . args)
|
345 |
+
"(utt.save.wave UTT FILENAME FILETYPE)
|
346 |
+
Save waveform in UTT in FILENAME with FILETYPE (if specified) or
|
347 |
+
using global parameter Wavefiletype."
|
348 |
+
(wave.save
|
349 |
+
(utt.wave (nth 0 args))
|
350 |
+
(nth 1 args)
|
351 |
+
(nth 2 args))
|
352 |
+
(nth 0 args))
|
353 |
+
|
354 |
+
(define (utt.play utt)
|
355 |
+
"(utt.play UTT)
|
356 |
+
Play waveform in utt by current audio method."
|
357 |
+
(wave.play (utt.wave utt))
|
358 |
+
utt)
|
359 |
+
|
360 |
+
(define (utt.save.track utt filename relation feature)
|
361 |
+
"(utt.save.track utt filename relation feature)
|
362 |
+
DEPRICATED use trace.save instead."
|
363 |
+
(format stderr "utt.save.track: DEPRICATED use track.save instead\n")
|
364 |
+
(track.save
|
365 |
+
(item.feat
|
366 |
+
(utt.relation.first utt relation)
|
367 |
+
feature)
|
368 |
+
filename)
|
369 |
+
utt)
|
370 |
+
|
371 |
+
(define (utt.import.track utt filename relation fname)
|
372 |
+
"(utt.import.track UTT FILENAME RELATION FEATURE_NAME)
|
373 |
+
Load track in FILENAME into UTT in R:RELATION.first.FEATURE_NAME.
|
374 |
+
Deletes RELATION if it already exists. (you maybe want to use track.load
|
375 |
+
directly rather than this legacy function."
|
376 |
+
(utt.relation.create utt relation)
|
377 |
+
(item.set_feat
|
378 |
+
(utt.relation.append utt relation)
|
379 |
+
fname
|
380 |
+
(track.load filename))
|
381 |
+
utt)
|
382 |
+
|
383 |
+
(define (wagon_predict item tree)
|
384 |
+
"(wagon_predict ITEM TREE)
|
385 |
+
Predict with given ITEM and CART tree and return the prediction
|
386 |
+
(the last item) rather than whole probability distribution."
|
387 |
+
(car (last (wagon item tree))))
|
388 |
+
|
389 |
+
(define (phone_is_silence phone)
|
390 |
+
(member_string
|
391 |
+
phone
|
392 |
+
(car (cdr (car (PhoneSet.description '(silences)))))))
|
393 |
+
|
394 |
+
(define (phone_feature phone feat)
|
395 |
+
"(phone_feature phone feat)
|
396 |
+
Return the feature for given phone in current phone set, or 0
|
397 |
+
if it doesn't exist."
|
398 |
+
(let ((ph (intern phone)))
|
399 |
+
(let ((fnames (cadr (assoc 'features (PhoneSet.description))))
|
400 |
+
(fvals (cdr (assoc ph (cadr (assoc 'phones (PhoneSet.description)))))))
|
401 |
+
(while (and fnames (not (string-equal feat (car (car fnames)))))
|
402 |
+
(set! fvals (cdr fvals))
|
403 |
+
(set! fnames (cdr fnames)))
|
404 |
+
(if fnames
|
405 |
+
(car fvals)
|
406 |
+
0))))
|
407 |
+
|
408 |
+
(defvar server_max_clients 10
|
409 |
+
"server_max_clients
|
410 |
+
In server mode, the maximum number of clients supported at any one
|
411 |
+
time. When more that this number of clients attach simulaneous
|
412 |
+
the last ones are denied access. Default value is 10.
|
413 |
+
[see Server/client API]")
|
414 |
+
|
415 |
+
(defvar server_port 1314
|
416 |
+
"server_port
|
417 |
+
In server mode the inet port number the server will wait for connects
|
418 |
+
on. The default value is 1314. [see Server/client API]")
|
419 |
+
|
420 |
+
(defvar server_log_file t
|
421 |
+
"server_log_file
|
422 |
+
If set to t server log information is printed to standard output
|
423 |
+
of the server process. If set to nil no output is given. If set
|
424 |
+
to anything else the value is used as the name of file to which
|
425 |
+
server log information is appended. Note this value is checked at
|
426 |
+
server start time, there is no way a client may change this.
|
427 |
+
[see Server/client API]")
|
428 |
+
|
429 |
+
(defvar server_passwd nil
|
430 |
+
"server_passwd
|
431 |
+
If non-nil clients must send this passwd to the server followed by
|
432 |
+
a newline before they can get a connection. It would be normal
|
433 |
+
to set this for the particular server task.
|
434 |
+
[see Server/client API]")
|
435 |
+
|
436 |
+
(defvar server_access_list '(localhost)
|
437 |
+
"server_access_list
|
438 |
+
If non-nil this is the exhaustive list of machines and domains
|
439 |
+
from which clients may access the server. This is a list of REGEXs
|
440 |
+
that client host must match. Remember to add the backslashes before
|
441 |
+
the dots. [see Server/client API]")
|
442 |
+
|
443 |
+
(defvar server_deny_list nil
|
444 |
+
"server_deny_list
|
445 |
+
If non-nil this is a list of machines which are to be denied access
|
446 |
+
to the server absolutely, irrespective of any other control features.
|
447 |
+
The list is a list of REGEXs that are used to matched the client hostname.
|
448 |
+
This list is checked first, then server_access_list, then passwd.
|
449 |
+
[see Server/client API]")
|
450 |
+
|
451 |
+
(define (def_feature_docstring fname fdoc)
|
452 |
+
"(def_feature_docstring FEATURENAME FEATUREDOC)
|
453 |
+
As some feature are used directly of stream items with no
|
454 |
+
accompanying feature function, the features are just values on the feature
|
455 |
+
list. This function also those features to have an accompanying
|
456 |
+
documentation string."
|
457 |
+
(let ((fff (assoc fname ff_docstrings)))
|
458 |
+
(cond
|
459 |
+
(fff ;; replace what's already there
|
460 |
+
(set-cdr! fff fdoc))
|
461 |
+
(t
|
462 |
+
(set! ff_docstrings (cons (cons fname fdoc) ff_docstrings))))
|
463 |
+
t))
|
464 |
+
|
465 |
+
(define (linear_regression item model)
|
466 |
+
"(linear_regression ITEM MODEL)
|
467 |
+
Use linear regression MODEL on ITEM. MODEL consists of a list
|
468 |
+
of features, weights and optional map list. E.g. ((Intercept 100)
|
469 |
+
(tobi_accent 10 (H* !H*)))."
|
470 |
+
(let ((intercept (if (equal? 'Intercept (car (car model)))
|
471 |
+
(car (cdr (car model))) 0))
|
472 |
+
(mm (if (equal? 'Intercept (car (car model)))
|
473 |
+
(cdr model) model)))
|
474 |
+
(apply +
|
475 |
+
(cons intercept
|
476 |
+
(mapcar
|
477 |
+
(lambda (f)
|
478 |
+
(let ((ff (item.feat item (car f))))
|
479 |
+
(if (car (cdr (cdr f)))
|
480 |
+
(if (member_string ff (car (cdr (cdr f))))
|
481 |
+
(car (cdr f))
|
482 |
+
0)
|
483 |
+
(* (parse-number ff) (car (cdr f))))))
|
484 |
+
mm)))))
|
485 |
+
|
486 |
+
(defvar help
|
487 |
+
"The Festival Speech Synthesizer System: Help
|
488 |
+
|
489 |
+
Getting Help
|
490 |
+
(doc '<SYMBOL>) displays help on <SYMBOL>
|
491 |
+
(manual nil) displays manual in local netscape
|
492 |
+
C-c return to top level
|
493 |
+
C-d or (quit) Exit Festival
|
494 |
+
(If compiled with editline)
|
495 |
+
M-h displays help on current symbol
|
496 |
+
M-s speaks help on current symbol
|
497 |
+
M-m displays relevant manula page in local netscape
|
498 |
+
TAB Command, symbol and filename completion
|
499 |
+
C-p or up-arrow Previous command
|
500 |
+
C-b or left-arrow Move back one character
|
501 |
+
C-f or right-arrow
|
502 |
+
Move forward one character
|
503 |
+
Normal Emacs commands work for editing command line
|
504 |
+
|
505 |
+
Doing stuff
|
506 |
+
(SayText TEXT) Synthesize text, text should be surrounded by
|
507 |
+
double quotes
|
508 |
+
(tts FILENAME nil) Say contexts of file, FILENAME should be
|
509 |
+
surrounded by double quotes
|
510 |
+
(voice_rab_diphone) Select voice (Britsh Male)
|
511 |
+
(voice_kal_diphone) Select voice (American Male)
|
512 |
+
")
|
513 |
+
|
514 |
+
(define (festival_warranty)
|
515 |
+
"(festival_warranty)
|
516 |
+
Display Festival's copyright and warranty. [see Copying]"
|
517 |
+
(format t
|
518 |
+
(string-append
|
519 |
+
" The Festival Speech Synthesis System: "
|
520 |
+
festival_version
|
521 |
+
"
|
522 |
+
Centre for Speech Technology Research
|
523 |
+
University of Edinburgh, UK
|
524 |
+
Copyright (c) 1996-2014
|
525 |
+
All Rights Reserved.
|
526 |
+
|
527 |
+
Permission is hereby granted, free of charge, to use and distribute
|
528 |
+
this software and its documentation without restriction, including
|
529 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
530 |
+
distribute, sublicense, and/or sell copies of this work, and to
|
531 |
+
permit persons to whom this work is furnished to do so, subject to
|
532 |
+
the following conditions:
|
533 |
+
1. The code must retain the above copyright notice, this list of
|
534 |
+
conditions and the following disclaimer.
|
535 |
+
2. Any modifications must be clearly marked as such.
|
536 |
+
3. Original authors' names are not deleted.
|
537 |
+
4. The authors' names are not used to endorse or promote products
|
538 |
+
derived from this software without specific prior written
|
539 |
+
permission.
|
540 |
+
|
541 |
+
THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK
|
542 |
+
DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
543 |
+
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
|
544 |
+
SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE
|
545 |
+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
546 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
547 |
+
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
548 |
+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
549 |
+
THIS SOFTWARE.
|
550 |
+
")))
|
551 |
+
|
552 |
+
(define (intro)
|
553 |
+
"(intro)
|
554 |
+
Synthesize an introduction to the Festival Speech Synthesis System."
|
555 |
+
(tts (path-append libdir "../examples/intro.text") nil))
|
556 |
+
|
557 |
+
(define (intro-spanish)
|
558 |
+
"(intro-spanish)
|
559 |
+
Synthesize an introduction to the Festival Speech Synthesis System
|
560 |
+
in spanish. Spanish voice must already be selected for this."
|
561 |
+
(tts (path-append libdir "../examples/spintro.text") nil))
|
562 |
+
|
563 |
+
(define (na_play FILENAME)
|
564 |
+
"(play_wave FILENAME)
|
565 |
+
Play given wavefile"
|
566 |
+
(utt.play (utt.synth (eval (list 'Utterance 'Wave FILENAME)))))
|
567 |
+
|
568 |
+
;;; Some autoload commands
|
569 |
+
(autoload manual-sym "festdoc" "Show appropriate manual section for symbol.")
|
570 |
+
(autoload manual "festdoc" "Show manual section.")
|
571 |
+
|
572 |
+
(autoload display "display" "Graphically display utterance.")
|
573 |
+
|
574 |
+
(autoload festtest "festtest" "Run tests of Festival.")
|
575 |
+
|
576 |
+
(defvar diphone_module_hooks nil
|
577 |
+
"diphone_module_hooks
|
578 |
+
A function or list of functions that will be applied to the utterance
|
579 |
+
at the start of the diphone module. It can be used to map segment
|
580 |
+
names to those that will be used by the diphone database itself.
|
581 |
+
Typical use specifies _ and $ for consonant clusters and syllable
|
582 |
+
boundaries, mapping to dark ll's etc. Reduction and tap type
|
583 |
+
phenomena should probabaly be done by post lexical rules though the
|
584 |
+
distinction is not a clear one.")
|
585 |
+
|
586 |
+
(def_feature_docstring
|
587 |
+
'Segment.diphone_phone_name
|
588 |
+
"Segment.diphone_phone_name
|
589 |
+
This is produced by the diphone module to contain the desired phone
|
590 |
+
name for the desired diphone. This adds things like _ if part of
|
591 |
+
a consonant or $ to denote syllable boundaries. These are generated
|
592 |
+
on a per voice basis by function(s) specified by diphone_module_hooks.
|
593 |
+
Identification of dark ll's etc. may also be included. Note this is not
|
594 |
+
necessarily the name of the diphone selected as if it is not found
|
595 |
+
some of these characters will be removed and fall back values will be
|
596 |
+
used.")
|
597 |
+
|
598 |
+
(def_feature_docstring
|
599 |
+
'Syllable.stress
|
600 |
+
"Syllable.stress
|
601 |
+
The lexical stress of the syllable as specified from the lexicon entry
|
602 |
+
corresponding to the word related to this syllable.")
|
603 |
+
|
604 |
+
;;;
|
605 |
+
;;; I tried some tests on the resulting speed both runtime and loadtime
|
606 |
+
;;; but compiled files don't seem to make any significant difference
|
607 |
+
;;;
|
608 |
+
(define (compile_library)
|
609 |
+
"(compile_library)
|
610 |
+
Compile all the scheme files in the library directory."
|
611 |
+
(mapcar
|
612 |
+
(lambda (file)
|
613 |
+
(format t "compile ... %s\n" file)
|
614 |
+
(compile-file (string-before file ".scm")))
|
615 |
+
(list
|
616 |
+
"synthesis.scm" "siod.scm" "init.scm" "lexicons.scm"
|
617 |
+
"festival.scm" "gsw_diphone.scm" "intonation.scm" "duration.scm"
|
618 |
+
"pos.scm" "phrase.scm" "don_diphone.scm" "rab_diphone.scm"
|
619 |
+
"voices.scm" "tts.scm" "festdoc.scm" "languages.scm" "token.scm"
|
620 |
+
"mbrola.scm" "display.scm" "postlex.scm" "tokenpos.scm"
|
621 |
+
"festtest.scm" "cslush.scm" "ducs_cluster.scm" "sucs.scm"
|
622 |
+
"web.scm" "cart_aux.scm"
|
623 |
+
"lts_nrl.scm" "lts_nrl_us.scm" "email-mode.scm"
|
624 |
+
"mrpa_phones.scm" "radio_phones.scm" "holmes_phones.scm"
|
625 |
+
"mrpa_durs.scm" "klatt_durs.scm" "gswdurtreeZ.scm"
|
626 |
+
"tobi.scm" "f2bf0lr.scm"))
|
627 |
+
t)
|
628 |
+
|
629 |
+
;;; For mlsa resynthesizer
|
630 |
+
(defvar mlsa_alpha_param 0.42)
|
631 |
+
(defvar mlsa_beta_param 0.0)
|
632 |
+
|
633 |
+
(provide 'festival)
|
CosyVoice-ttsfrd/resource/festival/festtest.scm
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Some basic functions used in tests for Festival
|
35 |
+
;;;
|
36 |
+
|
37 |
+
(define (test_words text)
|
38 |
+
"(test_words TEXT)
|
39 |
+
prints TEXT, Synthesizes TEXT and outputs the words in it."
|
40 |
+
(format t "Word test: %s\n " text)
|
41 |
+
(set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
|
42 |
+
(mapcar
|
43 |
+
(lambda (word) (format t "%s " (car word)))
|
44 |
+
(utt.features utt1 'Word '(name)))
|
45 |
+
(format t "\n")
|
46 |
+
t)
|
47 |
+
|
48 |
+
(define (test_segments text)
|
49 |
+
"(test_segments TEXT)
|
50 |
+
prints TEXT, Synthesizes TEXT and outputs the segments in it."
|
51 |
+
(format t "Segment test: %s\n " text)
|
52 |
+
(set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
|
53 |
+
(mapcar
|
54 |
+
(lambda (word) (format t "%s " (car word)))
|
55 |
+
(utt.features utt1 'Segment '(name)))
|
56 |
+
(format t "\n")
|
57 |
+
)
|
58 |
+
|
59 |
+
(define (test_phrases text)
|
60 |
+
"(test_phrases TEXT)
|
61 |
+
prints TEXT, Synthesizes TEXT and outputs the words and phrase breaks."
|
62 |
+
(format t "Phrase test: %s \n " text)
|
63 |
+
(set! utt1 (utt.synth (eval (list 'Utterance 'Text text))))
|
64 |
+
(mapcar
|
65 |
+
(lambda (phrase)
|
66 |
+
(mapcar (lambda (w) (format t "%s " (car (car w)))) (cdr phrase))
|
67 |
+
(format t "%s\n " (car (car phrase))))
|
68 |
+
(utt.relation_tree utt1 'Phrase))
|
69 |
+
(format t "\n")
|
70 |
+
t)
|
71 |
+
|
72 |
+
(provide 'festtest)
|
CosyVoice-ttsfrd/resource/festival/fringe.scm
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
6 |
+
;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
|
7 |
+
;;;
|
8 |
+
;;; The master copy of this file is in ../../speech_tools/lib/siod/fringe.scm
|
9 |
+
;;; and is copied here at build time.
|
10 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
24 |
+
;;; ;;
|
25 |
+
;;; Centre for Speech Technology Research ;;
|
26 |
+
;;; University of Edinburgh, UK ;;
|
27 |
+
;;; Copyright (c) 1996,1997 ;;
|
28 |
+
;;; All Rights Reserved. ;;
|
29 |
+
;;; ;;
|
30 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
31 |
+
;;; this software and its documentation without restriction, including ;;
|
32 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
33 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
34 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
35 |
+
;;; the following conditions: ;;
|
36 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
37 |
+
;;; conditions and the following disclaimer. ;;
|
38 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
39 |
+
;;; 3. Original authors' names are not deleted. ;;
|
40 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
41 |
+
;;; derived from this software without specific prior written ;;
|
42 |
+
;;; permission. ;;
|
43 |
+
;;; ;;
|
44 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
45 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
46 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
47 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
48 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
49 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
50 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
51 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
52 |
+
;;; THIS SOFTWARE. ;;
|
53 |
+
;;; ;;
|
54 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
55 |
+
;;;
|
56 |
+
;;; Talking to fringe.
|
57 |
+
|
58 |
+
(defvar fringe_verbose nil
|
59 |
+
"fringe_verbose
|
60 |
+
If this is set true, all subsequent fringe connections will
|
61 |
+
print a trace of what they are doing.")
|
62 |
+
|
63 |
+
;;; Aliases which are better suited to command line use.
|
64 |
+
|
65 |
+
(defvar fringe_name "fringe"
|
66 |
+
"fringe_name
|
67 |
+
The name of the last name passed to \[fringe_setup\].")
|
68 |
+
|
69 |
+
(defvar fringe_connection nil
|
70 |
+
"fringe_connection
|
71 |
+
A connection to fringe, used by the command line fringe functions.")
|
72 |
+
|
73 |
+
(define (fringe_setup &opt name)
|
74 |
+
"(fringe_setup &opt name)
|
75 |
+
Connect to fringe."
|
76 |
+
|
77 |
+
(fringe_read_server_table)
|
78 |
+
(if (not name) (set! name fringe_name))
|
79 |
+
(set! fringe_connection (fringe_server "fringe"))
|
80 |
+
(set! fringe_name name)
|
81 |
+
)
|
82 |
+
|
83 |
+
(define (fringe command)
|
84 |
+
"(fringe COMMAND)
|
85 |
+
Send COMMAND to the fringe server \[fringe_connection\]
|
86 |
+
For command line use, use (fringe_comand_string...) in scripts. "
|
87 |
+
(if (not fringe_connection) (fringe_setup))
|
88 |
+
(let ((val (fringe_command_string fringe_connection command)))
|
89 |
+
(if (or (null val) (consp val))
|
90 |
+
nil
|
91 |
+
val)
|
92 |
+
)
|
93 |
+
)
|
94 |
+
|
95 |
+
(define (fringel package operation args)
|
96 |
+
"(fringel PACKAGE OPERATION ARGS)
|
97 |
+
Send a command to the fringe server \[fringe_connection\].
|
98 |
+
For command line use, use (fringe_comand...) in scripts. "
|
99 |
+
|
100 |
+
(if (not fringe_connection) (fringe_setup))
|
101 |
+
(let ((val (fringe_command fringe_connection package operation args)))
|
102 |
+
(if (or (null val) (consp val))
|
103 |
+
nil
|
104 |
+
val)
|
105 |
+
)
|
106 |
+
)
|
107 |
+
|
108 |
+
(provide 'fringe)
|
CosyVoice-ttsfrd/resource/festival/gswdurtreeZ.scm
ADDED
@@ -0,0 +1,947 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; A tree to predict zcore durations build from gsw 450 (timit)
|
35 |
+
;;; doesn't use actual phonemes so it can have better generalizations
|
36 |
+
;;;
|
37 |
+
|
38 |
+
;; pre Sue's changes to mrpa_phones (on traing data)
|
39 |
+
;; RMSE 0.79102 Correlation is 0.610184 Mean (abs) Error 0.605081 (0.509517)
|
40 |
+
;; Post with balance
|
41 |
+
;; train test spit --stop 19 --balance 16
|
42 |
+
;; RMSE 0.841861 Correlation is 0.526064 Mean (abs) Error 0.646614 (0.539288)
|
43 |
+
;; on training data
|
44 |
+
;; RMSE 0.784032 Correlation is 0.619165 Mean (abs) Error 0.602819 (0.501332)
|
45 |
+
;;
|
46 |
+
;; Oct 29th 1997
|
47 |
+
;; stepwise (but its over trained)
|
48 |
+
;; RMSE 0.8322 Correlation is 0.5286 Mean (abs) Error 0.6375 (0.5350)
|
49 |
+
;;
|
50 |
+
;; May 11th 1998
|
51 |
+
;; new architecture, full new train on f2b on test data
|
52 |
+
;; in zscore domain
|
53 |
+
;; RMSE 0.8076 Correlation is 0.5307 Mean (abs) Error 0.6113 (0.5278)
|
54 |
+
;; in absolute domain
|
55 |
+
;; RMSE 0.0276 Correlation 0.7468 Mean (abs) error 0.0203 (0.0187)
|
56 |
+
;;
|
57 |
+
;; May 18th 1998
|
58 |
+
;; various corrections f2bdur.bbz.H0.S50.tree no names zscore
|
59 |
+
;; in zscore domain
|
60 |
+
;; RMSE 0.8049 Correlation is 0.6003 Mean (abs) Error 0.6008 (0.5357)
|
61 |
+
;; in absolute domain
|
62 |
+
;; RMSE 0.0268 Correlation 0.7766 Mean (abs) error 0.0196 (0.0183)
|
63 |
+
|
64 |
+
(set! gsw_duration_cart_tree
|
65 |
+
'
|
66 |
+
((name is #)
|
67 |
+
((emph_sil is +)
|
68 |
+
((0.0 -0.5))
|
69 |
+
((p.R:SylStructure.parent.parent.pbreak is BB)
|
70 |
+
((0.0 2.0))
|
71 |
+
((0.0 0.0))))
|
72 |
+
|
73 |
+
((R:SylStructure.parent.accented is 0)
|
74 |
+
((n.ph_ctype is 0)
|
75 |
+
((p.ph_vlng is 0)
|
76 |
+
((R:SylStructure.parent.syl_codasize < 1.5)
|
77 |
+
((p.ph_ctype is n)
|
78 |
+
((ph_ctype is f)
|
79 |
+
((0.559208 -0.783163))
|
80 |
+
((1.05215 -0.222704)))
|
81 |
+
((ph_ctype is s)
|
82 |
+
((R:SylStructure.parent.syl_break is 2)
|
83 |
+
((0.589948 0.764459))
|
84 |
+
((R:SylStructure.parent.asyl_in < 0.7)
|
85 |
+
((1.06385 0.567944))
|
86 |
+
((0.691943 0.0530272))))
|
87 |
+
((ph_vlng is l)
|
88 |
+
((pp.ph_vfront is 1)
|
89 |
+
((1.06991 0.766486))
|
90 |
+
((R:SylStructure.parent.syl_break is 1)
|
91 |
+
((0.69665 0.279248))
|
92 |
+
((0.670353 0.0567774))))
|
93 |
+
((p.ph_ctype is s)
|
94 |
+
((seg_onsetcoda is coda)
|
95 |
+
((0.828638 -0.038356))
|
96 |
+
((ph_ctype is f)
|
97 |
+
((0.7631 -0.545853))
|
98 |
+
((0.49329 -0.765994))))
|
99 |
+
((R:SylStructure.parent.parent.gpos is det)
|
100 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
101 |
+
((R:SylStructure.parent.sub_phrases < 1)
|
102 |
+
((0.811686 0.160195))
|
103 |
+
((0.799015 0.713958)))
|
104 |
+
((0.731599 -0.215472)))
|
105 |
+
((ph_ctype is r)
|
106 |
+
((0.673487 0.092772))
|
107 |
+
((R:SylStructure.parent.asyl_in < 1)
|
108 |
+
((0.745273 0.00132813))
|
109 |
+
((0.75457 -0.334898)))))))))
|
110 |
+
((pos_in_syl < 0.5)
|
111 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
112 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
113 |
+
((0.902446 -0.041618))
|
114 |
+
((R:SylStructure.parent.sub_phrases < 2.3)
|
115 |
+
((0.900629 0.262952))
|
116 |
+
((1.18474 0.594794))))
|
117 |
+
((seg_onset_stop is 0)
|
118 |
+
((R:SylStructure.parent.position_type is mid)
|
119 |
+
((0.512323 -0.760444))
|
120 |
+
((R:SylStructure.parent.syl_out < 6.8)
|
121 |
+
((pp.ph_vlng is a)
|
122 |
+
((0.640575 -0.450449))
|
123 |
+
((ph_ctype is f)
|
124 |
+
((R:SylStructure.parent.sub_phrases < 1.3)
|
125 |
+
((0.862876 -0.296956))
|
126 |
+
((R:SylStructure.parent.syl_out < 2.4)
|
127 |
+
((0.803215 0.0422868))
|
128 |
+
((0.877856 -0.154465))))
|
129 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
130 |
+
((R:SylStructure.parent.syl_out < 1.2)
|
131 |
+
((0.567081 -0.264199))
|
132 |
+
((0.598043 -0.541738)))
|
133 |
+
((0.676843 -0.166623)))))
|
134 |
+
((0.691678 -0.57173))))
|
135 |
+
((R:SylStructure.parent.parent.gpos is cc)
|
136 |
+
((1.15995 0.313289))
|
137 |
+
((pp.ph_vfront is 1)
|
138 |
+
((0.555993 0.0695819))
|
139 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
140 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
141 |
+
((0.721635 -0.367088))
|
142 |
+
((0.71919 -0.194887)))
|
143 |
+
((0.547052 -0.0637491)))))))
|
144 |
+
((ph_ctype is s)
|
145 |
+
((R:SylStructure.parent.syl_break is 0)
|
146 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
147 |
+
((0.650007 -0.333421))
|
148 |
+
((0.846301 -0.165383)))
|
149 |
+
((0.527756 -0.516332)))
|
150 |
+
((R:SylStructure.parent.syl_break is 0)
|
151 |
+
((p.ph_ctype is s)
|
152 |
+
((0.504414 -0.779112))
|
153 |
+
((0.812498 -0.337611)))
|
154 |
+
((pos_in_syl < 1.4)
|
155 |
+
((0.513041 -0.745807))
|
156 |
+
((p.ph_ctype is s)
|
157 |
+
((0.350582 -1.04907))
|
158 |
+
((0.362 -0.914974))))))))
|
159 |
+
((R:SylStructure.parent.syl_break is 0)
|
160 |
+
((ph_ctype is n)
|
161 |
+
((R:SylStructure.parent.position_type is initial)
|
162 |
+
((pos_in_syl < 1.2)
|
163 |
+
((0.580485 0.172658))
|
164 |
+
((0.630973 -0.101423)))
|
165 |
+
((0.577937 -0.360092)))
|
166 |
+
((R:SylStructure.parent.syl_out < 2.9)
|
167 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
168 |
+
((R:SylStructure.parent.position_type is initial)
|
169 |
+
((0.896092 0.764189))
|
170 |
+
((R:SylStructure.parent.sub_phrases < 3.6)
|
171 |
+
((ph_ctype is s)
|
172 |
+
((0.877362 0.555132))
|
173 |
+
((0.604511 0.369882)))
|
174 |
+
((0.799982 0.666966))))
|
175 |
+
((seg_onsetcoda is coda)
|
176 |
+
((p.ph_vlng is a)
|
177 |
+
((R:SylStructure.parent.last_accent < 0.4)
|
178 |
+
((0.800736 0.240634))
|
179 |
+
((0.720606 0.486176)))
|
180 |
+
((1.18173 0.573811)))
|
181 |
+
((0.607147 0.194468))))
|
182 |
+
((ph_ctype is r)
|
183 |
+
((0.88377 0.499383))
|
184 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
185 |
+
((R:SylStructure.parent.position_type is initial)
|
186 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
187 |
+
((0.62798 0.0737318))
|
188 |
+
((0.787334 0.331014)))
|
189 |
+
((ph_ctype is s)
|
190 |
+
((0.808368 0.0929299))
|
191 |
+
((0.527948 -0.0443271))))
|
192 |
+
((seg_coda_fric is 0)
|
193 |
+
((p.ph_vlng is a)
|
194 |
+
((0.679745 0.517681))
|
195 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
196 |
+
((0.759979 0.128316))
|
197 |
+
((0.775233 0.361383))))
|
198 |
+
((R:SylStructure.parent.last_accent < 1.3)
|
199 |
+
((0.696255 0.054136))
|
200 |
+
((0.632425 0.246742))))))))
|
201 |
+
((pos_in_syl < 0.3)
|
202 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
203 |
+
((0.847602 0.621547))
|
204 |
+
((ph_ctype is s)
|
205 |
+
((0.880645 0.501679))
|
206 |
+
((R:SylStructure.parent.sub_phrases < 3.3)
|
207 |
+
((R:SylStructure.parent.sub_phrases < 0.3)
|
208 |
+
((0.901014 -0.042049))
|
209 |
+
((0.657493 0.183226)))
|
210 |
+
((0.680126 0.284799)))))
|
211 |
+
((ph_ctype is s)
|
212 |
+
((p.ph_vlng is s)
|
213 |
+
((0.670033 -0.820934))
|
214 |
+
((0.863306 -0.348735)))
|
215 |
+
((ph_ctype is n)
|
216 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
217 |
+
((0.656966 -0.40092))
|
218 |
+
((0.530966 -0.639366)))
|
219 |
+
((seg_coda_fric is 0)
|
220 |
+
((1.04153 0.364857))
|
221 |
+
((pos_in_syl < 1.2)
|
222 |
+
((R:SylStructure.parent.syl_out < 3.4)
|
223 |
+
((0.81503 -0.00768613))
|
224 |
+
((0.602665 -0.197753)))
|
225 |
+
((0.601844 -0.394632)))))))))
|
226 |
+
((n.ph_ctype is f)
|
227 |
+
((pos_in_syl < 1.5)
|
228 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
229 |
+
((pos_in_syl < 0.1)
|
230 |
+
((1.63863 0.938841))
|
231 |
+
((R:SylStructure.parent.position_type is initial)
|
232 |
+
((0.897722 -0.0796637))
|
233 |
+
((nn.ph_vheight is 0)
|
234 |
+
((0.781081 0.480026))
|
235 |
+
((0.779711 0.127175)))))
|
236 |
+
((ph_ctype is r)
|
237 |
+
((p.ph_ctype is s)
|
238 |
+
((0.581329 -0.708767))
|
239 |
+
((0.564366 -0.236212)))
|
240 |
+
((ph_vlng is a)
|
241 |
+
((p.ph_ctype is r)
|
242 |
+
((0.70992 -0.273389))
|
243 |
+
((R:SylStructure.parent.parent.gpos is in)
|
244 |
+
((0.764696 0.0581338))
|
245 |
+
((nn.ph_vheight is 0)
|
246 |
+
((0.977737 0.721904))
|
247 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
248 |
+
((pp.ph_vfront is 0)
|
249 |
+
((0.586708 0.0161206))
|
250 |
+
((0.619949 0.227372)))
|
251 |
+
((0.707285 0.445569))))))
|
252 |
+
((ph_ctype is n)
|
253 |
+
((R:SylStructure.parent.syl_break is 1)
|
254 |
+
((nn.ph_vfront is 2)
|
255 |
+
((0.430295 -0.120097))
|
256 |
+
((0.741371 0.219042)))
|
257 |
+
((0.587492 0.321245)))
|
258 |
+
((p.ph_ctype is n)
|
259 |
+
((0.871586 0.134075))
|
260 |
+
((p.ph_ctype is r)
|
261 |
+
((0.490751 -0.466418))
|
262 |
+
((R:SylStructure.parent.syl_codasize < 1.3)
|
263 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
264 |
+
((p.ph_ctype is s)
|
265 |
+
((0.407452 -0.425925))
|
266 |
+
((0.644771 -0.542809)))
|
267 |
+
((0.688772 -0.201899)))
|
268 |
+
((ph_vheight is 1)
|
269 |
+
((nn.ph_vheight is 0)
|
270 |
+
((0.692018 0.209018))
|
271 |
+
((0.751345 -0.178136)))
|
272 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
273 |
+
((R:SylStructure.parent.asyl_in < 1.5)
|
274 |
+
((0.599633 -0.235593))
|
275 |
+
((0.60042 0.126118)))
|
276 |
+
((p.ph_vlng is a)
|
277 |
+
((0.7148 -0.174812))
|
278 |
+
((R:SylStructure.parent.parent.gpos is content)
|
279 |
+
((0.761296 -0.231509))
|
280 |
+
((0.813081 -0.536405)))))))))))))
|
281 |
+
((ph_ctype is n)
|
282 |
+
((0.898844 0.163343))
|
283 |
+
((p.ph_vlng is s)
|
284 |
+
((seg_coda_fric is 0)
|
285 |
+
((0.752921 -0.45528))
|
286 |
+
((0.890079 -0.0998025)))
|
287 |
+
((ph_ctype is f)
|
288 |
+
((0.729376 -0.930547))
|
289 |
+
((ph_ctype is s)
|
290 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
291 |
+
((0.745052 -0.634119))
|
292 |
+
((0.521502 -0.760176)))
|
293 |
+
((R:SylStructure.parent.syl_break is 1)
|
294 |
+
((0.766575 -0.121355))
|
295 |
+
((0.795616 -0.557509))))))))
|
296 |
+
((p.ph_vlng is 0)
|
297 |
+
((p.ph_ctype is r)
|
298 |
+
((ph_vlng is 0)
|
299 |
+
((0.733659 -0.402734))
|
300 |
+
((R:SylStructure.parent.sub_phrases < 1.5)
|
301 |
+
((ph_vlng is s)
|
302 |
+
((0.326176 -0.988478))
|
303 |
+
((n.ph_ctype is s)
|
304 |
+
((0.276471 -0.802536))
|
305 |
+
((0.438283 -0.900628))))
|
306 |
+
((nn.ph_vheight is 0)
|
307 |
+
((ph_vheight is 2)
|
308 |
+
((0.521 -0.768992))
|
309 |
+
((0.615436 -0.574918)))
|
310 |
+
((ph_vheight is 1)
|
311 |
+
((0.387376 -0.756359))
|
312 |
+
((pos_in_syl < 0.3)
|
313 |
+
((0.417235 -0.808937))
|
314 |
+
((0.384043 -0.93315)))))))
|
315 |
+
((ph_vlng is a)
|
316 |
+
((ph_ctype is 0)
|
317 |
+
((n.ph_ctype is s)
|
318 |
+
((p.ph_ctype is f)
|
319 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
320 |
+
((0.415908 -0.428493))
|
321 |
+
((pos_in_syl < 0.1)
|
322 |
+
((0.790441 0.0211071))
|
323 |
+
((0.452465 -0.254485))))
|
324 |
+
((p.ph_ctype is s)
|
325 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
326 |
+
((0.582447 -0.389966))
|
327 |
+
((0.757648 0.185781)))
|
328 |
+
((R:SylStructure.parent.sub_phrases < 1.4)
|
329 |
+
((0.628965 0.422551))
|
330 |
+
((0.713613 0.145576)))))
|
331 |
+
((seg_onset_stop is 0)
|
332 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
333 |
+
((pp.ph_vfront is 1)
|
334 |
+
((0.412363 -0.62319))
|
335 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
336 |
+
((0.729259 -0.317324))
|
337 |
+
((0.441633 -0.591051))))
|
338 |
+
((R:SylStructure.parent.syl_break is 1)
|
339 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
340 |
+
((0.457728 -0.405607))
|
341 |
+
((0.532411 -0.313148)))
|
342 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
343 |
+
((1.14175 0.159416))
|
344 |
+
((0.616396 -0.254651)))))
|
345 |
+
((R:SylStructure.parent.position_type is initial)
|
346 |
+
((0.264181 -0.799896))
|
347 |
+
((0.439801 -0.551309)))))
|
348 |
+
((R:SylStructure.parent.position_type is final)
|
349 |
+
((0.552027 -0.707084))
|
350 |
+
((0.585661 -0.901874))))
|
351 |
+
((ph_ctype is s)
|
352 |
+
((pos_in_syl < 1.2)
|
353 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
354 |
+
((pp.ph_vfront is 1)
|
355 |
+
((0.607449 0.196466))
|
356 |
+
((0.599662 0.00382414)))
|
357 |
+
((0.64109 -0.12859)))
|
358 |
+
((pp.ph_vfront is 1)
|
359 |
+
((0.720484 -0.219339))
|
360 |
+
((0.688707 -0.516734))))
|
361 |
+
((ph_vlng is s)
|
362 |
+
((n.ph_ctype is s)
|
363 |
+
((R:SylStructure.parent.parent.gpos is content)
|
364 |
+
((R:SylStructure.parent.position_type is single)
|
365 |
+
((0.659206 0.159445))
|
366 |
+
((R:SylStructure.parent.parent.word_numsyls < 3.5)
|
367 |
+
((R:SylStructure.parent.sub_phrases < 2)
|
368 |
+
((0.447186 -0.419103))
|
369 |
+
((0.631822 -0.0928561)))
|
370 |
+
((0.451623 -0.576116))))
|
371 |
+
((ph_vheight is 3)
|
372 |
+
((0.578626 -0.64583))
|
373 |
+
((0.56636 -0.4665))))
|
374 |
+
((R:SylStructure.parent.parent.gpos is in)
|
375 |
+
((0.771516 -0.217292))
|
376 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
377 |
+
((0.688571 -0.304382))
|
378 |
+
((R:SylStructure.parent.parent.gpos is content)
|
379 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
380 |
+
((n.ph_ctype is n)
|
381 |
+
((0.556085 -0.572203))
|
382 |
+
((0.820173 -0.240338)))
|
383 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.2)
|
384 |
+
((0.595398 -0.588171))
|
385 |
+
((0.524737 -0.95797))))
|
386 |
+
((R:SylStructure.parent.sub_phrases < 3.9)
|
387 |
+
((0.371492 -0.959427))
|
388 |
+
((0.440479 -0.845747)))))))
|
389 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
390 |
+
((p.ph_ctype is f)
|
391 |
+
((0.524088 -0.482247))
|
392 |
+
((nn.ph_vheight is 1)
|
393 |
+
((0.587666 -0.632362))
|
394 |
+
((ph_vlng is l)
|
395 |
+
((R:SylStructure.parent.position_type is final)
|
396 |
+
((0.513286 -0.713117))
|
397 |
+
((0.604613 -0.924308)))
|
398 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
399 |
+
((0.577997 -0.891342))
|
400 |
+
((0.659804 -1.15252))))))
|
401 |
+
((pp.ph_vlng is s)
|
402 |
+
((ph_ctype is f)
|
403 |
+
((0.813383 -0.599624))
|
404 |
+
((0.984027 -0.0771909)))
|
405 |
+
((p.ph_ctype is f)
|
406 |
+
((R:SylStructure.parent.parent.gpos is in)
|
407 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
408 |
+
((0.313572 -1.03242))
|
409 |
+
((0.525854 -0.542799)))
|
410 |
+
((R:SylStructure.parent.syl_out < 2.8)
|
411 |
+
((0.613007 -0.423979))
|
412 |
+
((0.570258 -0.766379))))
|
413 |
+
((R:SylStructure.parent.syl_break is 1)
|
414 |
+
((R:SylStructure.parent.parent.gpos is to)
|
415 |
+
((0.364585 -0.792895))
|
416 |
+
((ph_vlng is l)
|
417 |
+
((0.69143 -0.276816))
|
418 |
+
((0.65673 -0.523721))))
|
419 |
+
((R:SylStructure.parent.syl_out < 3.6)
|
420 |
+
((R:SylStructure.parent.position_type is initial)
|
421 |
+
((0.682096 -0.488102))
|
422 |
+
((0.406364 -0.731758)))
|
423 |
+
((0.584694 -0.822229)))))))))))
|
424 |
+
((n.ph_ctype is r)
|
425 |
+
((R:SylStructure.parent.position_type is initial)
|
426 |
+
((p.ph_vlng is a)
|
427 |
+
((0.797058 1.02334))
|
428 |
+
((ph_ctype is s)
|
429 |
+
((1.0548 0.536277))
|
430 |
+
((0.817253 0.138201))))
|
431 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
432 |
+
((R:SylStructure.parent.syl_out < 3.3)
|
433 |
+
((0.884574 -0.23471))
|
434 |
+
((0.772063 -0.525292)))
|
435 |
+
((nn.ph_vfront is 1)
|
436 |
+
((1.25254 0.417485))
|
437 |
+
((0.955557 -0.0781996)))))
|
438 |
+
((pp.ph_vfront is 0)
|
439 |
+
((ph_ctype is f)
|
440 |
+
((n.ph_ctype is s)
|
441 |
+
((R:SylStructure.parent.parent.gpos is content)
|
442 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 0)
|
443 |
+
((0.583506 -0.56941))
|
444 |
+
((0.525949 -0.289362)))
|
445 |
+
((0.749316 -0.0921038)))
|
446 |
+
((p.ph_vlng is s)
|
447 |
+
((0.734234 0.139463))
|
448 |
+
((0.680119 -0.0708717))))
|
449 |
+
((ph_vlng is s)
|
450 |
+
((ph_vheight is 1)
|
451 |
+
((0.908712 -0.618971))
|
452 |
+
((0.55344 -0.840495)))
|
453 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 1.2)
|
454 |
+
((pos_in_syl < 1.2)
|
455 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
456 |
+
((0.838715 0.00913392))
|
457 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
458 |
+
((ph_vheight is 2)
|
459 |
+
((0.555513 -0.512523))
|
460 |
+
((R:SylStructure.parent.position_type is initial)
|
461 |
+
((0.758711 0.121704))
|
462 |
+
((0.737555 -0.25637))))
|
463 |
+
((R:SylStructure.parent.syl_out < 3.1)
|
464 |
+
((n.ph_ctype is s)
|
465 |
+
((0.611756 -0.474522))
|
466 |
+
((1.05437 -0.247206)))
|
467 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
468 |
+
((R:SylStructure.parent.position_type is final)
|
469 |
+
((0.567761 -0.597866))
|
470 |
+
((0.785599 -0.407765)))
|
471 |
+
((0.575598 -0.741256))))))
|
472 |
+
((ph_ctype is s)
|
473 |
+
((n.ph_ctype is s)
|
474 |
+
((0.661069 -1.08426))
|
475 |
+
((0.783184 -0.39789)))
|
476 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
477 |
+
((R:SylStructure.parent.sub_phrases < 2.6)
|
478 |
+
((0.511323 -0.666011))
|
479 |
+
((0.691878 -0.499492)))
|
480 |
+
((ph_ctype is r)
|
481 |
+
((0.482131 -0.253186))
|
482 |
+
((0.852955 -0.372832))))))
|
483 |
+
((0.854447 -0.0936489)))))
|
484 |
+
((R:SylStructure.parent.position_type is final)
|
485 |
+
((0.685939 -0.249982))
|
486 |
+
((R:SylStructure.parent.syl_out < 3.2)
|
487 |
+
((0.989843 0.18086))
|
488 |
+
((0.686805 -0.0402908)))))))))
|
489 |
+
((R:SylStructure.parent.syl_out < 2.4)
|
490 |
+
((R:SylStructure.parent.syl_out < 0.2)
|
491 |
+
((seg_onsetcoda is coda)
|
492 |
+
((ph_ctype is s)
|
493 |
+
((R:SylStructure.parent.syl_break is 4)
|
494 |
+
((pp.ph_vlng is 0)
|
495 |
+
((0.959737 1.63203))
|
496 |
+
((1.20714 0.994933)))
|
497 |
+
((n.ph_ctype is 0)
|
498 |
+
((R:SylStructure.parent.syl_break is 2)
|
499 |
+
((0.864809 0.214457))
|
500 |
+
((0.874278 0.730381)))
|
501 |
+
((pp.ph_vfront is 0)
|
502 |
+
((seg_coda_fric is 0)
|
503 |
+
((1.20844 -0.336221))
|
504 |
+
((1.01357 0.468302)))
|
505 |
+
((0.658106 -0.799121)))))
|
506 |
+
((n.ph_ctype is f)
|
507 |
+
((ph_ctype is f)
|
508 |
+
((1.26332 0.0300613))
|
509 |
+
((ph_vlng is d)
|
510 |
+
((1.02719 1.1649))
|
511 |
+
((ph_ctype is 0)
|
512 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
513 |
+
((1.14048 2.2668))
|
514 |
+
((ph_vheight is 1)
|
515 |
+
((1.15528 1.50375))
|
516 |
+
((1.42406 2.07927))))
|
517 |
+
((R:SylStructure.parent.sub_phrases < 1.1)
|
518 |
+
((0.955892 1.10243))
|
519 |
+
((R:SylStructure.parent.syl_break is 2)
|
520 |
+
((1.32682 1.8432))
|
521 |
+
((1.27582 1.59853)))))))
|
522 |
+
((n.ph_ctype is 0)
|
523 |
+
((ph_ctype is n)
|
524 |
+
((R:SylStructure.parent.syl_break is 2)
|
525 |
+
((1.45399 1.12927))
|
526 |
+
((1.05543 0.442376)))
|
527 |
+
((R:SylStructure.parent.syl_break is 4)
|
528 |
+
((R:SylStructure.parent.position_type is final)
|
529 |
+
((ph_ctype is f)
|
530 |
+
((1.46434 1.76508))
|
531 |
+
((0.978055 0.7486)))
|
532 |
+
((1.2395 2.30826)))
|
533 |
+
((ph_ctype is 0)
|
534 |
+
((0.935325 1.69917))
|
535 |
+
((nn.ph_vfront is 1)
|
536 |
+
((1.20456 1.31128))
|
537 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
538 |
+
((nn.ph_vheight is 0)
|
539 |
+
((1.16907 0.212421))
|
540 |
+
((0.952091 0.653094)))
|
541 |
+
((p.ph_ctype is 0)
|
542 |
+
((1.05502 1.25802))
|
543 |
+
((0.818731 0.777568))))))))
|
544 |
+
((ph_ctype is f)
|
545 |
+
((p.ph_ctype is 0)
|
546 |
+
((1.03918 0.163941))
|
547 |
+
((0.737545 -0.167063)))
|
548 |
+
((R:SylStructure.parent.position_type is final)
|
549 |
+
((n.ph_ctype is n)
|
550 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
551 |
+
((R:SylStructure.parent.sub_phrases < 2.8)
|
552 |
+
((0.826207 -0.000859005))
|
553 |
+
((0.871119 0.273433)))
|
554 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
555 |
+
((1.17405 1.05694))
|
556 |
+
((0.858394 0.244916))))
|
557 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
558 |
+
((p.ph_ctype is 0)
|
559 |
+
((1.14092 1.21187))
|
560 |
+
((R:SylStructure.parent.syl_break is 2)
|
561 |
+
((1.02653 0.59865))
|
562 |
+
((0.94248 1.1634))))
|
563 |
+
((seg_coda_fric is 0)
|
564 |
+
((1.07441 0.292935))
|
565 |
+
((1.15736 0.92574)))))
|
566 |
+
((ph_vlng is s)
|
567 |
+
((R:SylStructure.parent.syl_break is 2)
|
568 |
+
((1.34638 1.23484))
|
569 |
+
((0.951514 2.02008)))
|
570 |
+
((ph_ctype is 0)
|
571 |
+
((p.ph_ctype is r)
|
572 |
+
((0.806106 0.697089))
|
573 |
+
((R:SylStructure.parent.syl_break is 2)
|
574 |
+
((1.10891 0.992197))
|
575 |
+
((1.04657 1.51093))))
|
576 |
+
((1.18165 0.520952)))))))))
|
577 |
+
((p.ph_vlng is 0)
|
578 |
+
((pos_in_syl < 0.7)
|
579 |
+
((R:SylStructure.parent.position_type is final)
|
580 |
+
((ph_ctype is r)
|
581 |
+
((0.966357 0.185827))
|
582 |
+
((ph_ctype is s)
|
583 |
+
((0.647163 0.0332298))
|
584 |
+
((0.692972 -0.534917))))
|
585 |
+
((ph_ctype is s)
|
586 |
+
((0.881521 0.575107))
|
587 |
+
((p.ph_ctype is f)
|
588 |
+
((0.8223 -0.111275))
|
589 |
+
((R:SylStructure.parent.last_accent < 0.3)
|
590 |
+
((0.969188 0.09447))
|
591 |
+
((0.894438 0.381947))))))
|
592 |
+
((p.ph_ctype is f)
|
593 |
+
((0.479748 -0.490108))
|
594 |
+
((0.813125 -0.201268))))
|
595 |
+
((ph_ctype is s)
|
596 |
+
((0.908566 1.20397))
|
597 |
+
((R:SylStructure.parent.last_accent < 1.2)
|
598 |
+
((0.88078 0.636568))
|
599 |
+
((0.978087 1.07763))))))
|
600 |
+
((pos_in_syl < 1.3)
|
601 |
+
((R:SylStructure.parent.syl_break is 0)
|
602 |
+
((pos_in_syl < 0.1)
|
603 |
+
((R:SylStructure.parent.position_type is initial)
|
604 |
+
((p.ph_ctype is n)
|
605 |
+
((0.801651 -0.0163359))
|
606 |
+
((ph_ctype is s)
|
607 |
+
((n.ph_ctype is r)
|
608 |
+
((0.893307 1.07253))
|
609 |
+
((p.ph_vlng is 0)
|
610 |
+
((0.92651 0.525806))
|
611 |
+
((0.652444 0.952792))))
|
612 |
+
((p.ph_vlng is 0)
|
613 |
+
((seg_onsetcoda is coda)
|
614 |
+
((0.820151 0.469117))
|
615 |
+
((p.ph_ctype is f)
|
616 |
+
((0.747972 -0.0716448))
|
617 |
+
((ph_ctype is f)
|
618 |
+
((0.770882 0.457137))
|
619 |
+
((0.840905 0.102492)))))
|
620 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
621 |
+
((0.667824 0.697337))
|
622 |
+
((0.737967 0.375114))))))
|
623 |
+
((ph_vheight is 1)
|
624 |
+
((0.624353 0.410671))
|
625 |
+
((R:SylStructure.parent.asyl_in < 0.8)
|
626 |
+
((0.647905 -0.331055))
|
627 |
+
((p.ph_ctype is s)
|
628 |
+
((0.629039 -0.240616))
|
629 |
+
((0.749277 -0.0191273))))))
|
630 |
+
((ph_vheight is 3)
|
631 |
+
((p.ph_ctype is s)
|
632 |
+
((0.626922 0.556537))
|
633 |
+
((0.789357 0.153892)))
|
634 |
+
((seg_onsetcoda is coda)
|
635 |
+
((n.ph_ctype is 0)
|
636 |
+
((R:SylStructure.parent.parent.word_numsyls < 3.4)
|
637 |
+
((0.744714 0.123242))
|
638 |
+
((0.742039 0.295753)))
|
639 |
+
((seg_coda_fric is 0)
|
640 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
641 |
+
((ph_vheight is 1)
|
642 |
+
((0.549715 -0.341018))
|
643 |
+
((0.573641 -0.00893114)))
|
644 |
+
((nn.ph_vfront is 2)
|
645 |
+
((0.67099 -0.744625))
|
646 |
+
((0.664438 -0.302803))))
|
647 |
+
((p.ph_vlng is 0)
|
648 |
+
((0.630028 0.113815))
|
649 |
+
((0.632794 -0.128733)))))
|
650 |
+
((ph_ctype is r)
|
651 |
+
((0.367169 -0.854509))
|
652 |
+
((0.94334 -0.216179))))))
|
653 |
+
((n.ph_ctype is f)
|
654 |
+
((ph_vlng is 0)
|
655 |
+
((1.3089 0.46195))
|
656 |
+
((R:SylStructure.parent.syl_codasize < 1.3)
|
657 |
+
((1.07673 0.657169))
|
658 |
+
((pp.ph_vlng is 0)
|
659 |
+
((0.972319 1.08222))
|
660 |
+
((1.00038 1.46257)))))
|
661 |
+
((p.ph_vlng is l)
|
662 |
+
((1.03617 0.785204))
|
663 |
+
((p.ph_vlng is a)
|
664 |
+
((R:SylStructure.parent.position_type is final)
|
665 |
+
((1.00681 0.321168))
|
666 |
+
((0.928115 0.950834)))
|
667 |
+
((ph_vlng is 0)
|
668 |
+
((pos_in_syl < 0.1)
|
669 |
+
((R:SylStructure.parent.position_type is final)
|
670 |
+
((0.863682 -0.167374))
|
671 |
+
((nn.ph_vheight is 0)
|
672 |
+
((p.ph_ctype is f)
|
673 |
+
((0.773591 -0.00374425))
|
674 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
675 |
+
((0.951802 0.228448))
|
676 |
+
((1.02282 0.504252))))
|
677 |
+
((1.09721 0.736476))))
|
678 |
+
((R:SylStructure.parent.position_type is final)
|
679 |
+
((1.04302 0.0590974))
|
680 |
+
((0.589208 -0.431535))))
|
681 |
+
((n.ph_ctype is 0)
|
682 |
+
((1.27879 1.00642))
|
683 |
+
((ph_vlng is s)
|
684 |
+
((R:SylStructure.parent.asyl_in < 1.4)
|
685 |
+
((0.935787 0.481652))
|
686 |
+
((0.9887 0.749861)))
|
687 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
688 |
+
((R:SylStructure.parent.position_type is final)
|
689 |
+
((0.921307 0.0696307))
|
690 |
+
((0.83675 0.552212)))
|
691 |
+
((0.810076 -0.0479225))))))))))
|
692 |
+
((ph_ctype is s)
|
693 |
+
((n.ph_ctype is s)
|
694 |
+
((0.706959 -1.0609))
|
695 |
+
((p.ph_ctype is n)
|
696 |
+
((0.850614 -0.59933))
|
697 |
+
((n.ph_ctype is r)
|
698 |
+
((0.665947 0.00698725))
|
699 |
+
((n.ph_ctype is 0)
|
700 |
+
((R:SylStructure.parent.position_type is initial)
|
701 |
+
((0.762889 -0.0649044))
|
702 |
+
((0.723956 -0.248899)))
|
703 |
+
((R:SylStructure.parent.sub_phrases < 1.4)
|
704 |
+
((0.632957 -0.601987))
|
705 |
+
((0.889114 -0.302401)))))))
|
706 |
+
((ph_ctype is f)
|
707 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
708 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
709 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
710 |
+
((0.865267 0.164636))
|
711 |
+
((0.581827 -0.0989051)))
|
712 |
+
((nn.ph_vfront is 2)
|
713 |
+
((0.684459 -0.316836))
|
714 |
+
((0.778854 -0.0961191))))
|
715 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
716 |
+
((p.ph_ctype is s)
|
717 |
+
((0.837964 -0.429437))
|
718 |
+
((0.875304 -0.0652743)))
|
719 |
+
((0.611071 -0.635089))))
|
720 |
+
((p.ph_ctype is r)
|
721 |
+
((R:SylStructure.parent.syl_out < 1.1)
|
722 |
+
((0.762012 0.0139361))
|
723 |
+
((0.567983 -0.454845)))
|
724 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
725 |
+
((ph_ctype is l)
|
726 |
+
((1.18845 0.809091))
|
727 |
+
((R:SylStructure.parent.position_type is initial)
|
728 |
+
((ph_ctype is n)
|
729 |
+
((0.773548 -0.277092))
|
730 |
+
((1.01586 0.281001)))
|
731 |
+
((p.ph_ctype is 0)
|
732 |
+
((1.06831 0.699145))
|
733 |
+
((0.924189 0.241873)))))
|
734 |
+
((R:SylStructure.parent.syl_break is 0)
|
735 |
+
((ph_ctype is n)
|
736 |
+
((0.592321 -0.470784))
|
737 |
+
((0.778688 -0.072112)))
|
738 |
+
((n.ph_ctype is s)
|
739 |
+
((1.08848 0.0733489))
|
740 |
+
((1.25674 0.608371))))))))))
|
741 |
+
((pos_in_syl < 0.7)
|
742 |
+
((p.ph_vlng is 0)
|
743 |
+
((R:SylStructure.parent.position_type is mid)
|
744 |
+
((ph_ctype is 0)
|
745 |
+
((ph_vheight is 2)
|
746 |
+
((0.456225 -0.293282))
|
747 |
+
((0.561529 -0.0816115)))
|
748 |
+
((0.6537 -0.504024)))
|
749 |
+
((ph_ctype is s)
|
750 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
751 |
+
((1.31586 0.98395))
|
752 |
+
((R:SylStructure.parent.position_type is single)
|
753 |
+
((0.816869 0.634789))
|
754 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
755 |
+
((1.05578 0.479029))
|
756 |
+
((R:SylStructure.parent.asyl_in < 0.4)
|
757 |
+
((1.11813 0.143214))
|
758 |
+
((0.87178 0.406834))))))
|
759 |
+
((n.ph_ctype is n)
|
760 |
+
((R:SylStructure.parent.last_accent < 0.6)
|
761 |
+
((0.838154 -0.415599))
|
762 |
+
((0.924024 0.110288)))
|
763 |
+
((seg_onsetcoda is coda)
|
764 |
+
((nn.ph_vfront is 2)
|
765 |
+
((0.670096 0.0314187))
|
766 |
+
((n.ph_ctype is f)
|
767 |
+
((1.00363 0.693893))
|
768 |
+
((R:SylStructure.parent.syl_out < 6)
|
769 |
+
((0.772363 0.215675))
|
770 |
+
((0.920313 0.574068)))))
|
771 |
+
((R:SylStructure.parent.position_type is final)
|
772 |
+
((0.673837 -0.458142))
|
773 |
+
((R:SylStructure.parent.sub_phrases < 2.8)
|
774 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
775 |
+
((0.894817 0.304628))
|
776 |
+
((ph_ctype is n)
|
777 |
+
((0.787302 -0.23094))
|
778 |
+
((R:SylStructure.parent.asyl_in < 1.2)
|
779 |
+
((ph_ctype is f)
|
780 |
+
((R:SylStructure.parent.last_accent < 0.5)
|
781 |
+
((1.12278 0.326954))
|
782 |
+
((0.802236 -0.100616)))
|
783 |
+
((0.791255 -0.0919132)))
|
784 |
+
((0.95233 0.219053)))))
|
785 |
+
((R:SylStructure.parent.position_type is initial)
|
786 |
+
((ph_ctype is f)
|
787 |
+
((1.0616 0.216118))
|
788 |
+
((0.703216 -0.00834086)))
|
789 |
+
((ph_ctype is f)
|
790 |
+
((1.22277 0.761763))
|
791 |
+
((0.904811 0.332721))))))))))
|
792 |
+
((ph_vheight is 0)
|
793 |
+
((p.ph_vlng is s)
|
794 |
+
((0.873379 0.217178))
|
795 |
+
((n.ph_ctype is r)
|
796 |
+
((0.723915 1.29451))
|
797 |
+
((n.ph_ctype is 0)
|
798 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
799 |
+
((R:SylStructure.parent.sub_phrases < 4)
|
800 |
+
((seg_coda_fric is 0)
|
801 |
+
((p.ph_vlng is l)
|
802 |
+
((0.849154 0.945261))
|
803 |
+
((0.633261 0.687498)))
|
804 |
+
((0.728546 0.403076)))
|
805 |
+
((0.850962 1.00255)))
|
806 |
+
((0.957999 1.09113)))
|
807 |
+
((0.85771 0.209045)))))
|
808 |
+
((ph_vheight is 2)
|
809 |
+
((0.803401 -0.0544067))
|
810 |
+
((0.681353 0.256045)))))
|
811 |
+
((n.ph_ctype is f)
|
812 |
+
((ph_ctype is s)
|
813 |
+
((p.ph_vlng is 0)
|
814 |
+
((0.479307 -0.9673))
|
815 |
+
((0.700477 -0.351397)))
|
816 |
+
((ph_ctype is f)
|
817 |
+
((0.73467 -0.6233))
|
818 |
+
((R:SylStructure.parent.syl_break is 0)
|
819 |
+
((p.ph_ctype is s)
|
820 |
+
((0.56282 0.266234))
|
821 |
+
((p.ph_ctype is r)
|
822 |
+
((0.446203 -0.302281))
|
823 |
+
((R:SylStructure.parent.sub_phrases < 2.7)
|
824 |
+
((ph_ctype is 0)
|
825 |
+
((0.572016 -0.0102436))
|
826 |
+
((0.497358 -0.274514)))
|
827 |
+
((0.545477 0.0482177)))))
|
828 |
+
((ph_vlng is s)
|
829 |
+
((0.805269 0.888495))
|
830 |
+
((ph_ctype is n)
|
831 |
+
((0.869854 0.653018))
|
832 |
+
((R:SylStructure.parent.sub_phrases < 2.2)
|
833 |
+
((0.735031 0.0612886))
|
834 |
+
((0.771859 0.346637))))))))
|
835 |
+
((R:SylStructure.parent.syl_codasize < 1.4)
|
836 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.3)
|
837 |
+
((R:SylStructure.parent.position_type is initial)
|
838 |
+
((0.743458 0.0411808))
|
839 |
+
((1.13068 0.613305)))
|
840 |
+
((pos_in_syl < 1.2)
|
841 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 1)
|
842 |
+
((1.11481 0.175467))
|
843 |
+
((0.937893 -0.276407)))
|
844 |
+
((0.74264 -0.550878))))
|
845 |
+
((pos_in_syl < 3.4)
|
846 |
+
((seg_onsetcoda is coda)
|
847 |
+
((ph_ctype is r)
|
848 |
+
((n.ph_ctype is s)
|
849 |
+
((0.714319 -0.240328))
|
850 |
+
((p.ph_ctype is 0)
|
851 |
+
((0.976987 0.330352))
|
852 |
+
((1.1781 -0.0816682))))
|
853 |
+
((ph_ctype is l)
|
854 |
+
((n.ph_ctype is 0)
|
855 |
+
((1.39137 0.383533))
|
856 |
+
((0.725585 -0.324515)))
|
857 |
+
((ph_vheight is 3)
|
858 |
+
((ph_vlng is d)
|
859 |
+
((0.802626 -0.62487))
|
860 |
+
((n.ph_ctype is r)
|
861 |
+
((0.661091 -0.513869))
|
862 |
+
((R:SylStructure.parent.position_type is initial)
|
863 |
+
((R:SylStructure.parent.parent.word_numsyls < 2.4)
|
864 |
+
((0.482285 0.207874))
|
865 |
+
((0.401601 -0.0204711)))
|
866 |
+
((0.733755 0.397372)))))
|
867 |
+
((n.ph_ctype is r)
|
868 |
+
((p.ph_ctype is 0)
|
869 |
+
((pos_in_syl < 1.2)
|
870 |
+
((0.666325 0.271734))
|
871 |
+
((nn.ph_vheight is 0)
|
872 |
+
((0.642401 -0.261466))
|
873 |
+
((0.783684 -0.00956571))))
|
874 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
875 |
+
((0.692225 -0.381895))
|
876 |
+
((0.741921 -0.0898767))))
|
877 |
+
((nn.ph_vfront is 2)
|
878 |
+
((ph_ctype is s)
|
879 |
+
((0.697527 -1.12626))
|
880 |
+
((n.ph_ctype is s)
|
881 |
+
((ph_vlng is 0)
|
882 |
+
((R:SylStructure.parent.sub_phrases < 2.4)
|
883 |
+
((0.498719 -0.906926))
|
884 |
+
((0.635342 -0.625651)))
|
885 |
+
((0.45886 -0.385089)))
|
886 |
+
((0.848596 -0.359702))))
|
887 |
+
((p.ph_vlng is a)
|
888 |
+
((p.ph_ctype is 0)
|
889 |
+
((0.947278 0.216904))
|
890 |
+
((0.637933 -0.394349)))
|
891 |
+
((p.ph_ctype is r)
|
892 |
+
((R:SylStructure.parent.syl_break is 0)
|
893 |
+
((0.529903 -0.860573))
|
894 |
+
((0.581378 -0.510488)))
|
895 |
+
((ph_vlng is 0)
|
896 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
897 |
+
((seg_onset_stop is 0)
|
898 |
+
((R:SylStructure.parent.syl_break is 0)
|
899 |
+
((p.ph_vlng is d)
|
900 |
+
((0.768363 0.0108428))
|
901 |
+
((ph_ctype is s)
|
902 |
+
((0.835756 -0.035054))
|
903 |
+
((ph_ctype is f)
|
904 |
+
((p.ph_vlng is s)
|
905 |
+
((0.602016 -0.179727))
|
906 |
+
((0.640126 -0.297341)))
|
907 |
+
((0.674628 -0.542602)))))
|
908 |
+
((ph_ctype is s)
|
909 |
+
((0.662261 -0.60496))
|
910 |
+
((0.662088 -0.432058))))
|
911 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
912 |
+
((0.582448 -0.389079))
|
913 |
+
((ph_ctype is s)
|
914 |
+
((0.60413 -0.73564))
|
915 |
+
((0.567153 -0.605444)))))
|
916 |
+
((R:SylStructure.parent.R:Syllable.p.syl_break is 2)
|
917 |
+
((0.761115 -0.827377))
|
918 |
+
((ph_ctype is n)
|
919 |
+
((0.855183 -0.275338))
|
920 |
+
((R:SylStructure.parent.syl_break is 0)
|
921 |
+
((0.788288 -0.802801))
|
922 |
+
((R:SylStructure.parent.syl_codasize < 2.2)
|
923 |
+
((0.686134 -0.371234))
|
924 |
+
((0.840184 -0.772883)))))))
|
925 |
+
((pos_in_syl < 1.2)
|
926 |
+
((R:SylStructure.parent.syl_break is 0)
|
927 |
+
((n.ph_ctype is n)
|
928 |
+
((0.423592 -0.655006))
|
929 |
+
((R:SylStructure.parent.syl_out < 4.4)
|
930 |
+
((0.595269 -0.303751))
|
931 |
+
((0.478433 -0.456882))))
|
932 |
+
((0.688133 -0.133182)))
|
933 |
+
((seg_onset_stop is 0)
|
934 |
+
((1.27464 0.114442))
|
935 |
+
((0.406837 -0.167545))))))))))))
|
936 |
+
((ph_ctype is r)
|
937 |
+
((0.462874 -0.87695))
|
938 |
+
((R:SylStructure.parent.R:Syllable.n.syl_onsetsize < 0.2)
|
939 |
+
((0.645442 -0.640572))
|
940 |
+
((0.673717 -0.321322)))))
|
941 |
+
((0.61008 -0.925472))))))))
|
942 |
+
;; RMSE 0.8085 Correlation is 0.5899 Mean (abs) Error 0.6024 (0.5393)
|
943 |
+
|
944 |
+
|
945 |
+
))
|
946 |
+
|
947 |
+
(provide 'gswdurtreeZ)
|
CosyVoice-ttsfrd/resource/festival/hts.scm
ADDED
@@ -0,0 +1,522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;; ---------------------------------------------------------------- ;;
|
2 |
+
;; Nagoya Institute of Technology and ;;
|
3 |
+
;; Carnegie Mellon University ;;
|
4 |
+
;; Copyright (c) 2002 ;;
|
5 |
+
;; All Rights Reserved. ;;
|
6 |
+
;; ;;
|
7 |
+
;; Permission is hereby granted, free of charge, to use and ;;
|
8 |
+
;; distribute this software and its documentation without ;;
|
9 |
+
;; restriction, including without limitation the rights to use, ;;
|
10 |
+
;; copy, modify, merge, publish, distribute, sublicense, and/or ;;
|
11 |
+
;; sell copies of this work, and to permit persons to whom this ;;
|
12 |
+
;; work is furnished to do so, subject to the following conditions: ;;
|
13 |
+
;; ;;
|
14 |
+
;; 1. The code must retain the above copyright notice, this list ;;
|
15 |
+
;; of conditions and the following disclaimer. ;;
|
16 |
+
;; ;;
|
17 |
+
;; 2. Any modifications must be clearly marked as such. ;;
|
18 |
+
;; ;;
|
19 |
+
;; 3. Original authors' names are not deleted. ;;
|
20 |
+
;; ;;
|
21 |
+
;; 4. The authors' names are not used to endorse or promote ;;
|
22 |
+
;; products derived from this software without specific prior ;;
|
23 |
+
;; written permission. ;;
|
24 |
+
;; ;;
|
25 |
+
;; NAGOYA INSTITUTE OF TECHNOLOGY, CARNEGIE MELLON UNIVERSITY AND ;;
|
26 |
+
;; THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH ;;
|
27 |
+
;; REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ;;
|
28 |
+
;; MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NAGOYA INSTITUTE ;;
|
29 |
+
;; OF TECHNOLOGY, CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS ;;
|
30 |
+
;; BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ;;
|
31 |
+
;; ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ;;
|
32 |
+
;; PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ;;
|
33 |
+
;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ;;
|
34 |
+
;; PERFORMANCE OF THIS SOFTWARE. ;;
|
35 |
+
;; ;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
;; Generic HTS support code and specific features ;;
|
38 |
+
;; http://hts.ics.nitech.ac.jp ;;
|
39 |
+
;; Author : Alan W Black <[email protected]> ;;
|
40 |
+
;; Date : August 2002 (and April 2004) ;;
|
41 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
42 |
+
;; ;;
|
43 |
+
;; Still has language specific features in here, that will have to ;;
|
44 |
+
;; move out to the voices ;;
|
45 |
+
;; ;;
|
46 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
47 |
+
|
48 |
+
(defvar hts_synth_pre_hooks nil)
|
49 |
+
(defvar hts_synth_post_hooks nil)
|
50 |
+
(defvar hts_engine_params nil)
|
51 |
+
|
52 |
+
(defvar hts_duration_stretch 0)
|
53 |
+
(defvar hts_f0_mean 0)
|
54 |
+
(defvar hts_f0_std 1)
|
55 |
+
(defvar hts_fw_factor 0.42)
|
56 |
+
(defvar hts_total_length 0.0)
|
57 |
+
(defvar hts_uv_threshold 0.5)
|
58 |
+
(defvar hts_use_phone_align 0)
|
59 |
+
|
60 |
+
(defSynthType HTS
|
61 |
+
(let ((featfile (make_tmp_filename))
|
62 |
+
(mcepfile (make_tmp_filename))
|
63 |
+
(f0file (make_tmp_filename))
|
64 |
+
(wavfile (make_tmp_filename))
|
65 |
+
(labfile (make_tmp_filename)))
|
66 |
+
|
67 |
+
(apply_hooks hts_synth_pre_hooks utt)
|
68 |
+
|
69 |
+
(set! hts_output_params
|
70 |
+
(list
|
71 |
+
(list "-labelfile" featfile)
|
72 |
+
(list "-om" mcepfile)
|
73 |
+
(list "-of" f0file)
|
74 |
+
(list "-or" wavfile)
|
75 |
+
(list "-od" labfile))
|
76 |
+
)
|
77 |
+
|
78 |
+
(hts_dump_feats utt hts_feats_list featfile)
|
79 |
+
|
80 |
+
(HTS_Synthesize utt)
|
81 |
+
|
82 |
+
(delete-file featfile)
|
83 |
+
(delete-file mcepfile)
|
84 |
+
(delete-file f0file)
|
85 |
+
(delete-file wavfile)
|
86 |
+
(delete-file labfile)
|
87 |
+
|
88 |
+
(apply_hooks hts_synth_post_hooks utt)
|
89 |
+
utt)
|
90 |
+
)
|
91 |
+
|
92 |
+
(define (hts_feats_output ofd s)
|
93 |
+
"This is bad as it makes decisions about what the feats are"
|
94 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
95 |
+
;;; SEGMENT
|
96 |
+
|
97 |
+
; boundary
|
98 |
+
(format ofd "%10.0f %10.0f "
|
99 |
+
(* 10000000 (item.feat s "segment_start"))
|
100 |
+
(* 10000000 (item.feat s "segment_end")))
|
101 |
+
|
102 |
+
; pp.name
|
103 |
+
(format ofd "%s" (if (string-equal "0" (item.feat s "p.p.name"))
|
104 |
+
"x" (item.feat s "p.p.name")))
|
105 |
+
; p.name
|
106 |
+
(format ofd "^%s" (if (string-equal "0" (item.feat s "p.name"))
|
107 |
+
"x" (item.feat s "p.name")))
|
108 |
+
; c.name
|
109 |
+
(format ofd "-%s" (if (string-equal "0" (item.feat s "name"))
|
110 |
+
"x" (item.feat s "name")))
|
111 |
+
; n.name
|
112 |
+
(format ofd "+%s" (if (string-equal "0" (item.feat s "n.name"))
|
113 |
+
"x" (item.feat s "n.name")))
|
114 |
+
; nn.name
|
115 |
+
(format ofd "=%s" (if (string-equal "0" (item.feat s "n.n.name"))
|
116 |
+
"x" (item.feat s "n.n.name")))
|
117 |
+
|
118 |
+
; position in syllable (segment)
|
119 |
+
(format ofd "@")
|
120 |
+
(format ofd "%s" (if (string-equal "pau" (item.feat s "name"))
|
121 |
+
"x" (+ 1 (item.feat s "pos_in_syl"))))
|
122 |
+
(format ofd "_%s" (if (string-equal "pau" (item.feat s "name"))
|
123 |
+
"x" (- (item.feat s "R:SylStructure.parent.R:Syllable.syl_numphones")
|
124 |
+
(item.feat s "pos_in_syl"))))
|
125 |
+
|
126 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
127 |
+
;;; SYLLABLE
|
128 |
+
|
129 |
+
;; previous syllable
|
130 |
+
|
131 |
+
; p.stress
|
132 |
+
(format ofd "/A:%s"
|
133 |
+
(if (string-equal "pau" (item.feat s "name"))
|
134 |
+
(item.feat s "p.R:SylStructure.parent.R:Syllable.stress")
|
135 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.p.stress")))
|
136 |
+
; p.accent
|
137 |
+
(format ofd "_%s"
|
138 |
+
(if (string-equal "pau" (item.feat s "name"))
|
139 |
+
(item.feat s "p.R:SylStructure.parent.R:Syllable.accented")
|
140 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.p.accented")))
|
141 |
+
; p.length
|
142 |
+
(format ofd "_%s"
|
143 |
+
(if (string-equal "pau" (item.feat s "name"))
|
144 |
+
(item.feat s "p.R:SylStructure.parent.R:Syllable.syl_numphones")
|
145 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.p.syl_numphones")))
|
146 |
+
;; current syllable
|
147 |
+
|
148 |
+
; c.stress
|
149 |
+
(format ofd "/B:%s"
|
150 |
+
(if (string-equal "pau" (item.feat s "name"))
|
151 |
+
"x"
|
152 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.stress")))
|
153 |
+
; c.accent
|
154 |
+
(format ofd "-%s"
|
155 |
+
(if (string-equal "pau" (item.feat s "name"))
|
156 |
+
"x"
|
157 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.accented")))
|
158 |
+
; c.length
|
159 |
+
(format ofd "-%s"
|
160 |
+
(if (string-equal "pau" (item.feat s "name"))
|
161 |
+
"x"
|
162 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.syl_numphones")))
|
163 |
+
|
164 |
+
; position in word (syllable)
|
165 |
+
(format ofd "@%s"
|
166 |
+
(if (string-equal "pau" (item.feat s "name"))
|
167 |
+
"x"
|
168 |
+
(+ 1 (item.feat s "R:SylStructure.parent.R:Syllable.pos_in_word"))))
|
169 |
+
(format ofd "-%s"
|
170 |
+
(if (string-equal "pau" (item.feat s "name"))
|
171 |
+
"x"
|
172 |
+
(-
|
173 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.word_numsyls")
|
174 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.pos_in_word"))))
|
175 |
+
|
176 |
+
; position in phrase (syllable)
|
177 |
+
(format ofd "&%s"
|
178 |
+
(if (string-equal "pau" (item.feat s "name"))
|
179 |
+
"x"
|
180 |
+
(+ 1
|
181 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.syl_in"))))
|
182 |
+
(format ofd "-%s"
|
183 |
+
(if (string-equal "pau" (item.feat s "name"))
|
184 |
+
"x"
|
185 |
+
(+ 1
|
186 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.syl_out"))))
|
187 |
+
|
188 |
+
; position in phrase (stressed syllable)
|
189 |
+
(format ofd "#%s"
|
190 |
+
(if (string-equal "pau" (item.feat s "name"))
|
191 |
+
"x"
|
192 |
+
(+ 1
|
193 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.ssyl_in"))))
|
194 |
+
(format ofd "-%s"
|
195 |
+
(if (string-equal "pau" (item.feat s "name"))
|
196 |
+
"x"
|
197 |
+
(+ 1
|
198 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.ssyl_out"))))
|
199 |
+
|
200 |
+
; position in phrase (accented syllable)
|
201 |
+
(format ofd "$%s"
|
202 |
+
(if (string-equal "pau" (item.feat s "name"))
|
203 |
+
"x"
|
204 |
+
(+ 1
|
205 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.asyl_in"))))
|
206 |
+
(format ofd "-%s"
|
207 |
+
(if (string-equal "pau" (item.feat s "name"))
|
208 |
+
"x"
|
209 |
+
(+ 1
|
210 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.asyl_out"))))
|
211 |
+
|
212 |
+
; distance from stressed syllable
|
213 |
+
(format ofd "!%s"
|
214 |
+
(if (string-equal "pau" (item.feat s "name"))
|
215 |
+
"x"
|
216 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_p_stress")))
|
217 |
+
(format ofd "-%s"
|
218 |
+
(if (string-equal "pau" (item.feat s "name"))
|
219 |
+
"x"
|
220 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_n_stress")))
|
221 |
+
|
222 |
+
; distance from accented syllable
|
223 |
+
(format ofd ";%s"
|
224 |
+
(if (string-equal "pau" (item.feat s "name"))
|
225 |
+
"x"
|
226 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_p_accent")))
|
227 |
+
(format ofd "-%s"
|
228 |
+
(if (string-equal "pau" (item.feat s "name"))
|
229 |
+
"x"
|
230 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.lisp_distance_to_n_accent")))
|
231 |
+
|
232 |
+
; name of the vowel of current syllable
|
233 |
+
(format ofd "|%s"
|
234 |
+
(if (string-equal "pau" (item.feat s "name"))
|
235 |
+
"x"
|
236 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.syl_vowel")))
|
237 |
+
|
238 |
+
;; next syllable
|
239 |
+
(format ofd "/C:%s"
|
240 |
+
(if (string-equal "pau" (item.feat s "name"))
|
241 |
+
(item.feat s "n.R:SylStructure.parent.R:Syllable.stress")
|
242 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.n.stress")))
|
243 |
+
; n.accent
|
244 |
+
(format ofd "+%s"
|
245 |
+
(if (string-equal "pau" (item.feat s "name"))
|
246 |
+
(item.feat s "n.R:SylStructure.parent.R:Syllable.accented")
|
247 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.n.accented")))
|
248 |
+
; n.length
|
249 |
+
(format ofd "+%s"
|
250 |
+
(if (string-equal "pau" (item.feat s "name"))
|
251 |
+
(item.feat s "n.R:SylStructure.parent.R:Syllable.syl_numphones")
|
252 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.n.syl_numphones")))
|
253 |
+
|
254 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
255 |
+
; WORD
|
256 |
+
|
257 |
+
;;;;;;;;;;;;;;;;;;
|
258 |
+
;; previous word
|
259 |
+
|
260 |
+
; p.gpos
|
261 |
+
(format ofd "/D:%s"
|
262 |
+
(if (string-equal "pau" (item.feat s "name"))
|
263 |
+
(item.feat s "p.R:SylStructure.parent.parent.R:Word.gpos")
|
264 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.p.gpos")))
|
265 |
+
; p.lenght (syllable)
|
266 |
+
(format ofd "_%s"
|
267 |
+
(if (string-equal "pau" (item.feat s "name"))
|
268 |
+
(item.feat s "p.R:SylStructure.parent.parent.R:Word.word_numsyls")
|
269 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.p.word_numsyls")))
|
270 |
+
|
271 |
+
;;;;;;;;;;;;;;;;;
|
272 |
+
;; current word
|
273 |
+
|
274 |
+
; c.gpos
|
275 |
+
(format ofd "/E:%s"
|
276 |
+
(if (string-equal "pau" (item.feat s "name"))
|
277 |
+
"x"
|
278 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.gpos")))
|
279 |
+
; c.lenght (syllable)
|
280 |
+
(format ofd "+%s"
|
281 |
+
(if (string-equal "pau" (item.feat s "name"))
|
282 |
+
"x"
|
283 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.word_numsyls")))
|
284 |
+
|
285 |
+
; position in phrase (word)
|
286 |
+
(format ofd "@%s"
|
287 |
+
(if (string-equal "pau" (item.feat s "name"))
|
288 |
+
"x"
|
289 |
+
(+ 1 (item.feat s "R:SylStructure.parent.parent.R:Word.pos_in_phrase"))))
|
290 |
+
(format ofd "+%s"
|
291 |
+
(if (string-equal "pau" (item.feat s "name"))
|
292 |
+
"x"
|
293 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.words_out")))
|
294 |
+
|
295 |
+
; position in phrase (content word)
|
296 |
+
(format ofd "&%s"
|
297 |
+
(if (string-equal "pau" (item.feat s "name"))
|
298 |
+
"x"
|
299 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.content_words_in")))
|
300 |
+
(format ofd "+%s"
|
301 |
+
(if (string-equal "pau" (item.feat s "name"))
|
302 |
+
"x"
|
303 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.content_words_out")))
|
304 |
+
|
305 |
+
; distance from content word in phrase
|
306 |
+
(format ofd "#%s"
|
307 |
+
(if (string-equal "pau" (item.feat s "name"))
|
308 |
+
"x"
|
309 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.lisp_distance_to_p_content")))
|
310 |
+
(format ofd "+%s"
|
311 |
+
(if (string-equal "pau" (item.feat s "name"))
|
312 |
+
"x"
|
313 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.lisp_distance_to_n_content")))
|
314 |
+
|
315 |
+
;;;;;;;;;;;;;;
|
316 |
+
;; next word
|
317 |
+
|
318 |
+
; n.gpos
|
319 |
+
(format ofd "/F:%s"
|
320 |
+
(if (string-equal "pau" (item.feat s "name"))
|
321 |
+
(item.feat s "n.R:SylStructure.parent.parent.R:Word.gpos")
|
322 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.n.gpos")))
|
323 |
+
; n.lenghte (syllable)
|
324 |
+
(format ofd "_%s"
|
325 |
+
(if (string-equal "pau" (item.feat s "name"))
|
326 |
+
(item.feat s "n.R:SylStructure.parent.parent.R:Word.word_numsyls")
|
327 |
+
(item.feat s "R:SylStructure.parent.parent.R:Word.n.word_numsyls")))
|
328 |
+
|
329 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
330 |
+
; PHRASE
|
331 |
+
|
332 |
+
;;;;;;;;;;;;;;;;;;;;
|
333 |
+
;; previous phrase
|
334 |
+
|
335 |
+
; length of previous phrase (syllable)
|
336 |
+
(format ofd "/G:%s"
|
337 |
+
(if (string-equal "pau" (item.feat s "name"))
|
338 |
+
(item.feat s "p.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")
|
339 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.p.lisp_num_syls_in_phrase")))
|
340 |
+
|
341 |
+
; length of previous phrase (word)
|
342 |
+
(format ofd "_%s"
|
343 |
+
(if (string-equal "pau" (item.feat s "name"))
|
344 |
+
(item.feat s "p.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")
|
345 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.p.lisp_num_words_in_phrase")))
|
346 |
+
|
347 |
+
;;;;;;;;;;;;;;;;;;;;
|
348 |
+
;; current phrase
|
349 |
+
|
350 |
+
; length of current phrase (syllable)
|
351 |
+
(format ofd "/H:%s"
|
352 |
+
(if (string-equal "pau" (item.feat s "name"))
|
353 |
+
"x"
|
354 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")))
|
355 |
+
|
356 |
+
; length of current phrase (word)
|
357 |
+
(format ofd "=%s"
|
358 |
+
(if (string-equal "pau" (item.feat s "name"))
|
359 |
+
"x"
|
360 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")))
|
361 |
+
|
362 |
+
; position in major phrase (phrase)
|
363 |
+
(format ofd "@%s"
|
364 |
+
(+ 1 (item.feat s "R:SylStructure.parent.R:Syllable.sub_phrases")))
|
365 |
+
(format ofd "=%s"
|
366 |
+
(-
|
367 |
+
(item.feat s "lisp_total_phrases")
|
368 |
+
(item.feat s "R:SylStructure.parent.R:Syllable.sub_phrases")))
|
369 |
+
|
370 |
+
; type of tobi endtone of current phrase
|
371 |
+
(format ofd "|%s"
|
372 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern.tobi_endtone"))
|
373 |
+
|
374 |
+
;;;;;;;;;;;;;;;;;;;;
|
375 |
+
;; next phrase
|
376 |
+
|
377 |
+
; length of next phrase (syllable)
|
378 |
+
(format ofd "/I:%s"
|
379 |
+
(if (string-equal "pau" (item.feat s "name"))
|
380 |
+
(item.feat s "n.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase")
|
381 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.n.lisp_num_syls_in_phrase")))
|
382 |
+
|
383 |
+
; length of next phrase (word)
|
384 |
+
(format ofd "=%s"
|
385 |
+
(if (string-equal "pau" (item.feat s "name"))
|
386 |
+
(item.feat s "n.R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase")
|
387 |
+
(item.feat s "R:SylStructure.parent.parent.R:Phrase.parent.n.lisp_num_words_in_phrase")))
|
388 |
+
|
389 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
390 |
+
; UTTERANCE
|
391 |
+
|
392 |
+
; length (syllable)
|
393 |
+
(format ofd "/J:%s" (item.feat s "lisp_total_syls"))
|
394 |
+
|
395 |
+
; length (word)
|
396 |
+
(format ofd "+%s" (item.feat s "lisp_total_words"))
|
397 |
+
|
398 |
+
; length (phrase)
|
399 |
+
(format ofd "-%s" (item.feat s "lisp_total_phrases"))
|
400 |
+
|
401 |
+
(format ofd "\n")
|
402 |
+
|
403 |
+
)
|
404 |
+
|
405 |
+
(define (hts_dump_feats utt feats ofile)
|
406 |
+
(let ((ofd (fopen ofile "w")))
|
407 |
+
(mapcar
|
408 |
+
(lambda (s)
|
409 |
+
(hts_feats_output ofd s))
|
410 |
+
(utt.relation.items utt 'Segment))
|
411 |
+
(fclose ofd)
|
412 |
+
))
|
413 |
+
|
414 |
+
|
415 |
+
;;
|
416 |
+
;; Extra features
|
417 |
+
;; From Segment items refer by
|
418 |
+
;;
|
419 |
+
;; R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_syls_in_phrase
|
420 |
+
;; R:SylStructure.parent.parent.R:Phrase.parent.lisp_num_words_in_phrase
|
421 |
+
;; lisp_total_words
|
422 |
+
;; lisp_total_syls
|
423 |
+
;; lisp_total_phrases
|
424 |
+
;;
|
425 |
+
;; The last three will act on any item
|
426 |
+
|
427 |
+
(define (distance_to_p_content i)
|
428 |
+
(let ((c 0) (rc 0 ) (w (item.relation.prev i "Phrase")))
|
429 |
+
(while w
|
430 |
+
(set! c (+ 1 c))
|
431 |
+
(if (string-equal "1" (item.feat w "contentp"))
|
432 |
+
(begin
|
433 |
+
(set! rc c)
|
434 |
+
(set! w nil))
|
435 |
+
(set! w (item.prev w)))
|
436 |
+
)
|
437 |
+
rc))
|
438 |
+
|
439 |
+
(define (distance_to_n_content i)
|
440 |
+
(let ((c 0) (rc 0) (w (item.relation.next i "Phrase")))
|
441 |
+
(while w
|
442 |
+
(set! c (+ 1 c))
|
443 |
+
(if (string-equal "1" (item.feat w "contentp"))
|
444 |
+
(begin
|
445 |
+
(set! rc c)
|
446 |
+
(set! w nil))
|
447 |
+
(set! w (item.next w)))
|
448 |
+
)
|
449 |
+
rc))
|
450 |
+
|
451 |
+
(define (distance_to_p_accent i)
|
452 |
+
(let ((c 0) (rc 0 ) (w (item.relation.prev i "Syllable")))
|
453 |
+
(while (and w (member_string (item.feat w "syl_break") '("0" "1")))
|
454 |
+
(set! c (+ 1 c))
|
455 |
+
(if (string-equal "1" (item.feat w "accented"))
|
456 |
+
(begin
|
457 |
+
(set! rc c)
|
458 |
+
(set! w nil))
|
459 |
+
(set! w (item.prev w)))
|
460 |
+
)
|
461 |
+
rc))
|
462 |
+
|
463 |
+
(define (distance_to_n_accent i)
|
464 |
+
(let ((c 0) (rc 0 ) (w (item.relation.next i "Syllable")))
|
465 |
+
(while (and w (member_string (item.feat w "p.syl_break") '("0" "1")))
|
466 |
+
(set! c (+ 1 c))
|
467 |
+
(if (string-equal "1" (item.feat w "accented"))
|
468 |
+
(begin
|
469 |
+
(set! rc c)
|
470 |
+
(set! w nil))
|
471 |
+
(set! w (item.next w)))
|
472 |
+
)
|
473 |
+
rc))
|
474 |
+
|
475 |
+
(define (distance_to_p_stress i)
|
476 |
+
(let ((c 0) (rc 0 ) (w (item.relation.prev i "Syllable")))
|
477 |
+
(while (and w (member_string (item.feat w "syl_break") '("0" "1")))
|
478 |
+
(set! c (+ 1 c))
|
479 |
+
(if (string-equal "1" (item.feat w "stress"))
|
480 |
+
(begin
|
481 |
+
(set! rc c)
|
482 |
+
(set! w nil))
|
483 |
+
(set! w (item.prev w)))
|
484 |
+
)
|
485 |
+
rc))
|
486 |
+
|
487 |
+
(define (distance_to_n_stress i)
|
488 |
+
(let ((c 0) (rc 0 ) (w (item.relation.next i "Syllable")))
|
489 |
+
(while (and w (member_string (item.feat w "p.syl_break") '("0" "1")))
|
490 |
+
(set! c (+ 1 c))
|
491 |
+
(if (string-equal "1" (item.feat w "stress"))
|
492 |
+
(begin
|
493 |
+
(set! rc c)
|
494 |
+
(set! w nil))
|
495 |
+
(set! w (item.next w)))
|
496 |
+
)
|
497 |
+
rc))
|
498 |
+
|
499 |
+
(define (num_syls_in_phrase i)
|
500 |
+
(apply
|
501 |
+
+
|
502 |
+
(mapcar
|
503 |
+
(lambda (w)
|
504 |
+
(length (item.relation.daughters w 'SylStructure)))
|
505 |
+
(item.relation.daughters i 'Phrase))))
|
506 |
+
|
507 |
+
(define (num_words_in_phrase i)
|
508 |
+
(length (item.relation.daughters i 'Phrase)))
|
509 |
+
|
510 |
+
(define (total_words w)
|
511 |
+
(length
|
512 |
+
(utt.relation.items (item.get_utt w) 'Word)))
|
513 |
+
|
514 |
+
(define (total_syls s)
|
515 |
+
(length
|
516 |
+
(utt.relation.items (item.get_utt s) 'Syllable)))
|
517 |
+
|
518 |
+
(define (total_phrases s)
|
519 |
+
(length
|
520 |
+
(utt.relation_tree (item.get_utt s) 'Phrase)))
|
521 |
+
|
522 |
+
(provide 'hts)
|
CosyVoice-ttsfrd/resource/festival/init.scm
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Initialisation file -- loaded before anything else
|
35 |
+
;;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
|
38 |
+
;;; Basic siod library (need this before load_library or require works)
|
39 |
+
(load (path-append libdir "siod.scm"))
|
40 |
+
|
41 |
+
(defvar home-directory (or (getenv "HOME") "/")
|
42 |
+
"home-directory
|
43 |
+
Place looked at for .festivalrc etc.")
|
44 |
+
|
45 |
+
;;; User startup initialization, can be used to override load-path
|
46 |
+
;;; to allow alternate basic modules to be loaded.
|
47 |
+
(if (probe_file (path-append home-directory ".siodvarsrc"))
|
48 |
+
(load (path-append home-directory ".siodvarsrc")))
|
49 |
+
|
50 |
+
(if (probe_file (path-append home-directory ".festivalvarsrc"))
|
51 |
+
(load (path-append home-directory ".festivalvarsrc")))
|
52 |
+
|
53 |
+
;;; A chance to set various variables to a local setting e.g.
|
54 |
+
;;; lexdir, voices_dir audio etc etc.
|
55 |
+
(if (probe_file (path-append libdir "sitevars.scm"))
|
56 |
+
(load (path-append libdir "sitevars.scm")))
|
57 |
+
|
58 |
+
;;; CSTR siod extensions
|
59 |
+
(require 'cstr)
|
60 |
+
|
61 |
+
;;; Festival specific definitions
|
62 |
+
(require 'festival)
|
63 |
+
|
64 |
+
;;; Dealing with module descriptions
|
65 |
+
(require 'module_description)
|
66 |
+
|
67 |
+
;;; Web related definitions
|
68 |
+
(require 'web)
|
69 |
+
|
70 |
+
;;; Utterance types and support
|
71 |
+
(require 'synthesis)
|
72 |
+
|
73 |
+
;;; Some default parameters
|
74 |
+
(Parameter.def 'Wavefiletype 'riff)
|
75 |
+
|
76 |
+
;;; Set default audio method
|
77 |
+
(cond
|
78 |
+
((member 'nas *modules*)
|
79 |
+
(Parameter.def 'Audio_Method 'netaudio))
|
80 |
+
((member 'esd *modules*)
|
81 |
+
(Parameter.def 'Audio_Method 'esdaudio))
|
82 |
+
((member 'sun16audio *modules*)
|
83 |
+
(Parameter.def 'Audio_Method 'sun16audio))
|
84 |
+
((member 'freebsd16audio *modules*)
|
85 |
+
(Parameter.def 'Audio_Method 'freebsd16audio))
|
86 |
+
((member 'linux16audio *modules*)
|
87 |
+
(Parameter.def 'Audio_Method 'linux16audio))
|
88 |
+
((member 'irixaudio *modules*)
|
89 |
+
(Parameter.def 'Audio_Method 'irixaudio))
|
90 |
+
((member 'macosxaudio *modules*)
|
91 |
+
(Parameter.def 'Audio_Method 'macosxaudio))
|
92 |
+
((member 'win32audio *modules*)
|
93 |
+
(Parameter.def 'Audio_Method 'win32audio))
|
94 |
+
((member 'os2audio *modules*)
|
95 |
+
(Parameter.def 'Audio_Method 'os2audio))
|
96 |
+
((member 'mplayeraudio *modules*)
|
97 |
+
(Parameter.def 'Audio_Method 'mplayeraudio))
|
98 |
+
(t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists
|
99 |
+
(Parameter.def 'Audio_Method 'sunaudio)))
|
100 |
+
;;; If you have an external program to play audio add its definition
|
101 |
+
;;; in siteinit.scm
|
102 |
+
|
103 |
+
;;; The audio spooler doesn't work under Windows so redefine audio_mode
|
104 |
+
(if (member 'mplayeraudio *modules*)
|
105 |
+
(define (audio_mode param) param)
|
106 |
+
)
|
107 |
+
|
108 |
+
;;; Intonation
|
109 |
+
(require 'intonation)
|
110 |
+
|
111 |
+
;;; Duration
|
112 |
+
(require 'duration)
|
113 |
+
|
114 |
+
;;; A large lexicon
|
115 |
+
(require 'lexicons)
|
116 |
+
(require 'pauses)
|
117 |
+
|
118 |
+
;;; Part of speech prediction
|
119 |
+
(require 'pos)
|
120 |
+
|
121 |
+
;;; Phrasing (dependent on pos)
|
122 |
+
(require 'phrase)
|
123 |
+
|
124 |
+
;;; POstlexical rules
|
125 |
+
(require 'postlex)
|
126 |
+
|
127 |
+
;;; Different voices
|
128 |
+
(require 'voices) ;; sets voice_default
|
129 |
+
(require 'languages)
|
130 |
+
|
131 |
+
;;; Some higher level functions
|
132 |
+
(require 'token)
|
133 |
+
(require 'tts)
|
134 |
+
|
135 |
+
;;;
|
136 |
+
;;; Local site initialization, if the file exists load it
|
137 |
+
;;;
|
138 |
+
(if (probe_file (path-append libdir "siteinit.scm"))
|
139 |
+
(load (path-append libdir "siteinit.scm")))
|
140 |
+
|
141 |
+
;;; User initialization, if a user has a personal customization
|
142 |
+
;;; file loaded it
|
143 |
+
(if (probe_file (path-append home-directory ".siodrc"))
|
144 |
+
(load (path-append home-directory ".siodrc")))
|
145 |
+
|
146 |
+
(if (probe_file (path-append home-directory ".festivalrc"))
|
147 |
+
(load (path-append home-directory ".festivalrc")))
|
148 |
+
|
149 |
+
;;; Default voice (have to do something cute so autoloads still work)
|
150 |
+
(eval (list voice_default))
|
151 |
+
|
152 |
+
(provide 'init)
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
CosyVoice-ttsfrd/resource/festival/intonation.scm
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Basic Intonation modules. These call appropriate sub-modules
|
35 |
+
;;; depending on the chosen intonation methods
|
36 |
+
;;;
|
37 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
38 |
+
|
39 |
+
;;; These modules should predict intonation events/labels
|
40 |
+
;;; based on information in the phrase and word streams
|
41 |
+
|
42 |
+
; to detect prespecified accents (feature "accent" in 'Word relation)
|
43 |
+
; AS 5/29/00
|
44 |
+
|
45 |
+
(define (tobi_accent_prespecified utt)
|
46 |
+
(let ((tobi_found nil)
|
47 |
+
(words (utt.relation.items utt 'Word)))
|
48 |
+
|
49 |
+
(while (and words (not tobi_found))
|
50 |
+
; feature "accent" might be prespecified on words or tokens, AS 05/29/00
|
51 |
+
(if (item.feat.present (car words) 'accent)
|
52 |
+
(set! tobi_found t)
|
53 |
+
; if Token relation exists, check tokens as well
|
54 |
+
(if (not (null (item.parent (item.relation (car words) 'Token))))
|
55 |
+
(if (item.feat.present (item.parent (item.relation (car words) 'Token)) 'accent)
|
56 |
+
(set! tobi_found t)
|
57 |
+
(set! words (cdr words)))
|
58 |
+
(set! words (cdr words)))))
|
59 |
+
tobi_found))
|
60 |
+
|
61 |
+
(set! int_accent_cart_tree_no_accent
|
62 |
+
'((NONE)))
|
63 |
+
|
64 |
+
(define (Intonation utt)
|
65 |
+
"(Intonation utt)
|
66 |
+
Select between different intonation modules depending on the Parameter
|
67 |
+
Int_Method. Currently offers three types: Simple, hats on each content
|
68 |
+
word; ToBI, a tree method for predicting ToBI accents; and Default a
|
69 |
+
really bad method with a simple downward sloping F0. This is the first
|
70 |
+
of a two-stage intonation prediction process. This adds accent-like
|
71 |
+
features to syllables, the second, Int_Targets generates the F0 contour
|
72 |
+
itself. [see Intonation]"
|
73 |
+
|
74 |
+
; AS 5/29/00: Hack to avoid prediction of further accent labels
|
75 |
+
; on utterance chunks that have already been annotated with
|
76 |
+
; accent labels
|
77 |
+
; use CART that doesn't assign any labels when using Intonation_Tree
|
78 |
+
|
79 |
+
(if (tobi_accent_prespecified utt)
|
80 |
+
(progn
|
81 |
+
(set! int_accent_cart_tree_save int_accent_cart_tree)
|
82 |
+
(set! int_accent_cart_tree int_accent_cart_tree_no_accent)
|
83 |
+
(Intonation_Tree utt)
|
84 |
+
(set! int_accent_cart_tree int_accent_cart_tree_save))
|
85 |
+
|
86 |
+
(let ((rval (apply_method 'Int_Method utt)))
|
87 |
+
(Parameter.get 'Int_Method)
|
88 |
+
(cond
|
89 |
+
(rval rval) ;; new style
|
90 |
+
((eq 'Simple (Parameter.get 'Int_Method))
|
91 |
+
(Intonation_Simple utt))
|
92 |
+
((eq 'ToBI (Parameter.get 'Int_Method))
|
93 |
+
(format t "Using Intonation_Tree")
|
94 |
+
(Intonation_Tree utt))
|
95 |
+
((eq 'General (Parameter.get 'Int_Method))
|
96 |
+
(Intonation_Simple utt)) ;; yes this is a duplication
|
97 |
+
(t
|
98 |
+
(Intonation_Default utt))))))
|
99 |
+
|
100 |
+
|
101 |
+
;;; These modules should create an actual F0 contour based on the
|
102 |
+
;;; the existing intonational events/labels etc
|
103 |
+
;;; Specifically this is called after durations have been predicted
|
104 |
+
|
105 |
+
(define (Int_Targets utt)
|
106 |
+
"(Int_Targets utt)
|
107 |
+
The second stage in F0 prediction. This generates F0 targets
|
108 |
+
related to segments using one of three methods, a simple hat,
|
109 |
+
linear regression based on ToBI markings, and a simple declining
|
110 |
+
slope. This second part deals with actual F0 values and durations,
|
111 |
+
while the previous section only deals with accent (and boundary tone)
|
112 |
+
assignment. [see Intonation]"
|
113 |
+
(let ((rval (apply_method 'Int_Target_Method utt)))
|
114 |
+
(cond
|
115 |
+
(rval rval) ;; new style
|
116 |
+
((eq 'Simple (Parameter.get 'Int_Method))
|
117 |
+
(Int_Targets_Simple utt))
|
118 |
+
((eq 'ToBI (Parameter.get 'Int_Method))
|
119 |
+
(Int_Targets_LR utt))
|
120 |
+
((eq 'General (Parameter.get 'Int_Method))
|
121 |
+
(Int_Targets_General utt))
|
122 |
+
(t
|
123 |
+
(Int_Targets_Default utt)))))
|
124 |
+
|
125 |
+
;;;
|
126 |
+
;;; A tree that adds accents (H) to all content words
|
127 |
+
;;; simple but better than nothing at all
|
128 |
+
;;;
|
129 |
+
(set! simple_accent_cart_tree
|
130 |
+
'
|
131 |
+
((R:SylStructure.parent.gpos is content)
|
132 |
+
((stress is 1)
|
133 |
+
((Accented))
|
134 |
+
((position_type is single)
|
135 |
+
((Accented))
|
136 |
+
((NONE))))
|
137 |
+
((NONE))))
|
138 |
+
|
139 |
+
(defvar duffint_params '((start 130) (end 110))
|
140 |
+
"duffint_params
|
141 |
+
Default parameters for Default (duff) intonation target generation.
|
142 |
+
This is an assoc list of parameters. Two parameters are supported
|
143 |
+
start specifies the start F0 in Hertz for an utterance, and end specifies
|
144 |
+
the end.")
|
145 |
+
|
146 |
+
;;;
|
147 |
+
;;; For simple testing, this function adds fixed duration and
|
148 |
+
;;; monotone intonation to a set of phones
|
149 |
+
;;;
|
150 |
+
(defvar FP_F0 120
|
151 |
+
"FP_F0
|
152 |
+
In using Fixed_Prosody as used in Phones type utterances and hence
|
153 |
+
SayPhones, this is the value in Hertz for the monotone F0.")
|
154 |
+
(defvar FP_duration 100
|
155 |
+
"FP_duration
|
156 |
+
In using Fixed_Prosody as used in Phones type utterances and hence
|
157 |
+
SayPhones, this is the fix value in ms for phone durations.")
|
158 |
+
|
159 |
+
(define (Fixed_Prosody utt)
|
160 |
+
"(Fixed_Prosody UTT)
|
161 |
+
Add fixed duration and fixed monotone F0 to the sgements in UTT.
|
162 |
+
Uses values of FP_duration and FP_F0 as fixed values."
|
163 |
+
(let (utt1
|
164 |
+
(dur_stretch (Parameter.get 'Duration_Stretch))
|
165 |
+
(orig_duffint_params duffint_params))
|
166 |
+
(Parameter.set 'Duration_Stretch (/ FP_duration 100.0))
|
167 |
+
(set! duffint_params (list (list 'start FP_F0) (list 'end FP_F0)))
|
168 |
+
|
169 |
+
(set! utt1 (Duration_Default utt))
|
170 |
+
(set! utt1 (Int_Targets_Default utt1))
|
171 |
+
|
172 |
+
;; Reset Parameter values back
|
173 |
+
(Parameter.set 'Duration_Stretch dur_stretch)
|
174 |
+
(set! duffint_params orig_duffint_params)
|
175 |
+
|
176 |
+
utt1
|
177 |
+
)
|
178 |
+
)
|
179 |
+
|
180 |
+
(define (segment_dpitch seg)
|
181 |
+
"(segment_dpitch UTT SEG)
|
182 |
+
Returns delta pitch, this pitch minus previous pitch."
|
183 |
+
(-
|
184 |
+
(parse-number (item.feat utt seg 'seg_pitch))
|
185 |
+
(parse-number (item.feat utt seg 'R:Segment.p.seg_pitch))))
|
186 |
+
|
187 |
+
(provide 'intonation)
|
CosyVoice-ttsfrd/resource/festival/java.scm
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1998 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Functions specific to supporting a Java client
|
35 |
+
;;;
|
36 |
+
|
37 |
+
;; none required yet
|
38 |
+
|
39 |
+
(provide 'java)
|
CosyVoice-ttsfrd/resource/festival/languages.scm
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Specification of voices and some major choices of synthesis
|
35 |
+
;;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
;;;
|
38 |
+
;;; This should use some sort of database description for voices so
|
39 |
+
;;; new voices will become automatically available.
|
40 |
+
;;;
|
41 |
+
|
42 |
+
(define (language_british_english)
|
43 |
+
"(language_british_english)
|
44 |
+
Set up language parameters for British English."
|
45 |
+
(require 'voices)
|
46 |
+
;; Will get more elaborate, with different choices of voices in language
|
47 |
+
|
48 |
+
(set! male1 voice_rab_diphone)
|
49 |
+
(if (symbol-bound? 'voice_don_diphone)
|
50 |
+
(set! male2 voice_don_diphone))
|
51 |
+
(if (symbol-bound? 'voice_gsw_diphone)
|
52 |
+
(set! male3 voice_gsw_diphone))
|
53 |
+
(if (symbol-bound? 'voice_gsw_450)
|
54 |
+
(set! male4 voice_gsw_450))
|
55 |
+
|
56 |
+
(male1)
|
57 |
+
(Parameter.set 'Language 'britishenglish)
|
58 |
+
)
|
59 |
+
|
60 |
+
(define (language_american_english)
|
61 |
+
"(language_american_english)
|
62 |
+
Set up language parameters for Aemerican English."
|
63 |
+
(require 'voices)
|
64 |
+
(if (symbol-bound? 'voice_kal_diphone)
|
65 |
+
(set! female1 voice_kal_diphone))
|
66 |
+
(if (symbol-bound? 'voice_kal_diphone)
|
67 |
+
(set! male1 voice_kal_diphone))
|
68 |
+
|
69 |
+
(male1)
|
70 |
+
(Parameter.set 'Language 'americanenglish)
|
71 |
+
)
|
72 |
+
|
73 |
+
(define (language_scots_gaelic)
|
74 |
+
"(language_scots_gaelic)
|
75 |
+
Set up language parameters for Scots Gaelic."
|
76 |
+
(error "Scots Gaelic not yet supported.")
|
77 |
+
|
78 |
+
(Parameter.set 'Language 'scotsgaelic)
|
79 |
+
)
|
80 |
+
|
81 |
+
(define (language_welsh)
|
82 |
+
"(language_welsh)
|
83 |
+
Set up language parameters for Welsh."
|
84 |
+
|
85 |
+
(set! male1 voice_welsh_hl)
|
86 |
+
|
87 |
+
(male1)
|
88 |
+
(Parameter.set 'Language 'welsh)
|
89 |
+
)
|
90 |
+
|
91 |
+
(define (language_castillian_spanish)
|
92 |
+
"(language_spanish)
|
93 |
+
Set up language parameters for Castillian Spanish."
|
94 |
+
|
95 |
+
(voice_el_diphone)
|
96 |
+
(set! male1 voice_el_diphone)
|
97 |
+
|
98 |
+
(Parameter.set 'Language 'spanish)
|
99 |
+
)
|
100 |
+
|
101 |
+
(define (select_language language)
|
102 |
+
(cond
|
103 |
+
((or (equal? language 'britishenglish)
|
104 |
+
(equal? language 'english)) ;; we all know its the *real* English
|
105 |
+
(language_british_english))
|
106 |
+
((equal? language 'americanenglish)
|
107 |
+
(language_american_english))
|
108 |
+
((equal? language 'scotsgaelic)
|
109 |
+
(language_scots_gaelic))
|
110 |
+
((equal? language 'welsh)
|
111 |
+
(language_welsh))
|
112 |
+
((equal? language 'spanish)
|
113 |
+
(language_castillian_spanish))
|
114 |
+
((equal? language 'klingon)
|
115 |
+
(language_klingon))
|
116 |
+
(t
|
117 |
+
(print "Unsupported language, using English")
|
118 |
+
(language_british_english))))
|
119 |
+
|
120 |
+
(defvar language_default language_british_english)
|
121 |
+
|
122 |
+
(provide 'languages)
|
CosyVoice-ttsfrd/resource/festival/lts.scm
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1998 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Functions specific to supporting a trained LTS rules
|
35 |
+
;;;
|
36 |
+
|
37 |
+
(define (lts_rules_predict word feats)
|
38 |
+
(let ((dcword (downcase word))
|
39 |
+
(syls) (phones))
|
40 |
+
(if (string-matches dcword "[a-z]*")
|
41 |
+
(begin
|
42 |
+
(set! phones
|
43 |
+
(cdr (reverse (cdr (reverse (lts_predict dcword))))))
|
44 |
+
(set! phones (add_lex_stress word feats phones))
|
45 |
+
(set! syls (lex.syllabify.phstress phones))
|
46 |
+
;; (set! syls (add_lex_stress word syls))
|
47 |
+
)
|
48 |
+
(set! syls nil))
|
49 |
+
(format t "word %l phones %l\n" word syls)
|
50 |
+
(list word nil syls)))
|
51 |
+
|
52 |
+
;(define (add_lex_stress word syls)
|
53 |
+
; (cond
|
54 |
+
; ((> (length syls) 1)
|
55 |
+
; (set-car! (cdr (nth (- (length syls) 2) syls)) 1))
|
56 |
+
; ((word-is-content word english_guess_pos)
|
57 |
+
; (set-car! (cdr (car syls)) 1)))
|
58 |
+
; syls)
|
59 |
+
|
60 |
+
(define (word-is-content word guess_pos)
|
61 |
+
(cond
|
62 |
+
((null guess_pos)
|
63 |
+
t)
|
64 |
+
((member_string word (cdr (car guess_pos)))
|
65 |
+
nil)
|
66 |
+
(t
|
67 |
+
(word-is-content word (cdr guess_pos)))))
|
68 |
+
|
69 |
+
(defvar lts_pos nil)
|
70 |
+
|
71 |
+
(define (lts_predict word rules)
|
72 |
+
"(lts_predict word rules)
|
73 |
+
Return list of phones related to word using CART trees."
|
74 |
+
(let ((utt (make_let_utt (enworden (wordexplode word)))))
|
75 |
+
(predict_phones utt rules)
|
76 |
+
(cdr (reverse (cdr (reverse ;; remove #'s
|
77 |
+
(mapcar
|
78 |
+
(lambda (p) (intern (item.name p)))
|
79 |
+
(utt.relation.items utt 'PHONE))))))
|
80 |
+
)
|
81 |
+
)
|
82 |
+
|
83 |
+
(define (wordexplode lets)
|
84 |
+
(if (consp lets)
|
85 |
+
lets
|
86 |
+
(symbolexplode lets)))
|
87 |
+
|
88 |
+
(define (make_let_utt letters)
|
89 |
+
"(make_let_utt letters)
|
90 |
+
Build an utterances from th4ese letters."
|
91 |
+
(let ((utt (Utterance Text "")))
|
92 |
+
(utt.relation.create utt 'LTS)
|
93 |
+
(utt.relation.create utt 'LETTER)
|
94 |
+
(utt.relation.create utt 'PHONE)
|
95 |
+
;; Create letter stream
|
96 |
+
(mapcar
|
97 |
+
(lambda (l)
|
98 |
+
(let ((lsi (utt.relation.append utt 'LETTER)))
|
99 |
+
(item.set_feat lsi "pos" lts_pos)
|
100 |
+
(item.set_name lsi l)))
|
101 |
+
letters)
|
102 |
+
utt))
|
103 |
+
|
104 |
+
(define (predict_phones utt rules)
|
105 |
+
"(predict_phones utt)
|
106 |
+
Predict phones using CART."
|
107 |
+
(add_new_phone utt (utt.relation.first utt 'LETTER) '#)
|
108 |
+
(mapcar
|
109 |
+
(lambda (lsi)
|
110 |
+
(let ((tree (car (cdr (assoc_string (item.name lsi) rules)))))
|
111 |
+
(if (not tree)
|
112 |
+
(format t "failed to find tree for %s\n" (item.name lsi))
|
113 |
+
(let ((p (wagon_predict lsi tree)))
|
114 |
+
; (format t "predict %s %s\n" (item.name lsi) p)
|
115 |
+
(cond
|
116 |
+
((string-matches p ".*-.*-.*-.*") ; a quad one
|
117 |
+
(add_new_phone utt lsi (string-before p "-"))
|
118 |
+
(add_new_phone utt lsi (string-before (string-after p "-") "-"))
|
119 |
+
(add_new_phone utt lsi (string-before (string-after (string-after p "-") "-") "-"))
|
120 |
+
(add_new_phone utt lsi (string-after (string-after (string-after p "-") "-") "-")))
|
121 |
+
((string-matches p ".*-.*-.*") ; a triple one
|
122 |
+
(add_new_phone utt lsi (string-before p "-"))
|
123 |
+
(add_new_phone utt lsi (string-before (string-after p "-") "-"))
|
124 |
+
(add_new_phone utt lsi (string-after (string-after p "-") "-")))
|
125 |
+
((string-matches p ".*-.*");; a double one
|
126 |
+
(add_new_phone utt lsi (string-before p "-"))
|
127 |
+
(add_new_phone utt lsi (string-after p "-")))
|
128 |
+
(t
|
129 |
+
(add_new_phone utt lsi p)))))))
|
130 |
+
(reverse (cdr (reverse (cdr (utt.relation.items utt 'LETTER))))))
|
131 |
+
(add_new_phone utt (utt.relation.last utt 'LETTER) '#)
|
132 |
+
utt)
|
133 |
+
|
134 |
+
(define (add_new_phone utt lsi p)
|
135 |
+
"(add_new_phone utt lsi p)
|
136 |
+
Add new phone linking to letter, ignoreing it if its _epsilon_."
|
137 |
+
(if (not (equal? p '_epsilon_))
|
138 |
+
(let ((psi (utt.relation.append utt 'PHONE)))
|
139 |
+
(item.set_name psi p)
|
140 |
+
(item.relation.append_daughter
|
141 |
+
(utt.relation.append utt 'LTS lsi)
|
142 |
+
'LTS psi)
|
143 |
+
)))
|
144 |
+
|
145 |
+
(define (enworden lets)
|
146 |
+
(cons '# (reverse (cons '# (reverse lets)))))
|
147 |
+
|
148 |
+
;;; Lexical stress assignment
|
149 |
+
;;;
|
150 |
+
|
151 |
+
(define (add_lex_stress word pos phones tree)
|
152 |
+
"(add_lex_stress word syls)
|
153 |
+
Predict lexical stress by decision tree."
|
154 |
+
(let ((utt (Utterance Text ""))
|
155 |
+
(si)
|
156 |
+
(nphones))
|
157 |
+
(utt.relation.create utt 'Letter)
|
158 |
+
(set! si (utt.relation.append utt 'Letter))
|
159 |
+
(item.set_feat si 'pos pos)
|
160 |
+
(item.set_feat si 'numsyls (count_syls phones))
|
161 |
+
(item.set_feat si 'sylpos 1)
|
162 |
+
(set! nphones (add_lex_stress_syl phones si tree))
|
163 |
+
; (format t "%l\n" phones)
|
164 |
+
; (format t "%l\n" nphones)
|
165 |
+
nphones))
|
166 |
+
|
167 |
+
(define (count_syls phones)
|
168 |
+
(cond
|
169 |
+
((null phones) 0)
|
170 |
+
((string-matches (car phones) "[aeiou@].*")
|
171 |
+
(+ 1 (count_syls (cdr phones))))
|
172 |
+
(t (count_syls (cdr phones)))))
|
173 |
+
|
174 |
+
(define (add_lex_stress_syl phones si tree)
|
175 |
+
"(add_lex_stress_syl phones si tree)
|
176 |
+
Add lexical stressing."
|
177 |
+
(cond
|
178 |
+
((null phones) nil)
|
179 |
+
((string-matches (car phones) "[aeiou@].*")
|
180 |
+
(item.set_feat si 'phone (car phones))
|
181 |
+
(item.set_feat si 'name (car phones))
|
182 |
+
(item.set_feat si 'num2end
|
183 |
+
(- (+ 1 (item.feat si 'numsyls))
|
184 |
+
(item.feat si 'sylpos)))
|
185 |
+
(set! stress (wagon_predict si tree))
|
186 |
+
(item.set_feat si 'sylpos
|
187 |
+
(+ 1 (item.feat si 'sylpos)))
|
188 |
+
(cons
|
189 |
+
(if (not (string-equal stress "0"))
|
190 |
+
(string-append (car phones) stress)
|
191 |
+
(car phones))
|
192 |
+
(add_lex_stress_syl (cdr phones) si tree)))
|
193 |
+
(t
|
194 |
+
(cons
|
195 |
+
(car phones)
|
196 |
+
(add_lex_stress_syl (cdr phones) si tree)))))
|
197 |
+
|
198 |
+
;;; Morphological analysis
|
199 |
+
|
200 |
+
|
201 |
+
;(define (wfst_stemmer)
|
202 |
+
; (wfst.load 'stemmer "/home/awb/projects/morpho/engstemmer.wfst")
|
203 |
+
; (wfst.load 'stemmerL "/home/awb/projects/morpho/engstemmerL.wfst")
|
204 |
+
; t)
|
205 |
+
|
206 |
+
;(define (stem word)
|
207 |
+
; (wfst.transduce 'stemmer (enworden (symbolexplode word))))
|
208 |
+
|
209 |
+
;(define (stemL word)
|
210 |
+
; (wfst.transduce 'stemmerL (enworden (symbolexplode word))))
|
211 |
+
|
212 |
+
(provide 'lts)
|
CosyVoice-ttsfrd/resource/festival/module_description.scm
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Handle module descriptions.
|
35 |
+
;;;
|
36 |
+
|
37 |
+
(defvar *module-descriptions* nil
|
38 |
+
"*module-descriptions*
|
39 |
+
An association list recording the description objects for proclaimed
|
40 |
+
modules.")
|
41 |
+
|
42 |
+
(define (set_module_description mod desc)
|
43 |
+
"(set_module_description MOD DESC)
|
44 |
+
Set the description for the module named MOD."
|
45 |
+
(let ((entry (assoc mod *module-descriptions*)))
|
46 |
+
(if entry
|
47 |
+
(set-cdr! entry (cons desc nil))
|
48 |
+
(set! *module-descriptions* (cons (cons mod (cons desc nil))
|
49 |
+
*module-descriptions*))
|
50 |
+
)
|
51 |
+
)
|
52 |
+
)
|
53 |
+
|
54 |
+
(define (module_description mod)
|
55 |
+
"(module_description MOD)
|
56 |
+
Returns the description record of the module named by symbol MOD"
|
57 |
+
(let ((entry (assoc mod *module-descriptions*)))
|
58 |
+
(if entry
|
59 |
+
(car (cdr entry))
|
60 |
+
nil
|
61 |
+
)
|
62 |
+
)
|
63 |
+
)
|
64 |
+
|
65 |
+
(defmac (proclaim form)
|
66 |
+
"(proclaim NAME &opt DESCRIPTION...)
|
67 |
+
Anounce the availability of a module NAME. DESCRIPTION
|
68 |
+
is a description in a fixed format."
|
69 |
+
(let ((name (car (cdr form)))
|
70 |
+
(description (cdr form))
|
71 |
+
)
|
72 |
+
(list 'proclaim-real (list 'quote name) (list 'quote description))
|
73 |
+
)
|
74 |
+
)
|
75 |
+
|
76 |
+
(define (proclaim-real name description)
|
77 |
+
(set! *modules* (cons name *modules*))
|
78 |
+
; (if description
|
79 |
+
; (set_module_description name (create_module_description description))
|
80 |
+
; )
|
81 |
+
)
|
82 |
+
|
83 |
+
(define (describe_module mod)
|
84 |
+
"(describe_module MOD)
|
85 |
+
Describe the module named by the symbol MOD."
|
86 |
+
|
87 |
+
(let ((entry (module_description mod)))
|
88 |
+
(format t "---------------------\n")
|
89 |
+
(if entry
|
90 |
+
(print_module_description entry)
|
91 |
+
(format t "No description for %l\n" mod)
|
92 |
+
)
|
93 |
+
(format t "---------------------\n")
|
94 |
+
)
|
95 |
+
)
|
96 |
+
|
97 |
+
(define (describe_all_modules)
|
98 |
+
"(describe_all_modules)
|
99 |
+
Print descriptions of all proclaimed modules"
|
100 |
+
(format t "---------------------\n")
|
101 |
+
(let ((p *module-descriptions*))
|
102 |
+
(while p
|
103 |
+
(print_module_description (car (cdr (car p))))
|
104 |
+
(format t "---------------------\n")
|
105 |
+
(set! p (cdr p))
|
106 |
+
)
|
107 |
+
)
|
108 |
+
)
|
109 |
+
|
110 |
+
(proclaim
|
111 |
+
module_description 1.1
|
112 |
+
"CSTR" "Richard Caley <[email protected]>"
|
113 |
+
( "Handle module descriptions from C++ and from Scheme."
|
114 |
+
)
|
115 |
+
)
|
116 |
+
|
117 |
+
(provide 'module_description)
|
CosyVoice-ttsfrd/resource/festival/mrpa_allophones.scm
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;; ;;
|
3 |
+
;; Centre for Speech Technology Research ;;
|
4 |
+
;; University of Edinburgh, UK ;;
|
5 |
+
;; Copyright (c) 1996,1997 ;;
|
6 |
+
;; All Rights Reserved. ;;
|
7 |
+
;; ;;
|
8 |
+
;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;; this software and its documentation without restriction, including ;;
|
10 |
+
;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;; the following conditions: ;;
|
14 |
+
;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;; conditions and the following disclaimer. ;;
|
16 |
+
;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;; derived from this software without specific prior written ;;
|
20 |
+
;; permission. ;;
|
21 |
+
;; ;;
|
22 |
+
;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;; THIS SOFTWARE. ;;
|
31 |
+
;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;
|
34 |
+
;; A definition of the extended mrpa phone set used for some diphone sets
|
35 |
+
;;
|
36 |
+
|
37 |
+
(defPhoneSet
|
38 |
+
mrpa_allophones
|
39 |
+
;;; Phone Features
|
40 |
+
(;; vowel or consonant
|
41 |
+
(vc + -)
|
42 |
+
;; vowel length: short long dipthong schwa
|
43 |
+
(vlng s l d a 0)
|
44 |
+
;; vowel height: high mid low
|
45 |
+
(vheight 1 2 3 -)
|
46 |
+
;; vowel frontness: front mid back
|
47 |
+
(vfront 1 2 3 -)
|
48 |
+
;; lip rounding
|
49 |
+
(vrnd + -)
|
50 |
+
;; consonant type: stop fricative affricative nasal liquid
|
51 |
+
(ctype s f a n l 0)
|
52 |
+
;; place of articulation: labial alveolar palatal labio-dental
|
53 |
+
;; dental velar
|
54 |
+
(cplace l a p b d v 0)
|
55 |
+
;; consonant voicing
|
56 |
+
(cvox + -)
|
57 |
+
)
|
58 |
+
;; Phone set members
|
59 |
+
(
|
60 |
+
(uh + s 2 3 - 0 0 +)
|
61 |
+
(e + s 2 1 - 0 0 +)
|
62 |
+
(a + s 3 1 - 0 0 +)
|
63 |
+
(o + s 3 3 - 0 0 +)
|
64 |
+
(i + s 1 1 - 0 0 +)
|
65 |
+
(u + s 1 3 + 0 0 +)
|
66 |
+
(ii + l 1 1 - 0 0 +)
|
67 |
+
(uu + l 2 3 + 0 0 +)
|
68 |
+
(oo + l 3 2 - 0 0 +)
|
69 |
+
(aa + l 3 1 - 0 0 +)
|
70 |
+
(@@ + l 2 2 - 0 0 +)
|
71 |
+
(ai + d 3 1 - 0 0 +)
|
72 |
+
(ei + d 2 1 - 0 0 +)
|
73 |
+
(oi + d 3 3 - 0 0 +)
|
74 |
+
(au + d 3 3 + 0 0 +)
|
75 |
+
(ou + d 3 3 + 0 0 +)
|
76 |
+
(e@ + d 2 1 - 0 0 +)
|
77 |
+
(i@ + d 1 1 - 0 0 +)
|
78 |
+
(u@ + d 3 1 - 0 0 +)
|
79 |
+
(@ + a - - - 0 0 +)
|
80 |
+
(p - 0 - - + s l -)
|
81 |
+
(t - 0 - - + s a -)
|
82 |
+
(k - 0 - - + s p -)
|
83 |
+
(b - 0 - - + s l +)
|
84 |
+
(d - 0 - - + s a +)
|
85 |
+
(g - 0 - - + s p +)
|
86 |
+
(s - 0 - - + f a -)
|
87 |
+
(z - 0 - - + f a +)
|
88 |
+
(sh - 0 - - + f p -)
|
89 |
+
(zh - 0 - - + f p +)
|
90 |
+
(f - 0 - - + f b -)
|
91 |
+
(v - 0 - - + f b +)
|
92 |
+
(th - 0 - - + f d -)
|
93 |
+
(dh - 0 - - + f d +)
|
94 |
+
(ch - 0 - - + a a -)
|
95 |
+
(jh - 0 - - + a a +)
|
96 |
+
(h - 0 - - + a v -)
|
97 |
+
(m - 0 - - + n l +)
|
98 |
+
(n - 0 - - + n d +)
|
99 |
+
(ng - 0 - - + n v +)
|
100 |
+
(l - 0 - - + l d +)
|
101 |
+
(ll - 0 - - + l d +)
|
102 |
+
(y - 0 - - + l a +)
|
103 |
+
(r - 0 - - + l p +)
|
104 |
+
(w - 0 - - + l l +)
|
105 |
+
(# - 0 - - - 0 0 -)
|
106 |
+
)
|
107 |
+
)
|
108 |
+
|
109 |
+
(PhoneSet.silences '(#))
|
110 |
+
|
111 |
+
(provide 'mrpa_allophones)
|
CosyVoice-ttsfrd/resource/festival/mrpa_durs.scm
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; mrpa average phoneme durations from gsw 450
|
35 |
+
;;;
|
36 |
+
(set! phoneme_durations
|
37 |
+
'(
|
38 |
+
(u 0.067)
|
39 |
+
(i@ 0.146)
|
40 |
+
(h 0.067)
|
41 |
+
(uu 0.105)
|
42 |
+
(uh 0.090)
|
43 |
+
(v 0.053)
|
44 |
+
(oo 0.145)
|
45 |
+
(i 0.060)
|
46 |
+
(jh 0.097)
|
47 |
+
(ii 0.095)
|
48 |
+
(w 0.066)
|
49 |
+
(k 0.088)
|
50 |
+
(+ 0.036)
|
51 |
+
(y 0.051)
|
52 |
+
(l 0.067)
|
53 |
+
(zh 0.080)
|
54 |
+
(ng 0.072)
|
55 |
+
(m 0.070)
|
56 |
+
(z 0.079)
|
57 |
+
(## 0.256)
|
58 |
+
(au 0.162)
|
59 |
+
(a 0.118)
|
60 |
+
(n 0.065)
|
61 |
+
(o 0.102)
|
62 |
+
(ai 0.156)
|
63 |
+
(b 0.071)
|
64 |
+
(ou 0.129)
|
65 |
+
(ch 0.119)
|
66 |
+
(p 0.094)
|
67 |
+
(oi 0.165)
|
68 |
+
(# 0.040)
|
69 |
+
(e@ 0.131)
|
70 |
+
(d 0.052)
|
71 |
+
(dh 0.032)
|
72 |
+
(e 0.091)
|
73 |
+
(r 0.062)
|
74 |
+
(sh 0.101)
|
75 |
+
(@@ 0.149)
|
76 |
+
(ei 0.131)
|
77 |
+
(f 0.091)
|
78 |
+
(s 0.093)
|
79 |
+
(g 0.066)
|
80 |
+
(u@ 0.120)
|
81 |
+
(aa 0.173)
|
82 |
+
(t 0.073)
|
83 |
+
(th 0.080)
|
84 |
+
(@ 0.054)
|
85 |
+
))
|
86 |
+
|
87 |
+
(set! gsw_durs
|
88 |
+
'(
|
89 |
+
(# 0.200 0.100)
|
90 |
+
(h 0.061 0.028)
|
91 |
+
(i@ 0.141 0.061)
|
92 |
+
(u 0.067 0.024)
|
93 |
+
(uu 0.107 0.044)
|
94 |
+
(uh 0.087 0.025)
|
95 |
+
(v 0.051 0.019)
|
96 |
+
(oo 0.138 0.046)
|
97 |
+
(i 0.058 0.023)
|
98 |
+
(ii 0.092 0.035)
|
99 |
+
(w 0.054 0.023)
|
100 |
+
(jh 0.094 0.024)
|
101 |
+
(k 0.089 0.034)
|
102 |
+
(y 0.048 0.025)
|
103 |
+
(l 0.056 0.026)
|
104 |
+
(zh 0.077 0.030)
|
105 |
+
(ng 0.064 0.024)
|
106 |
+
(m 0.063 0.021)
|
107 |
+
(z 0.072 0.029)
|
108 |
+
(a 0.120 0.036)
|
109 |
+
(au 0.171 0.046)
|
110 |
+
(n 0.059 0.025)
|
111 |
+
(ou 0.134 0.039)
|
112 |
+
(b 0.073 0.021)
|
113 |
+
(o 0.094 0.037)
|
114 |
+
(ai 0.137 0.047)
|
115 |
+
(ch 0.128 0.039)
|
116 |
+
(oi 0.183 0.050)
|
117 |
+
(p 0.101 0.032)
|
118 |
+
(e@ 0.144 0.061)
|
119 |
+
(d 0.048 0.021)
|
120 |
+
(dh 0.031 0.016)
|
121 |
+
(e 0.092 0.035)
|
122 |
+
(r 0.053 0.025)
|
123 |
+
(sh 0.108 0.031)
|
124 |
+
(f 0.095 0.033)
|
125 |
+
(@@ 0.147 0.035)
|
126 |
+
(ei 0.130 0.042)
|
127 |
+
(s 0.102 0.037)
|
128 |
+
(u@ 0.140 0.057)
|
129 |
+
(th 0.093 0.050)
|
130 |
+
(g 0.064 0.021)
|
131 |
+
(aa 0.155 0.045)
|
132 |
+
(t 0.070 0.034)
|
133 |
+
(@ 0.046 0.020)
|
134 |
+
))
|
135 |
+
|
136 |
+
(provide 'mrpa_durs)
|
CosyVoice-ttsfrd/resource/festival/mrpa_phones.scm
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;; ;;
|
3 |
+
;; Centre for Speech Technology Research ;;
|
4 |
+
;; University of Edinburgh, UK ;;
|
5 |
+
;; Copyright (c) 1996,1997 ;;
|
6 |
+
;; All Rights Reserved. ;;
|
7 |
+
;; ;;
|
8 |
+
;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;; this software and its documentation without restriction, including ;;
|
10 |
+
;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;; the following conditions: ;;
|
14 |
+
;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;; conditions and the following disclaimer. ;;
|
16 |
+
;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;; derived from this software without specific prior written ;;
|
20 |
+
;; permission. ;;
|
21 |
+
;; ;;
|
22 |
+
;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;; THIS SOFTWARE. ;;
|
31 |
+
;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;
|
34 |
+
;; A definition of the mrpa phone set
|
35 |
+
;;
|
36 |
+
|
37 |
+
(defPhoneSet
|
38 |
+
mrpa
|
39 |
+
;;; Phone Features
|
40 |
+
(;; vowel or consonant
|
41 |
+
(vc + -)
|
42 |
+
;; vowel length: short long dipthong schwa
|
43 |
+
(vlng s l d a 0)
|
44 |
+
;; vowel height: high mid low
|
45 |
+
(vheight 1 2 3 0)
|
46 |
+
;; vowel frontness: front mid back
|
47 |
+
(vfront 1 2 3 0)
|
48 |
+
;; lip rounding
|
49 |
+
(vrnd + - 0)
|
50 |
+
;; consonant type: stop fricative affricate nasal lateral approximant
|
51 |
+
(ctype s f a n l r 0)
|
52 |
+
;; place of articulation: labial alveolar palatal labio-dental
|
53 |
+
;; dental velar glottal
|
54 |
+
(cplace l a p b d v g 0)
|
55 |
+
;; consonant voicing
|
56 |
+
(cvox + - 0)
|
57 |
+
)
|
58 |
+
;; Phone set members
|
59 |
+
(
|
60 |
+
(uh + s 2 3 - 0 0 0)
|
61 |
+
(e + s 2 1 - 0 0 0)
|
62 |
+
(a + s 3 1 - 0 0 0)
|
63 |
+
(o + s 2 3 + 0 0 0)
|
64 |
+
(i + s 1 1 - 0 0 0)
|
65 |
+
(u + s 1 3 + 0 0 0)
|
66 |
+
(ii + l 1 1 - 0 0 0)
|
67 |
+
(uu + l 1 3 + 0 0 0)
|
68 |
+
(oo + l 3 3 + 0 0 0)
|
69 |
+
(aa + l 3 3 - 0 0 0)
|
70 |
+
(@@ + l 2 2 - 0 0 0)
|
71 |
+
(ai + d 3 2 - 0 0 0)
|
72 |
+
(ei + d 2 1 - 0 0 0)
|
73 |
+
(oi + d 3 3 + 0 0 0)
|
74 |
+
(au + d 3 2 + 0 0 0)
|
75 |
+
(ou + d 2 2 - 0 0 0)
|
76 |
+
(e@ + d 2 1 - 0 0 0)
|
77 |
+
(i@ + d 1 1 - 0 0 0)
|
78 |
+
(u@ + d 3 1 + 0 0 0)
|
79 |
+
(@ + a 2 2 - 0 0 0)
|
80 |
+
(p - 0 0 0 0 s l -)
|
81 |
+
(t - 0 0 0 0 s a -)
|
82 |
+
(k - 0 0 0 0 s v -)
|
83 |
+
(b - 0 0 0 0 s l +)
|
84 |
+
(d - 0 0 0 0 s a +)
|
85 |
+
(g - 0 0 0 0 s v +)
|
86 |
+
(s - 0 0 0 0 f a -)
|
87 |
+
(z - 0 0 0 0 f a +)
|
88 |
+
(sh - 0 0 0 0 f p -)
|
89 |
+
(zh - 0 0 0 0 f p +)
|
90 |
+
(f - 0 0 0 0 f b -)
|
91 |
+
(v - 0 0 0 0 f b +)
|
92 |
+
(th - 0 0 0 0 f d -)
|
93 |
+
(dh - 0 0 0 0 f d +)
|
94 |
+
(ch - 0 0 0 0 a p -)
|
95 |
+
(jh - 0 0 0 0 a p +)
|
96 |
+
(h - 0 0 0 0 f g -)
|
97 |
+
(m - 0 0 0 0 n l +)
|
98 |
+
(n - 0 0 0 0 n a +)
|
99 |
+
(ng - 0 0 0 0 n v +)
|
100 |
+
(l - 0 0 0 0 l a +)
|
101 |
+
(y - 0 0 0 0 r p +)
|
102 |
+
(r - 0 0 0 0 r a +)
|
103 |
+
(w - 0 0 0 0 r l +)
|
104 |
+
(# - 0 0 0 0 0 0 -)
|
105 |
+
)
|
106 |
+
)
|
107 |
+
|
108 |
+
(PhoneSet.silences '(#))
|
109 |
+
|
110 |
+
(provide 'mrpa_phones)
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
CosyVoice-ttsfrd/resource/festival/ogimarkup-mode.scm
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; An example tts text mode for reading OGI's CSLU toolkit mark up
|
35 |
+
;;;
|
36 |
+
;;; Note not all tokens do something in festival but all are removed
|
37 |
+
;;; from the actual text
|
38 |
+
;;;
|
39 |
+
|
40 |
+
(defvar ogimarkup_eou_tree
|
41 |
+
'((n.name matches "<.*")
|
42 |
+
((1))
|
43 |
+
((n.whitespace matches ".*\n.*\n\\(.\\|\n\\)*") ;; A significant break (2 nls)
|
44 |
+
((1))
|
45 |
+
((punc in ("?" ":" "!"))
|
46 |
+
((1))
|
47 |
+
((punc is ".")
|
48 |
+
;; This is to distinguish abbreviations vs periods
|
49 |
+
;; These are heuristics
|
50 |
+
((name matches "\\(.*\\..*\\|[A-Z][A-Za-z]?[A-Za-z]?\\|etc\\)") ;; an abbreviation
|
51 |
+
((n.whitespace is " ")
|
52 |
+
((0)) ;; if abbrev single space isn't enough for break
|
53 |
+
((n.name matches "[A-Z].*")
|
54 |
+
((1))
|
55 |
+
((0))))
|
56 |
+
((n.whitespace is " ") ;; if it doesn't look like an abbreviation
|
57 |
+
((n.name matches "[A-Z].*") ;; single space and non-cap is no break
|
58 |
+
((1))
|
59 |
+
((0)))
|
60 |
+
((1))))
|
61 |
+
((0)))))))
|
62 |
+
|
63 |
+
(define (ogimarkup_init_func)
|
64 |
+
"Called on starting ogimarkup text mode."
|
65 |
+
(set! ogimarkup_in_tag nil)
|
66 |
+
(set! ogimarkup_tagtokens "")
|
67 |
+
(set! ogimarkup_previous_t2w_func token_to_words)
|
68 |
+
(set! english_token_to_words ogimarkup_token_to_words)
|
69 |
+
(set! token_to_words ogimarkup_token_to_words)
|
70 |
+
(set! ogimarkup_previous_eou_tree eou_tree)
|
71 |
+
(set! eou_tree ogimarkup_eou_tree))
|
72 |
+
|
73 |
+
(define (ogimarkup_exit_func)
|
74 |
+
"Called on exit ogimarkup text mode."
|
75 |
+
(Parameter.set 'Duration_Stretch 1.0)
|
76 |
+
(set! token_to_words ogimarkup_previous_t2w_func)
|
77 |
+
(set! english_token_to_words ogimarkup_previous_t2w_func)
|
78 |
+
(set! eou_tree ogimarkup_previous_eou_tree))
|
79 |
+
|
80 |
+
(define (ogimarkup_token_to_words token name)
|
81 |
+
"(ogimarkup_token_to_words token name)
|
82 |
+
OGI markup specific token to word rules. Tags may have optional
|
83 |
+
argument e.g. <slow> or <slow 0.6> which means the tag may be over
|
84 |
+
a number of tokens."
|
85 |
+
(let (tag (arg nil) (rval nil))
|
86 |
+
(cond
|
87 |
+
((string-matches name "<.*")
|
88 |
+
(set! ogimarkup_tagtokens "")
|
89 |
+
(set! tag (string-after name "<"))
|
90 |
+
(if (string-matches tag ".*>$")
|
91 |
+
(set! tag (string-before tag ">"))
|
92 |
+
(if (string-matches (set! arg (item.feat token "n.name"))
|
93 |
+
".*>$")
|
94 |
+
(set! arg (string-before arg ">"))))
|
95 |
+
(set! ogimarkup_in_tag tag)
|
96 |
+
(cond
|
97 |
+
((string-equal tag "slow")
|
98 |
+
(Parameter.set 'Duration_Stretch 1.3))
|
99 |
+
((string-equal tag "SLOW")
|
100 |
+
(Parameter.set 'Duration_Stretch 2.0))
|
101 |
+
((string-equal tag "normal")
|
102 |
+
(Parameter.set 'Duration_Stretch 1.0))
|
103 |
+
((string-matches tag "FAST")
|
104 |
+
(Parameter.set 'Duration_Stretch 0.5))
|
105 |
+
((string-matches tag "fast")
|
106 |
+
(Parameter.set 'Duration_Stretch 0.8))
|
107 |
+
((string-matches tag"spell")
|
108 |
+
;; This ain't really right as we'll get an utterance break here
|
109 |
+
(set! rval (symbolexplode arg)))
|
110 |
+
((string-matches tag "phone")
|
111 |
+
;; This ain't really right as we'll get an utterance break here
|
112 |
+
(item.set_feat token "token_pos" "digits") ;; canonical phone number
|
113 |
+
(set! rval (ogimarkup_previous_t2w_func token arg)))
|
114 |
+
((string-matches tag "male")
|
115 |
+
(if (and (member 'OGIresLPC *modules*)
|
116 |
+
(symbol-bound? 'voice_aec_diphone))
|
117 |
+
(voice_aec_diphone)
|
118 |
+
(voice_kal_diphone)))
|
119 |
+
((string-matches tag "Male")
|
120 |
+
(if (and (member 'OGIresLPC *modules*)
|
121 |
+
(symbol-bound? 'voice_mwm_diphone))
|
122 |
+
(voice_mwm_diphone)
|
123 |
+
(voice_cmu_us_rms_cg)))
|
124 |
+
((string-matches tag "MALE")
|
125 |
+
(if (and (member 'OGIresLPC *modules*)
|
126 |
+
(symbol-bound? 'voice_jph_diphone))
|
127 |
+
(voice_jph_diphone)
|
128 |
+
(voice_rab_diphone)))
|
129 |
+
((string-matches tag "FT")
|
130 |
+
t) ;; do nothing until the end of this tag
|
131 |
+
((string-matches (downcase tag) "female")
|
132 |
+
;; only one female voice so map female Female FEMALE to it
|
133 |
+
(if (and (member 'OGIresLPC *modules*)
|
134 |
+
(symbol-bound? 'voice_tll_diphone))
|
135 |
+
(voice_tll_diphone)
|
136 |
+
(voice_cmu_us_slt_arctic_hts))))
|
137 |
+
(if (string-matches name ".*>$")
|
138 |
+
(set! ogimarkup_in_tag nil))
|
139 |
+
rval ;; mostly nil
|
140 |
+
)
|
141 |
+
((string-matches name ".*>$")
|
142 |
+
(set! ogimarkup_tagtokens
|
143 |
+
(string-append
|
144 |
+
ogimarkup_tagtokens
|
145 |
+
(ogimarkup_get_token_string token t))) ;; delete final >
|
146 |
+
(if (string-equal ogimarkup_in_tag "FT")
|
147 |
+
(ogimarkup_festival_eval ogimarkup_tagtokens))
|
148 |
+
(set! ogimarkup_in_tag nil) ;; end of tag
|
149 |
+
nil)
|
150 |
+
(ogimarkup_in_tag
|
151 |
+
(set! ogimarkup_tagtokens
|
152 |
+
(string-append
|
153 |
+
ogimarkup_tagtokens
|
154 |
+
(ogimarkup_get_token_string token nil)))
|
155 |
+
nil) ;; still in tag
|
156 |
+
(t ;; for all other cases
|
157 |
+
(ogimarkup_previous_t2w_func token name)))))
|
158 |
+
|
159 |
+
(set! tts_text_modes
|
160 |
+
(cons
|
161 |
+
(list
|
162 |
+
'ogimarkup ;; mode name
|
163 |
+
(list ;; ogimarkup mode params
|
164 |
+
(list 'init_func ogimarkup_init_func)
|
165 |
+
(list 'exit_func ogimarkup_exit_func)))
|
166 |
+
tts_text_modes))
|
167 |
+
|
168 |
+
(define (ogimarkup_get_token_string token delend)
|
169 |
+
"(ogimarkup_get_token_string TOKEN DELEND)
|
170 |
+
return string for token including whitespace and punctuation. If DELEND
|
171 |
+
is true remove > from the name."
|
172 |
+
(string-append
|
173 |
+
(item.feat token "whitespace")
|
174 |
+
(item.feat token "prepunctuation")
|
175 |
+
(if delend
|
176 |
+
(string-before
|
177 |
+
(item.feat token "name") ">")
|
178 |
+
(item.feat token "name"))
|
179 |
+
(if (string-equal "0" (item.feat token "punc"))
|
180 |
+
""
|
181 |
+
(item.feat token "punc"))))
|
182 |
+
|
183 |
+
(define (ogimarkup_festival_eval tagtokens)
|
184 |
+
"(ogimarkup_festival_eval TAGTOKENS
|
185 |
+
Take a string of the tokens within the tag and read an s-expression from
|
186 |
+
it and then evaluate it."
|
187 |
+
(let ((com "") (command nil))
|
188 |
+
(set! command (read-from-string tagtokens))
|
189 |
+
(eval command)))
|
190 |
+
|
191 |
+
(provide 'ogimarkup-mode)
|
CosyVoice-ttsfrd/resource/festival/pauses.scm
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Predicting pause insertion
|
35 |
+
|
36 |
+
(define (Pauses utt)
|
37 |
+
"(Pauses utt)
|
38 |
+
Insert pauses where required."
|
39 |
+
(let ((rval (apply_method 'Pause_Method utt)))
|
40 |
+
(cond
|
41 |
+
(rval rval) ;; new style
|
42 |
+
(t
|
43 |
+
(Classic_Pauses utt))))
|
44 |
+
(Pause_optional_deleting_B_X utt))
|
45 |
+
|
46 |
+
(define (Classic_Pauses utt)
|
47 |
+
"(Pauses UTT)
|
48 |
+
Predict pause insertion."
|
49 |
+
(let ((words (utt.relation.items utt 'Word)) lastword tpname)
|
50 |
+
(if words
|
51 |
+
(begin
|
52 |
+
(insert_initial_pause utt) ;; always have a start pause
|
53 |
+
(set! lastword (car (last words)))
|
54 |
+
(mapcar
|
55 |
+
(lambda (w)
|
56 |
+
(let ((pbreak (item.feat w "pbreak"))
|
57 |
+
(emph (item.feat w "R:Token.parent.EMPH")))
|
58 |
+
(cond
|
59 |
+
((or (string-equal "B" pbreak)
|
60 |
+
(string-equal "BB" pbreak))
|
61 |
+
(insert_pause utt w))
|
62 |
+
; ((string-equal emph "1")
|
63 |
+
; (insert_pause utt w))
|
64 |
+
((equal? w lastword)
|
65 |
+
(insert_pause utt w)))))
|
66 |
+
words)
|
67 |
+
;; The embarrassing bit. Remove any words labelled as punc or fpunc
|
68 |
+
(mapcar
|
69 |
+
(lambda (w)
|
70 |
+
(let ((pos (item.feat w "pos")))
|
71 |
+
(if (or (string-equal "punc" pos)
|
72 |
+
(string-equal "fpunc" pos))
|
73 |
+
(let ((pbreak (item.feat w "pbreak"))
|
74 |
+
(wp (item.relation w 'Phrase)))
|
75 |
+
(if (and (string-matches pbreak "BB?")
|
76 |
+
(item.relation.prev w 'Word))
|
77 |
+
(item.set_feat
|
78 |
+
(item.relation.prev w 'Word) "pbreak" pbreak))
|
79 |
+
(item.relation.remove w 'Word)
|
80 |
+
;; can't refer to w as we've just deleted it
|
81 |
+
(item.relation.remove wp 'Phrase)))))
|
82 |
+
words)
|
83 |
+
;; 12/01/2006 V.Strom: Even more embarrasing: Delete all silences
|
84 |
+
;; that are followed by a silence. These silence sequences
|
85 |
+
;; emerge if 'punc of phrase-final words consists of more than one
|
86 |
+
;; character, e.g. period+quote. That in turn causes problems in
|
87 |
+
;; build_utts: the 2nd silence ends up with no features but its name,
|
88 |
+
;; because there is no corresponding 2nd silence in the phone
|
89 |
+
;; segmentation to align with.
|
90 |
+
;; This schould be fixed in the functions below, but it is easier for
|
91 |
+
;; me to clean up at the end:
|
92 |
+
(set! sil (car (car (cdr (car (PhoneSet.description '(silences)))))))
|
93 |
+
(set! seg (item.next(utt.relation.first utt 'Segment)))
|
94 |
+
(while seg
|
95 |
+
(if(and(equal? sil (item.name seg))
|
96 |
+
(equal? sil (item.name (item.prev seg))))
|
97 |
+
(item.delete (item.prev seg)))
|
98 |
+
(set! seg (item.next seg)))))
|
99 |
+
utt))
|
100 |
+
|
101 |
+
(define (insert_pause utt word)
|
102 |
+
"(insert_pause UTT WORDITEM)
|
103 |
+
Insert a silence segment after the last segment in WORDITEM in UTT."
|
104 |
+
(let ((lastseg (find_last_seg word))
|
105 |
+
(silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
|
106 |
+
(if lastseg
|
107 |
+
(item.relation.insert
|
108 |
+
lastseg 'Segment (list silence) 'after))))
|
109 |
+
|
110 |
+
(define (insert_initial_pause utt)
|
111 |
+
"(insert_initial_pause UTT)
|
112 |
+
Always have an initial silence if the utterance is non-empty.
|
113 |
+
Insert a silence segment after the last segment in WORDITEM in UTT."
|
114 |
+
(let ((firstseg (car (utt.relation.items utt 'Segment)))
|
115 |
+
(silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
|
116 |
+
(if firstseg
|
117 |
+
(item.relation.insert
|
118 |
+
firstseg 'Segment (list silence) 'before))))
|
119 |
+
|
120 |
+
(define (insert_final_pause utt)
|
121 |
+
"(insert_final_pause UTT)
|
122 |
+
Always have a final silence if the utterance is non-empty."
|
123 |
+
(let ((lastseg (utt.relation.last utt 'Segment))
|
124 |
+
(silence (car (car (cdr (car (PhoneSet.description '(silences))))))))
|
125 |
+
(set! silence (format nil "%l" silence)) ; to make the symbol a string
|
126 |
+
;(format t "silence is %l\n" silence)
|
127 |
+
;(format t "lastseg is %l\n" (item.name lastseg))
|
128 |
+
(if lastseg
|
129 |
+
(if (not(equal? (item.name lastseg) silence))
|
130 |
+
(begin
|
131 |
+
(format t "iserted final pause %s\n" silence)
|
132 |
+
(item.relation.insert lastseg 'Segment (list silence) 'after))))))
|
133 |
+
|
134 |
+
|
135 |
+
(define (find_last_seg word)
|
136 |
+
;;; Find the segment that is immediately at this end of this word
|
137 |
+
;;; If this word is punctuation it might not have any segments
|
138 |
+
;;; so we have to check back until we find a word with a segment in it
|
139 |
+
(cond
|
140 |
+
((null word)
|
141 |
+
nil) ;; there are no segs (don't think this can happen)
|
142 |
+
(t
|
143 |
+
(let ((lsyl (item.relation.daughtern word 'SylStructure)))
|
144 |
+
(if lsyl
|
145 |
+
(item.relation.daughtern lsyl 'SylStructure)
|
146 |
+
(find_last_seg (item.relation.prev word 'Word)))))))
|
147 |
+
|
148 |
+
(define (Unisyn_Pauses utt)
|
149 |
+
"(Unisyn_Pauses UTT)
|
150 |
+
Predict pause insertion in a Unisyn utterance structure."
|
151 |
+
(let ((words (utt.relation.items utt 'Word)) lastword tpname)
|
152 |
+
(if words
|
153 |
+
(begin
|
154 |
+
(us_insert_initial_pause utt) ;; always have a start pause
|
155 |
+
(set! lastword (car (last words)))
|
156 |
+
(mapcar
|
157 |
+
(lambda (w)
|
158 |
+
(let ((pbreak (item.feat w "pbreak"))
|
159 |
+
(emph (item.feat w "R:Token.parent.EMPH")))
|
160 |
+
(cond
|
161 |
+
((or (string-equal "B" pbreak)
|
162 |
+
(string-equal "BB" pbreak))
|
163 |
+
(us_insert_pause utt w))
|
164 |
+
; ((string-equal emph "1")
|
165 |
+
; (us_insert_pause utt w))
|
166 |
+
((equal? w lastword)
|
167 |
+
(us_insert_pause utt w)))))
|
168 |
+
words)
|
169 |
+
;; The embarrassing bit. Remove any words labelled as punc or fpunc
|
170 |
+
(mapcar
|
171 |
+
(lambda (w)
|
172 |
+
(let ((pos (item.feat w "pos")))
|
173 |
+
(if (or (string-equal "punc" pos)
|
174 |
+
(string-equal "fpunc" pos))
|
175 |
+
(let ((pbreak (item.feat w "pbreak"))
|
176 |
+
(wp (item.relation w 'Phrase)))
|
177 |
+
(if (and (string-matches pbreak "BB?")
|
178 |
+
(item.relation.prev w 'Word))
|
179 |
+
(item.set_feat
|
180 |
+
(item.relation.prev w 'Word) "pbreak" pbreak))
|
181 |
+
(item.relation.remove w 'Word)
|
182 |
+
;; can't refer to w as we've just deleted it
|
183 |
+
(item.relation.remove wp 'Phrase)))))
|
184 |
+
words)))
|
185 |
+
utt))
|
186 |
+
|
187 |
+
(define (us_insert_pause utt word)
|
188 |
+
"(us_insert_pause UTT WORDITEM)
|
189 |
+
Insert a silence segment after the last segment in WORDITEM in UTT."
|
190 |
+
(let ((lastseg (us_find_last_seg word))
|
191 |
+
(silence "pau"))
|
192 |
+
(if lastseg
|
193 |
+
(item.relation.insert
|
194 |
+
lastseg 'Segment (list silence) 'after))))
|
195 |
+
|
196 |
+
(define (us_insert_initial_pause utt)
|
197 |
+
"(us_insert_initial_pause UTT)
|
198 |
+
Always have an initial silence if the utterance is non-empty.
|
199 |
+
Insert a silence segment after the last segment in WORDITEM in UTT."
|
200 |
+
(let ((firstseg (utt.relation.first utt 'Segment))
|
201 |
+
(silence "pau"))
|
202 |
+
(if firstseg
|
203 |
+
(item.relation.insert
|
204 |
+
firstseg 'Segment (list silence) 'before))))
|
205 |
+
|
206 |
+
(define (us_find_last_seg word)
|
207 |
+
;;; Find the segment that is immediately at this end of this word
|
208 |
+
;;; If this word is punctuation it might not have any segments
|
209 |
+
;;; so we have to check back until we find a word with a segment in it
|
210 |
+
(cond
|
211 |
+
((null word)
|
212 |
+
nil) ;; there are no segs (don't think this can happen)
|
213 |
+
(t
|
214 |
+
(if (item.daughtern_to (item.relation word 'WordStructure) 'Syllable)
|
215 |
+
(item.daughtern_to
|
216 |
+
(item.relation
|
217 |
+
(item.daughtern_to (item.relation word 'WordStructure) 'Syllable)
|
218 |
+
'SylStructure)
|
219 |
+
'Segment)
|
220 |
+
(us_find_last_seg (item.relation.prev word 'Word))))))
|
221 |
+
|
222 |
+
(define (Pause_optional_deleting_B_X utt)
|
223 |
+
"(Pause_optional_deleting_B_X utt)
|
224 |
+
|
225 |
+
Delete all phone symbols starting with 'B_' from the segemt relation
|
226 |
+
(a B_150 e.g. is a 150ms pause) if symbol 'Pause_delete_B_X is defined.
|
227 |
+
"
|
228 |
+
; The B_X never occur in the phone segmentation but are predicted by
|
229 |
+
; some pause methods, in particular the default I used to produce the
|
230 |
+
; .utt files for the 2009 test sentences for the Blizzard challange.
|
231 |
+
; Some participants complained about them and I had to fix it quickly.
|
232 |
+
(if (symbol-bound? 'Pause_delete_B_X)
|
233 |
+
(let(seg )
|
234 |
+
(set! seg (item.next(utt.relation.first utt 'Segment)))
|
235 |
+
(while seg
|
236 |
+
(set! next_seg (item.next seg))
|
237 |
+
;(format t "segment %l\n" (item.name seg))
|
238 |
+
(if(string-matches (item.name seg) "B_[0-9]*")
|
239 |
+
(item.delete seg))
|
240 |
+
(set! seg next_seg)))))
|
241 |
+
|
242 |
+
(provide 'pauses)
|
CosyVoice-ttsfrd/resource/festival/postlex.scm
ADDED
@@ -0,0 +1,587 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Postlexical rules
|
35 |
+
;;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
;; Modifed for CSTR HTS Voice Library ;;
|
38 |
+
;; Author : Junichi Yamagishi ([email protected]) ;;
|
39 |
+
;; Date : Sept 2008 ;;
|
40 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
41 |
+
|
42 |
+
|
43 |
+
(define (PostLex utt)
|
44 |
+
"(PostLex utt)
|
45 |
+
Apply post lexical rules to segment stream. These may be almost
|
46 |
+
arbitrary rules as specified by the particular voice, through the
|
47 |
+
postlex_hooks variable. A number of standard post lexical rule
|
48 |
+
sets are provided including reduction, posessives etc. These
|
49 |
+
rules are also used to mark standard segments with their cluster
|
50 |
+
information used in creating diphone names."
|
51 |
+
(let ((rval (apply_method 'PostLex_Method utt)))
|
52 |
+
(cond
|
53 |
+
(rval rval) ;; new style
|
54 |
+
(t ;; should only really need this one
|
55 |
+
(apply_hooks postlex_rules_hooks utt)))
|
56 |
+
utt
|
57 |
+
))
|
58 |
+
|
59 |
+
(define (Classic_PostLex utt)
|
60 |
+
"(Classic_PostLex utt)
|
61 |
+
Apply post lexical rules (both builtin and those specified in
|
62 |
+
postlex_rules_hooks)."
|
63 |
+
(Builtin_PostLex utt) ;; haven't translated all the rules yet
|
64 |
+
(apply_hooks postlex_rules_hooks utt)
|
65 |
+
utt
|
66 |
+
)
|
67 |
+
|
68 |
+
(defvar postlex_rules_hooks nil
|
69 |
+
"postlex_rules_hooks
|
70 |
+
A function or list of functions which encode post lexical rules.
|
71 |
+
This will be voice specific, though some rules will be shared across
|
72 |
+
languages.")
|
73 |
+
|
74 |
+
;;; Mapping of full vowels to reduced vowels, this should be part
|
75 |
+
;;; of the phoneset definitions
|
76 |
+
(defvar postlex_vowel_reduce_table
|
77 |
+
'((mrpa
|
78 |
+
((uh @) (i @) (a @) (e @) (u @) (o @) (oo @)))
|
79 |
+
(radio
|
80 |
+
((ah ax el en em)
|
81 |
+
(ih ax)
|
82 |
+
; (er axr ax)
|
83 |
+
; (iy ih)
|
84 |
+
; (ey ax)
|
85 |
+
(aa ax)
|
86 |
+
(ae ax)
|
87 |
+
(eh ax))))
|
88 |
+
"postlex_vowel_reduce_table
|
89 |
+
Mapping of vowels to their reduced form. This in an assoc list of
|
90 |
+
phoneset name to an assoc list of full vowel to reduced form.")
|
91 |
+
|
92 |
+
(defvar postlex_vowel_reduce_cart_tree nil
|
93 |
+
"postlex_vowel_reduce_cart_tree
|
94 |
+
CART tree for vowel reduction.")
|
95 |
+
|
96 |
+
(defvar postlex_vowel_reduce_cart_tree_hand
|
97 |
+
'((stress is 0)
|
98 |
+
((p.syl_break < 2)
|
99 |
+
((syl_break < 2)
|
100 |
+
((1))
|
101 |
+
((0)))
|
102 |
+
((0)))
|
103 |
+
((0)))
|
104 |
+
"postlex_vowel_reduce_cart_tree_hand
|
105 |
+
A CART tree for vowel reduction. This is hand-written.")
|
106 |
+
|
107 |
+
(defvar postlex_vowel_reduce_cart_data
|
108 |
+
'
|
109 |
+
((R:SylStructure.parent.gpos is cc)
|
110 |
+
(((0 0.993548) (1 0.00645161) 0))
|
111 |
+
((p.R:SylStructure.parent.gpos is md)
|
112 |
+
(((0 0.903226) (1 0.0967742) 0))
|
113 |
+
((p.R:SylStructure.parent.gpos is det)
|
114 |
+
((n.R:SylStructure.parent.gpos is content)
|
115 |
+
((last_accent < 2.5)
|
116 |
+
((next_accent < 2.5)
|
117 |
+
((next_accent < 1.2)
|
118 |
+
((n.syl_break is 4)
|
119 |
+
(((0 0.967213) (1 0.0327869) 0))
|
120 |
+
((syl_break is 4)
|
121 |
+
(((0 0.952381) (1 0.047619) 0))
|
122 |
+
((n.syl_break is 4)
|
123 |
+
(((0 0.953488) (1 0.0465116) 0))
|
124 |
+
((position_type is single)
|
125 |
+
(((0 0.947368) (1 0.0526316) 0))
|
126 |
+
((accented is 0)
|
127 |
+
((n.accented is 0)
|
128 |
+
(((0 0.857143) (1 0.142857) 0))
|
129 |
+
(((0 0.415385) (1 0.584615) 1)))
|
130 |
+
(((0 0.974359) (1 0.025641) 0)))))))
|
131 |
+
(((0 0.968254) (1 0.031746) 0)))
|
132 |
+
(((0 0.969697) (1 0.030303) 0)))
|
133 |
+
(((0 0.976744) (1 0.0232558) 0)))
|
134 |
+
(((0 0.990291) (1 0.00970874) 0)))
|
135 |
+
((next_accent < 108.5)
|
136 |
+
((p.R:SylStructure.parent.gpos is pps)
|
137 |
+
(((0 0.828947) (1 0.171053) 0))
|
138 |
+
((R:SylStructure.parent.gpos is det)
|
139 |
+
((accented is 0)
|
140 |
+
(((0 0.0599572) (1 0.940043) 1))
|
141 |
+
(((0 0.949367) (1 0.0506329) 0)))
|
142 |
+
((p.R:SylStructure.parent.gpos is cc)
|
143 |
+
(((0 0.880952) (1 0.119048) 0))
|
144 |
+
((p.R:SylStructure.parent.gpos is wp)
|
145 |
+
(((0 0.875) (1 0.125) 0))
|
146 |
+
((p.R:SylStructure.parent.gpos is in)
|
147 |
+
((n.syl_break is 4)
|
148 |
+
(((0 0.961538) (1 0.0384615) 0))
|
149 |
+
((next_accent < 2.5)
|
150 |
+
((syl_break is 4)
|
151 |
+
(((0 0.95122) (1 0.0487805) 0))
|
152 |
+
((next_accent < 1.2)
|
153 |
+
((accented is 0)
|
154 |
+
((n.stress is 0)
|
155 |
+
(((0 0.788462) (1 0.211538) 0))
|
156 |
+
((R:SylStructure.parent.R:Word.p.gpos is content)
|
157 |
+
(((0 0.863636) (1 0.136364) 0))
|
158 |
+
((position_type is single)
|
159 |
+
(((0 0.729167) (1 0.270833) 0))
|
160 |
+
(((0 0.4) (1 0.6) 1)))))
|
161 |
+
(((0 0.983871) (1 0.016129) 0)))
|
162 |
+
(((0 0.96) (1 0.04) 0))))
|
163 |
+
(((0 0.963636) (1 0.0363636) 0))))
|
164 |
+
((position_type is single)
|
165 |
+
((syl_break is 4)
|
166 |
+
(((0 0.993865) (1 0.00613497) 0))
|
167 |
+
((p.R:SylStructure.parent.gpos is to)
|
168 |
+
(((0 0.984375) (1 0.015625) 0))
|
169 |
+
((syl_break is 1)
|
170 |
+
((accented is 0)
|
171 |
+
((n.R:SylStructure.parent.gpos is in)
|
172 |
+
(((0 0.869565) (1 0.130435) 0))
|
173 |
+
((R:SylStructure.parent.gpos is content)
|
174 |
+
(((0 0.861789) (1 0.138211) 0))
|
175 |
+
((p.R:SylStructure.parent.gpos is content)
|
176 |
+
((p.syl_break is 4)
|
177 |
+
(((0 0.858065) (1 0.141935) 0))
|
178 |
+
((R:SylStructure.parent.gpos is in)
|
179 |
+
((p.syl_break is 1)
|
180 |
+
((n.R:SylStructure.parent.gpos is det)
|
181 |
+
(((0 0.659574) (1 0.340426) 0))
|
182 |
+
((p.stress is 0)
|
183 |
+
(((0 0.422222) (1 0.577778) 1))
|
184 |
+
(((0 0.582278) (1 0.417722) 0))))
|
185 |
+
((n.accented is 0)
|
186 |
+
((n.R:SylStructure.parent.gpos is content)
|
187 |
+
(((0 0.65) (1 0.35) 0))
|
188 |
+
((p.stress is 0)
|
189 |
+
(((0 0.464286) (1 0.535714) 1))
|
190 |
+
(((0 0.538462) (1 0.461538) 0))))
|
191 |
+
(((0 0.803279) (1 0.196721) 0))))
|
192 |
+
((n.R:SylStructure.parent.gpos is det)
|
193 |
+
(((0 0.952381) (1 0.047619) 0))
|
194 |
+
((n.syl_break is 4)
|
195 |
+
(((0 0.833333) (1 0.166667) 0))
|
196 |
+
((p.stress is 0)
|
197 |
+
((p.syl_break is 1)
|
198 |
+
((n.syl_break is 1)
|
199 |
+
(((0 0.740741) (1 0.259259) 0))
|
200 |
+
((R:SylStructure.parent.gpos is aux)
|
201 |
+
(((0 0.478261) (1 0.521739) 1))
|
202 |
+
(((0 0.769231) (1 0.230769) 0))))
|
203 |
+
(((0 0.755556) (1 0.244444) 0)))
|
204 |
+
(((0 0.797619) (1 0.202381) 0)))))))
|
205 |
+
(((0 0.870968) (1 0.129032) 0)))))
|
206 |
+
(((0 0.983806) (1 0.0161943) 0)))
|
207 |
+
(((0 0.977778) (1 0.0222222) 0)))))
|
208 |
+
((next_accent < 21.6)
|
209 |
+
((p.stress is 0)
|
210 |
+
((R:SylStructure.parent.R:Word.p.gpos is md)
|
211 |
+
(((0 0.961538) (1 0.0384615) 0))
|
212 |
+
((position_type is mid)
|
213 |
+
(((0 0.977612) (1 0.0223881) 0))
|
214 |
+
((n.R:SylStructure.parent.gpos is det)
|
215 |
+
(((0 0.916667) (1 0.0833333) 0))
|
216 |
+
((R:SylStructure.parent.R:Word.n.gpos is 0)
|
217 |
+
(((0 0.915493) (1 0.084507) 0))
|
218 |
+
((R:SylStructure.parent.R:Word.n.gpos is pps)
|
219 |
+
(((0 0.884615) (1 0.115385) 0))
|
220 |
+
((n.stress is 0)
|
221 |
+
((n.syl_break is 4)
|
222 |
+
(((0 0.986755) (1 0.013245) 0))
|
223 |
+
((p.syl_break is 4)
|
224 |
+
(((0 0.977011) (1 0.0229885) 0))
|
225 |
+
((n.syl_break is 4)
|
226 |
+
(((0 0.965517) (1 0.0344828) 0))
|
227 |
+
((last_accent < 1.2)
|
228 |
+
((last_accent < 0.1)
|
229 |
+
(((0 0.910448) (1 0.0895522) 0))
|
230 |
+
((next_accent < 1.2)
|
231 |
+
((R:SylStructure.parent.R:Word.n.gpos is in)
|
232 |
+
(((0 0.82) (1 0.18) 0))
|
233 |
+
((n.syl_break is 0)
|
234 |
+
((R:SylStructure.parent.R:Word.p.gpos is content)
|
235 |
+
(((0 0.819672) (1 0.180328) 0))
|
236 |
+
(((0 0.444444) (1 0.555556) 1)))
|
237 |
+
(((0 0.785714) (1 0.214286) 0))))
|
238 |
+
(((0 0.836364) (1 0.163636) 0))))
|
239 |
+
(((0 0.962025) (1 0.0379747) 0))))))
|
240 |
+
((stress is 0)
|
241 |
+
((n.syl_break is 4)
|
242 |
+
(((0 0.21875) (1 0.78125) 1))
|
243 |
+
((R:SylStructure.parent.R:Word.p.gpos is aux)
|
244 |
+
(((0 0.259259) (1 0.740741) 1))
|
245 |
+
((p.syl_break is 1)
|
246 |
+
(((0 0.243094) (1 0.756906) 1))
|
247 |
+
((R:SylStructure.parent.R:Word.p.gpos is det)
|
248 |
+
(((0 0.290323) (1 0.709677) 1))
|
249 |
+
((R:SylStructure.parent.R:Word.p.gpos is in)
|
250 |
+
(((0 0.3) (1 0.7) 1))
|
251 |
+
((syl_break is 1)
|
252 |
+
(((0 0.289157) (1 0.710843) 1))
|
253 |
+
((p.syl_break is 4)
|
254 |
+
(((0 0.352941) (1 0.647059) 1))
|
255 |
+
((n.syl_break is 0)
|
256 |
+
(((0 0.311475) (1 0.688525) 1))
|
257 |
+
((syl_break is 4)
|
258 |
+
(((0 0.4) (1 0.6) 1))
|
259 |
+
(((0 0.581395) (1 0.418605) 0)))))))))))
|
260 |
+
(((0 1) (1 0) 0)))))))))
|
261 |
+
((stress is 0)
|
262 |
+
((R:SylStructure.parent.R:Word.n.gpos is 0)
|
263 |
+
(((0 0.121212) (1 0.878788) 1))
|
264 |
+
((next_accent < 2.4)
|
265 |
+
((R:SylStructure.parent.gpos is content)
|
266 |
+
((position_type is mid)
|
267 |
+
(((0 0.176895) (1 0.823105) 1))
|
268 |
+
((p.syl_break is 1)
|
269 |
+
(((0 0.229167) (1 0.770833) 1))
|
270 |
+
((syl_break is 4)
|
271 |
+
(((0 0.242775) (1 0.757225) 1))
|
272 |
+
((p.syl_break is 0)
|
273 |
+
((n.R:SylStructure.parent.gpos is in)
|
274 |
+
(((0 0.253521) (1 0.746479) 1))
|
275 |
+
((R:SylStructure.parent.R:Word.p.gpos is in)
|
276 |
+
(((0 0.262774) (1 0.737226) 1))
|
277 |
+
((last_accent < 2.1)
|
278 |
+
((n.R:SylStructure.parent.gpos is aux)
|
279 |
+
(((0 0.304348) (1 0.695652) 1))
|
280 |
+
((next_accent < 1.2)
|
281 |
+
((n.R:SylStructure.parent.gpos is cc)
|
282 |
+
(((0 0.291667) (1 0.708333) 1))
|
283 |
+
((syl_break is 1)
|
284 |
+
((n.syl_break is 4)
|
285 |
+
(((0 0.344828) (1 0.655172) 1))
|
286 |
+
((R:SylStructure.parent.R:Word.p.gpos is det)
|
287 |
+
(((0 0.364706) (1 0.635294) 1))
|
288 |
+
((n.syl_break is 4)
|
289 |
+
(((0 0.384615) (1 0.615385) 1))
|
290 |
+
((last_accent < 1.2)
|
291 |
+
((p.accented is 0)
|
292 |
+
(((0 0.584906) (1 0.415094) 0))
|
293 |
+
((n.accented is 0)
|
294 |
+
((R:SylStructure.parent.R:Word.p.gpos is content)
|
295 |
+
(((0 0.41) (1 0.59) 1))
|
296 |
+
(((0 0.6) (1 0.4) 0)))
|
297 |
+
(((0 0.333333) (1 0.666667) 1))))
|
298 |
+
(((0 0.380952) (1 0.619048) 1))))))
|
299 |
+
((p.accented is 0)
|
300 |
+
(((0 0.183673) (1 0.816327) 1))
|
301 |
+
((n.R:SylStructure.parent.gpos is content)
|
302 |
+
((n.stress is 0)
|
303 |
+
(((0 0.295455) (1 0.704545) 1))
|
304 |
+
((R:SylStructure.parent.R:Word.p.gpos is content)
|
305 |
+
((n.syl_break is 1)
|
306 |
+
(((0 0.5) (1 0.5) 0))
|
307 |
+
(((0 0.40625) (1 0.59375) 1)))
|
308 |
+
(((0 0.333333) (1 0.666667) 1))))
|
309 |
+
(((0 0.2) (1 0.8) 1))))))
|
310 |
+
(((0 0.3) (1 0.7) 1))))
|
311 |
+
(((0 0.302326) (1 0.697674) 1)))))
|
312 |
+
(((0 0.25) (1 0.75) 1))))))
|
313 |
+
(((0 0.173913) (1 0.826087) 1)))
|
314 |
+
(((0 0.166667) (1 0.833333) 1))))
|
315 |
+
(((0 1) (1 0) 0))))
|
316 |
+
(((0 0.2) (1 0.8) 1)))))))))
|
317 |
+
(((0 0.15) (1 0.85) 1)))))))
|
318 |
+
|
319 |
+
(defvar postlex_mrpa_r_cart_tree
|
320 |
+
'((name is r)
|
321 |
+
((R:Segment.n.ph_vc is -)
|
322 |
+
((delete))
|
323 |
+
((nil)))
|
324 |
+
((nil)))
|
325 |
+
"postlex_mrpa_r_cart_tree
|
326 |
+
For remove final R when not between vowels.")
|
327 |
+
|
328 |
+
|
329 |
+
;; Changed this to actually work... (Rob 09/12/04)
|
330 |
+
;; Changed this to delete the syllable when schwa is unneccesary (awb 19/07/04)
|
331 |
+
(define (postlex_apos_s_check utt)
|
332 |
+
"(postlex_apos_s_check UTT)
|
333 |
+
Deal with possesive s for English (American and British). Delete
|
334 |
+
schwa of 's if previous is not an alveolar or palatal fricative or affricative, and
|
335 |
+
change voiced to unvoiced s if previous is not voiced."
|
336 |
+
(mapcar
|
337 |
+
(lambda (syl)
|
338 |
+
; word is 's
|
339 |
+
(if (string-equal "'s" (item.feat
|
340 |
+
syl "R:SylStructure.parent.name"))
|
341 |
+
(begin
|
342 |
+
;; de-voice if last phone of previous word is unvoiced
|
343 |
+
(if (string-equal
|
344 |
+
"-"
|
345 |
+
(item.feat syl "p.R:SylStructure.daughtern.ph_cvox"))
|
346 |
+
(item.set_name
|
347 |
+
(item.relation.daughtern syl 'SylStructure)
|
348 |
+
"s")) ;; change it from "z" to "s"
|
349 |
+
; if the previous seg is a aveolar or palatal,
|
350 |
+
; fricative or affricate don't delete schwa otherwise delete it
|
351 |
+
(if (and
|
352 |
+
(member_string
|
353 |
+
(item.feat syl "p.R:SylStructure.daughtern.ph_ctype") '(f a))
|
354 |
+
(member_string
|
355 |
+
(item.feat syl "p.R:SylStructure.daughtern.ph_cplace") '(a p)))
|
356 |
+
(begin
|
357 |
+
t)
|
358 |
+
(begin
|
359 |
+
;; delete the schwa
|
360 |
+
(item.delete (item.relation.daughter1 syl 'SylStructure))
|
361 |
+
;; attach orphaned s/z to previous word
|
362 |
+
(item.relation.append_daughter
|
363 |
+
(item.prev syl)
|
364 |
+
'SylStructure
|
365 |
+
(item.relation.daughtern syl 'SylStructure))
|
366 |
+
;; delete the now empty syllable
|
367 |
+
(item.delete syl))))))
|
368 |
+
;; never happens to if 's is first in an utterance
|
369 |
+
(cdr (utt.relation.items utt 'Syllable)))
|
370 |
+
utt)
|
371 |
+
|
372 |
+
;; Changed this to work the other way round, too. Volker 10/08/06
|
373 |
+
(define (postlex_the_vs_thee utt)
|
374 |
+
"(postlex_the_vs_thee utt)
|
375 |
+
Unnreduce the schwa in \"the\" when a vowel follows.
|
376 |
+
Reduce the vowel in \"the\" when no vowel follows (this
|
377 |
+
requires a lexicon entry for \"the\" with feature \"reduced\",
|
378 |
+
otherwise there will be no reduction)."
|
379 |
+
(let ((fullform (cadr (car (caar (cdr (cdar (lex.lookup_all 'thee)))))))
|
380 |
+
(reducedform (cadr(car(caar(cddr(lex.lookup 'the '(reduced)))))))
|
381 |
+
seg)
|
382 |
+
|
383 |
+
(mapcar
|
384 |
+
(lambda (word)
|
385 |
+
(if (string-equal "the" (downcase (item.feat word "name")))
|
386 |
+
(begin
|
387 |
+
(set! seg (item.relation (item.daughtern (item.relation.daughtern word 'SylStructure)) 'Segment))
|
388 |
+
(if (string-equal "+" (item.feat (item.next seg) 'ph_vc))
|
389 |
+
(item.set_feat seg 'name fullform)
|
390 |
+
(item.set_feat seg 'name reducedform)))))
|
391 |
+
(utt.relation.items utt 'Word)))
|
392 |
+
utt)
|
393 |
+
|
394 |
+
(define (postlex_the_vs_thee_changeflag utt)
|
395 |
+
"(postlex_the_vs_thee_changeflag utt)
|
396 |
+
Unnreduce the schwa in \"the\" when a vowel follows.
|
397 |
+
Reduce the vowel in \"the\" when no vowel follows (this
|
398 |
+
requires a lexicon entry for \"the\" with feature \"reduced\",
|
399 |
+
otherwise there will be no reduction)."
|
400 |
+
(let ((fullform (cadr (car (caar (cdr (cdar (lex.lookup_all 'thee)))))))
|
401 |
+
(reducedform (cadr(car(caar(cddr(lex.lookup 'the '(reduced)))))))
|
402 |
+
seg)
|
403 |
+
|
404 |
+
(mapcar
|
405 |
+
(lambda (word)
|
406 |
+
(if (string-equal "the" (downcase (item.feat word "name")))
|
407 |
+
(begin
|
408 |
+
(set! seg (item.relation (item.daughtern (item.relation.daughtern word 'SylStructure)) 'Segment))
|
409 |
+
(if (string-equal "+" (item.feat (item.next seg) 'ph_vc))
|
410 |
+
(item.set_feat seg 'reducable 0)
|
411 |
+
(item.set_feat seg 'reducable 1)))))
|
412 |
+
(utt.relation.items utt 'Word)))
|
413 |
+
utt)
|
414 |
+
|
415 |
+
|
416 |
+
;; For Multisyn voices only. Volker 14/08/06
|
417 |
+
(define (postlex_a utt)
|
418 |
+
"(postlex_a utt)
|
419 |
+
If POS of \"a\" is \"nn\" and segment feature \"reducable\", set it to 0.
|
420 |
+
This is a bugfix, but still requires the target cost function to add a
|
421 |
+
penalty if a candidate is reducable but the target is not. expro_target_cost
|
422 |
+
does that."
|
423 |
+
(let(seg)
|
424 |
+
(mapcar
|
425 |
+
(lambda(word)
|
426 |
+
;; (format t "%s\t%s\n" (item.feat word 'name)(item.feat word 'pos))
|
427 |
+
(if(and(string-equal "a" (downcase (item.feat word "name")))
|
428 |
+
(string-equal "nn" (item.feat word "pos")))
|
429 |
+
(begin
|
430 |
+
(set! seg (item.relation (item.daughtern (item.relation.daughtern word
|
431 |
+
'SylStructure)) 'Segment))
|
432 |
+
;; (format t "should not be reducable\n")
|
433 |
+
(if (eq 1 (parse-number (item.feat seg 'reducable)))
|
434 |
+
(item.set_feat seg 'reducable 0))))
|
435 |
+
)
|
436 |
+
(utt.relation.items utt 'Word)))
|
437 |
+
utt)
|
438 |
+
|
439 |
+
|
440 |
+
|
441 |
+
(define (postlex_unilex_vowel_reduction utt)
|
442 |
+
"(postlex_unilex_vowel_reduction utt)
|
443 |
+
Perform vowel reduction based on unilex specification of what can be reduced."
|
444 |
+
(let ()
|
445 |
+
(mapcar
|
446 |
+
(lambda (seg)
|
447 |
+
(if (and (eq? (parse-number (item.feat seg "reducable")) 1)
|
448 |
+
(not (> (parse-number (item.feat seg "R:SylStructure.parent.stress")) 0)))
|
449 |
+
(if (not (and (seg_word_final seg)
|
450 |
+
(string-equal (item.feat (item.next seg) 'ph_vc) "+")))
|
451 |
+
(item.set_feat seg "name" (item.feat seg "reducedform")))))
|
452 |
+
(utt.relation.items utt 'Segment)))
|
453 |
+
utt)
|
454 |
+
|
455 |
+
|
456 |
+
|
457 |
+
|
458 |
+
(define (seg_word_final seg)
|
459 |
+
"(seg_word_final seg)
|
460 |
+
Is this segment word final?"
|
461 |
+
(let ((this_seg_word (item.parent (item.relation.parent seg 'SylStructure)))
|
462 |
+
(silence (car (cadr (car (PhoneSet.description '(silences))))))
|
463 |
+
next_seg_word)
|
464 |
+
(if (item.next seg)
|
465 |
+
(set! next_seg_word (item.parent (item.relation.parent (item.next seg) 'SylStructure))))
|
466 |
+
(if (or (equal? this_seg_word next_seg_word)
|
467 |
+
(string-equal (item.feat seg "name") silence))
|
468 |
+
nil
|
469 |
+
t)))
|
470 |
+
|
471 |
+
|
472 |
+
|
473 |
+
;; imported from postlex_intervoc_r.scm Volker 14/08/06
|
474 |
+
(define (postlex_intervoc_r utt)
|
475 |
+
"(postlex_intervoc_r UTT)
|
476 |
+
|
477 |
+
Remove any word-final /r/ which is phrase-final or not going
|
478 |
+
to be inter-vocalic i.e. the following words does not start
|
479 |
+
with a vowel.
|
480 |
+
|
481 |
+
NOTE: in older versions of unilex-rpx.out for Festival, there
|
482 |
+
is no word-final /r/.
|
483 |
+
|
484 |
+
"
|
485 |
+
(let (word next_word last_phone following_phone)
|
486 |
+
(set! word (utt.relation.first utt 'Word))
|
487 |
+
|
488 |
+
(while word
|
489 |
+
(set! next_word (item.next word))
|
490 |
+
(set! last_phone (item.daughtern
|
491 |
+
(item.daughtern(item.relation word 'SylStructure))))
|
492 |
+
(if next_word
|
493 |
+
(begin
|
494 |
+
|
495 |
+
(set! following_phone (item.daughter1
|
496 |
+
(item.daughter1
|
497 |
+
(item.relation next_word 'SylStructure))))
|
498 |
+
; last_phone and following_phone should always be defined at this point,
|
499 |
+
; but since the upgrade to Fedora and characters no longer being in ISO
|
500 |
+
; but in UTF8, the pound sterling is no longer treated correctly.
|
501 |
+
; Probably (Token utt) should be fixed.
|
502 |
+
|
503 |
+
(if (and following_phone last_phone)
|
504 |
+
(begin
|
505 |
+
(format t "%s\t%s %s %s %s\n" (item.name word)
|
506 |
+
(item.name last_phone)
|
507 |
+
(item.name following_phone)
|
508 |
+
(item.feat following_phone 'ph_vc)
|
509 |
+
(item.feat word 'pbreak))
|
510 |
+
(if(and(equal? "r" (item.name last_phone))
|
511 |
+
(or(not(equal? "NB" (item.feat word 'pbreak)))
|
512 |
+
(equal? "-" (item.feat following_phone 'ph_vc))))
|
513 |
+
(begin
|
514 |
+
(format t "\t\t\t/r/ in \"%s %s\" deleted\n"
|
515 |
+
(item.name word)(item.name next_word))
|
516 |
+
(item.delete last_phone))))))
|
517 |
+
(if(and last_phone (equal? "r" (item.name last_phone)))
|
518 |
+
(begin
|
519 |
+
(format t "\t\t\tutterance-final /r/ deleted\n")
|
520 |
+
(item.delete last_phone)))
|
521 |
+
)
|
522 |
+
|
523 |
+
(set! word (item.next word))))
|
524 |
+
utt)
|
525 |
+
|
526 |
+
|
527 |
+
(define (postlex_stop_deletion utt)
|
528 |
+
"(postlex_stop_deletion utt)
|
529 |
+
|
530 |
+
Delete any stop or affricative (phone which has a closure)
|
531 |
+
immediately followed by another stop or affricative.
|
532 |
+
|
533 |
+
Also save the identity of the deleted phone for the
|
534 |
+
context cost functions. Consider:
|
535 |
+
|
536 |
+
backtrack /b a k t r a k/ -> /b a t r a k/
|
537 |
+
(actually Jenny reduces : /b a k_cl k t_cl t r a k/ -> /b a k_cl t r a k/)
|
538 |
+
If we then look for a diphone /a t/ we want to favour
|
539 |
+
candidates coming from the same context i.e. which
|
540 |
+
are actually a reduced /a k t/. In the data base,
|
541 |
+
the 1st /a/ gets the feature right_context=k and the
|
542 |
+
/t/ gets the fearture left_context=k.
|
543 |
+
|
544 |
+
"
|
545 |
+
(let(seg next_seg prev_seg)
|
546 |
+
(set! seg (utt.relation.first utt 'Segment))
|
547 |
+
(while seg
|
548 |
+
(set! prev_seg (item.prev seg))
|
549 |
+
(if prev_seg
|
550 |
+
(begin
|
551 |
+
;(format t "%s %s %s\n" (item.name seg)
|
552 |
+
; (item.feat seg 'ph_ctype)
|
553 |
+
; (item.feat seg 'p.ph_ctype))
|
554 |
+
(if(and(or(equal? "s" (item.feat seg 'ph_ctype))
|
555 |
+
(equal? "a" (item.feat seg 'ph_ctype)))
|
556 |
+
(or(equal? "s" (item.feat seg 'p.ph_ctype))
|
557 |
+
(equal? "a" (item.feat seg 'p.ph_ctype)))
|
558 |
+
; When there are 3 stops in a row, and after the 1st has been
|
559 |
+
; deleted, this prevents the 2nd to be deleted as well:
|
560 |
+
(equal? 0 (item.feat prev_seg 'left_context)))
|
561 |
+
(begin
|
562 |
+
(set! prev_prev_seg (item.prev prev_seg))
|
563 |
+
(format t "postlex_stop_deletion: %s in %s\n"
|
564 |
+
(item.name prev_seg)
|
565 |
+
(item.name(item.parent(item.relation.parent prev_seg
|
566 |
+
'SylStructure))))
|
567 |
+
(if prev_prev_seg
|
568 |
+
(begin
|
569 |
+
;(format t "setting left_context of %s and right context of %s to %s\n"
|
570 |
+
; (item.name seg)
|
571 |
+
; (item.name prev_prev_seg)
|
572 |
+
; (item.name prev_seg))
|
573 |
+
(item.set_feat seg 'left_context (item.name prev_seg))
|
574 |
+
(item.set_feat prev_prev_seg 'right_context (item.name prev_seg))))
|
575 |
+
(if(and(item.next seg)
|
576 |
+
(equal? (item.name seg) (item.name prev_seg)))
|
577 |
+
(begin
|
578 |
+
;(format t "setting left_context of %s to %s\n"
|
579 |
+
; (item.name (item.next seg)
|
580 |
+
; (item.name prev_seg))
|
581 |
+
|
582 |
+
(item.set_feat (item.next seg) 'left_context (item.name prev_seg))))
|
583 |
+
(item.delete prev_seg)))))
|
584 |
+
(set! seg (item.next seg))))
|
585 |
+
utt)
|
586 |
+
|
587 |
+
(provide 'postlex)
|
CosyVoice-ttsfrd/resource/festival/sable-latin.ent
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--
|
2 |
+
|
3 |
+
NOTE: THIS IS A WORKING DOCUMENT. NOTHING IN HERE SHOULD BE
|
4 |
+
TAKEN AS FINAL.
|
5 |
+
|
6 |
+
This is an initial proposal for a Latin 1 and assorted
|
7 |
+
other characters entity set for SABLE. It is based on the
|
8 |
+
equivalent set for HTML 3.
|
9 |
+
|
10 |
+
-->
|
11 |
+
<!-- Portions of this text are copyright ISO:
|
12 |
+
|
13 |
+
(C) International Organization for Standardization 1986
|
14 |
+
Permission to copy in any form is granted for use with
|
15 |
+
conforming SGML systems and applications as defined in
|
16 |
+
ISO 8879, provided this notice is included in all copies.
|
17 |
+
-->
|
18 |
+
<!-- Character entity set. Typical invocation:
|
19 |
+
<!ENTITY % HTMLlat1 PUBLIC
|
20 |
+
"-//W3O//ENTITIES W3 Latin 1 for HTML//EN">
|
21 |
+
%HTMLlat1;
|
22 |
+
-->
|
23 |
+
<!-- Modified for use in HTML
|
24 |
+
$Id: sable-latin.ent,v 1.2 2001/04/04 13:12:35 awb Exp $ =
|
25 |
+
|
26 |
+
-->
|
27 |
+
<!-- Modified to add characters in the range &161; to &191; in
|
28 |
+
the ISO Latin-1 character set, which could only be referred =
|
29 |
+
|
30 |
+
to by numeric references. Entity names based on relevant entities in
|
31 |
+
ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN"
|
32 |
+
Also added the standard lt gt amp entities from HTML 2.0
|
33 |
+
Chris Lilley, 13 March 1995
|
34 |
+
=
|
35 |
+
|
36 |
+
This covers all of Latin 1, but we are still unable to display a =
|
37 |
+
|
38 |
+
Trade Mark (TM)
|
39 |
+
-->
|
40 |
+
|
41 |
+
<!ENTITY AElig "Æ" > <!-- capital AE diphthong (ligature) -->
|
42 |
+
<!ENTITY Aacute "Á" > <!-- capital A, acute accent -->
|
43 |
+
<!ENTITY Acirc "Â" > <!-- capital A, circumflex accent -->
|
44 |
+
<!ENTITY Agrave "À" > <!-- capital A, grave accent -->
|
45 |
+
<!ENTITY Aring "Å" > <!-- capital A, ring -->
|
46 |
+
<!ENTITY Atilde "Ã" > <!-- capital A, tilde -->
|
47 |
+
<!ENTITY Auml "Ä" > <!-- capital A, dieresis or umlaut mark -->
|
48 |
+
<!ENTITY Ccedil "Ç" > <!-- capital C, cedilla -->
|
49 |
+
<!ENTITY ETH "Ð" > <!-- capital Eth, Icelandic -->
|
50 |
+
<!ENTITY Eacute "É" > <!-- capital E, acute accent -->
|
51 |
+
<!ENTITY Ecirc "Ê" > <!-- capital E, circumflex accent -->
|
52 |
+
<!ENTITY Egrave "È" > <!-- capital E, grave accent -->
|
53 |
+
<!ENTITY Euml "Ë" > <!-- capital E, dieresis or umlaut mark -->
|
54 |
+
<!ENTITY Iacute "Í" > <!-- capital I, acute accent -->
|
55 |
+
<!ENTITY Icirc "Î" > <!-- capital I, circumflex accent -->
|
56 |
+
<!ENTITY Igrave "Ì" > <!-- capital I, grave accent -->
|
57 |
+
<!ENTITY Iuml "Ï" > <!-- capital I, dieresis or umlaut mark -->
|
58 |
+
<!ENTITY Ntilde "Ñ" > <!-- capital N, tilde -->
|
59 |
+
<!ENTITY Oacute "Ó" > <!-- capital O, acute accent -->
|
60 |
+
<!ENTITY Ocirc "Ô" > <!-- capital O, circumflex accent -->
|
61 |
+
<!ENTITY Ograve "Ò" > <!-- capital O, grave accent -->
|
62 |
+
<!ENTITY Oslash "Ø" > <!-- capital O, slash -->
|
63 |
+
<!ENTITY Otilde "Õ" > <!-- capital O, tilde -->
|
64 |
+
<!ENTITY Ouml "Ö" > <!-- capital O, dieresis or umlaut mark -->
|
65 |
+
<!ENTITY THORN "Þ" > <!-- capital THORN, Icelandic -->
|
66 |
+
<!ENTITY Uacute "Ú" > <!-- capital U, acute accent -->
|
67 |
+
<!ENTITY Ucirc "Û" > <!-- capital U, circumflex accent -->
|
68 |
+
<!ENTITY Ugrave "Ù" > <!-- capital U, grave accent -->
|
69 |
+
<!ENTITY Uuml "Ü" > <!-- capital U, dieresis or umlaut mark -->
|
70 |
+
<!ENTITY Yacute "Ý" > <!-- capital Y, acute accent -->
|
71 |
+
<!ENTITY aacute "á" > <!-- small a, acute accent -->
|
72 |
+
<!ENTITY acirc "â" > <!-- small a, circumflex accent -->
|
73 |
+
<!ENTITY aelig "æ" > <!-- small ae diphthong (ligature) -->
|
74 |
+
<!ENTITY agrave "à" > <!-- small a, grave accent -->
|
75 |
+
<!ENTITY aring "å" > <!-- small a, ring -->
|
76 |
+
<!ENTITY atilde "ã" > <!-- small a, tilde -->
|
77 |
+
<!ENTITY auml "ä" > <!-- small a, dieresis or umlaut mark -->
|
78 |
+
<!ENTITY ccedil "ç" > <!-- small c, cedilla -->
|
79 |
+
<!ENTITY eacute "é" > <!-- small e, acute accent -->
|
80 |
+
<!ENTITY ecirc "ê" > <!-- small e, circumflex accent -->
|
81 |
+
<!ENTITY egrave "è" > <!-- small e, grave accent -->
|
82 |
+
<!ENTITY eth "ð" > <!-- small eth, Icelandic -->
|
83 |
+
<!ENTITY euml "ë" > <!-- small e, dieresis or umlaut mark -->
|
84 |
+
<!ENTITY iacute "í" > <!-- small i, acute accent -->
|
85 |
+
<!ENTITY icirc "î" > <!-- small i, circumflex accent -->
|
86 |
+
<!ENTITY igrave "ì" > <!-- small i, grave accent -->
|
87 |
+
<!ENTITY iuml "ï" > <!-- small i, dieresis or umlaut mark -->
|
88 |
+
<!ENTITY ntilde "ñ" > <!-- small n, tilde -->
|
89 |
+
<!ENTITY oacute "ó" > <!-- small o, acute accent -->
|
90 |
+
<!ENTITY ocirc "ô" > <!-- small o, circumflex accent -->
|
91 |
+
<!ENTITY ograve "ò" > <!-- small o, grave accent -->
|
92 |
+
<!ENTITY oslash "ø" > <!-- small o, slash -->
|
93 |
+
<!ENTITY otilde "õ" > <!-- small o, tilde -->
|
94 |
+
<!ENTITY ouml "ö" > <!-- small o, dieresis or umlaut mark -->
|
95 |
+
<!ENTITY szlig "ß" > <!-- small sharp s, German (sz ligature) -->
|
96 |
+
<!ENTITY thorn "þ" > <!-- small thorn, Icelandic -->
|
97 |
+
<!ENTITY uacute "ú" > <!-- small u, acute accent -->
|
98 |
+
<!ENTITY ucirc "û" > <!-- small u, circumflex accent -->
|
99 |
+
<!ENTITY ugrave "ù" > <!-- small u, grave accent -->
|
100 |
+
<!ENTITY uuml "ü" > <!-- small u, dieresis or umlaut mark -->
|
101 |
+
<!ENTITY yacute "ý" > <!-- small y, acute accent -->
|
102 |
+
<!ENTITY yuml "ÿ" > <!-- small y, dieresis or umlaut mark -->
|
103 |
+
<!-- =
|
104 |
+
|
105 |
+
Ones that aren't accented characters, and so not in ISO Added Latin =
|
106 |
+
1.
|
107 |
+
|
108 |
+
umlaut. macron, acute, cedilla
|
109 |
+
were not in ISO Numeric and Special Graphic
|
110 |
+
either; I took their names from the numeric entity list in
|
111 |
+
http://www.hpl.hp.co.uk/people/dsr/html/latin1.html =
|
112 |
+
|
113 |
+
Chris Lilley, 13 March 1995 =
|
114 |
+
|
115 |
+
-->
|
116 |
+
|
117 |
+
<!ENTITY iexcl "¡" > <!-- inverted exclamation mark &161; -->
|
118 |
+
<!ENTITY cent "¢" > <!-- cent sign &162; -->
|
119 |
+
<!ENTITY pound "£" > <!-- pound sterling sign &163; -->
|
120 |
+
<!ENTITY curren "¤" > <!-- general currency sign &164; -->
|
121 |
+
<!ENTITY yen "¥" > <!-- yen sign &165; -->
|
122 |
+
<!ENTITY brvbar "¦" > <!-- broken (vertical) bar &166; -->
|
123 |
+
<!ENTITY sect "§" > <!-- section sign &167; -->
|
124 |
+
<!ENTITY umlaut "¨" > <!-- umlaut (dieresis) &168; -->
|
125 |
+
<!ENTITY copy "©" > <!-- copyright sign &169; -->
|
126 |
+
<!ENTITY ordf "ª" > <!-- ordinal indicator, feminine &170; -->
|
127 |
+
<!ENTITY laquo "«" > <!-- angle quotation mark, left &171; -->
|
128 |
+
<!ENTITY not "¬" > <!-- not sign &172; -->
|
129 |
+
<!ENTITY shy "­" > <!-- soft hyphen &173;-->
|
130 |
+
<!ENTITY reg "®" > <!-- registered trademark &174; -->
|
131 |
+
<!ENTITY macron "¯" > <!-- macron &175; -->
|
132 |
+
<!ENTITY deg "°" > <!-- degree sign &176; -->
|
133 |
+
<!ENTITY plusmn "±" > <!-- plus-or-minus sign &177; -->
|
134 |
+
<!ENTITY sup2 "²" > <!-- superscript two &178; -->
|
135 |
+
<!ENTITY sup3 "³" > <!-- superscript three &179; -->
|
136 |
+
<!ENTITY acute "´" > <!-- acute accent &180; -->
|
137 |
+
<!ENTITY micro "µ" > <!-- micro sign &181; -->
|
138 |
+
<!ENTITY para "¶" > <!-- pilcrow (paragraph sign) &182; -->
|
139 |
+
<!ENTITY middot "·" > <!-- middle dot (centred decimal point) &183; -->
|
140 |
+
<!ENTITY cedilla "¸" > <!-- cedilla accent &184; -->
|
141 |
+
<!ENTITY sup1 "¹" > <!-- superscript one -->
|
142 |
+
<!ENTITY ordm "º" > <!-- ordinal indicator, masculine -->
|
143 |
+
<!ENTITY raquo "»" > <!-- angle quotation mark, right -->
|
144 |
+
<!ENTITY frac14 "¼" > <!-- fraction one-quarter -->
|
145 |
+
<!ENTITY frac12 "½" > <!-- fraction one-half -->
|
146 |
+
<!ENTITY frac34 "¾" > <!-- fraction three-quarters -->
|
147 |
+
<!ENTITY iquest "¿" > <!-- inverted question mark -->
|
148 |
+
<!-- the odd ones tucked in amongst the accented letters -->
|
149 |
+
<!ENTITY times "×" > <!-- multiply sign -->
|
150 |
+
<!ENTITY divide "÷" > <!-- divide sign -->
|
151 |
+
|
152 |
+
<!ENTITY amp "&" > <!-- ampersand -->
|
153 |
+
<!ENTITY gt ">" > <!-- greater than -->
|
154 |
+
<!ENTITY lt "<" > <!-- less than -->
|
155 |
+
<!ENTITY quot """ > <!-- double quote -->
|
156 |
+
|
157 |
+
<!--
|
158 |
+
Should the dollar sign and such like also be given entity names?
|
159 |
+
There are suitable ones around. For example, people using =
|
160 |
+
|
161 |
+
internationalised keyboards in various countries might not be =
|
162 |
+
|
163 |
+
readily able to access some of these characters.
|
164 |
+
=
|
165 |
+
|
166 |
+
On such grounds, I suggest entity names for these:
|
167 |
+
! " # $ % ' ( ) * + , - . / : ; =3D ? [ \ ] ^ _ ` { | } ~
|
168 |
+
Lastly, what about &tab; for those whose editors convert all
|
169 |
+
tabs to spaces?
|
170 |
+
|
171 |
+
-->
|
CosyVoice-ttsfrd/resource/festival/sable-mode.scm
ADDED
@@ -0,0 +1,560 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1998 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;; ;;
|
34 |
+
;;; Festival (1.3.X) support for SABLE 0.2 the SGML/XML based mark up ;;
|
35 |
+
;;; language. ;;
|
36 |
+
;;; ;;
|
37 |
+
;;; This is XML version requiring Edinburgh's LTG's rxp XML parser as ;;
|
38 |
+
;;; distributed with Festival ;;
|
39 |
+
;;; ;;
|
40 |
+
|
41 |
+
(require_module 'rxp)
|
42 |
+
|
43 |
+
;;(set! auto-text-mode-alist
|
44 |
+
;; (cons
|
45 |
+
;; (cons "\\.sable$" 'sable)
|
46 |
+
;; auto-text-mode-alist))
|
47 |
+
|
48 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
49 |
+
;; ;;
|
50 |
+
;; Remember where to find these two XML entities. ;;
|
51 |
+
;; ;;
|
52 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
53 |
+
|
54 |
+
|
55 |
+
(xml_register_id "-//SABLE//DTD SABLE speech mark up//EN"
|
56 |
+
(path-append libdir "Sable.v0_2.dtd")
|
57 |
+
)
|
58 |
+
|
59 |
+
(xml_register_id "-//SABLE//ENTITIES Added Latin 1 for SABLE//EN"
|
60 |
+
(path-append libdir "sable-latin.ent")
|
61 |
+
)
|
62 |
+
|
63 |
+
;; (print (xml_registered_ids))
|
64 |
+
|
65 |
+
(defvar SABLE_RXDOUBLE "-?\\(\\([0-9]+\\.[0-9]*\\)\\|\\([0-9]+\\)\\|\\(\\.[0-9]+\\)\\)\\([eE][---+]?[0-9]+\\)?")
|
66 |
+
|
67 |
+
(defvar sable_pitch_base_map
|
68 |
+
'((highest 1.2)
|
69 |
+
(high 1.1)
|
70 |
+
(medium 1.0)
|
71 |
+
(default 1.0)
|
72 |
+
(low 0.9)
|
73 |
+
(lowest 0.8)))
|
74 |
+
(defvar sable_pitch_med_map
|
75 |
+
'((highest 1.2)
|
76 |
+
(high 1.1)
|
77 |
+
(medium 1.0)
|
78 |
+
(default 1.0)
|
79 |
+
(low 0.9)
|
80 |
+
(lowest 0.8)))
|
81 |
+
(defvar sable_pitch_range_map
|
82 |
+
'((largest 1.2)
|
83 |
+
(large 1.1)
|
84 |
+
(medium 1.0)
|
85 |
+
(default 1.0)
|
86 |
+
(small 0.9)
|
87 |
+
(smallest 0.8)))
|
88 |
+
(defvar sable_rate_speed_map
|
89 |
+
'((fastest 1.5)
|
90 |
+
(fast 1.2)
|
91 |
+
(medium 1.0)
|
92 |
+
(default 1.0)
|
93 |
+
(slow 0.8)
|
94 |
+
(slowest 0.6)))
|
95 |
+
(defvar sable_volume_level_map
|
96 |
+
'((loudest 2.0)
|
97 |
+
(loud 1.5)
|
98 |
+
(default 1.0)
|
99 |
+
(medium 1.0)
|
100 |
+
(quiet 0.5)))
|
101 |
+
|
102 |
+
(define (sable_init_globals)
|
103 |
+
(set! utts nil)
|
104 |
+
(set! sable_omitted_mode nil)
|
105 |
+
(set! sable_word_features_stack nil)
|
106 |
+
(set! sable_pitch_context nil)
|
107 |
+
(set! sable_vol_context nil)
|
108 |
+
(set! sable_vol_type 'no_change)
|
109 |
+
(set! sable_vol_factor 1.0)
|
110 |
+
(set! sable_current_language 'britishenglish)
|
111 |
+
(set! sable_unsupported_language nil)
|
112 |
+
(set! sable_language_stack nil)
|
113 |
+
(set! sable_current_speaker 'voice_kal_diphone)
|
114 |
+
(set! sable_speaker_stack nil)
|
115 |
+
)
|
116 |
+
|
117 |
+
(define (sable_token_to_words token name)
|
118 |
+
"(sable_token_to_words utt token name)
|
119 |
+
SABLE mode token specific analysis."
|
120 |
+
(cond
|
121 |
+
((or sable_omitted_mode sable_unsupported_language)
|
122 |
+
;; don't say anything (whole utterance)
|
123 |
+
nil)
|
124 |
+
((string-equal "1" (item.feat token "done_sable_sub"))
|
125 |
+
;; to catch recursive calls this when splitting up sub expressions
|
126 |
+
(sable_previous_token_to_words token name))
|
127 |
+
((and (not (string-equal "0" (item.feat token "sable_sub")))
|
128 |
+
(string-equal "0" (item.feat token "p.sable_sub")))
|
129 |
+
(let (words (sub (item.feat token "sable_sub")))
|
130 |
+
(item.set_feat token "done_sable_sub" "1")
|
131 |
+
(set! words
|
132 |
+
(apply append
|
133 |
+
(mapcar
|
134 |
+
(lambda (w)
|
135 |
+
(set! www (sable_previous_token_to_words token w))
|
136 |
+
www)
|
137 |
+
(read-from-string sub))))
|
138 |
+
(item.set_feat token "done_sable_sub" "0")
|
139 |
+
words))
|
140 |
+
((string-equal "1" (item.feat token "sable_ignore"))
|
141 |
+
;; don't say anything (individual word)
|
142 |
+
nil)
|
143 |
+
((string-equal "1" (item.feat token "sable_ipa"))
|
144 |
+
;; Each token is an IPA phone
|
145 |
+
(item.set_feat token "phonemes" (sable-map-ipa name))
|
146 |
+
(list name))
|
147 |
+
((string-equal "1" (item.feat token "sable_literal"))
|
148 |
+
;; Only deal with spell here
|
149 |
+
(let ((subwords) (subword))
|
150 |
+
(item.set_feat token "pos" token.letter_pos)
|
151 |
+
(mapcar
|
152 |
+
(lambda (letter)
|
153 |
+
;; might be symbols or digits
|
154 |
+
(set! subword (sable_previous_token_to_words token letter))
|
155 |
+
(if subwords
|
156 |
+
(set! subwords (append subwords subword))
|
157 |
+
(set! subwords subword)))
|
158 |
+
(symbolexplode name))
|
159 |
+
subwords))
|
160 |
+
((not (string-equal "0" (item.feat token "token_pos")))
|
161 |
+
;; bypass the prediction stage, if English
|
162 |
+
(if (member_string (Parameter.get 'Language)
|
163 |
+
'(britishenglish americanenglish))
|
164 |
+
(builtin_english_token_to_words token name)
|
165 |
+
(sable_previous_token_to_words token name)))
|
166 |
+
;; could be others here later
|
167 |
+
(t
|
168 |
+
(sable_previous_token_to_words token name))))
|
169 |
+
|
170 |
+
(defvar sable_elements
|
171 |
+
'(
|
172 |
+
("(SABLE" (ATTLIST UTT)
|
173 |
+
(eval (list sable_current_speaker)) ;; so we know what state we start in
|
174 |
+
(sable_setup_voice_params)
|
175 |
+
nil
|
176 |
+
)
|
177 |
+
(")SABLE" (ATTLIST UTT)
|
178 |
+
(xxml_synth UTT) ;; Synthesis the remaining tokens
|
179 |
+
nil
|
180 |
+
)
|
181 |
+
;; Utterance break elements
|
182 |
+
("(LANGUAGE" (ATTLIST UTT)
|
183 |
+
;; Status: probably complete
|
184 |
+
(xxml_synth UTT)
|
185 |
+
(set! sable_language_stack
|
186 |
+
(cons
|
187 |
+
(list sable_current_language sable_unsupported_language)
|
188 |
+
sable_language_stack))
|
189 |
+
;; Select a new language
|
190 |
+
(let ((language (upcase (car (xxml_attval "ID" ATTLIST)))))
|
191 |
+
(cond
|
192 |
+
((or (string-equal language "SPANISH")
|
193 |
+
(string-equal language "ES"))
|
194 |
+
(set! sable_current_language 'spanish)
|
195 |
+
(set! sable_unsupported_language nil)
|
196 |
+
(select_language 'spanish))
|
197 |
+
((or (string-equal language "ENGLISH")
|
198 |
+
(string-equal language "EN"))
|
199 |
+
(set! sable_current_language 'britishenglish)
|
200 |
+
(set! sable_unsupported_language nil)
|
201 |
+
(select_language 'britishenglish))
|
202 |
+
(t ;; skip languages you don't know
|
203 |
+
;; BUG: if current language isn't English this wont work
|
204 |
+
(apply_hooks tts_hooks
|
205 |
+
(eval (list 'Utterance 'Text
|
206 |
+
(string-append "Some text in " language))))
|
207 |
+
(set! sable_unsupported_language t)))
|
208 |
+
nil))
|
209 |
+
(")LANGUAGE" (ATTLIST UTT)
|
210 |
+
(xxml_synth UTT)
|
211 |
+
(set! sable_unsupported_language (car (cdr (car sable_language_stack))))
|
212 |
+
(set! sable_current_language (car (car sable_language_stack)))
|
213 |
+
(set! sable_language_stack (cdr sable_language_stack))
|
214 |
+
(if (not sable_omitted_mode)
|
215 |
+
(begin
|
216 |
+
(select_language sable_current_language)
|
217 |
+
(sable_setup_voice_params)))
|
218 |
+
nil)
|
219 |
+
("(SPEAKER" (ATTLIST UTT)
|
220 |
+
;; Status: GENDER/AGE ignored, should be done by sable-def-speaker
|
221 |
+
;; function to define Festival voices to SABLE
|
222 |
+
(xxml_synth UTT)
|
223 |
+
(set! sable_speaker_stack (cons sable_current_speaker sable_speaker_stack))
|
224 |
+
(cond
|
225 |
+
((not equal? sable_current_language 'britishenglish)
|
226 |
+
(print "SABLE: choosen unknown voice, current voice unchanged"))
|
227 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'male1)
|
228 |
+
(set! sable_current_speaker 'voice_kal_diphone)
|
229 |
+
(voice_kal_diphone))
|
230 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'male2)
|
231 |
+
(set! sable_current_speaker 'voice_cmu_us_rms_cg)
|
232 |
+
(voice_cmu_us_rms_cg))
|
233 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'male3)
|
234 |
+
(set! sable_current_speaker 'voice_ked_diphone)
|
235 |
+
(voice_ked_diphone))
|
236 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'male4)
|
237 |
+
(set! sable_current_speaker 'voice_rab_diphone)
|
238 |
+
(voice_rab_diphone))
|
239 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'male5)
|
240 |
+
(set! sable_current_speaker 'voice_cmu_us_awb_cg)
|
241 |
+
(voice_cmu_us_awb_cg))
|
242 |
+
((equal? (car (xxml_attval "NAME" ATTLIST)) 'female1)
|
243 |
+
(set! sable_current_speaker 'voice_cmu_us_slt_cg)
|
244 |
+
(voice_us1_mbrola))
|
245 |
+
(t
|
246 |
+
(set! sable_current_speaker (intern (string-append "voice_" (car (xxml_attval "NAME" ATTLIST)))))
|
247 |
+
(eval (list sable_current_speaker))))
|
248 |
+
(sable_setup_voice_params)
|
249 |
+
nil)
|
250 |
+
(")SPEAKER" (ATTLIST UTT)
|
251 |
+
(xxml_synth UTT)
|
252 |
+
(set! sable_utt UTT)
|
253 |
+
(set! sable_current_speaker (car sable_speaker_stack))
|
254 |
+
(set! sable_speaker_stack (cdr sable_speaker_stack))
|
255 |
+
(eval (list sable_current_speaker))
|
256 |
+
(sable_setup_voice_params)
|
257 |
+
nil)
|
258 |
+
("BREAK" (ATTLIST UTT)
|
259 |
+
;; Status: probably complete
|
260 |
+
;; may cause an utterance break
|
261 |
+
(let ((level (upcase (car (xxml_attval "LEVEL" ATTLIST)))))
|
262 |
+
(cond
|
263 |
+
((null UTT) nil)
|
264 |
+
((string-equal "LARGE" level)
|
265 |
+
(xxml_synth UTT)
|
266 |
+
nil)
|
267 |
+
(t
|
268 |
+
(let ((last_token (utt.relation.last UTT'Token)))
|
269 |
+
(if last_token
|
270 |
+
(item.set_feat last_token "pbreak" "B"))
|
271 |
+
UTT)))))
|
272 |
+
("(DIV" (ATLIST UTT)
|
273 |
+
;; Status: probably complete
|
274 |
+
(xxml_synth UTT)
|
275 |
+
nil)
|
276 |
+
("AUDIO" (ATTLIST UTT)
|
277 |
+
;; Status: MODE (background) ignored, only insertion supported
|
278 |
+
;; mime type of file also ignored, as its LEVEL
|
279 |
+
(let ((tmpfile (make_tmp_filename)))
|
280 |
+
;; ignoring mode-background (and will for sometime)
|
281 |
+
;; ignoring level option
|
282 |
+
(xxml_synth UTT) ;; synthesizing anything ready to be synthesized
|
283 |
+
(get_url (car (xxml_attval "SRC" ATTLIST)) tmpfile)
|
284 |
+
(apply_hooks tts_hooks
|
285 |
+
(eval (list 'Utterance 'Wave tmpfile)))
|
286 |
+
(delete-file tmpfile)
|
287 |
+
nil))
|
288 |
+
("(EMPH" (ATTLIST UTT)
|
289 |
+
;; Status: nesting makes no difference, levels ignored
|
290 |
+
;; Festival is particularly bad at adding specific emphasis
|
291 |
+
;; that's what happens when you use statistical methods that
|
292 |
+
;; don't include any notion of emphasis
|
293 |
+
;; This is *not* recursive and only one level of EMPH supported
|
294 |
+
(sable_push_word_features)
|
295 |
+
(set! xxml_word_features
|
296 |
+
(cons (list "dur_stretch" 1.6)
|
297 |
+
(cons
|
298 |
+
(list "EMPH" "1") xxml_word_features)))
|
299 |
+
UTT)
|
300 |
+
(")EMPH" (ATTLIST UTT)
|
301 |
+
(set! xxml_word_features (sable_pop_word_features))
|
302 |
+
UTT)
|
303 |
+
("(PITCH" (ATTLIST UTT)
|
304 |
+
;; Status: probably complete
|
305 |
+
;; At present festival requires an utterance break here
|
306 |
+
(xxml_synth UTT)
|
307 |
+
(set! sable_pitch_context (cons int_lr_params sable_pitch_context))
|
308 |
+
(let ((base (sable_interpret_param
|
309 |
+
(car (xxml_attval "BASE" ATTLIST))
|
310 |
+
sable_pitch_base_map
|
311 |
+
(cadr (assoc 'target_f0_mean int_lr_params))
|
312 |
+
sable_pitch_base_original))
|
313 |
+
(med (sable_interpret_param
|
314 |
+
(car (xxml_attval "MED" ATTLIST))
|
315 |
+
sable_pitch_med_map
|
316 |
+
(cadr (assoc 'target_f0_mean int_lr_params))
|
317 |
+
sable_pitch_med_original))
|
318 |
+
(range (sable_interpret_param
|
319 |
+
(car (xxml_attval "RANGE" ATTLIST))
|
320 |
+
sable_pitch_range_map
|
321 |
+
(cadr (assoc 'target_f0_std int_lr_params))
|
322 |
+
sable_pitch_range_original))
|
323 |
+
(oldmean (cadr (assoc 'target_f0_mean int_lr_params))))
|
324 |
+
;; Festival (if it supports anything) supports mean and std
|
325 |
+
;; so we treat base as med if med doesn't seem to do anything
|
326 |
+
(if (equal? med oldmean)
|
327 |
+
(set! med base))
|
328 |
+
(set! int_lr_params
|
329 |
+
(cons
|
330 |
+
(list 'target_f0_mean med)
|
331 |
+
(cons
|
332 |
+
(list 'target_f0_std range)
|
333 |
+
int_lr_params)))
|
334 |
+
nil))
|
335 |
+
(")PITCH" (ATTLIST UTT)
|
336 |
+
(xxml_synth UTT)
|
337 |
+
(set! int_lr_params (car sable_pitch_context))
|
338 |
+
(set! sable_pitch_context (cdr sable_pitch_context))
|
339 |
+
nil)
|
340 |
+
("(RATE" (ATTLIST UTT)
|
341 |
+
;; Status: can't deal with absolute word per minute SPEED.
|
342 |
+
(sable_push_word_features)
|
343 |
+
;; can't deal with words per minute value
|
344 |
+
(let ((rate (sable_interpret_param
|
345 |
+
(car (xxml_attval "SPEED" ATTLIST))
|
346 |
+
sable_rate_speed_map
|
347 |
+
(sable_find_fval "dur_stretch" xxml_word_features 1.0)
|
348 |
+
sable_rate_speed_original)))
|
349 |
+
(set! xxml_word_features
|
350 |
+
(cons (list "dur_stretch" (/ 1.0 rate)) xxml_word_features))
|
351 |
+
UTT))
|
352 |
+
(")RATE" (ATTLIST UTT)
|
353 |
+
(set! xxml_word_features (sable_pop_word_features))
|
354 |
+
UTT)
|
355 |
+
("(VOLUME" (ATTLIST UTT)
|
356 |
+
;; Status: probably complete
|
357 |
+
;; At present festival requires an utterance break here
|
358 |
+
(xxml_synth UTT)
|
359 |
+
(set! sable_vol_context (cons (list sable_vol_type sable_vol_factor)
|
360 |
+
sable_vol_context))
|
361 |
+
(let ((level (sable_interpret_param
|
362 |
+
(car (xxml_attval "LEVEL" ATTLIST))
|
363 |
+
sable_volume_level_map
|
364 |
+
sable_vol_factor
|
365 |
+
1.0)))
|
366 |
+
(cond
|
367 |
+
((string-matches (car (xxml_attval "LEVEL" ATTLIST)) ".*%")
|
368 |
+
(set! sable_vol_type 'relative))
|
369 |
+
((string-matches (car (xxml_attval "LEVEL" ATTLIST)) SABLE_RXDOUBLE)
|
370 |
+
(set! sable_vol_type 'absolute))
|
371 |
+
(t
|
372 |
+
(set! sable_vol_type 'relative)))
|
373 |
+
(set! sable_vol_factor level))
|
374 |
+
nil)
|
375 |
+
(")VOLUME" (ATTLIST UTT)
|
376 |
+
(xxml_synth UTT)
|
377 |
+
(set! sable_vol_type (car (car sable_vol_context)))
|
378 |
+
(set! sable_vol_factor (car (cdr (car sable_vol_context))))
|
379 |
+
(set! sable_vol_context (cdr sable_vol_context))
|
380 |
+
nil)
|
381 |
+
("(ENGINE" (ATTLIST UTT)
|
382 |
+
;; Status: probably complete
|
383 |
+
(xxml_synth UTT)
|
384 |
+
(if (string-matches (car (xxml_attval "ID" ATTLIST)) "festival.*")
|
385 |
+
(let ((datastr ""))
|
386 |
+
(mapcar
|
387 |
+
(lambda (c) (set! datastr (string-append datastr " " c)))
|
388 |
+
(xxml_attval "DATA" ATTLIST))
|
389 |
+
(apply_hooks tts_hooks (eval (list 'Utterance 'Text datastr)))
|
390 |
+
(set! sable_omitted_mode t)) ;; ignore contents
|
391 |
+
;; else
|
392 |
+
;; its not relevant to me
|
393 |
+
)
|
394 |
+
nil)
|
395 |
+
(")ENGINE" (ATTLIST UTT)
|
396 |
+
(xxml_synth UTT)
|
397 |
+
(set! sable_omitted_mode nil)
|
398 |
+
nil)
|
399 |
+
("MARKER" (ATTLIST UTT)
|
400 |
+
;; Status: does nothing
|
401 |
+
;; Can't support this without low-level control of audio spooler
|
402 |
+
(format t "SABLE: marker \"%s\"\n"
|
403 |
+
(car (xxml_attval "MARK" ATTLIST)))
|
404 |
+
UTT)
|
405 |
+
("(PRON" (ATTLIST UTT)
|
406 |
+
;; Status: IPA currently ignored
|
407 |
+
(sable_push_word_features)
|
408 |
+
;; can't deal with words per minute value
|
409 |
+
(let ((ipa (xxml_attval "IPA" ATTLIST))
|
410 |
+
(sub (xxml_attval "SUB" ATTLIST)))
|
411 |
+
(cond
|
412 |
+
(ipa
|
413 |
+
(format t "SABLE: ipa ignored\n")
|
414 |
+
(set! xxml_word_features
|
415 |
+
(cons (list "sable_ignore" "1") xxml_word_features)))
|
416 |
+
(sub
|
417 |
+
(set! xxml_word_features
|
418 |
+
(cons (list "sable_sub" (format nil "%l" sub))
|
419 |
+
xxml_word_features))
|
420 |
+
(set! xxml_word_features
|
421 |
+
(cons (list "sable_ignore" "1") xxml_word_features))))
|
422 |
+
UTT))
|
423 |
+
(")PRON" (ATTLIST UTT)
|
424 |
+
(set! xxml_word_features (sable_pop_word_features))
|
425 |
+
UTT)
|
426 |
+
("(SAYAS" (ATTLIST UTT)
|
427 |
+
;; Status: only a few of the types are dealt with
|
428 |
+
(sable_push_word_features)
|
429 |
+
(set! sable_utt UTT)
|
430 |
+
;; can't deal with words per minute value
|
431 |
+
(let ((mode (downcase (car (xxml_attval "MODE" ATTLIST))))
|
432 |
+
(modetype (car (xxml_attval "MODETYPE" ATTLIST))))
|
433 |
+
(cond
|
434 |
+
((string-equal mode "literal")
|
435 |
+
(set! xxml_word_features
|
436 |
+
(cons (list "sable_literal" "1") xxml_word_features)))
|
437 |
+
((string-equal mode "phone")
|
438 |
+
(set! xxml_word_features
|
439 |
+
(cons (list "token_pos" "digits") xxml_word_features)))
|
440 |
+
((string-equal mode "ordinal")
|
441 |
+
(set! xxml_word_features
|
442 |
+
(cons (list "token_pos" "ordinal") xxml_word_features)))
|
443 |
+
((string-equal mode "cardinal")
|
444 |
+
(set! xxml_word_features
|
445 |
+
(cons (list "token_pos" "cardinal") xxml_word_features)))
|
446 |
+
(t
|
447 |
+
;; blindly trust festival to get it right
|
448 |
+
t))
|
449 |
+
UTT))
|
450 |
+
(")SAYAS" (ATTLIST UTT)
|
451 |
+
(set! xxml_word_features (sable_pop_word_features))
|
452 |
+
UTT)
|
453 |
+
|
454 |
+
|
455 |
+
))
|
456 |
+
|
457 |
+
(define (sable_init_func)
|
458 |
+
"(sable_init_func)
|
459 |
+
Initialisation for SABLE mode"
|
460 |
+
(sable_init_globals)
|
461 |
+
(voice_kal_diphone)
|
462 |
+
(set! sable_previous_elements xxml_elements)
|
463 |
+
(set! xxml_elements sable_elements)
|
464 |
+
(set! sable_previous_token_to_words english_token_to_words)
|
465 |
+
(set! english_token_to_words sable_token_to_words)
|
466 |
+
(set! token_to_words sable_token_to_words))
|
467 |
+
|
468 |
+
(define (sable_exit_func)
|
469 |
+
"(sable_exit_func)
|
470 |
+
Exit function for SABLE mode"
|
471 |
+
(set! xxml_elements sable_previous_elements)
|
472 |
+
(set! token_to_words sable_previous_token_to_words)
|
473 |
+
(set! english_token_to_words sable_previous_token_to_words))
|
474 |
+
|
475 |
+
(define (sable_push_word_features)
|
476 |
+
"(sable_push_word_features)
|
477 |
+
Save current word features on stack."
|
478 |
+
(set! sable_word_features_stack
|
479 |
+
(cons xxml_word_features sable_word_features_stack)))
|
480 |
+
|
481 |
+
(define (sable_adjust_volume utt)
|
482 |
+
"(sable_adjust_volume utt)
|
483 |
+
Amplify or attenutate signale based on value of sable_vol_factor
|
484 |
+
and sable_vol_type (absolute or relative)."
|
485 |
+
(set! utts (cons utt utts))
|
486 |
+
(cond
|
487 |
+
((equal? sable_vol_type 'no_change)
|
488 |
+
utt)
|
489 |
+
((equal? sable_vol_type 'absolute)
|
490 |
+
(utt.wave.rescale utt sable_vol_factor 'absolute))
|
491 |
+
((equal? sable_vol_type 'relative)
|
492 |
+
(utt.wave.rescale utt sable_vol_factor))
|
493 |
+
(t
|
494 |
+
(format stderr "SABLE: volume unknown type \"%s\"\n" sable_vol_type)
|
495 |
+
utt))
|
496 |
+
utt)
|
497 |
+
|
498 |
+
(define (sable_pop_word_features)
|
499 |
+
"(sable_pop_word_features)
|
500 |
+
Pop word features from stack."
|
501 |
+
(let ((r (car sable_word_features_stack)))
|
502 |
+
(set! sable_word_features_stack (cdr sable_word_features_stack))
|
503 |
+
r))
|
504 |
+
|
505 |
+
(define (sable_find_fval feat flist def)
|
506 |
+
(cond
|
507 |
+
((null flist) def)
|
508 |
+
((string-equal feat (car (car flist)))
|
509 |
+
(car (cdr (car flist))))
|
510 |
+
(t
|
511 |
+
(sable_find_fval feat (cdr flist) def))))
|
512 |
+
|
513 |
+
(define (sable_interpret_param ident map original current)
|
514 |
+
"(sable_interpret_param IDENT MAP ORIGINAL CURRENT)
|
515 |
+
If IDENT is in map return ORIGINAL times value in map, otherwise
|
516 |
+
treat IDENT of the form +/-N% and modify CURRENT accordingly."
|
517 |
+
(let ((mm (assoc ident map)))
|
518 |
+
(cond
|
519 |
+
(mm
|
520 |
+
(* original (car (cdr mm))))
|
521 |
+
((string-matches ident SABLE_RXDOUBLE)
|
522 |
+
(parse-number ident))
|
523 |
+
((string-matches ident ".*%")
|
524 |
+
(+ current (* current (/ (parse-number (string-before ident "%"))
|
525 |
+
100.0))))
|
526 |
+
;; ((string-matches ident ".*%")
|
527 |
+
;; (* current (/ (parse-number (string-before ident "%")) 100.0)))
|
528 |
+
((not ident) current)
|
529 |
+
(t
|
530 |
+
(format stderr "SABLE: modifier \"%s\" not of float, tag or +/-N\n"
|
531 |
+
ident)
|
532 |
+
current))))
|
533 |
+
|
534 |
+
(define (sable_setup_voice_params)
|
535 |
+
"(sable_setup_voice_params)
|
536 |
+
Set up original values for various voice parameters."
|
537 |
+
(set! sable_pitch_base_original (cadr (assoc 'target_f0_mean int_lr_params)))
|
538 |
+
(set! sable_pitch_med_original (cadr (assoc 'target_f0_mean int_lr_params)))
|
539 |
+
(set! sable_pitch_range_original (cadr (assoc 'target_f0_std int_lr_params)))
|
540 |
+
(set! sable_rate_speed_original 1.0)
|
541 |
+
(if (and after_synth_hooks (not (consp after_synth_hooks)))
|
542 |
+
(set! after_synth_hooks
|
543 |
+
(cons after_synth_hooks (list sable_adjust_volume)))
|
544 |
+
(set! after_synth_hooks
|
545 |
+
(append after_synth_hooks (list sable_adjust_volume))))
|
546 |
+
)
|
547 |
+
|
548 |
+
;;; Declare the new mode to Festival
|
549 |
+
(set! tts_text_modes
|
550 |
+
(cons
|
551 |
+
(list
|
552 |
+
'sable ;; mode name
|
553 |
+
(list
|
554 |
+
(list 'init_func sable_init_func)
|
555 |
+
(list 'exit_func sable_exit_func)
|
556 |
+
'(analysis_type xml)
|
557 |
+
))
|
558 |
+
tts_text_modes))
|
559 |
+
|
560 |
+
(provide 'sable-mode)
|
CosyVoice-ttsfrd/resource/festival/scfg_wsj_wp20.gram
ADDED
@@ -0,0 +1,523 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-*-mode:scheme-*-
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; A Stochastic context free grammar for the wp20 tag set with 19
|
35 |
+
;;; nonterminals
|
36 |
+
;;;
|
37 |
+
;;; This was trained from 10,000 sentences (00-04) of the UPenn WSJ tree
|
38 |
+
;;; bank using the inside-outside algorithm seeded with the bracketing from
|
39 |
+
;;; the treebank. The implementation is the scfg_ suite in the
|
40 |
+
;; speech tools and is based on the paper "Inside-Outside
|
41 |
+
;;; Reestimation from partially bracketed corpora", F Pereira and
|
42 |
+
;;; Y. Schabes. pp 128-135, 30th ACL, Newark, Delaware 1992.
|
43 |
+
;;;
|
44 |
+
;;; This grammar with 19 nonterminals was trained for 174 passes
|
45 |
+
;;; using a fifth of training data each time. It was tested against
|
46 |
+
;;; independent data both bracketed and unbracketed. After training,
|
47 |
+
;;; all rules with a probability less than 1.0e-6 were pruned.
|
48 |
+
;;;
|
49 |
+
;;; On an unseen test set of 686 sentences (from wsj/05/) this gets
|
50 |
+
;;; 92.2397% bracketing accuracy and 29.5918% sentences fully correct
|
51 |
+
;;;
|
52 |
+
;;; previous best 15_20 grammar
|
53 |
+
;;; 90.2377% bracketing accuracy and 24.7813% sentences fully correct
|
54 |
+
;;;
|
55 |
+
;;; Training this grammar took a long time. This is best grammar
|
56 |
+
;;; by testing grammars varying the number of non-terminals from 11-25
|
57 |
+
;;; as the number of NTs increases the time for training also increases
|
58 |
+
;;; This 19_20 grammar took 20 days on a Sun Ultra 1 140, but I also
|
59 |
+
;;; had to search 11-18 to confirm this is best, which was done with a
|
60 |
+
;;; collection of Ultra 140s 170s and Pentium Pros (Linux and FreeBSD)
|
61 |
+
;;;
|
62 |
+
(0.00593452 NT00 NT00 NT00)
|
63 |
+
(0.0319023 NT00 NT00 NT13)
|
64 |
+
(0.00105452 NT00 NT00 NT18)
|
65 |
+
(0.00061816 NT00 NT02 NT10)
|
66 |
+
(0.000399698 NT00 NT02 NT12)
|
67 |
+
(0.0383818 NT00 NT05 NT00)
|
68 |
+
(0.00011458 NT00 NT06 NT03)
|
69 |
+
(0.00164298 NT00 NT06 NT17)
|
70 |
+
(0.00153884 NT00 NT07 NT07)
|
71 |
+
(0.00118244 NT00 NT07 NT12)
|
72 |
+
(0.00171642 NT00 NT07 NT13)
|
73 |
+
(0.00031308 NT00 NT07 NT17)
|
74 |
+
(0.0949408 NT00 NT09 NT18)
|
75 |
+
(0.000932166 NT00 NT10 NT03)
|
76 |
+
(0.000150288 NT00 NT10 NT17)
|
77 |
+
(0.0152371 NT00 NT12 NT18)
|
78 |
+
(0.73409 NT00 NT14 NT13)
|
79 |
+
(0.0403652 NT00 NT14 NT18)
|
80 |
+
(0.000195643 NT00 NT16 NT07)
|
81 |
+
(0.0134222 NT00 NT18 NT13)
|
82 |
+
(0.015624 NT00 NT18 NT18)
|
83 |
+
(0.00251118 NT01 NT01 NT07)
|
84 |
+
(0.00354571 NT01 NT01 NT11)
|
85 |
+
(0.22337 NT01 NT01 NT16)
|
86 |
+
(0.0467048 NT01 NT02 NT05)
|
87 |
+
(0.000518329 NT01 NT04 NT01)
|
88 |
+
(0.000100574 NT01 NT06 NT05)
|
89 |
+
(0.0480904 NT01 NT07 NT05)
|
90 |
+
(0.000358197 NT01 NT11 NT11)
|
91 |
+
(0.00278007 NT01 NT16 NT05)
|
92 |
+
(0.000179198 NT01 NT16 NT15)
|
93 |
+
(0.00140099 NT01 n)
|
94 |
+
(0.00228587 NT01 v)
|
95 |
+
(0.524988 NT01 dt)
|
96 |
+
(0.00128028 NT01 in)
|
97 |
+
(0.0660845 NT01 j)
|
98 |
+
(0.0131026 NT01 cd)
|
99 |
+
(0.00584238 NT01 r)
|
100 |
+
(0.0548382 NT01 prp)
|
101 |
+
(0.000445004 NT01 wdt)
|
102 |
+
(0.00135794 NT01 wp)
|
103 |
+
(0.000195991 NT01 wrb)
|
104 |
+
(0.000264526 NT02 NT01 NT01)
|
105 |
+
(0.00243627 NT02 NT01 NT02)
|
106 |
+
(0.613543 NT02 NT01 NT07)
|
107 |
+
(0.00180865 NT02 NT01 NT11)
|
108 |
+
(0.0042804 NT02 NT01 NT16)
|
109 |
+
(0.0392418 NT02 NT02 NT07)
|
110 |
+
(0.026104 NT02 NT02 NT12)
|
111 |
+
(0.000916683 NT02 NT02 NT16)
|
112 |
+
(0.00158862 NT02 NT04 NT01)
|
113 |
+
(0.000206161 NT02 NT04 NT02)
|
114 |
+
(0.00343189 NT02 NT04 NT16)
|
115 |
+
(0.000417113 NT02 NT07 NT05)
|
116 |
+
(0.0988457 NT02 NT07 NT07)
|
117 |
+
(0.000931386 NT02 NT07 NT11)
|
118 |
+
(0.00073236 NT02 NT07 NT12)
|
119 |
+
(0.000153421 NT02 NT10 NT13)
|
120 |
+
(0.00163484 NT02 NT11 NT02)
|
121 |
+
(0.0379562 NT02 NT11 NT07)
|
122 |
+
(0.0149 NT02 NT11 NT11)
|
123 |
+
(0.00105811 NT02 NT11 NT12)
|
124 |
+
(0.000175184 NT02 NT16 NT02)
|
125 |
+
(0.0403395 NT02 NT16 NT07)
|
126 |
+
(0.00297703 NT02 NT16 NT12)
|
127 |
+
(0.0875026 NT02 n)
|
128 |
+
(0.00496719 NT02 v)
|
129 |
+
(0.000409658 NT02 dt)
|
130 |
+
(0.00239978 NT02 j)
|
131 |
+
(0.010203 NT02 r)
|
132 |
+
(0.000194628 NT02 pdt)
|
133 |
+
(0.000377009 NT03 NT04 NT02)
|
134 |
+
(0.11551 NT03 NT08 NT13)
|
135 |
+
(0.347629 NT03 NT09 NT13)
|
136 |
+
(0.484911 NT03 NT10 NT13)
|
137 |
+
(0.00188291 NT03 NT11 NT12)
|
138 |
+
(0.0495461 NT03 NT17 NT13)
|
139 |
+
(0.00918797 NT04 NT03 NT05)
|
140 |
+
(0.000303954 NT04 NT04 NT02)
|
141 |
+
(0.00284848 NT04 NT04 NT04)
|
142 |
+
(0.00710115 NT04 NT04 NT12)
|
143 |
+
(0.000597744 NT04 NT04 NT15)
|
144 |
+
(0.000377075 NT04 NT04 NT16)
|
145 |
+
(0.00130088 NT04 NT09 NT05)
|
146 |
+
(0.00175428 NT04 NT10 NT13)
|
147 |
+
(0.000127716 NT04 NT15 NT04)
|
148 |
+
(0.00013648 NT04 NT15 NT06)
|
149 |
+
(0.00045093 NT04 NT15 NT07)
|
150 |
+
(0.000626479 NT04 NT15 NT16)
|
151 |
+
(0.000563588 NT04 NT16 NT15)
|
152 |
+
(0.0232089 NT04 NT17 NT05)
|
153 |
+
(0.000138094 NT04 NT17 NT15)
|
154 |
+
(0.00094009 NT04 n)
|
155 |
+
(0.671108 NT04 v)
|
156 |
+
(0.0150619 NT04 punc)
|
157 |
+
(0.00056566 NT04 dt)
|
158 |
+
(0.144629 NT04 r)
|
159 |
+
(0.00270621 NT04 prp)
|
160 |
+
(0.0449587 NT04 to)
|
161 |
+
(0.0543755 NT04 md)
|
162 |
+
(0.00839747 NT04 wdt)
|
163 |
+
(0.00813689 NT04 wp)
|
164 |
+
(0.000560496 NT05 NT07 NT05)
|
165 |
+
(0.000901219 NT05 NT15 NT07)
|
166 |
+
(0.180172 NT05 punc)
|
167 |
+
(0.533041 NT05 cc)
|
168 |
+
(0.285244 NT05 pos)
|
169 |
+
(0.00164003 NT06 NT00 NT13)
|
170 |
+
(0.00222915 NT06 NT01 NT06)
|
171 |
+
(0.275903 NT06 NT01 NT07)
|
172 |
+
(0.00191616 NT06 NT01 NT11)
|
173 |
+
(0.00316549 NT06 NT01 NT12)
|
174 |
+
(0.000730143 NT06 NT01 NT14)
|
175 |
+
(0.000559842 NT06 NT02 NT06)
|
176 |
+
(0.0236744 NT06 NT02 NT07)
|
177 |
+
(0.00284929 NT06 NT02 NT09)
|
178 |
+
(0.155052 NT06 NT02 NT12)
|
179 |
+
(0.00387995 NT06 NT02 NT14)
|
180 |
+
(0.0161403 NT06 NT02 NT18)
|
181 |
+
(0.000110944 NT06 NT04 NT01)
|
182 |
+
(0.00237845 NT06 NT04 NT02)
|
183 |
+
(0.00625142 NT06 NT04 NT06)
|
184 |
+
(0.00118802 NT06 NT04 NT08)
|
185 |
+
(0.000132901 NT06 NT04 NT10)
|
186 |
+
(0.000192545 NT06 NT04 NT11)
|
187 |
+
(0.000199118 NT06 NT06 NT01)
|
188 |
+
(0.0081704 NT06 NT06 NT12)
|
189 |
+
(0.00198439 NT06 NT06 NT14)
|
190 |
+
(0.000889455 NT06 NT06 NT18)
|
191 |
+
(0.00142038 NT06 NT07 NT05)
|
192 |
+
(0.0820095 NT06 NT07 NT07)
|
193 |
+
(0.000112894 NT06 NT07 NT09)
|
194 |
+
(0.0220243 NT06 NT07 NT12)
|
195 |
+
(0.000133911 NT06 NT07 NT14)
|
196 |
+
(0.00100807 NT06 NT07 NT17)
|
197 |
+
(0.000191764 NT06 NT08 NT13)
|
198 |
+
(0.000340112 NT06 NT10 NT08)
|
199 |
+
(0.000126776 NT06 NT10 NT09)
|
200 |
+
(0.0136266 NT06 NT10 NT12)
|
201 |
+
(0.00867414 NT06 NT10 NT13)
|
202 |
+
(0.00341334 NT06 NT10 NT18)
|
203 |
+
(0.00154851 NT06 NT11 NT12)
|
204 |
+
(0.00104947 NT06 NT12 NT12)
|
205 |
+
(0.000219189 NT06 NT14 NT05)
|
206 |
+
(0.00313879 NT06 NT14 NT13)
|
207 |
+
(0.000745073 NT06 NT15 NT02)
|
208 |
+
(0.000433144 NT06 NT15 NT06)
|
209 |
+
(0.000159867 NT06 NT15 NT16)
|
210 |
+
(0.00124313 NT06 NT16 NT02)
|
211 |
+
(0.00918606 NT06 NT16 NT07)
|
212 |
+
(0.00373496 NT06 NT16 NT12)
|
213 |
+
(0.014053 NT06 NT18 NT13)
|
214 |
+
(0.0155714 NT06 n)
|
215 |
+
(0.00123379 NT06 punc)
|
216 |
+
(0.0152764 NT06 dt)
|
217 |
+
(0.00123486 NT06 j)
|
218 |
+
(0.00359625 NT06 r)
|
219 |
+
(0.212966 NT06 prp)
|
220 |
+
(0.00199168 NT06 cc)
|
221 |
+
(0.0383471 NT06 wdt)
|
222 |
+
(0.0182587 NT06 wp)
|
223 |
+
(0.00204833 NT06 wrb)
|
224 |
+
(0.0109929 NT06 ex)
|
225 |
+
(0.0011995 NT07 NT05 NT16)
|
226 |
+
(0.119588 NT07 NT07 NT07)
|
227 |
+
(0.000353596 NT07 NT07 NT11)
|
228 |
+
(0.000177793 NT07 NT07 NT12)
|
229 |
+
(0.00101956 NT07 NT11 NT11)
|
230 |
+
(0.000357614 NT07 NT15 NT01)
|
231 |
+
(0.00084812 NT07 NT15 NT06)
|
232 |
+
(0.0182872 NT07 NT16 NT07)
|
233 |
+
(0.00018607 NT07 NT16 NT11)
|
234 |
+
(0.856315 NT07 n)
|
235 |
+
(0.000736333 NT07 v)
|
236 |
+
(0.000645479 NT08 NT00 NT09)
|
237 |
+
(0.000990156 NT08 NT01 NT02)
|
238 |
+
(0.0410251 NT08 NT01 NT07)
|
239 |
+
(0.0013863 NT08 NT01 NT09)
|
240 |
+
(0.000242552 NT08 NT01 NT12)
|
241 |
+
(0.00174478 NT08 NT01 NT14)
|
242 |
+
(0.000596656 NT08 NT01 NT16)
|
243 |
+
(0.00130945 NT08 NT02 NT07)
|
244 |
+
(0.166303 NT08 NT02 NT09)
|
245 |
+
(0.0143253 NT08 NT02 NT12)
|
246 |
+
(0.0113813 NT08 NT02 NT14)
|
247 |
+
(0.000597887 NT08 NT02 NT16)
|
248 |
+
(0.0133053 NT08 NT03 NT09)
|
249 |
+
(0.0109076 NT08 NT03 NT17)
|
250 |
+
(0.000211313 NT08 NT04 NT01)
|
251 |
+
(0.0105796 NT08 NT04 NT02)
|
252 |
+
(0.00440181 NT08 NT04 NT04)
|
253 |
+
(0.00203737 NT08 NT04 NT06)
|
254 |
+
(0.213275 NT08 NT04 NT08)
|
255 |
+
(0.0781169 NT08 NT04 NT09)
|
256 |
+
(0.0190657 NT08 NT04 NT10)
|
257 |
+
(0.00319326 NT08 NT04 NT12)
|
258 |
+
(0.000693766 NT08 NT04 NT15)
|
259 |
+
(0.00112226 NT08 NT04 NT16)
|
260 |
+
(0.00117025 NT08 NT06 NT02)
|
261 |
+
(0.00807496 NT08 NT06 NT08)
|
262 |
+
(0.0183971 NT08 NT06 NT09)
|
263 |
+
(0.00127343 NT08 NT06 NT14)
|
264 |
+
(0.0322725 NT08 NT06 NT17)
|
265 |
+
(0.00396897 NT08 NT07 NT07)
|
266 |
+
(0.0154729 NT08 NT07 NT09)
|
267 |
+
(0.000708139 NT08 NT07 NT10)
|
268 |
+
(0.00186499 NT08 NT07 NT11)
|
269 |
+
(0.000701346 NT08 NT07 NT14)
|
270 |
+
(0.0116278 NT08 NT08 NT09)
|
271 |
+
(0.0965117 NT08 NT10 NT09)
|
272 |
+
(0.000142086 NT08 NT10 NT12)
|
273 |
+
(0.000210725 NT08 NT10 NT14)
|
274 |
+
(0.00336223 NT08 NT11 NT07)
|
275 |
+
(0.00183799 NT08 NT11 NT09)
|
276 |
+
(0.00109249 NT08 NT11 NT11)
|
277 |
+
(0.000880671 NT08 NT11 NT12)
|
278 |
+
(0.0032493 NT08 NT12 NT08)
|
279 |
+
(0.0372072 NT08 NT12 NT09)
|
280 |
+
(0.00113127 NT08 NT12 NT12)
|
281 |
+
(0.00892231 NT08 NT15 NT02)
|
282 |
+
(0.00383754 NT08 NT15 NT06)
|
283 |
+
(0.000528365 NT08 NT15 NT07)
|
284 |
+
(0.0060705 NT08 NT15 NT08)
|
285 |
+
(0.00853698 NT08 NT15 NT10)
|
286 |
+
(0.0349777 NT08 NT15 NT14)
|
287 |
+
(0.000202857 NT08 NT16 NT06)
|
288 |
+
(0.00709689 NT08 NT16 NT07)
|
289 |
+
(0.000240097 NT08 NT16 NT08)
|
290 |
+
(0.0401819 NT08 NT16 NT09)
|
291 |
+
(0.00124754 NT08 NT16 NT14)
|
292 |
+
(0.00862498 NT08 n)
|
293 |
+
(0.0115193 NT08 v)
|
294 |
+
(0.000974267 NT08 in)
|
295 |
+
(0.0169837 NT08 j)
|
296 |
+
(0.00626434 NT08 r)
|
297 |
+
(0.00437851 NT08 prp)
|
298 |
+
(0.0062359 NT09 NT01 NT07)
|
299 |
+
(0.000165196 NT09 NT01 NT14)
|
300 |
+
(0.00151872 NT09 NT02 NT04)
|
301 |
+
(0.000660061 NT09 NT02 NT15)
|
302 |
+
(0.000434321 NT09 NT02 NT16)
|
303 |
+
(0.00805872 NT09 NT03 NT09)
|
304 |
+
(0.000180982 NT09 NT04 NT08)
|
305 |
+
(0.050609 NT09 NT04 NT09)
|
306 |
+
(0.000307442 NT09 NT04 NT15)
|
307 |
+
(0.00281491 NT09 NT04 NT17)
|
308 |
+
(0.000295911 NT09 NT06 NT15)
|
309 |
+
(0.00133828 NT09 NT07 NT11)
|
310 |
+
(0.0235741 NT09 NT12 NT09)
|
311 |
+
(0.00121997 NT09 NT12 NT12)
|
312 |
+
(0.00391762 NT09 NT15 NT01)
|
313 |
+
(0.173027 NT09 NT15 NT02)
|
314 |
+
(0.000462089 NT09 NT15 NT06)
|
315 |
+
(0.0276663 NT09 NT15 NT07)
|
316 |
+
(0.210483 NT09 NT15 NT08)
|
317 |
+
(0.000177004 NT09 NT15 NT09)
|
318 |
+
(0.243402 NT09 NT15 NT10)
|
319 |
+
(0.0174403 NT09 NT15 NT11)
|
320 |
+
(0.00646962 NT09 NT15 NT12)
|
321 |
+
(0.155174 NT09 NT15 NT14)
|
322 |
+
(0.00930502 NT09 NT15 NT17)
|
323 |
+
(0.000311399 NT09 NT16 NT02)
|
324 |
+
(0.0052031 NT09 NT16 NT07)
|
325 |
+
(0.00742336 NT09 NT16 NT09)
|
326 |
+
(0.000409254 NT09 in)
|
327 |
+
(0.0019424 NT09 j)
|
328 |
+
(0.0393282 NT09 r)
|
329 |
+
(0.00016039 NT09 prp)
|
330 |
+
(0.00268682 NT10 NT01 NT07)
|
331 |
+
(0.00173594 NT10 NT01 NT09)
|
332 |
+
(0.00550051 NT10 NT01 NT10)
|
333 |
+
(0.00269002 NT10 NT01 NT11)
|
334 |
+
(0.00881491 NT10 NT01 NT12)
|
335 |
+
(0.0158503 NT10 NT02 NT02)
|
336 |
+
(0.00229071 NT10 NT02 NT07)
|
337 |
+
(0.00765082 NT10 NT02 NT09)
|
338 |
+
(0.00102327 NT10 NT02 NT11)
|
339 |
+
(0.474288 NT10 NT02 NT12)
|
340 |
+
(0.0119086 NT10 NT02 NT14)
|
341 |
+
(0.000270767 NT10 NT02 NT15)
|
342 |
+
(0.00425023 NT10 NT02 NT16)
|
343 |
+
(0.0533347 NT10 NT04 NT02)
|
344 |
+
(0.00286524 NT10 NT04 NT06)
|
345 |
+
(0.0687658 NT10 NT04 NT10)
|
346 |
+
(0.0157381 NT10 NT04 NT12)
|
347 |
+
(0.000809508 NT10 NT05 NT12)
|
348 |
+
(0.00188343 NT10 NT06 NT04)
|
349 |
+
(0.000155481 NT10 NT06 NT09)
|
350 |
+
(0.00569591 NT10 NT06 NT14)
|
351 |
+
(0.00233367 NT10 NT06 NT17)
|
352 |
+
(0.000189475 NT10 NT07 NT05)
|
353 |
+
(0.018548 NT10 NT07 NT07)
|
354 |
+
(0.00472354 NT10 NT07 NT09)
|
355 |
+
(0.0121145 NT10 NT07 NT11)
|
356 |
+
(0.0698482 NT10 NT07 NT12)
|
357 |
+
(0.000402661 NT10 NT07 NT16)
|
358 |
+
(0.00183044 NT10 NT07 NT17)
|
359 |
+
(0.00166519 NT10 NT10 NT02)
|
360 |
+
(0.015445 NT10 NT10 NT09)
|
361 |
+
(0.019208 NT10 NT10 NT12)
|
362 |
+
(0.000942866 NT10 NT10 NT18)
|
363 |
+
(0.00149941 NT10 NT11 NT01)
|
364 |
+
(0.00624706 NT10 NT11 NT02)
|
365 |
+
(0.0381755 NT10 NT11 NT11)
|
366 |
+
(0.00754256 NT10 NT11 NT12)
|
367 |
+
(0.00139213 NT10 NT15 NT02)
|
368 |
+
(0.000523505 NT10 NT15 NT06)
|
369 |
+
(0.0015256 NT10 NT15 NT10)
|
370 |
+
(0.00119525 NT10 NT15 NT12)
|
371 |
+
(0.00683524 NT10 NT16 NT02)
|
372 |
+
(0.000398591 NT10 NT16 NT04)
|
373 |
+
(0.0701558 NT10 NT16 NT07)
|
374 |
+
(0.00198721 NT10 NT16 NT11)
|
375 |
+
(0.0075364 NT10 NT16 NT12)
|
376 |
+
(0.0186618 NT10 n)
|
377 |
+
(0.000591828 NT10 uh)
|
378 |
+
(0.157827 NT11 NT11 NT11)
|
379 |
+
(0.0422576 NT11 NT15 NT11)
|
380 |
+
(0.00247895 NT11 NT15 NT16)
|
381 |
+
(0.000257833 NT11 dt)
|
382 |
+
(0.754818 NT11 cd)
|
383 |
+
(0.0421123 NT11 r)
|
384 |
+
(0.00236916 NT12 NT01 NT07)
|
385 |
+
(0.000118511 NT12 NT02 NT16)
|
386 |
+
(0.00638739 NT12 NT04 NT02)
|
387 |
+
(0.0055731 NT12 NT04 NT04)
|
388 |
+
(0.0340903 NT12 NT04 NT12)
|
389 |
+
(0.00102031 NT12 NT04 NT15)
|
390 |
+
(0.00143793 NT12 NT04 NT16)
|
391 |
+
(0.000102621 NT12 NT04 NT17)
|
392 |
+
(0.0032774 NT12 NT06 NT04)
|
393 |
+
(0.000366976 NT12 NT07 NT07)
|
394 |
+
(0.00218153 NT12 NT07 NT11)
|
395 |
+
(0.0117989 NT12 NT11 NT07)
|
396 |
+
(0.00303601 NT12 NT12 NT12)
|
397 |
+
(0.0747798 NT12 NT13 NT03)
|
398 |
+
(0.000232806 NT12 NT15 NT01)
|
399 |
+
(0.341016 NT12 NT15 NT02)
|
400 |
+
(0.0190932 NT12 NT15 NT06)
|
401 |
+
(0.100931 NT12 NT15 NT07)
|
402 |
+
(0.193386 NT12 NT15 NT10)
|
403 |
+
(0.0142796 NT12 NT15 NT11)
|
404 |
+
(0.000915196 NT12 NT16 NT07)
|
405 |
+
(0.000299768 NT12 NT16 NT11)
|
406 |
+
(0.0135637 NT12 NT16 NT12)
|
407 |
+
(0.115493 NT12 n)
|
408 |
+
(0.00344871 NT12 v)
|
409 |
+
(0.0262404 NT12 punc)
|
410 |
+
(0.000493049 NT12 in)
|
411 |
+
(0.00235382 NT12 j)
|
412 |
+
(0.0192274 NT12 r)
|
413 |
+
(0.00199831 NT12 prp)
|
414 |
+
(0.000209376 NT13 NT11 NT15)
|
415 |
+
(0.00188858 NT13 NT13 NT03)
|
416 |
+
(0.540855 NT13 punc)
|
417 |
+
(0.00804226 NT13 cc)
|
418 |
+
(0.000413617 NT14 NT00 NT09)
|
419 |
+
(0.0218326 NT14 NT00 NT14)
|
420 |
+
(0.000451496 NT14 NT00 NT18)
|
421 |
+
(0.00149459 NT14 NT01 NT07)
|
422 |
+
(0.00384046 NT14 NT01 NT17)
|
423 |
+
(0.00138254 NT14 NT02 NT09)
|
424 |
+
(0.0525259 NT14 NT03 NT14)
|
425 |
+
(0.000893974 NT14 NT04 NT02)
|
426 |
+
(0.000175088 NT14 NT04 NT06)
|
427 |
+
(0.000478859 NT14 NT04 NT08)
|
428 |
+
(0.00086439 NT14 NT04 NT09)
|
429 |
+
(0.00529624 NT14 NT04 NT10)
|
430 |
+
(0.000476852 NT14 NT04 NT12)
|
431 |
+
(0.00549502 NT14 NT04 NT14)
|
432 |
+
(0.0281873 NT14 NT05 NT14)
|
433 |
+
(0.76715 NT14 NT06 NT17)
|
434 |
+
(0.00303311 NT14 NT07 NT07)
|
435 |
+
(0.00027137 NT14 NT07 NT09)
|
436 |
+
(0.000748841 NT14 NT07 NT12)
|
437 |
+
(0.0874896 NT14 NT07 NT17)
|
438 |
+
(0.00416962 NT14 NT09 NT14)
|
439 |
+
(0.00175999 NT14 NT10 NT09)
|
440 |
+
(0.000710869 NT14 NT11 NT17)
|
441 |
+
(0.000723932 NT14 NT12 NT07)
|
442 |
+
(0.00440147 NT14 NT12 NT14)
|
443 |
+
(0.000761726 NT14 NT14 NT09)
|
444 |
+
(0.00084762 NT14 NT14 NT17)
|
445 |
+
(0.000323644 NT14 NT15 NT02)
|
446 |
+
(0.00264492 NT14 NT15 NT14)
|
447 |
+
(0.000238841 NT14 NT16 NT07)
|
448 |
+
(0.000126025 NT14 NT16 NT09)
|
449 |
+
(0.000217731 NT14 r)
|
450 |
+
(0.00024161 NT14 wrb)
|
451 |
+
(0.000366989 NT15 NT04 NT04)
|
452 |
+
(0.00127143 NT15 NT04 NT15)
|
453 |
+
(0.00137902 NT15 NT11 NT07)
|
454 |
+
(0.000109067 NT15 NT15 NT04)
|
455 |
+
(0.00380199 NT15 NT15 NT06)
|
456 |
+
(0.000193842 NT15 NT15 NT15)
|
457 |
+
(0.000253898 NT15 NT15 NT16)
|
458 |
+
(0.00556123 NT15 v)
|
459 |
+
(0.0798535 NT15 punc)
|
460 |
+
(0.557206 NT15 in)
|
461 |
+
(0.0519477 NT15 cc)
|
462 |
+
(0.170466 NT15 of)
|
463 |
+
(0.113587 NT15 to)
|
464 |
+
(0.0125211 NT15 wrb)
|
465 |
+
(0.00146961 NT15 pdt)
|
466 |
+
(0.000682686 NT16 NT01 NT16)
|
467 |
+
(0.000353409 NT16 NT02 NT02)
|
468 |
+
(0.0034721 NT16 NT02 NT05)
|
469 |
+
(0.00392739 NT16 NT04 NT04)
|
470 |
+
(0.0225952 NT16 NT04 NT16)
|
471 |
+
(0.00368407 NT16 NT05 NT16)
|
472 |
+
(0.000275916 NT16 NT06 NT05)
|
473 |
+
(0.0263102 NT16 NT07 NT05)
|
474 |
+
(0.00344251 NT16 NT07 NT12)
|
475 |
+
(0.00271063 NT16 NT07 NT16)
|
476 |
+
(0.000950873 NT16 NT10 NT13)
|
477 |
+
(0.0229124 NT16 NT11 NT07)
|
478 |
+
(0.0173136 NT16 NT11 NT11)
|
479 |
+
(0.0094147 NT16 NT11 NT16)
|
480 |
+
(0.00210054 NT16 NT13 NT03)
|
481 |
+
(0.000417271 NT16 NT15 NT01)
|
482 |
+
(0.0100377 NT16 NT15 NT11)
|
483 |
+
(0.000679194 NT16 NT16 NT05)
|
484 |
+
(0.00203961 NT16 NT16 NT11)
|
485 |
+
(0.00352444 NT16 NT16 NT12)
|
486 |
+
(0.0133536 NT16 NT16 NT16)
|
487 |
+
(0.0041124 NT16 n)
|
488 |
+
(0.0518387 NT16 v)
|
489 |
+
(0.0133556 NT16 punc)
|
490 |
+
(0.746857 NT16 j)
|
491 |
+
(0.0325454 NT16 cd)
|
492 |
+
(0.000994964 NT16 r)
|
493 |
+
(0.000325555 NT17 NT03 NT09)
|
494 |
+
(0.000431668 NT17 NT03 NT17)
|
495 |
+
(0.000283523 NT17 NT04 NT01)
|
496 |
+
(0.00308221 NT17 NT04 NT02)
|
497 |
+
(0.000106449 NT17 NT04 NT07)
|
498 |
+
(0.584517 NT17 NT04 NT08)
|
499 |
+
(0.0389749 NT17 NT04 NT09)
|
500 |
+
(0.00927257 NT17 NT04 NT10)
|
501 |
+
(0.000698039 NT17 NT04 NT11)
|
502 |
+
(0.0594712 NT17 NT04 NT14)
|
503 |
+
(0.000381951 NT17 NT04 NT16)
|
504 |
+
(0.248255 NT17 NT04 NT17)
|
505 |
+
(0.000264379 NT17 NT05 NT08)
|
506 |
+
(0.00194384 NT17 NT05 NT10)
|
507 |
+
(0.000308808 NT17 NT05 NT14)
|
508 |
+
(0.000271388 NT17 NT07 NT08)
|
509 |
+
(0.000131093 NT17 NT07 NT10)
|
510 |
+
(0.00011195 NT17 NT07 NT17)
|
511 |
+
(0.000462643 NT17 NT08 NT09)
|
512 |
+
(0.00153331 NT17 NT11 NT07)
|
513 |
+
(0.00214335 NT17 NT11 NT11)
|
514 |
+
(0.000307068 NT17 NT11 NT12)
|
515 |
+
(0.000550528 NT17 NT15 NT10)
|
516 |
+
(0.000125644 NT17 NT16 NT02)
|
517 |
+
(0.000474489 NT17 NT17 NT09)
|
518 |
+
(0.00032483 NT17 NT17 NT18)
|
519 |
+
(0.045027 NT17 v)
|
520 |
+
(0.00425503 NT18 NT07 NT18)
|
521 |
+
(0.978831 NT18 NT13 NT00)
|
522 |
+
(0.00130119 NT18 NT13 NT03)
|
523 |
+
(0.0155958 NT18 NT17 NT13)
|
CosyVoice-ttsfrd/resource/festival/sec.B.hept.ngrambin
ADDED
Binary file (545 Bytes). View file
|
|
CosyVoice-ttsfrd/resource/festival/sec.ts20.quad.ngrambin
ADDED
Binary file (34.4 kB). View file
|
|
CosyVoice-ttsfrd/resource/festival/siteinit.scm
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2 |
+
;;; ;;
|
3 |
+
;;; Centre for Speech Technology Research ;;
|
4 |
+
;;; University of Edinburgh, UK ;;
|
5 |
+
;;; Copyright (c) 1996,1997 ;;
|
6 |
+
;;; All Rights Reserved. ;;
|
7 |
+
;;; ;;
|
8 |
+
;;; Permission is hereby granted, free of charge, to use and distribute ;;
|
9 |
+
;;; this software and its documentation without restriction, including ;;
|
10 |
+
;;; without limitation the rights to use, copy, modify, merge, publish, ;;
|
11 |
+
;;; distribute, sublicense, and/or sell copies of this work, and to ;;
|
12 |
+
;;; permit persons to whom this work is furnished to do so, subject to ;;
|
13 |
+
;;; the following conditions: ;;
|
14 |
+
;;; 1. The code must retain the above copyright notice, this list of ;;
|
15 |
+
;;; conditions and the following disclaimer. ;;
|
16 |
+
;;; 2. Any modifications must be clearly marked as such. ;;
|
17 |
+
;;; 3. Original authors' names are not deleted. ;;
|
18 |
+
;;; 4. The authors' names are not used to endorse or promote products ;;
|
19 |
+
;;; derived from this software without specific prior written ;;
|
20 |
+
;;; permission. ;;
|
21 |
+
;;; ;;
|
22 |
+
;;; THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ;;
|
23 |
+
;;; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ;;
|
24 |
+
;;; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ;;
|
25 |
+
;;; SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ;;
|
26 |
+
;;; FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;;
|
27 |
+
;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ;;
|
28 |
+
;;; AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ;;
|
29 |
+
;;; ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ;;
|
30 |
+
;;; THIS SOFTWARE. ;;
|
31 |
+
;;; ;;
|
32 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
33 |
+
;;;
|
34 |
+
;;; Site specific initialisation file
|
35 |
+
;;;
|
36 |
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
37 |
+
|
38 |
+
;; If festival's internal audio playing support doesn't work on your
|
39 |
+
;; machine you can make Festival use your own program to play waveform
|
40 |
+
;; files. Uncomment the following and change "play" to the name of
|
41 |
+
;; your local program that can play files
|
42 |
+
|
43 |
+
;(Parameter.set 'Audio_Required_Format 'riff)
|
44 |
+
;(Parameter.set 'Audio_Method 'Audio_Command)
|
45 |
+
|
46 |
+
;; Apple OSX (if you can file afplay)
|
47 |
+
;(Parameter.set 'Audio_Command "afplay $FILE")
|
48 |
+
|
49 |
+
;; SOX (play) often a good alternative on cygwin and linux
|
50 |
+
;(Parameter.set 'Audio_Command "play -q $FILE")
|
51 |
+
|
52 |
+
;; Windows 7 (when sox's play doesn't work -- but this might not exit)
|
53 |
+
;(Parameter.set 'Audio_Command "c:/Windows/System32/WindowsPowerShell/v1.0/powershell -c '(New-Object Media.Soundplayer C:/cygwin'$FILE').PlaySync(); Exit;'")
|
54 |
+
|
55 |
+
;; If you want a voice different from the system installed default
|
56 |
+
;; uncomment the following line and change the name to the voice you
|
57 |
+
;; want
|
58 |
+
|
59 |
+
;(set! voice_default 'voice_cmu_us_awb_arctic_hts)
|
60 |
+
|
61 |
+
(provide 'siteinit)
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
CosyVoice-ttsfrd/resource/festival/speech.properties
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# Register speech engines
|
2 |
+
cstr.festival.EngineCentral=cstr.festival.jsapi.EngineCentral
|