Here is the script:
Code: Select all
#!/bin/bash
#
# install festival
# install this nice voice:
#sudo apt-get install festlex-cmu
#cd /usr/share/festival/voices/english/
#sudo wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_clb_arctic-0.95-release.tar.bz2
#sudo tar jxf cmu_us_clb_arctic-0.95-release.tar.bz2
#sudo ln -s cmu_us_clb_arctic cmu_us_clb_arctic_clunits
#sudo cp /etc/festival.scm /etc/festival.scm.backup
#sudo echo "(set! voice_default 'voice_cmu_us_clb_arctic_clunits)" >> /etc/festival.scm
#echo "This is a test." | festival --tts
#rm /usr/share/festival/voices/english/cmu_us_clb_arctic-0.95-release.tar.bz2
# need this for CMU files apt install festlex-cmu
#info from http://ubuntuforums.org/showthread.php?t=677277
# more info http://ubuntuforums.org/showthread.php?t=751169
# Variables
# Available Voices Installed
# cmu_us_slt_arctic_clunits
# us2_mbrola
# en1_mbrola
# us1_mbrola
# cmu_us_bdl_arctic_clunits
# cmu_us_jmk_arctic_clunits
# rab_diphone
# us3_mbrola
# cmu_us_awb_arctic_clunits
# ked_diphone
# kal_diphone
# cmu_us_clb_arctic_clunits
# cmu_us_ksp_arctic_clunits
# cmu_us_rms_arctic_clunits
VOICE="cmu_us_clb_arctic_clunits"
# string used to set voice -eval (voice_XXXXXXXX)
# string used to set volume -scale (1-100)
VOICEVOLUME="4"
VOICESTRING="-eval (voice_"$VOICE") -scale "$VOICEVOLUME
INPUTFILE="phrases.txt"
NEWFOLDER=`date +%F-%H:%M`-$VOICE
#output some info
echo "Creating voices from " $INPUTFILE ", and saving it into a new folder ./" $NEWFOLDER ". Voice list copied to " $NEWFOLDER"/VoiceList.txt"
mkdir $NEWFOLDER
# Put a copy of the phrase file into folder
cp $INPUTFILE $NEWFOLDER/VoiceList.txt
# Do some work!
while IFS=$'\t' read -r -a myArray
do
if [[ ${myArray[0]} && ${myArray[1]} ]]; then
echo "Creating file - " $NEWFOLDER"/"${myArray[0]}".wav With Text: " ${myArray[1]}
echo ${myArray[1]} | text2wave $VOICESTRING >$NEWFOLDER"/"${myArray[0]}.wav
else
echo "Missing Data for line: " ${myArray[0]}
fi
done < $INPUTFILE
Code: Select all
0000 Zero
0001 One
0002 Two
0003 Three
0004 Four
0005 Five
0006 Point zero
0007 Point one
0008 Point two
0009 Point three
0010 Point four
0011 Point five
0012 Point six
0013 Point seven
0014 Point eight
0015 Point nine
0021 Warning
0022 Error
0023 Alert
0024 Feet
0025 Foot
0026
0027
0028 Helo Arron. Welcome to ER9X with FR SKY Support. Try not to crash your shiit this time.
0029 Limit
0030 RPM
0031 Flight Battery Low
0032 Radio Voltage
0033 Current
0034 Altitude
0035 Point
0036 Volts
0037 Volt
0038 Minutes
0039 Minute
0040 Pack Voltage
0041 30 Seconds
0042 20 Seconds
0043 10 Seconds
0044 Percent
0045 Inactive ellarm Have you forgotten about me Arron?
0046 Radio Battery Low
0047 Degrees
0048 Degree
0049 Receiver Voltage
0050 Temperature
0051 Amps
0052 Amp
0053 Seconds
0054 Second
0055 DB
0056 Meters
0057 Meter
0058 No Telemetry
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070 Recieve Signal Alert
0071 Transmit Signal Alert
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100 Hundred
0101 1 Hundred
0102 2 Hundred
0103 3 Hundred
0104 4 Hundred
0105 5 Hundred
0106 6 Hundred
0107 7 Hundred
0108 8 Hundred
0109 9 Hundred
0110 Thousand
0111 1 Thousand
0112 2 Thousand
0113 3 Thousand
0114 4 Thousand
0115 5 Thousand
0116 6 Thousand
0117 7 Thousand
0118 8 Thousand
0119 9 Thousand
0120 10 Thousand
0121 11 Thousand
0122 12 Thousand
0123 13 Thousand
0124 14 Thousand
0125 15 Thousand
0126 16 Thousand
0127 17 Thousand
0128 18 Thousand
0129 19 Thousand
0130 20 Thousand
0131
0132
0133 Throttle-Cut Inactive
0134 Throttle-Cut Active
0135
0136 Pilot Assist Disabled
0137 Pilot Assist Enabled
0138 Return To Home
0139 Please disable Pilot Assist
0140
0141 Flaps Up
0142 Flaps Down
0143
0144 Flaps Up
0145 Flaps 1
0146 Flaps 2
0147 Flaps 1
0148 Throttle Enabled
0149 Throttle Disabled
0150 Gear Up
0151 Gear Down
0152 Lights On
0153 Lights Off
0154 Beacon On
0155 Beacon Off
0156 Strobe On
0157 Strobe Off
0158 Throttle Hold Inactive
0159 Throttle Hold Active
0160 Throttle-Cut Active
0161 Throttle-Cut Inactive
0162 Aileron Rate Low
0163
0164 Aaleron Rate High
0165 Elevator Rate Low
0166
0167 Elevator Rate High
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0260 Easy Star
0261 Pico Cub
0262 Extra Hypeerion
0263 Tri copter
0264 Extra L E K I
0265 Bixler 2 FPV
0266 Arrons Crazy Hexacopter
0265
0266
0267
0268
0269
0270
0400 0
0401 1
0402 2
0403 3
0404 4
0405 5
0406 6
0407 7
0408 8
0409 9
0410 10
0411 11
0412 12
0413 13
0414 14
0415 15
0416 16
0417 17
0418 18
0419 19
0420 20
0421 21
0422 22
0423 23
0424 24
0425 25
0426 26
0427 27
0428 28
0429 29
0430 30
0431 31
0432 32
0433 33
0434 34
0435 35
0436 36
0437 37
0438 38
0439 39
0440 40
0441 41
0442 42
0443 43
0444 44
0445 45
0446 46
0447 47
0448 48
0449 49
0450 50
0451 51
0452 52
0453 53
0454 54
0455 55
0456 56
0457 57
0458 58
0459 59
0460 60
0461 61
0462 62
0463 63
0464 64
0465 65
0466 66
0467 67
0468 68
0469 69
0470 70
0471 71
0472 72
0473 73
0474 74
0475 75
0476 76
0477 77
0478 78
0479 79
0480 80
0481 81
0482 82
0483 83
0484 84
0485 85
0486 86
0487 87
0488 88
0489 89
0490 90
0491 91
0492 92
0493 93
0494 94
0495 95
0496 96
0497 97
0498 98
0499 99
Happy crashing!