- Added demo
This commit is contained in:
Frank
2023-12-24 03:27:55 +01:00
parent aa64f82bd9
commit 45990a8788
6 changed files with 77 additions and 51 deletions
+5
View File
@@ -0,0 +1,5 @@
.buildpath
.project
.project
.settings/org.eclipse.ldt.prefs
+6
View File
@@ -5,7 +5,13 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.ldt.nature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,26 @@
----
-- MSRS: Config Windows
--
-- This is a simple demo mission that shows how to use the MSRS class to provide text-to-speech via SRS.
-- Therefore, you need to have the SRS cliend and server installed and running on your system.
--
-- The parameters are taken from a config file "Moose_MSRS.lua", which is included in the demo directory.
-- You need to copy this file to your "Saved Games/DCS/Config/" directory and adjust the necessary parameters.
-- In particular, you need to set the path where SRS is installed on your system.
-- Also the voice used will be "Microsoft Hazel Desktop". You need to either install that on your windows
-- system or change it to a voice you have installed.
-- The config file is automatically loaded when Moose is loaded. So you do not need to worry about it.
--
-- First, we create a MSRS instance, which will transmit on 305 MHz AM.
-- The text is then broadcasted after 5 seconds.
--
-- You can either use the SRS awacs overlay or just into the F/A-18 Hornet client to listen in on the transmission.
---
-- Create a new MSRS instance. Frequency is 305 MHz AM(=0).
-- The first parameter (nil) is the SRS installation path. This is taken from the Moose_MSRS.lua config file.
local msrs=MSRS:New(nil, 305.00, 0)
-- Broadcast text after 5 seconds.
msrs:PlayText("Hello World, this is the Moose simple radio text-to-speech class speaking.", 5)
@@ -0,0 +1,40 @@
-- Moose MSRS default Config
MSRS_Config = {
Path = "C:\\Program Files\\DCS-SimpleRadio-Standalone", -- Path to SRS install directory. Mind the double backslashes.
Port = 5002, -- Port of SRS server. Default 5002.
Backend = "srsexe", -- Interface to SRS: "srsexe" or "grpc".
Frequency = {127, 243}, -- Default frequences. Must be a table 1..n entries!
Modulation = {0,0}, -- Default modulations. Must be a table, 1..n entries, one for each frequency!
Volume = 1.0, -- Default volume [0,1].
Coalition = 0, -- 0 = Neutral, 1 = Red, 2 = Blue (only a factor if SRS server has encryption enabled).
Coordinate = {0,0,0}, -- x, y, alt (only a factor if SRS server has line-of-sight and/or distance limit enabled).
Culture = "en-GB",
Gender = "male",
Voice = "Microsoft Hazel Desktop", -- Voice that is used if no explicit provider voice is specified.
Label = "MSRS",
Provider = "win", --Provider for generating TTS (win, gcloud, azure, asw).
-- Windows
win = {
voice = "Microsoft Hazel Desktop", -- Native Windows TTS engine. That voice needs to be installed on your system.
},
-- Google Cloud
gcloud = {
voice = "en-GB-Standard-A", -- The Google Cloud voice to use (see https://cloud.google.com/text-to-speech/docs/voices).
credentials="C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourfilename.json", -- Full path to credentials JSON file (only for SRS-TTS.exe backend)
key="Your access Key", -- Google API access key (only for DCS-gRPC backend)
},
-- Amazon Web Service
aws = {
voice = "Brian", -- The default AWS voice to use (see https://docs.aws.amazon.com/polly/latest/dg/voicelist.html).
key="Your Access Key", -- Your AWS key.
secret="Your secret key", -- Your AWS secret key.
region="eu-central-1", -- Your AWS region (see https://docs.aws.amazon.com/general/latest/gr/pol.html).
},
-- Microsoft Azure
azure = {
voice="en-US-AriaNeural", --The default Azure voice to use (see https://learn.microsoft.com/azure/cognitive-services/speech-service/language-support).
key="Your access key", -- Your Azure access key.
region="westeurope", -- The Azure region to use (see https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/regions).
},
}
@@ -1,51 +0,0 @@
---
-- Name: TAD-A2G-100 - TYPES - Detection Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_TYPES method, which groups detected targets into Unit Types that were detected.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_TYPES
:New( RecceSet ) -- The RecceSet will detect the enemies, and group them into unit types that were detected.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )