January 8, 20242 yr Hello guys. Excuse me for this, i have very limited knowledge regarding scripts. Is it possible to make the software play an audio file? I have made some voice commands regarding gsx and would like to set audio files for different replies from ground or cabin crew. Thanks in advance
January 8, 20242 yr Commercial Member 2 hours ago, arpal said: Is it possible to make the software play an audio file? Yes. 🙂 LORBY-SI
January 8, 20242 yr Commercial Member Check the AAO manual - click on the question mark in the menu bar of the main dialog - find the chapter about scripting - read that - then browse through the tables of Commands... (sorry, I just realized that the screenshot was from the upcoming version 4.10) Edited January 8, 20242 yr by Lorby_SI LORBY-SI
January 8, 20242 yr Commercial Member 4 minutes ago, arpal said: Where can I find help regarding this, please? Save your sound file into \Documents\LorbyAxisAndOhs Files\Sounds Let us assume the file is called "mysound.mp3" In AAO (must be either connected to the sim or running in offline mode) go to "Scripting->Scripts Editor" Enter (SOUND:mysound.mp3) into the big white box Click on "Test". You should now hear your sound. If everything works, choose a Script Group where you want to save the script and enter a "Script Title" at the top. Click on "Save as new". Now you can either assign the script to a button (they appear in the normal event selection list) or call it like a K: event with 1 (>K:scriptgroup-scripttitle) Edited January 8, 20242 yr by Lorby_SI LORBY-SI
January 8, 20242 yr Commercial Member Plus this:Reverse Polish Notation (flightsimulator.com) LORBY-SI
January 8, 20242 yr Commercial Member Btw. what you are trying to do is best implemented as a CONVERSATION in my opinion. Please consult the AAO manual about them. This is essentially a line-based script file. With a CONVERSATION you can script "flows", where the logic is waiting for something to happen (=an action from you, a variable changing its value, etc.). Some of the AAO testers are building virtual flight attendants and cockpit flows with this logic (including GSX flows). And be mindful that you can use TextToSpeech too in AAO, there is no need for pre-recorded audio files, you can make it talk back dynamically. If you are willing to invest in good SAPI voices - or in an account at Amazon Polly or Microsoft Azure, TextToSpeech can be a really good alternative. Where are you from? Would a German Discord be of any help to you? Many of the creative people around AAO addons are active on the "JD" discord. Edited January 8, 20242 yr by Lorby_SI LORBY-SI
January 8, 20242 yr Commercial Member Not to forget - you can write AAO scripts in JScript and VBScript too. Although for your use case, RPN is the better choice I think. LORBY-SI
January 8, 20242 yr Commercial Member Here is a code snippet of what a CONVERSATION would look like that covers the De-Icing procedure with GSX (please note that this snippet is from AAO 4.10 - some of the VOICE and SOUND commands look different in the current retail version 4.00, they have fewer options) ...stuff happening before this.... (L:Checklist_Before_Start) 1 == if{ (GOTO:WELCOME_PURSER) } els{ (L:VoiceDefinedGER) 1 == if{ (SPEAK:Ich wär dann soweit für die Biehfor start tschecklist.) } els{ (SPEAK:I am ready for the before start checklist.) } } (VOICEDEVICE:0) ;******************************* :WELCOME_PURSER (WAIT:3000) (STOPRANDOMSOUND:Boarding_Music) (WAIT:3000) (L:CG_PU_SELECT) 0 == if{ (SOUND:Welcome.mp3|100|0|3|8,770,60-1,8) } els{ (SOUND:Dani_Welcome.mp3|100|0|3|8,770,60-1,8) } ;******************************* ;BEFORE START CHECKLIST AND DEICE CHECK [(L:Checklist_Before_Start) 1 ==] (WAIT:3000) (VOICEDEVICE:1) (A:AMBIENT TEMPERATURE, Celsius) 7 > if{ (GOTO:pushback_no_ice) } els{ (L:VoiceDefinedGER) 1 == if{ (SPEAK:Käptn, die Temperatur ist unter acht grad, sollen wir die eisen?) } els{ (SPEAK:Captain, Temperature is below eight degrees, should we dee ice ?) } } (WAIT:20000) (L:FSDT_GSX_DEICING_STATE, Number) 0 == if{ (L:VoiceDefinedGER) 1 == if{ (SPEAK:Ok, die eisen ist heute nicht nötig.) (GOTO:pushback_no_ice) } els{ (SPEAK:Alright, dee icing is not necessary today!) (GOTO:pushback_no_ice) } } (WAIT:5000) [(L:FSDT_GSX_DEICING_STATE, Number) 4 ==] (L:VoiceDefinedGER) 1 == if{ (SPEAK:Ok, die eising ist angefordert. Fahrzeuge sind jetzt auf dem Weg.) } els{ (SPEAK:Ok, dee icing is requested. Trucks are on their way now.) } [(L:FSDT_GSX_DEICING_STATE, Number) 6 ==] (WAIT:5000) (L:VoiceDefinedGER) 1 == if{ (SPEAK:Die eising ist jetzt beendet.) } els{ (SPEAK:Dee icing is now finished.) } 1 (>L:CG_DEICING) (WAIT:3000) :pushback_no_ice ...continuing with other stuff... Edited January 8, 20242 yr by Lorby_SI LORBY-SI
January 9, 20242 yr Author Thank you so much!!! I was able to make it with the sound: and wait commands I have FS2CREW for my virtual copilot so the only thing that was missing was the voice commands for basic GSX functions and your information was so helpful Cheers!4
Archived
This topic is now archived and is closed to further replies.