voxforge.org
VoxForge Dev

Changeset 24

Show
Ignore:
Timestamp:
04/22/07 16:09:33 (2 years ago)
Author:
trevarthan
Message:

Switch from Flite() to human voice recordings. This eliminates the app_flite dependency.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/extensions_voxforge.conf

    r19 r24  
    2424exten => s,2,Set(ran-instructions=0) 
    2525exten => s,3,Set(prompts-dir=/voxforge-code/prompts) 
    26 exten => s,4,Flite("Welcome to the Vox Forge automated reecording system!") 
    27 exten => s,5,Goto(custom-voxforge-license|s|1) 
     26exten => s,4,Set(menu-dir=${prompts-dir}/audio/menu) 
     27;exten => s,5,Flite("Welcome to the Vox Forge automated reecording system!") 
     28exten => s,5,Playback(${menu-dir}/welcome) 
     29exten => s,6,Goto(custom-voxforge-license|s|1) 
    2830exten => i,1,Goto(s|2) 
    2931 
    3032[custom-voxforge-license] 
    31 exten => s,1,Flite("To use this system. You must agree to have your voice reecorded.") 
    32 exten => s,2,Flite("And licensed under the G N U ... G P L.") 
    33 exten => s,3,Flite("With copyright assigned to the Free Software Foundation.") 
    34 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) 
     33;exten => s,1,Flite("To use this system. You must agree to have your voice reecorded.") 
     34;exten => s,2,Flite("And licensed under the G N U ... G P L.") 
     35;exten => s,3,Flite("With copyright assigned to the Free Software Foundation.") 
     36;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) 
     37exten => s,1,Playback(${menu-dir}/license-agree-info) 
     38exten => s,2,Background(${menu-dir}/license-agree-prompt) 
     39exten => s,3,WaitExten(10) 
    3540exten => 1,1,Goto(custom-voxforge-gender|s|1) 
    3641exten => 2,1,Playback(vm-goodbye) 
    3742exten => 2,2,Hangup() 
    38 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) 
    39 exten => 3,2,Goto(s|4) 
    40 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     43;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) 
     44exten => 3,1,Background(${menu-dir}/license-about) 
     45exten => 3,2,Goto(s|2) 
     46;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     47exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    4148exten => i,2,Goto(s|1) 
    4249 
    4350[custom-voxforge-gender] 
    44 exten => s,1,Flite("Please press 1 if you are a male. Press 2 if you are a female."|12) 
     51;exten => s,1,Flite("Please press 1 if you are a male. Press 2 if you are a female."|12) 
     52exten => s,1,Background(${menu-dir}/gender) 
     53exten => s,2,WaitExten(10) 
    4554exten => 1,1,Setvar(gender=male) 
    4655exten => 1,2,Goto(custom-voxforge-gender-confirm|s|1) 
    4756exten => 2,1,Setvar(gender=female) 
    4857exten => 2,2,Goto(custom-voxforge-gender-confirm|s|1) 
    49 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     58;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     59exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    5060exten => i,2,Goto(s|1) 
    5161 
    5262[custom-voxforge-gender-confirm] 
    53 exten => s,1,Flite('OK, you chose ${gender}. Press 1 if this is correct. Press 2 to try again.'|12) 
     63;exten => s,1,Flite('OK, you chose ${gender}. Press 1 if this is correct. Press 2 to try again.'|12) 
     64exten => s,1,GotoIf($[${gender} = 'male']?2:4) 
     65exten => s,2,Background(${menu-dir}/chose-male) 
     66exten => s,3,Goto(s|5) 
     67exten => s,4,Background(${menu-dir}/chose-female) 
     68exten => s,5,Background(${menu-dir}/1-correct-2-try-again) 
     69exten => s,6,WaitExten(10) 
    5470exten => 1,1,Goto(custom-voxforge-agerange|s|1) 
    5571exten => 2,1,Goto(custom-voxforge-gender|s|1) 
    56 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     72;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     73exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    5774exten => i,2,Goto(s|1) 
    5875 
    5976[custom-voxforge-agerange] 
    60 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) 
     77;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) 
     78exten => s,1,Background(${menu-dir}/agerange) 
     79exten => s,2,WaitExten(10) 
    6180exten => 1,1,Setvar(agerange=youth) 
    6281exten => 1,2,Goto(custom-voxforge-agerange-confirm|s|1) 
     
    6584exten => 3,1,Setvar(agerange=senior) 
    6685exten => 3,2,Goto(custom-voxforge-agerange-confirm|s|1) 
    67 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     86;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     87exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    6888exten => i,2,Goto(s|1) 
    6989 
    7090[custom-voxforge-agerange-confirm] 
    71 exten => s,1,Flite('OK, you chose ${agerange}. Press 1 if this is correct. Press 2 to try again.'|12) 
     91;exten => s,1,Flite('OK, you chose ${agerange}. Press 1 if this is correct. Press 2 to try again.'|12) 
     92exten => s,1,GotoIf($[${agerange} = 'youth']?2:4) 
     93exten => s,2,Background(${menu-dir}/chose-youth) 
     94exten => s,3,Goto(s|8) 
     95exten => s,4,GotoIf($[${agerange} = 'adult']?5:7) 
     96exten => s,5,Background(${menu-dir}/chose-adult) 
     97exten => s,6,Goto(s|8) 
     98exten => s,7,Background(${menu-dir}/chose-senior) 
     99exten => s,8,Background(${menu-dir}/1-correct-2-try-again) 
     100exten => s,9,WaitExten(10) 
    72101exten => 1,1,Set(num-complete=0) 
    73102exten => 1,2,Set(num-complete-this-round=0) 
    74103exten => 1,3,Goto(custom-voxforge-selectscript|s|1) 
    75104exten => 2,1,Goto(custom-voxforge-agerange|s|1) 
    76 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     105;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     106exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    77107exten => i,2,Goto(s|1) 
    78108 
     
    314344exten => s,3,Gosub(sub-voxforge-init|s|1) 
    315345exten => s,4,Gosub(sub-voxforge-instructions|s|1) 
    316 exten => s,5,Flite('Now, press 1 if you are ready to hear a phrase. Or press 2 to hear these instructions again.'|12) 
     346;exten => s,5,Flite('Now, press 1 if you are ready to hear a phrase. Or press 2 to hear these instructions again.'|12) 
     347exten => s,5,Background(${menu-dir}/1-hear-phrase-2-instructions-again) 
     348exten => s,6,WaitExten(10) 
    317349exten => 1,1,GotoIf($["${last-prompt-priority}" = "nan"]?20) 
    318350exten => 1,2,System(rm ${RECORDED_FILE}.wav) 
     
    326358exten => 3,2,Gosub(sub-voxforge-hrecord-compare|s|1) 
    327359exten => 3,20,Goto(2|1) 
    328 exten => 4,1,Flite('OK, skipping this prompt and try ing the next one...') 
     360;exten => 4,1,Flite('OK, skipping this prompt and try ing the next one...') 
     361exten => 4,1,Background(${menu-dir}/skip) 
    329362exten => 4,2,System(rm ${RECORDED_FILE}.wav) 
    330363exten => 4,3,Gosub(sub-voxforge-do-next|s|1) 
    331 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) 
    332 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     364;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) 
     365exten => 10,1,Background(${menu-dir}/post-record) 
     366exten => 10,2,WaitExten(10) 
     367;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     368exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    333369exten => i,2,GotoIf($["${last-prompt-priority}" = "nan"]?20) 
    334370exten => i,3,Goto(10|1) 
     
    340376exten => s,2,Setvar(last-prompt-priority=${MACRO_PRIORITY}) 
    341377exten => s,3,Setvar(last-prompt-name=${ARG1}) 
    342 exten => s,4,Flite('Here is sentence number $[${num-complete-this-round} + 1] out of 5:") 
    343 exten => s,5,Playback(${prompts-dir}/audio/${last-prompt-name}) 
    344 exten => s,6,Record(/tmp/voxforge-%d:wav|0|20|) 
    345 exten => s,7,Flite('OK, I will play the original phrase. Then the phrase you just recorded:'|1) 
    346 exten => s,8,Gosub(sub-voxforge-hrecord-compare|s|1) 
     378;exten => s,4,Flite('Here is sentence number $[${num-complete-this-round} + 1] out of 5:") 
     379exten => s,4,Playback(${menu-dir}/sentence-number) 
     380exten => s,5,SayNumber($[${num-complete-this-round} + 1],m) 
     381exten => s,6,Playback(${menu-dir}/out-of) 
     382exten => s,7,SayNumber(5,m) 
     383exten => s,8,Playback(${prompts-dir}/audio/${last-prompt-name}) 
     384exten => s,9,Record(/tmp/voxforge-%d:wav|0|20|) 
     385;exten => s,7,Flite('OK, I will play the original phrase. Then the phrase you just recorded:'|1) 
     386exten => s,10,Playback(${menu-dir}/compare) 
     387exten => s,11,Gosub(sub-voxforge-hrecord-compare|s|1) 
    347388exten => h,1,Gosub(sub-voxforge-unexpected-hangup-cleanup|s|1) 
    348389 
     
    369410[sub-voxforge-phoneme-finished] 
    370411exten => s,1,Set(num-complete-this-round=0) 
    371 exten => s,2,Flite('Congratulations! You have completed ${num-complete} phrases.') 
    372 exten => s,3,Flite('We appreciate your contribution. Please. Take a moment to complete 5 more.') 
    373 exten => s,4,Flite('Press 1 to complete 5 more. Or Press 9 to hang up.'|12) 
     412;exten => s,2,Flite('Congratulations! You have completed ${num-complete} phrases.') 
     413exten => s,2,Playback(${menu-dir}/congratulations-have-completed) 
     414exten => s,3,SayNumber(${num-complete},m) 
     415exten => s,4,Playback(${menu-dir}/phrases) 
     416;exten => s,3,Flite('We appreciate your contribution. Please. Take a moment to complete 5 more.') 
     417;exten => s,4,Flite('Press 1 to complete 5 more. Or Press 9 to hang up.'|12) 
     418exten => s,5,Background(${menu-dir}/continue-hangup) 
     419exten => s,6,WaitExten(10) 
    374420exten => 1,1,Gosub(sub-voxforge-do-next|s|1) 
    375 exten => 9,1,Flite('Thank You for your contribution. Please call again soon.') 
     421;exten => 9,1,Flite('Thank You for your contribution. Please call again soon.') 
     422exten => 9,1,Playback(${menu-dir}/thank-you-call-again) 
    376423exten => 9,2,Playback(vm-goodbye) 
    377424exten => 9,3,Hangup() 
    378425exten => 9,4,Gosub(sub-voxforge-autosubmit|s|1) 
    379 exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     426;exten => i,1,Flite('Sorry. that is not a valid choice.'|1234567890) 
     427exten => i,1,Background(${menu-dir}/not-a-valid-choice) 
    380428exten => i,2,Goto(s|1) 
    381429exten => h,1,Gosub(sub-voxforge-autosubmit|s|1) 
     
    415463exten => s, 1,GotoIf($[${ran-instructions} = 1]?2:3) 
    416464exten => s, 2,Return() 
    417 exten => s, 3,Flite('OK, this is how it works: I will reed a phrase to you. Then you will hear a beep.') 
    418 exten => s, 4,Flite('After the beep, please wait for 1 second.') 
    419 exten => s, 5,Flite('Then you say out loud the phrase you just herd.') 
    420 exten => s, 6,Flite('Wait another second and then press the pound key.') 
    421 exten => s, 7,Flite('Some phrases sound silly. Or strange.') 
    422 exten => s, 8,Flite('Please avoid Laugh ing... Cough ing... Stutter ing.... Mispronunciations....  And background noise.') 
    423 exten => s, 9,Flite('If any of these things happen. Please go back and reecord the phrase again.') 
    424 exten => s,10,Return() 
     465;exten => s, 3,Flite('OK, this is how it works: I will reed a phrase to you. Then you will hear a beep.') 
     466;exten => s, 4,Flite('After the beep, please wait for 1 second.') 
     467;exten => s, 5,Flite('Then you say out loud the phrase you just herd.') 
     468;exten => s, 6,Flite('Wait another second and then press the pound key.') 
     469;exten => s, 7,Flite('Some phrases sound silly. Or strange.') 
     470;exten => s, 8,Flite('Please avoid Laugh ing... Cough ing... Stutter ing.... Mispronunciations....  And background noise.') 
     471;exten => s, 9,Flite('If any of these things happen. Please go back and reecord the phrase again.') 
     472exten => s, 3,Playback(${menu-dir}/instructions) 
     473exten => s, 4,Return() 
    425474 
    426475[sub-voxforge-unexpected-hangup-cleanup]