| 1 | ; extensions_voxforge.conf - An IVR to automatically recording transcribed audio for Voxforge.org |
|---|
| 2 | ; Copyright (C) 2007 Jesse D. Guardiani |
|---|
| 3 | ; |
|---|
| 4 | ; This program is free software; you can redistribute it and/or |
|---|
| 5 | ; modify it under the terms of the GNU General Public License |
|---|
| 6 | ; as published by the Free Software Foundation; either version 2 |
|---|
| 7 | ; of the License, or (at your option) any later version. |
|---|
| 8 | ; |
|---|
| 9 | ; This program is distributed in the hope that it will be useful, |
|---|
| 10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | ; GNU General Public License for more details. |
|---|
| 13 | ; |
|---|
| 14 | ; You should have received a copy of the GNU General Public License |
|---|
| 15 | ; along with this program; if not, write to the Free Software |
|---|
| 16 | ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|---|
| 17 | ; --------------------------------------------------------------------------------- |
|---|
| 18 | ; |
|---|
| 19 | ; note: I misspell 'record' as 'reecord' on purpose because flite mispronounces it. |
|---|
| 20 | ; I also use periods (.) instead of commas (,) because flite doesn't pause long enough on commas. |
|---|
| 21 | |
|---|
| 22 | [custom-voxforge] |
|---|
| 23 | exten => s,1,Set(ran-init=0) |
|---|
| 24 | exten => s,2,Set(ran-instructions=0) |
|---|
| 25 | exten => s,3,Set(prompts-dir=/voxforge-code/prompts) |
|---|
| 26 | exten => s,4,Set(menu-dir=${prompts-dir}/audio/menu) |
|---|
| 27 | ;exten => s,5,Flite("Welcome to the Vox Forge automated reecording system!") |
|---|
| 28 | exten => s,5,Answer() |
|---|
| 29 | exten => s,6,Wait(2) |
|---|
| 30 | exten => s,7,Playback(${menu-dir}/welcome) |
|---|
| 31 | exten => s,8,Gosub(sub-voxforge-channel-limit|s|1) |
|---|
| 32 | exten => s,9,Goto(custom-voxforge-license|s|1) |
|---|
| 33 | exten => i,1,Goto(s|2) |
|---|
| 34 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 35 | |
|---|
| 36 | [custom-voxforge-license] |
|---|
| 37 | ;exten => s,1,Flite("To use this system. You must agree to have your voice reecorded.") |
|---|
| 38 | ;exten => s,2,Flite("And licensed under the G N U ... G P L.") |
|---|
| 39 | ;exten => s,3,Flite("With copyright assigned to the Free Software Foundation.") |
|---|
| 40 | ;exten => s,4,Flite('Press 1 if you agree. Press 2. Or hang up now. If you do not agree. Or do not understand. Press 3 for more information about the G N U ... G P L license.'|123) |
|---|
| 41 | exten => s,1,Playback(${menu-dir}/license-agree-info) |
|---|
| 42 | exten => s,2,Background(${menu-dir}/license-agree-prompt) |
|---|
| 43 | exten => s,3,WaitExten(10) |
|---|
| 44 | exten => 1,1,Goto(custom-voxforge-gender|s|1) |
|---|
| 45 | exten => 2,1,Playback(vm-goodbye) |
|---|
| 46 | exten => 2,2,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 47 | exten => 2,3,Hangup() |
|---|
| 48 | ;exten => 3,1,Flite("The G N U ... G P L. or G N U... General Public License. refers to a type of Open Source license. Copyright protects a creator's right to control copies and changes to A work. By pressing 1... you agree... to give away the Copyright of your speech submission to the Free Software Foundation. And license your submission under the G P L. The G P L protects everyone's right to copy and make changes to your submission. For more information about the G P L. please go to www dot g n u dot o r g"|123) |
|---|
| 49 | exten => 3,1,Background(${menu-dir}/license-about) |
|---|
| 50 | exten => 3,2,Goto(s|2) |
|---|
| 51 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 52 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 53 | exten => i,2,Goto(s|1) |
|---|
| 54 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 55 | |
|---|
| 56 | [custom-voxforge-gender] |
|---|
| 57 | ;exten => s,1,Flite("Please press 1 if you are a male. Press 2 if you are a female."|12) |
|---|
| 58 | exten => s,1,Background(${menu-dir}/gender) |
|---|
| 59 | exten => s,2,WaitExten(10) |
|---|
| 60 | exten => 1,1,Setvar(gender=male) |
|---|
| 61 | exten => 1,2,Goto(custom-voxforge-gender-confirm|s|1) |
|---|
| 62 | exten => 2,1,Setvar(gender=female) |
|---|
| 63 | exten => 2,2,Goto(custom-voxforge-gender-confirm|s|1) |
|---|
| 64 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 65 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 66 | exten => i,2,Goto(s|1) |
|---|
| 67 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 68 | |
|---|
| 69 | [custom-voxforge-gender-confirm] |
|---|
| 70 | ;exten => s,1,Flite('OK, you chose ${gender}. Press 1 if this is correct. Press 2 to try again.'|12) |
|---|
| 71 | exten => s,1,GotoIf($[${gender} = 'male']?2:4) |
|---|
| 72 | exten => s,2,Background(${menu-dir}/chose-male) |
|---|
| 73 | exten => s,3,Goto(s|5) |
|---|
| 74 | exten => s,4,Background(${menu-dir}/chose-female) |
|---|
| 75 | exten => s,5,Background(${menu-dir}/1-correct-2-try-again) |
|---|
| 76 | exten => s,6,WaitExten(10) |
|---|
| 77 | exten => 1,1,Goto(custom-voxforge-agerange|s|1) |
|---|
| 78 | exten => 2,1,Goto(custom-voxforge-gender|s|1) |
|---|
| 79 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 80 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 81 | exten => i,2,Goto(s|1) |
|---|
| 82 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 83 | |
|---|
| 84 | [custom-voxforge-agerange] |
|---|
| 85 | ;exten => s,1,Flite('Please press 1 if you are a youth. Press 2 if you are an adult. Or press 3 if you are a senior.'|123) |
|---|
| 86 | exten => s,1,Background(${menu-dir}/agerange) |
|---|
| 87 | exten => s,2,WaitExten(10) |
|---|
| 88 | exten => 1,1,Setvar(agerange=youth) |
|---|
| 89 | exten => 1,2,Goto(custom-voxforge-agerange-confirm|s|1) |
|---|
| 90 | exten => 2,1,Setvar(agerange=adult) |
|---|
| 91 | exten => 2,2,Goto(custom-voxforge-agerange-confirm|s|1) |
|---|
| 92 | exten => 3,1,Setvar(agerange=senior) |
|---|
| 93 | exten => 3,2,Goto(custom-voxforge-agerange-confirm|s|1) |
|---|
| 94 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 95 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 96 | exten => i,2,Goto(s|1) |
|---|
| 97 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 98 | |
|---|
| 99 | [custom-voxforge-agerange-confirm] |
|---|
| 100 | ;exten => s,1,Flite('OK, you chose ${agerange}. Press 1 if this is correct. Press 2 to try again.'|12) |
|---|
| 101 | exten => s,1,GotoIf($[${agerange} = 'youth']?2:4) |
|---|
| 102 | exten => s,2,Background(${menu-dir}/chose-youth) |
|---|
| 103 | exten => s,3,Goto(s|8) |
|---|
| 104 | exten => s,4,GotoIf($[${agerange} = 'adult']?5:7) |
|---|
| 105 | exten => s,5,Background(${menu-dir}/chose-adult) |
|---|
| 106 | exten => s,6,Goto(s|8) |
|---|
| 107 | exten => s,7,Background(${menu-dir}/chose-senior) |
|---|
| 108 | exten => s,8,Background(${menu-dir}/1-correct-2-try-again) |
|---|
| 109 | exten => s,9,WaitExten(10) |
|---|
| 110 | exten => 1,1,Set(num-complete=0) |
|---|
| 111 | exten => 1,2,Set(num-complete-this-round=0) |
|---|
| 112 | exten => 1,3,Goto(custom-voxforge-selectscript|s|1) |
|---|
| 113 | exten => 2,1,Goto(custom-voxforge-agerange|s|1) |
|---|
| 114 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 115 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 116 | exten => i,2,Goto(s|1) |
|---|
| 117 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 118 | |
|---|
| 119 | [custom-voxforge-selectscript] |
|---|
| 120 | exten => s,1,Set(max-script-num=48) |
|---|
| 121 | exten => s,2,Gosub(sub-voxforge-get-script-num|s|1) |
|---|
| 122 | exten => s,3,Gosub(sub-voxforge-increment-script-num|s|1) |
|---|
| 123 | exten => s,4,Goto(${script-num}|1) |
|---|
| 124 | |
|---|
| 125 | exten => 1,1,Goto(custom-voxforge-vf3-1|s|1) |
|---|
| 126 | exten => 2,1,Goto(custom-voxforge-vf3-2|s|1) |
|---|
| 127 | exten => 3,1,Goto(custom-voxforge-vf3-3|s|1) |
|---|
| 128 | exten => 4,1,Goto(custom-voxforge-vf3-4|s|1) |
|---|
| 129 | exten => 5,1,Goto(custom-voxforge-vf3-5|s|1) |
|---|
| 130 | exten => 6,1,Goto(custom-voxforge-vf3-6|s|1) |
|---|
| 131 | exten => 7,1,Goto(custom-voxforge-vf3-7|s|1) |
|---|
| 132 | exten => 8,1,Goto(custom-voxforge-vf3-8|s|1) |
|---|
| 133 | |
|---|
| 134 | exten => 9,1,Goto(custom-voxforge-vf4-1|s|1) |
|---|
| 135 | exten => 10,1,Goto(custom-voxforge-vf4-2|s|1) |
|---|
| 136 | exten => 11,1,Goto(custom-voxforge-vf4-3|s|1) |
|---|
| 137 | exten => 12,1,Goto(custom-voxforge-vf4-4|s|1) |
|---|
| 138 | exten => 13,1,Goto(custom-voxforge-vf4-5|s|1) |
|---|
| 139 | exten => 14,1,Goto(custom-voxforge-vf4-6|s|1) |
|---|
| 140 | exten => 15,1,Goto(custom-voxforge-vf4-7|s|1) |
|---|
| 141 | exten => 16,1,Goto(custom-voxforge-vf4-8|s|1) |
|---|
| 142 | |
|---|
| 143 | exten => 17,1,Goto(custom-voxforge-vf5-1|s|1) |
|---|
| 144 | exten => 18,1,Goto(custom-voxforge-vf5-2|s|1) |
|---|
| 145 | exten => 19,1,Goto(custom-voxforge-vf5-3|s|1) |
|---|
| 146 | exten => 20,1,Goto(custom-voxforge-vf5-4|s|1) |
|---|
| 147 | exten => 21,1,Goto(custom-voxforge-vf5-5|s|1) |
|---|
| 148 | exten => 22,1,Goto(custom-voxforge-vf5-6|s|1) |
|---|
| 149 | exten => 23,1,Goto(custom-voxforge-vf5-7|s|1) |
|---|
| 150 | exten => 24,1,Goto(custom-voxforge-vf5-8|s|1) |
|---|
| 151 | |
|---|
| 152 | exten => 25,1,Goto(custom-voxforge-vf6-1|s|1) |
|---|
| 153 | exten => 26,1,Goto(custom-voxforge-vf6-2|s|1) |
|---|
| 154 | exten => 27,1,Goto(custom-voxforge-vf6-3|s|1) |
|---|
| 155 | exten => 28,1,Goto(custom-voxforge-vf6-4|s|1) |
|---|
| 156 | exten => 29,1,Goto(custom-voxforge-vf6-5|s|1) |
|---|
| 157 | exten => 30,1,Goto(custom-voxforge-vf6-6|s|1) |
|---|
| 158 | exten => 31,1,Goto(custom-voxforge-vf6-7|s|1) |
|---|
| 159 | exten => 32,1,Goto(custom-voxforge-vf6-8|s|1) |
|---|
| 160 | |
|---|
| 161 | exten => 33,1,Goto(custom-voxforge-vf7-1|s|1) |
|---|
| 162 | exten => 34,1,Goto(custom-voxforge-vf7-2|s|1) |
|---|
| 163 | exten => 35,1,Goto(custom-voxforge-vf7-3|s|1) |
|---|
| 164 | exten => 36,1,Goto(custom-voxforge-vf7-4|s|1) |
|---|
| 165 | exten => 37,1,Goto(custom-voxforge-vf7-5|s|1) |
|---|
| 166 | exten => 38,1,Goto(custom-voxforge-vf7-6|s|1) |
|---|
| 167 | exten => 39,1,Goto(custom-voxforge-vf7-7|s|1) |
|---|
| 168 | exten => 40,1,Goto(custom-voxforge-vf7-8|s|1) |
|---|
| 169 | |
|---|
| 170 | exten => 41,1,Goto(custom-voxforge-vf8-1|s|1) |
|---|
| 171 | exten => 42,1,Goto(custom-voxforge-vf8-2|s|1) |
|---|
| 172 | exten => 43,1,Goto(custom-voxforge-vf8-3|s|1) |
|---|
| 173 | exten => 44,1,Goto(custom-voxforge-vf8-4|s|1) |
|---|
| 174 | exten => 45,1,Goto(custom-voxforge-vf8-5|s|1) |
|---|
| 175 | exten => 46,1,Goto(custom-voxforge-vf8-6|s|1) |
|---|
| 176 | exten => 47,1,Goto(custom-voxforge-vf8-7|s|1) |
|---|
| 177 | exten => 48,1,Goto(custom-voxforge-vf8-8|s|1) |
|---|
| 178 | |
|---|
| 179 | exten => i,1,Goto(s|1) |
|---|
| 180 | |
|---|
| 181 | |
|---|
| 182 | [custom-voxforge-vf3-1] |
|---|
| 183 | include => custom-voxforge-phoneme-explain |
|---|
| 184 | exten => 50,1,Macro(voxforge-hrecord,'vf3-01') |
|---|
| 185 | exten => 50,2,Macro(voxforge-hrecord,'vf3-02') |
|---|
| 186 | exten => 50,3,Macro(voxforge-hrecord,'vf3-03') |
|---|
| 187 | exten => 50,4,Macro(voxforge-hrecord,'vf3-04') |
|---|
| 188 | exten => 50,5,Macro(voxforge-hrecord,'vf3-05') |
|---|
| 189 | |
|---|
| 190 | [custom-voxforge-vf3-2] |
|---|
| 191 | include => custom-voxforge-phoneme-explain |
|---|
| 192 | exten => 50,1,Macro(voxforge-hrecord,'vf3-06') |
|---|
| 193 | exten => 50,2,Macro(voxforge-hrecord,'vf3-07') |
|---|
| 194 | exten => 50,3,Macro(voxforge-hrecord,'vf3-08') |
|---|
| 195 | exten => 50,4,Macro(voxforge-hrecord,'vf3-09') |
|---|
| 196 | exten => 50,5,Macro(voxforge-hrecord,'vf3-10') |
|---|
| 197 | |
|---|
| 198 | [custom-voxforge-vf3-3] |
|---|
| 199 | include => custom-voxforge-phoneme-explain |
|---|
| 200 | exten => 50,1,Macro(voxforge-hrecord,'vf3-11') |
|---|
| 201 | exten => 50,2,Macro(voxforge-hrecord,'vf3-12') |
|---|
| 202 | exten => 50,3,Macro(voxforge-hrecord,'vf3-13') |
|---|
| 203 | exten => 50,4,Macro(voxforge-hrecord,'vf3-14') |
|---|
| 204 | exten => 50,5,Macro(voxforge-hrecord,'vf3-15') |
|---|
| 205 | |
|---|
| 206 | [custom-voxforge-vf3-4] |
|---|
| 207 | include => custom-voxforge-phoneme-explain |
|---|
| 208 | exten => 50,1,Macro(voxforge-hrecord,'vf3-16') |
|---|
| 209 | exten => 50,2,Macro(voxforge-hrecord,'vf3-17') |
|---|
| 210 | exten => 50,3,Macro(voxforge-hrecord,'vf3-18') |
|---|
| 211 | exten => 50,4,Macro(voxforge-hrecord,'vf3-19') |
|---|
| 212 | exten => 50,5,Macro(voxforge-hrecord,'vf3-20') |
|---|
| 213 | |
|---|
| 214 | [custom-voxforge-vf3-5] |
|---|
| 215 | include => custom-voxforge-phoneme-explain |
|---|
| 216 | exten => 50,1,Macro(voxforge-hrecord,'vf3-21') |
|---|
| 217 | exten => 50,2,Macro(voxforge-hrecord,'vf3-22') |
|---|
| 218 | exten => 50,3,Macro(voxforge-hrecord,'vf3-23') |
|---|
| 219 | exten => 50,4,Macro(voxforge-hrecord,'vf3-24') |
|---|
| 220 | exten => 50,5,Macro(voxforge-hrecord,'vf3-25') |
|---|
| 221 | |
|---|
| 222 | [custom-voxforge-vf3-6] |
|---|
| 223 | include => custom-voxforge-phoneme-explain |
|---|
| 224 | exten => 50,1,Macro(voxforge-hrecord,'vf3-26') |
|---|
| 225 | exten => 50,2,Macro(voxforge-hrecord,'vf3-27') |
|---|
| 226 | exten => 50,3,Macro(voxforge-hrecord,'vf3-28') |
|---|
| 227 | exten => 50,4,Macro(voxforge-hrecord,'vf3-29') |
|---|
| 228 | exten => 50,5,Macro(voxforge-hrecord,'vf3-30') |
|---|
| 229 | |
|---|
| 230 | [custom-voxforge-vf3-7] |
|---|
| 231 | include => custom-voxforge-phoneme-explain |
|---|
| 232 | exten => 50,1,Macro(voxforge-hrecord,'vf3-31') |
|---|
| 233 | exten => 50,2,Macro(voxforge-hrecord,'vf3-32') |
|---|
| 234 | exten => 50,3,Macro(voxforge-hrecord,'vf3-33') |
|---|
| 235 | exten => 50,4,Macro(voxforge-hrecord,'vf3-34') |
|---|
| 236 | exten => 50,5,Macro(voxforge-hrecord,'vf3-35') |
|---|
| 237 | |
|---|
| 238 | [custom-voxforge-vf3-8] |
|---|
| 239 | include => custom-voxforge-phoneme-explain |
|---|
| 240 | exten => 50,1,Macro(voxforge-hrecord,'vf3-36') |
|---|
| 241 | exten => 50,2,Macro(voxforge-hrecord,'vf3-37') |
|---|
| 242 | exten => 50,3,Macro(voxforge-hrecord,'vf3-38') |
|---|
| 243 | exten => 50,4,Macro(voxforge-hrecord,'vf3-39') |
|---|
| 244 | exten => 50,5,Macro(voxforge-hrecord,'vf3-40') |
|---|
| 245 | |
|---|
| 246 | |
|---|
| 247 | [custom-voxforge-vf4-1] |
|---|
| 248 | include => custom-voxforge-phoneme-explain |
|---|
| 249 | exten => 50,1,Macro(voxforge-hrecord,'vf4-01') |
|---|
| 250 | exten => 50,2,Macro(voxforge-hrecord,'vf4-02') |
|---|
| 251 | exten => 50,3,Macro(voxforge-hrecord,'vf4-03') |
|---|
| 252 | exten => 50,4,Macro(voxforge-hrecord,'vf4-04') |
|---|
| 253 | exten => 50,5,Macro(voxforge-hrecord,'vf4-05') |
|---|
| 254 | |
|---|
| 255 | [custom-voxforge-vf4-2] |
|---|
| 256 | include => custom-voxforge-phoneme-explain |
|---|
| 257 | exten => 50,1,Macro(voxforge-hrecord,'vf4-06') |
|---|
| 258 | exten => 50,2,Macro(voxforge-hrecord,'vf4-07') |
|---|
| 259 | exten => 50,3,Macro(voxforge-hrecord,'vf4-08') |
|---|
| 260 | exten => 50,4,Macro(voxforge-hrecord,'vf4-09') |
|---|
| 261 | exten => 50,5,Macro(voxforge-hrecord,'vf4-10') |
|---|
| 262 | |
|---|
| 263 | [custom-voxforge-vf4-3] |
|---|
| 264 | include => custom-voxforge-phoneme-explain |
|---|
| 265 | exten => 50,1,Macro(voxforge-hrecord,'vf4-11') |
|---|
| 266 | exten => 50,2,Macro(voxforge-hrecord,'vf4-12') |
|---|
| 267 | exten => 50,3,Macro(voxforge-hrecord,'vf4-13') |
|---|
| 268 | exten => 50,4,Macro(voxforge-hrecord,'vf4-14') |
|---|
| 269 | exten => 50,5,Macro(voxforge-hrecord,'vf4-15') |
|---|
| 270 | |
|---|
| 271 | [custom-voxforge-vf4-4] |
|---|
| 272 | include => custom-voxforge-phoneme-explain |
|---|
| 273 | exten => 50,1,Macro(voxforge-hrecord,'vf4-16') |
|---|
| 274 | exten => 50,2,Macro(voxforge-hrecord,'vf4-17') |
|---|
| 275 | exten => 50,3,Macro(voxforge-hrecord,'vf4-18') |
|---|
| 276 | exten => 50,4,Macro(voxforge-hrecord,'vf4-19') |
|---|
| 277 | exten => 50,5,Macro(voxforge-hrecord,'vf4-20') |
|---|
| 278 | |
|---|
| 279 | [custom-voxforge-vf4-5] |
|---|
| 280 | include => custom-voxforge-phoneme-explain |
|---|
| 281 | exten => 50,1,Macro(voxforge-hrecord,'vf4-21') |
|---|
| 282 | exten => 50,2,Macro(voxforge-hrecord,'vf4-22') |
|---|
| 283 | exten => 50,3,Macro(voxforge-hrecord,'vf4-23') |
|---|
| 284 | exten => 50,4,Macro(voxforge-hrecord,'vf4-24') |
|---|
| 285 | exten => 50,5,Macro(voxforge-hrecord,'vf4-25') |
|---|
| 286 | |
|---|
| 287 | [custom-voxforge-vf4-6] |
|---|
| 288 | include => custom-voxforge-phoneme-explain |
|---|
| 289 | exten => 50,1,Macro(voxforge-hrecord,'vf4-26') |
|---|
| 290 | exten => 50,2,Macro(voxforge-hrecord,'vf4-27') |
|---|
| 291 | exten => 50,3,Macro(voxforge-hrecord,'vf4-28') |
|---|
| 292 | exten => 50,4,Macro(voxforge-hrecord,'vf4-29') |
|---|
| 293 | exten => 50,5,Macro(voxforge-hrecord,'vf4-30') |
|---|
| 294 | |
|---|
| 295 | [custom-voxforge-vf4-7] |
|---|
| 296 | include => custom-voxforge-phoneme-explain |
|---|
| 297 | exten => 50,1,Macro(voxforge-hrecord,'vf4-31') |
|---|
| 298 | exten => 50,2,Macro(voxforge-hrecord,'vf4-32') |
|---|
| 299 | exten => 50,3,Macro(voxforge-hrecord,'vf4-33') |
|---|
| 300 | exten => 50,4,Macro(voxforge-hrecord,'vf4-34') |
|---|
| 301 | exten => 50,5,Macro(voxforge-hrecord,'vf4-35') |
|---|
| 302 | |
|---|
| 303 | [custom-voxforge-vf4-8] |
|---|
| 304 | include => custom-voxforge-phoneme-explain |
|---|
| 305 | exten => 50,1,Macro(voxforge-hrecord,'vf4-36') |
|---|
| 306 | exten => 50,2,Macro(voxforge-hrecord,'vf4-37') |
|---|
| 307 | exten => 50,3,Macro(voxforge-hrecord,'vf4-38') |
|---|
| 308 | exten => 50,4,Macro(voxforge-hrecord,'vf4-39') |
|---|
| 309 | exten => 50,5,Macro(voxforge-hrecord,'vf4-40') |
|---|
| 310 | |
|---|
| 311 | |
|---|
| 312 | [custom-voxforge-vf5-1] |
|---|
| 313 | include => custom-voxforge-phoneme-explain |
|---|
| 314 | exten => 50,1,Macro(voxforge-hrecord,'vf5-01') |
|---|
| 315 | exten => 50,2,Macro(voxforge-hrecord,'vf5-02') |
|---|
| 316 | exten => 50,3,Macro(voxforge-hrecord,'vf5-03') |
|---|
| 317 | exten => 50,4,Macro(voxforge-hrecord,'vf5-04') |
|---|
| 318 | exten => 50,5,Macro(voxforge-hrecord,'vf5-05') |
|---|
| 319 | |
|---|
| 320 | [custom-voxforge-vf5-2] |
|---|
| 321 | include => custom-voxforge-phoneme-explain |
|---|
| 322 | exten => 50,1,Macro(voxforge-hrecord,'vf5-06') |
|---|
| 323 | exten => 50,2,Macro(voxforge-hrecord,'vf5-07') |
|---|
| 324 | exten => 50,3,Macro(voxforge-hrecord,'vf5-08') |
|---|
| 325 | exten => 50,4,Macro(voxforge-hrecord,'vf5-09') |
|---|
| 326 | exten => 50,5,Macro(voxforge-hrecord,'vf5-10') |
|---|
| 327 | |
|---|
| 328 | [custom-voxforge-vf5-3] |
|---|
| 329 | include => custom-voxforge-phoneme-explain |
|---|
| 330 | exten => 50,1,Macro(voxforge-hrecord,'vf5-11') |
|---|
| 331 | exten => 50,2,Macro(voxforge-hrecord,'vf5-12') |
|---|
| 332 | exten => 50,3,Macro(voxforge-hrecord,'vf5-13') |
|---|
| 333 | exten => 50,4,Macro(voxforge-hrecord,'vf5-14') |
|---|
| 334 | exten => 50,5,Macro(voxforge-hrecord,'vf5-15') |
|---|
| 335 | |
|---|
| 336 | [custom-voxforge-vf5-4] |
|---|
| 337 | include => custom-voxforge-phoneme-explain |
|---|
| 338 | exten => 50,1,Macro(voxforge-hrecord,'vf5-16') |
|---|
| 339 | exten => 50,2,Macro(voxforge-hrecord,'vf5-17') |
|---|
| 340 | exten => 50,3,Macro(voxforge-hrecord,'vf5-18') |
|---|
| 341 | exten => 50,4,Macro(voxforge-hrecord,'vf5-19') |
|---|
| 342 | exten => 50,5,Macro(voxforge-hrecord,'vf5-20') |
|---|
| 343 | |
|---|
| 344 | [custom-voxforge-vf5-5] |
|---|
| 345 | include => custom-voxforge-phoneme-explain |
|---|
| 346 | exten => 50,1,Macro(voxforge-hrecord,'vf5-21') |
|---|
| 347 | exten => 50,2,Macro(voxforge-hrecord,'vf5-22') |
|---|
| 348 | exten => 50,3,Macro(voxforge-hrecord,'vf5-23') |
|---|
| 349 | exten => 50,4,Macro(voxforge-hrecord,'vf5-24') |
|---|
| 350 | exten => 50,5,Macro(voxforge-hrecord,'vf5-25') |
|---|
| 351 | |
|---|
| 352 | [custom-voxforge-vf5-6] |
|---|
| 353 | include => custom-voxforge-phoneme-explain |
|---|
| 354 | exten => 50,1,Macro(voxforge-hrecord,'vf5-26') |
|---|
| 355 | exten => 50,2,Macro(voxforge-hrecord,'vf5-27') |
|---|
| 356 | exten => 50,3,Macro(voxforge-hrecord,'vf5-28') |
|---|
| 357 | exten => 50,4,Macro(voxforge-hrecord,'vf5-29') |
|---|
| 358 | exten => 50,5,Macro(voxforge-hrecord,'vf5-30') |
|---|
| 359 | |
|---|
| 360 | [custom-voxforge-vf5-7] |
|---|
| 361 | include => custom-voxforge-phoneme-explain |
|---|
| 362 | exten => 50,1,Macro(voxforge-hrecord,'vf5-31') |
|---|
| 363 | exten => 50,2,Macro(voxforge-hrecord,'vf5-32') |
|---|
| 364 | exten => 50,3,Macro(voxforge-hrecord,'vf5-33') |
|---|
| 365 | exten => 50,4,Macro(voxforge-hrecord,'vf5-34') |
|---|
| 366 | exten => 50,5,Macro(voxforge-hrecord,'vf5-35') |
|---|
| 367 | |
|---|
| 368 | [custom-voxforge-vf5-8] |
|---|
| 369 | include => custom-voxforge-phoneme-explain |
|---|
| 370 | exten => 50,1,Macro(voxforge-hrecord,'vf5-36') |
|---|
| 371 | exten => 50,2,Macro(voxforge-hrecord,'vf5-37') |
|---|
| 372 | exten => 50,3,Macro(voxforge-hrecord,'vf5-38') |
|---|
| 373 | exten => 50,4,Macro(voxforge-hrecord,'vf5-39') |
|---|
| 374 | exten => 50,5,Macro(voxforge-hrecord,'vf5-40') |
|---|
| 375 | |
|---|
| 376 | |
|---|
| 377 | [custom-voxforge-vf6-1] |
|---|
| 378 | include => custom-voxforge-phoneme-explain |
|---|
| 379 | exten => 50,1,Macro(voxforge-hrecord,'vf6-01') |
|---|
| 380 | exten => 50,2,Macro(voxforge-hrecord,'vf6-02') |
|---|
| 381 | exten => 50,3,Macro(voxforge-hrecord,'vf6-03') |
|---|
| 382 | exten => 50,4,Macro(voxforge-hrecord,'vf6-04') |
|---|
| 383 | exten => 50,5,Macro(voxforge-hrecord,'vf6-05') |
|---|
| 384 | |
|---|
| 385 | [custom-voxforge-vf6-2] |
|---|
| 386 | include => custom-voxforge-phoneme-explain |
|---|
| 387 | exten => 50,1,Macro(voxforge-hrecord,'vf6-06') |
|---|
| 388 | exten => 50,2,Macro(voxforge-hrecord,'vf6-07') |
|---|
| 389 | exten => 50,3,Macro(voxforge-hrecord,'vf6-08') |
|---|
| 390 | exten => 50,4,Macro(voxforge-hrecord,'vf6-09') |
|---|
| 391 | exten => 50,5,Macro(voxforge-hrecord,'vf6-10') |
|---|
| 392 | |
|---|
| 393 | [custom-voxforge-vf6-3] |
|---|
| 394 | include => custom-voxforge-phoneme-explain |
|---|
| 395 | exten => 50,1,Macro(voxforge-hrecord,'vf6-11') |
|---|
| 396 | exten => 50,2,Macro(voxforge-hrecord,'vf6-12') |
|---|
| 397 | exten => 50,3,Macro(voxforge-hrecord,'vf6-13') |
|---|
| 398 | exten => 50,4,Macro(voxforge-hrecord,'vf6-14') |
|---|
| 399 | exten => 50,5,Macro(voxforge-hrecord,'vf6-15') |
|---|
| 400 | |
|---|
| 401 | [custom-voxforge-vf6-4] |
|---|
| 402 | include => custom-voxforge-phoneme-explain |
|---|
| 403 | exten => 50,1,Macro(voxforge-hrecord,'vf6-16') |
|---|
| 404 | exten => 50,2,Macro(voxforge-hrecord,'vf6-17') |
|---|
| 405 | exten => 50,3,Macro(voxforge-hrecord,'vf6-18') |
|---|
| 406 | exten => 50,4,Macro(voxforge-hrecord,'vf6-19') |
|---|
| 407 | exten => 50,5,Macro(voxforge-hrecord,'vf6-20') |
|---|
| 408 | |
|---|
| 409 | [custom-voxforge-vf6-5] |
|---|
| 410 | include => custom-voxforge-phoneme-explain |
|---|
| 411 | exten => 50,1,Macro(voxforge-hrecord,'vf6-21') |
|---|
| 412 | exten => 50,2,Macro(voxforge-hrecord,'vf6-22') |
|---|
| 413 | exten => 50,3,Macro(voxforge-hrecord,'vf6-23') |
|---|
| 414 | exten => 50,4,Macro(voxforge-hrecord,'vf6-24') |
|---|
| 415 | exten => 50,5,Macro(voxforge-hrecord,'vf6-25') |
|---|
| 416 | |
|---|
| 417 | [custom-voxforge-vf6-6] |
|---|
| 418 | include => custom-voxforge-phoneme-explain |
|---|
| 419 | exten => 50,1,Macro(voxforge-hrecord,'vf6-26') |
|---|
| 420 | exten => 50,2,Macro(voxforge-hrecord,'vf6-27') |
|---|
| 421 | exten => 50,3,Macro(voxforge-hrecord,'vf6-28') |
|---|
| 422 | exten => 50,4,Macro(voxforge-hrecord,'vf6-29') |
|---|
| 423 | exten => 50,5,Macro(voxforge-hrecord,'vf6-30') |
|---|
| 424 | |
|---|
| 425 | [custom-voxforge-vf6-7] |
|---|
| 426 | include => custom-voxforge-phoneme-explain |
|---|
| 427 | exten => 50,1,Macro(voxforge-hrecord,'vf6-31') |
|---|
| 428 | exten => 50,2,Macro(voxforge-hrecord,'vf6-32') |
|---|
| 429 | exten => 50,3,Macro(voxforge-hrecord,'vf6-33') |
|---|
| 430 | exten => 50,4,Macro(voxforge-hrecord,'vf6-34') |
|---|
| 431 | exten => 50,5,Macro(voxforge-hrecord,'vf6-35') |
|---|
| 432 | |
|---|
| 433 | [custom-voxforge-vf6-8] |
|---|
| 434 | include => custom-voxforge-phoneme-explain |
|---|
| 435 | exten => 50,1,Macro(voxforge-hrecord,'vf6-36') |
|---|
| 436 | exten => 50,2,Macro(voxforge-hrecord,'vf6-37') |
|---|
| 437 | exten => 50,3,Macro(voxforge-hrecord,'vf6-38') |
|---|
| 438 | exten => 50,4,Macro(voxforge-hrecord,'vf6-39') |
|---|
| 439 | exten => 50,5,Macro(voxforge-hrecord,'vf6-40') |
|---|
| 440 | |
|---|
| 441 | |
|---|
| 442 | [custom-voxforge-vf7-1] |
|---|
| 443 | include => custom-voxforge-phoneme-explain |
|---|
| 444 | exten => 50,1,Macro(voxforge-hrecord,'vf7-01') |
|---|
| 445 | exten => 50,2,Macro(voxforge-hrecord,'vf7-02') |
|---|
| 446 | exten => 50,3,Macro(voxforge-hrecord,'vf7-03') |
|---|
| 447 | exten => 50,4,Macro(voxforge-hrecord,'vf7-04') |
|---|
| 448 | exten => 50,5,Macro(voxforge-hrecord,'vf7-05') |
|---|
| 449 | |
|---|
| 450 | [custom-voxforge-vf7-2] |
|---|
| 451 | include => custom-voxforge-phoneme-explain |
|---|
| 452 | exten => 50,1,Macro(voxforge-hrecord,'vf7-06') |
|---|
| 453 | exten => 50,2,Macro(voxforge-hrecord,'vf7-07') |
|---|
| 454 | exten => 50,3,Macro(voxforge-hrecord,'vf7-08') |
|---|
| 455 | exten => 50,4,Macro(voxforge-hrecord,'vf7-09') |
|---|
| 456 | exten => 50,5,Macro(voxforge-hrecord,'vf7-10') |
|---|
| 457 | |
|---|
| 458 | [custom-voxforge-vf7-3] |
|---|
| 459 | include => custom-voxforge-phoneme-explain |
|---|
| 460 | exten => 50,1,Macro(voxforge-hrecord,'vf7-11') |
|---|
| 461 | exten => 50,2,Macro(voxforge-hrecord,'vf7-12') |
|---|
| 462 | exten => 50,3,Macro(voxforge-hrecord,'vf7-13') |
|---|
| 463 | exten => 50,4,Macro(voxforge-hrecord,'vf7-14') |
|---|
| 464 | exten => 50,5,Macro(voxforge-hrecord,'vf7-15') |
|---|
| 465 | |
|---|
| 466 | [custom-voxforge-vf7-4] |
|---|
| 467 | include => custom-voxforge-phoneme-explain |
|---|
| 468 | exten => 50,1,Macro(voxforge-hrecord,'vf7-16') |
|---|
| 469 | exten => 50,2,Macro(voxforge-hrecord,'vf7-17') |
|---|
| 470 | exten => 50,3,Macro(voxforge-hrecord,'vf7-18') |
|---|
| 471 | exten => 50,4,Macro(voxforge-hrecord,'vf7-19') |
|---|
| 472 | exten => 50,5,Macro(voxforge-hrecord,'vf7-20') |
|---|
| 473 | |
|---|
| 474 | [custom-voxforge-vf7-5] |
|---|
| 475 | include => custom-voxforge-phoneme-explain |
|---|
| 476 | exten => 50,1,Macro(voxforge-hrecord,'vf7-21') |
|---|
| 477 | exten => 50,2,Macro(voxforge-hrecord,'vf7-22') |
|---|
| 478 | exten => 50,3,Macro(voxforge-hrecord,'vf7-23') |
|---|
| 479 | exten => 50,4,Macro(voxforge-hrecord,'vf7-24') |
|---|
| 480 | exten => 50,5,Macro(voxforge-hrecord,'vf7-25') |
|---|
| 481 | |
|---|
| 482 | [custom-voxforge-vf7-6] |
|---|
| 483 | include => custom-voxforge-phoneme-explain |
|---|
| 484 | exten => 50,1,Macro(voxforge-hrecord,'vf7-26') |
|---|
| 485 | exten => 50,2,Macro(voxforge-hrecord,'vf7-27') |
|---|
| 486 | exten => 50,3,Macro(voxforge-hrecord,'vf7-28') |
|---|
| 487 | exten => 50,4,Macro(voxforge-hrecord,'vf7-29') |
|---|
| 488 | exten => 50,5,Macro(voxforge-hrecord,'vf7-30') |
|---|
| 489 | |
|---|
| 490 | [custom-voxforge-vf7-7] |
|---|
| 491 | include => custom-voxforge-phoneme-explain |
|---|
| 492 | exten => 50,1,Macro(voxforge-hrecord,'vf7-31') |
|---|
| 493 | exten => 50,2,Macro(voxforge-hrecord,'vf7-32') |
|---|
| 494 | exten => 50,3,Macro(voxforge-hrecord,'vf7-33') |
|---|
| 495 | exten => 50,4,Macro(voxforge-hrecord,'vf7-34') |
|---|
| 496 | exten => 50,5,Macro(voxforge-hrecord,'vf7-35') |
|---|
| 497 | |
|---|
| 498 | [custom-voxforge-vf7-8] |
|---|
| 499 | include => custom-voxforge-phoneme-explain |
|---|
| 500 | exten => 50,1,Macro(voxforge-hrecord,'vf7-36') |
|---|
| 501 | exten => 50,2,Macro(voxforge-hrecord,'vf7-37') |
|---|
| 502 | exten => 50,3,Macro(voxforge-hrecord,'vf7-38') |
|---|
| 503 | exten => 50,4,Macro(voxforge-hrecord,'vf7-39') |
|---|
| 504 | exten => 50,5,Macro(voxforge-hrecord,'vf7-40') |
|---|
| 505 | |
|---|
| 506 | |
|---|
| 507 | [custom-voxforge-vf8-1] |
|---|
| 508 | include => custom-voxforge-phoneme-explain |
|---|
| 509 | exten => 50,1,Macro(voxforge-hrecord,'vf8-01') |
|---|
| 510 | exten => 50,2,Macro(voxforge-hrecord,'vf8-02') |
|---|
| 511 | exten => 50,3,Macro(voxforge-hrecord,'vf8-03') |
|---|
| 512 | exten => 50,4,Macro(voxforge-hrecord,'vf8-04') |
|---|
| 513 | exten => 50,5,Macro(voxforge-hrecord,'vf8-05') |
|---|
| 514 | |
|---|
| 515 | [custom-voxforge-vf8-2] |
|---|
| 516 | include => custom-voxforge-phoneme-explain |
|---|
| 517 | exten => 50,1,Macro(voxforge-hrecord,'vf8-06') |
|---|
| 518 | exten => 50,2,Macro(voxforge-hrecord,'vf8-07') |
|---|
| 519 | exten => 50,3,Macro(voxforge-hrecord,'vf8-08') |
|---|
| 520 | exten => 50,4,Macro(voxforge-hrecord,'vf8-09') |
|---|
| 521 | exten => 50,5,Macro(voxforge-hrecord,'vf8-10') |
|---|
| 522 | |
|---|
| 523 | [custom-voxforge-vf8-3] |
|---|
| 524 | include => custom-voxforge-phoneme-explain |
|---|
| 525 | exten => 50,1,Macro(voxforge-hrecord,'vf8-11') |
|---|
| 526 | exten => 50,2,Macro(voxforge-hrecord,'vf8-12') |
|---|
| 527 | exten => 50,3,Macro(voxforge-hrecord,'vf8-13') |
|---|
| 528 | exten => 50,4,Macro(voxforge-hrecord,'vf8-14') |
|---|
| 529 | exten => 50,5,Macro(voxforge-hrecord,'vf8-15') |
|---|
| 530 | |
|---|
| 531 | [custom-voxforge-vf8-4] |
|---|
| 532 | include => custom-voxforge-phoneme-explain |
|---|
| 533 | exten => 50,1,Macro(voxforge-hrecord,'vf8-16') |
|---|
| 534 | exten => 50,2,Macro(voxforge-hrecord,'vf8-17') |
|---|
| 535 | exten => 50,3,Macro(voxforge-hrecord,'vf8-18') |
|---|
| 536 | exten => 50,4,Macro(voxforge-hrecord,'vf8-19') |
|---|
| 537 | exten => 50,5,Macro(voxforge-hrecord,'vf8-20') |
|---|
| 538 | |
|---|
| 539 | [custom-voxforge-vf8-5] |
|---|
| 540 | include => custom-voxforge-phoneme-explain |
|---|
| 541 | exten => 50,1,Macro(voxforge-hrecord,'vf8-21') |
|---|
| 542 | exten => 50,2,Macro(voxforge-hrecord,'vf8-22') |
|---|
| 543 | exten => 50,3,Macro(voxforge-hrecord,'vf8-23') |
|---|
| 544 | exten => 50,4,Macro(voxforge-hrecord,'vf8-24') |
|---|
| 545 | exten => 50,5,Macro(voxforge-hrecord,'vf8-25') |
|---|
| 546 | |
|---|
| 547 | [custom-voxforge-vf8-6] |
|---|
| 548 | include => custom-voxforge-phoneme-explain |
|---|
| 549 | exten => 50,1,Macro(voxforge-hrecord,'vf8-26') |
|---|
| 550 | exten => 50,2,Macro(voxforge-hrecord,'vf8-27') |
|---|
| 551 | exten => 50,3,Macro(voxforge-hrecord,'vf8-28') |
|---|
| 552 | exten => 50,4,Macro(voxforge-hrecord,'vf8-29') |
|---|
| 553 | exten => 50,5,Macro(voxforge-hrecord,'vf8-30') |
|---|
| 554 | |
|---|
| 555 | [custom-voxforge-vf8-7] |
|---|
| 556 | include => custom-voxforge-phoneme-explain |
|---|
| 557 | exten => 50,1,Macro(voxforge-hrecord,'vf8-31') |
|---|
| 558 | exten => 50,2,Macro(voxforge-hrecord,'vf8-32') |
|---|
| 559 | exten => 50,3,Macro(voxforge-hrecord,'vf8-33') |
|---|
| 560 | exten => 50,4,Macro(voxforge-hrecord,'vf8-34') |
|---|
| 561 | exten => 50,5,Macro(voxforge-hrecord,'vf8-35') |
|---|
| 562 | |
|---|
| 563 | [custom-voxforge-vf8-8] |
|---|
| 564 | include => custom-voxforge-phoneme-explain |
|---|
| 565 | exten => 50,1,Macro(voxforge-hrecord,'vf8-36') |
|---|
| 566 | exten => 50,2,Macro(voxforge-hrecord,'vf8-37') |
|---|
| 567 | exten => 50,3,Macro(voxforge-hrecord,'vf8-38') |
|---|
| 568 | exten => 50,4,Macro(voxforge-hrecord,'vf8-39') |
|---|
| 569 | exten => 50,5,Macro(voxforge-hrecord,'vf8-40') |
|---|
| 570 | |
|---|
| 571 | |
|---|
| 572 | [custom-voxforge-phoneme-explain] |
|---|
| 573 | ; note: I misspelled 'read' as 'reed' on purpose because flite was mispronouncing it. |
|---|
| 574 | exten => s,1,Setvar(last-prompt-priority=nan) |
|---|
| 575 | exten => s,2,GotoIf($[${num-complete} > 0]?1,1) |
|---|
| 576 | exten => s,3,Gosub(sub-voxforge-init|s|1) |
|---|
| 577 | exten => s,4,Gosub(sub-voxforge-instructions|s|1) |
|---|
| 578 | ;exten => s,5,Flite('Now, press 1 if you are ready to hear a phrase. Or press 2 to hear these instructions again.'|12) |
|---|
| 579 | exten => s,5,Background(${menu-dir}/1-hear-phrase-2-instructions-again) |
|---|
| 580 | exten => s,6,WaitExten(10) |
|---|
| 581 | exten => 1,1,GotoIf($["${last-prompt-priority}" = "nan"]?20) |
|---|
| 582 | exten => 1,2,System(rm ${RECORDED_FILE}.wav) |
|---|
| 583 | exten => 1,3,Goto(50|${last-prompt-priority}) |
|---|
| 584 | exten => 1,20,Set(ran-instructions=1) |
|---|
| 585 | exten => 1,21,Goto(50|1) |
|---|
| 586 | exten => 2,1,GotoIf($["${last-prompt-priority}" = "nan"]?20) |
|---|
| 587 | exten => 2,2,Gosub(sub-voxforge-get-next|s|1) |
|---|
| 588 | exten => 2,20,Goto(s|1) |
|---|
| 589 | exten => 3,1,GotoIf($["${last-prompt-priority}" = "nan"]?20) |
|---|
| 590 | exten => 3,2,Gosub(sub-voxforge-hrecord-compare|s|1) |
|---|
| 591 | exten => 3,20,Goto(2|1) |
|---|
| 592 | ;exten => 4,1,Flite('OK, skipping this prompt and try ing the next one...') |
|---|
| 593 | exten => 4,1,Background(${menu-dir}/skip) |
|---|
| 594 | exten => 4,2,System(rm ${RECORDED_FILE}.wav) |
|---|
| 595 | exten => 4,3,Gosub(sub-voxforge-do-next|s|1) |
|---|
| 596 | ;exten => 10,1,Flite('Do they sound the same? Is your reecording free of laugh ing.... Cough ing.... Stutter ing.... Mispronunciations.... And background noise? Press 1 to try again. Press 2 to continue. Press 3 to hear your reecording again. Press 4 if the prompt is unclear and you would like to try a different reecording.'|1234) |
|---|
| 597 | exten => 10,1,Background(${menu-dir}/post-record) |
|---|
| 598 | exten => 10,2,WaitExten(10) |
|---|
| 599 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 600 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 601 | exten => i,2,GotoIf($["${last-prompt-priority}" = "nan"]?20) |
|---|
| 602 | exten => i,3,Goto(10|1) |
|---|
| 603 | exten => i,20,Goto(s|1) |
|---|
| 604 | exten => h,1,Gosub(sub-voxforge-unexpected-hangup-cleanup|s|1) |
|---|
| 605 | |
|---|
| 606 | [macro-voxforge-hrecord] |
|---|
| 607 | exten => s,1,Setvar(last-prompt-context=${MACRO_CONTEXT}) |
|---|
| 608 | exten => s,2,Setvar(last-prompt-priority=${MACRO_PRIORITY}) |
|---|
| 609 | exten => s,3,Setvar(last-prompt-name=${ARG1}) |
|---|
| 610 | ;exten => s,4,Flite('Here is sentence number $[${num-complete-this-round} + 1] out of 5:") |
|---|
| 611 | exten => s,4,Playback(${menu-dir}/sentence-number) |
|---|
| 612 | exten => s,5,SayNumber($[${num-complete-this-round} + 1],m) |
|---|
| 613 | exten => s,6,Playback(${menu-dir}/out-of) |
|---|
| 614 | exten => s,7,SayNumber(5,m) |
|---|
| 615 | exten => s,8,Playback(${prompts-dir}/audio/${last-prompt-name}) |
|---|
| 616 | exten => s,9,Record(/tmp/voxforge-%d:wav|0|20|) |
|---|
| 617 | ;exten => s,7,Flite('OK, I will play the original phrase. Then the phrase you just recorded:'|1) |
|---|
| 618 | exten => s,10,Playback(${menu-dir}/compare) |
|---|
| 619 | exten => s,11,Gosub(sub-voxforge-hrecord-compare|s|1) |
|---|
| 620 | exten => h,1,Gosub(sub-voxforge-unexpected-hangup-cleanup|s|1) |
|---|
| 621 | |
|---|
| 622 | [sub-voxforge-hrecord-compare] |
|---|
| 623 | exten => s,1,Playback(${prompts-dir}/audio/${last-prompt-name}) |
|---|
| 624 | exten => s,2,Playback(${RECORDED_FILE}) |
|---|
| 625 | exten => s,3,Goto(${last-prompt-context},10,1) |
|---|
| 626 | exten => h,1,Gosub(sub-voxforge-unexpected-hangup-cleanup|s|1) |
|---|
| 627 | |
|---|
| 628 | [sub-voxforge-channel-limit] |
|---|
| 629 | exten => s,1,GotoIf(${DB_EXISTS(voxforge/channel-limit)}?3) |
|---|
| 630 | exten => s,2,Return() |
|---|
| 631 | exten => s,3,GotoIf(${DB_EXISTS(voxforge/num-active-channels)}?5) |
|---|
| 632 | exten => s,4,Set(DB(voxforge/num-active-channels)=0) |
|---|
| 633 | exten => s,5,GotoIf($[${DB(voxforge/num-active-channels)} + 1 > ${DB(voxforge/channel-limit)}]?8) |
|---|
| 634 | exten => s,6,Set(DB(voxforge/num-active-channels)=$[${DB(voxforge/num-active-channels)} + 1]) |
|---|
| 635 | exten => s,7,Return() |
|---|
| 636 | ;exten => s,8,Flite("All lines are currently busy... Please try again later...") |
|---|
| 637 | exten => s,8,Playback(${menu-dir}/all-lines-currently-busy) |
|---|
| 638 | exten => s,9,Playback(vm-goodbye) |
|---|
| 639 | exten => s,10,Hangup() |
|---|
| 640 | |
|---|
| 641 | [sub-voxforge-decrement-num-active-channels] |
|---|
| 642 | exten => s,1,GotoIf($[${DB(voxforge/num-active-channels)} - 1 < 0]?4) |
|---|
| 643 | exten => s,2,Set(DB(voxforge/num-active-channels)=$[${DB(voxforge/num-active-channels)} - 1]) |
|---|
| 644 | exten => s,3,Return() |
|---|
| 645 | exten => s,4,Noop(----- Had to zero voxforge/num-active-channels! Must be a bug! -----) |
|---|
| 646 | exten => s,5,Set(DB(voxforge/num-active-channels)=0) |
|---|
| 647 | exten => s,6,Return() |
|---|
| 648 | |
|---|
| 649 | [sub-voxforge-get-script-num] |
|---|
| 650 | exten => s,1,GotoIf(${DB_EXISTS(voxforge/script-num)}?4) |
|---|
| 651 | exten => s,2,Set(script-num=9) |
|---|
| 652 | exten => s,3,Return() |
|---|
| 653 | exten => s,4,Set(script-num=${DB(voxforge/script-num)}) |
|---|
| 654 | exten => s,5,Return() |
|---|
| 655 | |
|---|
| 656 | [sub-voxforge-increment-script-num] |
|---|
| 657 | exten => s,1,GotoIf($[${script-num} + 1 > ${max-script-num}]?4) |
|---|
| 658 | exten => s,2,Set(DB(voxforge/script-num)=$[${script-num} + 1]) |
|---|
| 659 | exten => s,3,Return() |
|---|
| 660 | exten => s,4,Set(DB(voxforge/script-num)=1) |
|---|
| 661 | exten => s,5,Return() |
|---|
| 662 | |
|---|
| 663 | [sub-voxforge-phoneme-finished] |
|---|
| 664 | exten => s,1,Set(num-complete-this-round=0) |
|---|
| 665 | ;exten => s,2,Flite('Congratulations! You have completed ${num-complete} phrases.') |
|---|
| 666 | exten => s,2,Playback(${menu-dir}/congratulations-have-completed) |
|---|
| 667 | exten => s,3,SayNumber(${num-complete},m) |
|---|
| 668 | exten => s,4,Playback(${menu-dir}/phrases) |
|---|
| 669 | ;exten => s,3,Flite('We appreciate your contribution. Please. Take a moment to complete 5 more.') |
|---|
| 670 | ;exten => s,4,Flite('Press 1 to complete 5 more. Or Press 9 to hang up.'|12) |
|---|
| 671 | exten => s,5,Background(${menu-dir}/continue-hangup) |
|---|
| 672 | exten => s,6,WaitExten(10) |
|---|
| 673 | exten => 1,1,Gosub(sub-voxforge-do-next|s|1) |
|---|
| 674 | ;exten => 9,1,Flite('Thank You for your contribution. Please call again soon.') |
|---|
| 675 | exten => 9,1,Playback(${menu-dir}/thank-you-call-again) |
|---|
| 676 | exten => 9,2,Playback(vm-goodbye) |
|---|
| 677 | exten => 9,3,Hangup() |
|---|
| 678 | exten => 9,4,Gosub(sub-voxforge-autosubmit|s|1) |
|---|
| 679 | ;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) |
|---|
| 680 | exten => i,1,Background(${menu-dir}/not-a-valid-choice) |
|---|
| 681 | exten => i,2,Goto(s|1) |
|---|
| 682 | exten => h,1,Gosub(sub-voxforge-autosubmit|s|1) |
|---|
| 683 | |
|---|
| 684 | [sub-voxforge-get-next] |
|---|
| 685 | exten => s,1,System(mv ${RECORDED_FILE}.wav ${session-dir}/${last-prompt-name}.wav) |
|---|
| 686 | exten => s,2,System(grep -R --no-filename ${last-prompt-name} ${prompts-dir}/vf* >> ${session-dir}/prompts) |
|---|
| 687 | exten => s,3,Set(num-complete=$[${num-complete} + 1]) |
|---|
| 688 | exten => s,4,Set(num-complete-this-round=$[${num-complete-this-round} + 1]) |
|---|
| 689 | exten => s,5,GotoIf($[${num-complete-this-round} < 5]?20) |
|---|
| 690 | exten => s,6,Gosub(sub-voxforge-phoneme-finished|s|1) |
|---|
| 691 | exten => s,20,Gosub(sub-voxforge-do-next|s|1) |
|---|
| 692 | |
|---|
| 693 | [sub-voxforge-do-next] |
|---|
| 694 | exten => s,1,GotoIf($[${last-prompt-priority} < 5]?2:3) |
|---|
| 695 | exten => s,2,Goto(${last-prompt-context}|50|$[${last-prompt-priority} + 1]) |
|---|
| 696 | exten => s,3,Goto(custom-voxforge-selectscript|s|1) |
|---|
| 697 | |
|---|
| 698 | |
|---|
| 699 | [sub-voxforge-init] |
|---|
| 700 | exten => s, 1,GotoIf($[${ran-init} = 1]?2:3) |
|---|
| 701 | exten => s, 2,Return() |
|---|
| 702 | exten => s, 3,Set(session-ident=${STRFTIME(${EPOCH},GMT,%Y%m%d-%H%M%S)}-${UNIQUEID}) |
|---|
| 703 | exten => s, 4,Set(session-dir=/voxforge-audio/work/${session-ident}) |
|---|
| 704 | exten => s, 5,System(mkdir ${session-dir}) |
|---|
| 705 | exten => s, 6,Set(year=${STRFTIME(${EPOCH},GMT,%Y)}) |
|---|
| 706 | exten => s, 7,System(echo \'Copyright \(C\) ${year} Free Software Foundation\' > ${session-dir}/LICENSE) |
|---|
| 707 | exten => s, 8,System(cat /voxforge-code/LICENSE.append >> ${session-dir}/LICENSE) |
|---|
| 708 | exten => s, 9,System(cat /voxforge-code/README.prepend > ${session-dir}/README) |
|---|
| 709 | exten => s,10,System(echo \'Gender: ${gender}\;\' >> ${session-dir}/README) |
|---|
| 710 | exten => s,11,System(echo \'Age range: ${agerange}\;\' >> ${session-dir}/README) |
|---|
| 711 | exten => s,12,System(cat /voxforge-code/README.append >> ${session-dir}/README) |
|---|
| 712 | exten => s,13,Set(ran-init=1) |
|---|
| 713 | exten => s,14,Return() |
|---|
| 714 | |
|---|
| 715 | [sub-voxforge-instructions] |
|---|
| 716 | exten => s, 1,GotoIf($[${ran-instructions} = 1]?2:3) |
|---|
| 717 | exten => s, 2,Return() |
|---|
| 718 | ;exten => s, 3,Flite('OK, this is how it works: I will reed a phrase to you. Then you will hear a beep.') |
|---|
| 719 | ;exten => s, 4,Flite('After the beep, please wait for 1 second.') |
|---|
| 720 | ;exten => s, 5,Flite('Then you say out loud the phrase you just herd.') |
|---|
| 721 | ;exten => s, 6,Flite('Wait another second and then press the pound key.') |
|---|
| 722 | ;exten => s, 7,Flite('Some phrases sound silly. Or strange.') |
|---|
| 723 | ;exten => s, 8,Flite('Please avoid Laugh ing... Cough ing... Stutter ing.... Mispronunciations.... And background noise.') |
|---|
| 724 | ;exten => s, 9,Flite('If any of these things happen. Please go back and reecord the phrase again.') |
|---|
| 725 | exten => s, 3,Playback(${menu-dir}/instructions) |
|---|
| 726 | exten => s, 4,Return() |
|---|
| 727 | exten => h,1,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 728 | |
|---|
| 729 | [sub-voxforge-unexpected-hangup-cleanup] |
|---|
| 730 | exten => s,1,System(rm ${RECORDED_FILE}.wav) |
|---|
| 731 | exten => s,2,GotoIf($[${num-complete} < 5]?5) |
|---|
| 732 | exten => s,3,Gosub(sub-voxforge-autosubmit|s|1) |
|---|
| 733 | exten => s,4,Return() |
|---|
| 734 | exten => s,5,Noop(----- Only completed ${num-complete} so will not submit -----) |
|---|
| 735 | exten => s,6,System(mv ${session-dir} /voxforge-audio/partial/) |
|---|
| 736 | exten => s,7,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 737 | |
|---|
| 738 | [sub-voxforge-autosubmit] |
|---|
| 739 | exten => s,1,System(echo \'${num-complete}\' > ${session-dir}/num-complete) |
|---|
| 740 | exten => s,2,System(mv ${session-dir} /voxforge-audio/complete/) |
|---|
| 741 | exten => s,3,System(echo \'-------------------- START ${session-ident} --------------------\' >> /voxforge-audio/submit.log) |
|---|
| 742 | exten => s,4,System(/voxforge-code/submit_audio.sh /voxforge-audio/complete/${session-ident}) |
|---|
| 743 | exten => s,5,System(echo \'-------------------- STOP ${session-ident} --------------------\' >> /voxforge-audio/submit.log) |
|---|
| 744 | exten => s,6,Noop(----- Auto Submit of ${num-complete} phrases - Status:${SYSTEMSTATUS} APPERROR:${APPERROR} FAILURE:${FAILURE} SUCCESS:${SUCCESS} -----) |
|---|
| 745 | exten => s,7,Gosub(sub-voxforge-decrement-num-active-channels|s|1) |
|---|
| 746 | |
|---|
| 747 | ; vim: set ts=8 sw=2 filetype=asterisk: |
|---|