File size: 6,934 Bytes
9f1c059 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# ----------------------------------------------------------------- #
# The HMM-Based Speech Synthesis System (HTS) #
# developed by HTS Working Group #
# http://hts.sp.nitech.ac.jp/ #
# ----------------------------------------------------------------- #
# #
# Copyright (c) 2001-2011 Nagoya Institute of Technology #
# Department of Computer Science #
# #
# 2001-2008 Tokyo Institute of Technology #
# Interdisciplinary Graduate School of #
# Science and Engineering #
# #
# All rights reserved. #
# #
# Redistribution and use in source and binary forms, with or #
# without modification, are permitted provided that the following #
# conditions are met: #
# #
# - Redistributions of source code must retain the above copyright #
# notice, this list of conditions and the following disclaimer. #
# - Redistributions in binary form must reproduce the above #
# copyright notice, this list of conditions and the following #
# disclaimer in the documentation and/or other materials provided #
# with the distribution. #
# - Neither the name of the HTS working group nor the names of its #
# contributors may be used to endorse or promote products derived #
# from this software without specific prior written permission. #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND #
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, #
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE #
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS #
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED #
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, #
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON #
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, #
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY #
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE #
# POSSIBILITY OF SUCH DAMAGE. #
# ----------------------------------------------------------------- #
{
##############################
### SEGMENT
# boundary
# printf "%10.0f %10.0f ", 1e7 * $65, 1e7 * $66
# pp.name
printf "%s", ($63 == "0") ? "x" : $63
# p.name
printf "^%s", ($1 == "0") ? "x" : $1
# c.name
printf "-%s", $2
# n.name
printf "+%s", ($3 == "0") ? "x" : $3
# nn.name
printf "=%s", ($64 == "0") ? "x" : $64
# position in syllable (segment)
printf "@"
printf "%s", ($2 == "pau") ? "x" : $4 + 1
printf "_%s", ($2 == "pau") ? "x" : $12 - $4
##############################
### SYLLABLE
## previous syllable
# p.stress
printf "/A:%s", ($2 == "pau") ? $49 : $5
# p.accent
printf "_%s", ($2 == "pau") ? $51 : $8
# p.length
printf "_%s", ($2 == "pau") ? $53 : $11
## current syllable
# c.stress
printf "/B:%s", ($2 == "pau") ? "x" : $6
# c.accent
printf "-%s", ($2 == "pau") ? "x" : $9
# c.length
printf "-%s", ($2 == "pau") ? "x" : $12
# position in word (syllable)
printf "@%s", ($2 == "pau") ? "x" : $14 + 1
printf "-%s", ($2 == "pau") ? "x" : $30 - $14
# position in phrase (syllable)
printf "&%s", ($2 == "pau") ? "x" : $15 + 1
printf "-%s", ($2 == "pau") ? "x" : $16 + 1
# position in phrase (stressed syllable)
printf "#%s", ($2 == "pau") ? "x" : $17 + 1
printf "-%s", ($2 == "pau") ? "x" : $18 + 1
# position in phrase (accented syllable)
printf "$"
printf "%s", ($2 == "pau") ? "x" : $19 + 1
printf "-%s", ($2 == "pau") ? "x" : $20 + 1
# distance from stressed syllable
printf "!%s", ($2 == "pau") ? "x" : $21
printf "-%s", ($2 == "pau") ? "x" : $22
# distance from accented syllable
printf ";%s", ($2 == "pau") ? "x" : $23
printf "-%s", ($2 == "pau") ? "x" : $24
# name of the vowel of current syllable
printf "|%s", ($2 == "pau") ? "x" : $25
## next syllable
# n.stress
printf "/C:%s", ($2 == "pau") ? $50 : $7
# n.accent
printf "+%s", ($2 == "pau") ? $52 : $10
# n.length
printf "+%s", ($2 == "pau") ? $54 : $13
##############################
# WORD
##################
## previous word
# p.gpos
printf "/D:%s", ($2 == "pau") ? $55 : $26
# p.lenght (syllable)
printf "_%s", ($2 == "pau") ? $57 : $29
#################
## current word
# c.gpos
printf "/E:%s", ($2 == "pau") ? "x" : $27
# c.lenght (syllable)
printf "+%s", ($2 == "pau") ? "x" : $30
# position in phrase (word)
printf "@%s", ($2 == "pau") ? "x" : $32 + 1
printf "+%s", ($2 == "pau") ? "x" : $33
# position in phrase (content word)
printf "&%s", ($2 == "pau") ? "x" : $34 + 1
printf "+%s", ($2 == "pau") ? "x" : $35
# distance from content word in phrase
printf "#%s", ($2 == "pau") ? "x" : $36
printf "+%s", ($2 == "pau") ? "x" : $37
##############
## next word
# n.gpos
printf "/F:%s", ($2 == "pau") ? $56 : $28
# n.lenghte (syllable)
printf "_%s", ($2 == "pau") ? $58 : $31
##############################
# PHRASE
####################
## previous phrase
# length of previous phrase (syllable)
printf "/G:%s", ($2 == "pau") ? $59 : $38
# length of previous phrase (word)
printf "_%s" , ($2 == "pau") ? $61 : $41
####################
## current phrase
# length of current phrase (syllable)
printf "/H:%s", ($2 == "pau") ? "x" : $39
# length of current phrase (word)
printf "=%s", ($2 == "pau") ? "x" : $42
# position in major phrase (phrase)
printf "^";
printf "%s", $44 + 1
printf "=%s", $48 - $44
# type of tobi endtone of current phrase
printf "|%s", $45
####################
## next phrase
# length of next phrase (syllable)
printf "/I:%s", ($2 == "pau") ? $60 : $40
# length of next phrase (word)
printf "=%s", ($2 == "pau") ? $62 : $43
##############################
# UTTERANCE
# length (syllable)
printf "/J:%s", $46
# length (word)
printf "+%s", $47
# length (phrase)
printf "-%s", $48
printf "\n"
}
|