Skip to content

Commit

Permalink
feat: Add [en] source text for Lua script sounds (#36)
Browse files Browse the repository at this point in the history
This adds source text for phrases for audio files used in the commonly used LUA scripts Betaflight, iNav telemetry and Yaapu telemetry. Too keep things tidy I put them in a seperate script CSV file and their output is generated into seperate folders. The idea is that lua script users can use instead of the builtin audio files these ones, which have the same voice and quality as all the other audio. This is especially nice, since some lua scripts also use system audio files.
  • Loading branch information
microraptor authored Aug 12, 2022
1 parent fb5ec3e commit 0d820e8
Show file tree
Hide file tree
Showing 4 changed files with 373 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ To use them, the language folder (for example, `en`) must be under the `SOUNDS`

To use any audio on your switches, first copy the file you want to use to your language folder, then you can use this file in your `Global Functions` or `Special Functions` by selecting a switch for the function and choosing the `Play track` option.

#### SCRIPTS

Inside the language folder (only in `en` for now) there is a folder called `SCRIPTS`, which has audio files for commonly used LUA scripts. These audio files are generated with the same voice as the other audio files of their language pack. Each script has their own folder.

##### BETAFLIGHT

Audio files for [Betaflight TX Lua Scripts](https://github.com/betaflight/betaflight-tx-lua-scripts). Copy the WAV files from `SOUNDS/<lang>/SCRIPTS/BETAFLIGHT/` to `SOUNDS/en/` to overwrite the original audio files of the script.

##### INAV

Audio files for [iNav Lua Telemetry Flight Status](https://github.com/iNavFlight/OpenTX-Telemetry-Widget). Copy the WAV files from `SOUNDS/<lang>/SCRIPTS/INAV/` to `SCRIPTS/TELEMETRY/iNav/<lang>/` to overwrite the original audio files of the script.

##### YAAPU

Audio files for [Yaapu Telemetry Script and Widget](https://github.com/yaapu/FrskyTelemetryScript). Copy the WAV files from `SOUNDS/<lang>/SCRIPTS/YAAPU/` to `SOUNDS/yaapu0/<lang>/` to overwrite the original audio files of the script.

## Voices

All of the voices used in the EdgeTX voice packs have been picked from the [neural voices](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=speechtotext#prebuilt-neural-voices) offered by Microsft Azure text to speech service, in order to get as close as possible to humanlike voices. If you want to see what voices are available, and try different phrases, [check out the online demo generator](https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features). Using some recording software, you could even save your own phrases and use them in the voice packs.
Expand Down
5 changes: 5 additions & 0 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
find "$(dirname "$0")" -name "*.log" -delete

./voice-gen.py voices/en-GB.csv en-IE-EmilyNeural en
./voice-gen.py voices/en-GB_scripts.csv en-IE-EmilyNeural en/SCRIPTS
./voice-gen.py voices/en-GB.csv en-GB-LibbyNeural en_gb-libby
./voice-gen.py voices/en-GB_scripts.csv en-GB-LibbyNeural en_gb-libby/SCRIPTS
./voice-gen.py voices/en-GB.csv en-GB-RyanNeural en_gb-ryan
./voice-gen.py voices/en-GB_scripts.csv en-GB-RyanNeural en_gb-ryan/SCRIPTS
./voice-gen.py voices/en-US.csv en-US-SaraNeural en_us-sara
./voice-gen.py voices/en-US_scripts.csv en-US-SaraNeural en_us-sara/SCRIPTS
./voice-gen.py voices/en-US.csv en-US-GuyNeural en_us-guy
./voice-gen.py voices/en-US_scripts.csv en-US-GuyNeural en_us-guy/SCRIPTS
./voice-gen.py voices/pt-PT.csv pt-BR-FranciscaNeural pt
./voice-gen.py voices/es-ES.csv es-ES-ElviraNeural es
./voice-gen.py voices/es-CL.csv es-CL-CatalinaNeural es_cl-catalina
Expand Down
176 changes: 176 additions & 0 deletions voices/en-GB_scripts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
"String ID","Source text","Translation","Context","Path","Filename"
"1","P","P",,"BETAFLIGHT","p.wav"
"2","I","I",,"BETAFLIGHT","i.wav"
"3","D","D",,"BETAFLIGHT","d.wav"
"4","D setpoint","D setpoint",,"BETAFLIGHT","dsetpt.wav"
"5","acro mode","acro mode",,"INAV","acromd.wav"
"6","active","active",,"INAV","active.wav"
"7","altitude hold","altitude hold",,"INAV","althld.wav"
"8","angle mode","angle mode",,"INAV","anglmd.wav"
"9","battery critical","battery critical",,"INAV","batcrt.wav"
"10","Low battery","Low battery",,"INAV","batlow.wav"
"11","battery","battery",,"INAV","battry.wav"
"12","cruise mode","cruise mode",,"INAV","cruzmd.wav"
"13","danger","danger",,"INAV","danger.wav"
"14","engines armed","engines armed",,"INAV","engarm.wav"
"15","engines disarmed","engines disarmed",,"INAV","engdrm.wav"
"16","failsafe off","failsafe off",,"INAV","fsoff.wav"
"17","failsafe on","failsafe on",,"INAV","fson.wav"
"18","good","good",,"INAV","good.wav"
"19","GPS","GPS",,"INAV","gps.wav"
"20","heading hold active","heading hold active",,"INAV","hedhlda.wav"
"21","heading hold","heading hold",,"INAV","hedhld.wav"
"22","headfree active","headfree active",,"INAV","hfact.wav"
"23","headfree off","headfree off",,"INAV","hfoff.wav"
"24","home reset","home reset",,"INAV","homrst.wav"
"25","horizon mode","horizon mode",,"INAV","hrznmd.wav"
"26","lost","lost",,"INAV","lost.wav"
"27","manual mode","manual mode",,"INAV","manmd.wav"
"28","normal","normal",,"INAV","normal.wav"
"29","off","off",,"INAV","off.wav"
"30","on","on",,"INAV","on.wav"
"31","position hold","position hold",,"INAV","poshld.wav"
"32","ready to fly","ready to fly",,"INAV","ready.wav"
"33","return to launch","return to launch",,"INAV","rtl.wav"
"34","too high","too high",,"INAV","toohgh.wav"
"35","warning","warning",,"INAV","warnng.wav"
"36","waypoint","waypoint",,"INAV","waypt.wav"
"37","Acro flight mode","acro flight mode",,"YAAPU","acro.wav"
"38","Acro mode","Acro mode",,"YAAPU","acro_r.wav"
"39","Altitude","Altitude",,"YAAPU","alt.wav"
"40","Altitude hold flight mode","Altitude hold flight mode",,"YAAPU","althold.wav"
"41","Motors armed","Motors armed",,"YAAPU","armed.wav"
"42","Auto flight mode","Auto flight mode",,"YAAPU","auto.wav"
"43","Auto mode","Auto mode",,"YAAPU","auto_r.wav"
"44","Auto RTL flight mode","Auto RTL flight mode",,"YAAPU","autortl.wav"
"45","Autotune enabled","Autotune enabled",,"YAAPU","autotune.wav"
"46","Avoid A D S B flight mode","Avoid A D S B flight mode",,"YAAPU","avoidadsb.wav"
"47","Battery at 5 percent","Battery at 5 percent",,"YAAPU","bat5.wav"
"48","Battery at 10 percent","Battery at 10 percent",,"YAAPU","bat10.wav"
"49","Battery at 15 percent","Battery at 15 percent",,"YAAPU","bat15.wav"
"50","Battery at 20 percent","Battery at 20 percent",,"YAAPU","bat20.wav"
"51","Battery at 25 percent","Battery at 25 percent",,"YAAPU","bat25.wav"
"52","Battery at 30 percent","Battery at 30 percent",,"YAAPU","bat30.wav"
"53","Battery at 40 percent","Battery at 40 percent",,"YAAPU","bat40.wav"
"54","Battery at 50 percent","Battery at 50 percent",,"YAAPU","bat50.wav"
"55","Battery at 60 percent","Battery at 60 percent",,"YAAPU","bat60.wav"
"56","Battery at 70 percent","Battery at 70 percent",,"YAAPU","bat70.wav"
"57","Battery at 80 percent","Battery at 80 percent",,"YAAPU","bat80.wav"
"58","Battery at 90 percent","Battery at 90 percent",,"YAAPU","bat90.wav"
"59","Battery alert","Battery alert",,"YAAPU","batalert.wav"
"60","Battery level 1 alert","Battery level 1 alert",,"YAAPU","batalert1.wav"
"61","Battery level 2 alert","Battery level 2 alert",,"YAAPU","batalert2.wav"
"62","Brake flight mode","Brake flight mode",,"YAAPU","brake.wav"
"63","Circle flight mode","Circle flight mode",,"YAAPU","circle.wav"
"64","Cruise flight mode","Cruise flight mode",,"YAAPU","cruise.wav"
"65","Motors disarmed","Motors disarmed",,"YAAPU","disarmed.wav"
"66","Distance","Distance",,"YAAPU","dist.wav"
"67","Drift flight mode","Drift flight mode",,"YAAPU","drift.wav"
"68","E K F failsafe","E K F failsafe",,"YAAPU","ekf.wav"
"69","failsafe","failsafe",,"YAAPU","failsafe.wav"
"70","fence enabled","fence enabled",,"YAAPU","fence.wav"
"71","fence breach","fence breach",,"YAAPU","fencebreach.wav"
"72","Flip flight mode","Flip flight mode",,"YAAPU","flip.wav"
"73","flow position hold flight mode","flow position hold flight mode",,"YAAPU","flowhold.wav"
"74","Fly by wire a flight mode","Fly by wire a flight mode",,"YAAPU","flybywirea.wav"
"75","Fly by wire b flight mode","Fly by wire b flight mode",,"YAAPU","flybywireb.wav"
"76","follow flight mode","follow flight mode",,"YAAPU","follow.wav"
"77","follow mode","follow mode",,"YAAPU","follow_r.wav"
"78","GPS 3D fix lock","GPS 3D fix lock",,"YAAPU","gpsfix.wav"
"79","No gps","No gps",,"YAAPU","gpsnofix.wav"
"80","Guided flight mode","Guided flight mode",,"YAAPU","guided.wav"
"81","Guided mode","Guided mode",,"YAAPU","guided_r.wav"
"82","Guided no gps flight mode","Guided no gps flight mode",,"YAAPU","guidednogps.wav"
"83","Hold mode","Hold mode",,"YAAPU","hold_r.wav"
"84","Initialising","Initialising",,"YAAPU","initializing.wav"
"85","Initialising","Initialising",,"YAAPU","initializing_r.wav"
"86","Land flight mode","Land flight mode",,"YAAPU","land.wav"
"87","Landing complete","Landing complete",,"YAAPU","landing.wav"
"88","Loiter flight mode","Loiter flight mode",,"YAAPU","loiter.wav"
"89","Loiter mode","Loiter mode",,"YAAPU","loiter_r.wav"
"90","Low battery","Low battery",,"YAAPU","lowbat.wav"
"91","Manual flight mode","Manual flight mode",,"YAAPU","manual.wav"
"92","Manual mode","Manual mode",,"YAAPU","manual_r.wav"
"93","Max altitude alert","Max altitude alert",,"YAAPU","maxalt.wav"
"94","Max distance alert","Max distance alert",,"YAAPU","maxdist.wav"
"95","Low altitude alert","Low altitude alert",,"YAAPU","minalt.wav"
"96","Position hold flight mode","Position hold flight mode",,"YAAPU","poshold.wav"
"97","Q acro flight mode","Q acro flight mode",,"YAAPU","qacro.wav"
"98","Q autotune flight mode","Q autotune flight mode",,"YAAPU","qautotune.wav"
"99","Q hover flight mode","Q hover flight mode",,"YAAPU","qhover.wav"
"100","Q land flight mode","Q land flight mode",,"YAAPU","qland.wav"
"101","Q loiter flight mode","Q loiter flight mode",,"YAAPU","qloiter.wav"
"102","Q return to home flight mode","Q return to home flight mode",,"YAAPU","qrtl.wav"
"103","Q stabilise flight mode","Q stabilise flight mode",,"YAAPU","qstabilize.wav"
"104","Return to home","Return to home",,"YAAPU","rtl.wav"
"105","Return to home mode","Return to home mode",,"YAAPU","rtl_r.wav"
"106","simple mode","simple mode",,"YAAPU","simple_r.wav"
"107","simple mode disabled","simple mode disabled",,"YAAPU","simpleoff.wav"
"108","simple mode enabled","simple mode enabled",,"YAAPU","simpleon.wav"
"109","Smart return to home flight mode","Smart return to home flight mode",,"YAAPU","smartrtl.wav"
"110","Smart return to home mode","Smart return to home mode",,"YAAPU","smartrtl_r.wav"
"111","Sport flight mode","Sport flight mode",,"YAAPU","sport.wav"
"112","super simple mode disabled","super simple mode disabled",,"YAAPU","ssimpleoff.wav"
"113","super simple mode enabled","super simple mode enabled",,"YAAPU","ssimpleon.wav"
"114","Stabilise flight mode","Stabilise flight mode",,"YAAPU","stabilize.wav"
"115","Steering mode","Steering mode",,"YAAPU","steering_r.wav"
"116","no terrain data","no terrain data",,"YAAPU","terrainko.wav"
"117","Thermal flight mode","Thermal flight mode",,"YAAPU","thermal.wav"
"118","Throw flight mode","Throw flight mode",,"YAAPU","throw.wav"
"119","Timer alert","Timer alert",,"YAAPU","timealert.wav"
"120","Training flight mode","Training flight mode",,"YAAPU","training.wav"
"121","turtle mode","turtle mode",,"YAAPU","turtle.wav"
"122","Zigzag flight mode","Zigzag flight mode",,"YAAPU","zigzag.wav"
"123","takeoff flight mode","takeoff flight mode",,"YAAPU","takeofffm.wav"
"124","System I D flight mode","System I D flight mode",,"YAAPU","systemid.wav"
"125","autorotate flight mode","autorotate flight mode",,"YAAPU","autorotate.wav"
"126","velocity flight mode","velocity flight mode",,"YAAPU","velocity.wav"
"127","Yaa-pu telemetry ready","Yaa-pu telemetry ready",,"YAAPU","yaapu.wav"
"128","Altitude control mode","Altitude control mode","PX4","YAAPU","altctl.wav"
"129","Position control mode","Position control mode","PX4","YAAPU","posctl.wav"
"130","ready","ready","PX4","YAAPU","ready.wav"
"131","Auto takeoff mode","Auto takeoff mode","PX4","YAAPU","takeoff.wav"
"132","Auto mission mode","Auto mission mode","PX4","YAAPU","mission.wav"
"133","link loss failsafe mode","link loss failsafe mode","PX4","YAAPU","rtgs.wav"
"134","Precision landing mode","Precision landing mode","PX4","YAAPU","precland.wav"
"135","Offboard mode","Offboard mode","PX4","YAAPU","offboard.wav"
"136","rate attitude mode","rate attitude mode","PX4","YAAPU","rattitude.wav"
"137","simple mode","simple mode","PX4","YAAPU","simple.wav"
"138","PreArming: Need 3D Fix","PreArming: Need 3D Fix","Msg-Hash","YAAPU","264977348.wav"
"139","Smart RTL Unavailable","Smart RTL Unavailable","Msg-Hash","YAAPU","1834616480.wav"
"140","EKF variance","EKF variance","Msg-Hash","YAAPU","2386213680.wav"
"141","GPS Glitch cleared","GPS Glitch cleared","Msg-Hash","YAAPU","2310179660.wav"
"142","GPS Glitch","GPS Glitch","Msg-Hash","YAAPU","4137200300.wav"
"143","Parachute: Released","Parachute: Released","Msg-Hash","YAAPU","2664106240.wav"
"144","Flight plan received","Flight plan received","Msg-Hash","YAAPU","656739232.wav"
"145","Mission complete","Mission complete","Msg-Hash","YAAPU","3708582640.wav"
"146","Geofence triggered","Geofence triggered","Msg-Hash","YAAPU","1809087708.wav"
"147","Flight mode change failed","Flight mode change failed","Msg-Hash","YAAPU","116655276.wav"
"148","AutoTune: Success","AutoTune: Success","Msg-Hash","YAAPU","1008001424.wav"
"149","AutoTune: Failed","AutoTune: Failed","Msg-Hash","YAAPU","1396289024.wav"
"150","Transition done","Transition done","Msg-Hash","YAAPU","986165592.wav"
"151","Transition started","Transition started","Msg-Hash","YAAPU","1249672288.wav"
"152","Transition done","Transition done","Msg-Hash","YAAPU","4019153925.wav"
"153","Transition VTOL done","Transition VTOL done","Msg-Hash","YAAPU","3417557720.wav"
"154","Land descend started","Land descend started","Msg-Hash","YAAPU","1204090832.wav"
"155","Land final started","Land final started","Msg-Hash","YAAPU","2890289840.wav"
"156","Soaring: Outside max radius","Soaring: Outside max radius","Msg-Hash","YAAPU","1883944664.wav"
"157","Soaring: Disabled.","Soaring: Disabled.","Msg-Hash","YAAPU","4175833240.wav"
"158","Soaring: not climbing","Soaring: not climbing","Msg-Hash","YAAPU","2599859119.wav"
"159","Soaring: drifted too far","Soaring: drifted too far","Msg-Hash","YAAPU","636067590.wav"
"160","Soaring: Too high","Soaring: Too high","Msg-Hash","YAAPU","2730864352.wav"
"161","Soaring: Too low","Soaring: Too low","Msg-Hash","YAAPU","1698465616.wav"
"162","Soaring: Thermal ended","Soaring: Thermal ended","Msg-Hash","YAAPU","981284144.wav"
"163","Soaring: Drifted too far","Soaring: Drifted too far","Msg-Hash","YAAPU","2913564252.wav"
"164","Soaring: Exit via RC switch","Soaring: Exit via RC switch","Msg-Hash","YAAPU","1746499976.wav"
"165","Soaring: Enabled.","Soaring: Enabled.","Msg-Hash","YAAPU","883458048.wav"
"166","Soaring: thermal weak","Soaring: thermal weak","Msg-Hash","YAAPU","2139150204.wav"
"167","Soaring: reached upper altitude","Soaring: reached upper altitude","Msg-Hash","YAAPU","1352994600.wav"
"168","Soaring: reached lower altitude","Soaring: reached lower altitude","Msg-Hash","YAAPU","4026147344.wav"
"169","reached command:","reached command:","Msg-Hash","YAAPU","4091124880.wav"
"170","reached waypoint:","reached waypoint:","Msg-Hash","YAAPU","3311875476.wav"
"171","Passed waypoint:","Passed waypoint:","Msg-Hash","YAAPU","1997782032.wav"
"172","Takeoff complete","Takeoff complete","Msg-Hash","YAAPU","554623408.wav"
"173","Smart RTL deactivated","Smart RTL deactivated","Msg-Hash","YAAPU","3025044912.wav"
"174","GPS home acquired","GPS home acquired","Msg-Hash","YAAPU","3956583920.wav"
"175","GPS home acquired","GPS home acquired","Msg-Hash","YAAPU","1309405592.wav"
Loading

0 comments on commit 0d820e8

Please sign in to comment.