mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
SRS - added hints on using Google with TTS
This commit is contained in:
parent
0785ee3099
commit
0422eee9af
@ -463,12 +463,14 @@ AWACS.TaskStatus = {
|
|||||||
-- TODO - System for Players to VID contacts? And put data into contacst fifo
|
-- TODO - System for Players to VID contacts? And put data into contacst fifo
|
||||||
-- TODO - Task reassignment - if a player reject a task, don't choose him again for x minutes
|
-- TODO - Task reassignment - if a player reject a task, don't choose him again for x minutes
|
||||||
-- DEBUG - WIP - Player tasking
|
-- DEBUG - WIP - Player tasking
|
||||||
|
-- TODO -- Maybe check in AI only when airborne
|
||||||
|
-- TODO -- remove SSL tag when not on google (currently sometimes spoken)
|
||||||
-- TODO - Localization
|
-- TODO - Localization
|
||||||
-- TODO - (LOW) LotATC / IFF
|
-- TODO - (LOW) LotATC / IFF
|
||||||
--
|
|
||||||
-- TODO - SW Optimizer
|
-- TODO - SW Optimizer
|
||||||
--
|
--
|
||||||
-- DONE - added SSML tags to make google readouts nicer
|
-- DONE - added SSML tags to make google readouts nicer
|
||||||
|
-- DONE - 2nd audio queue for priority messages
|
||||||
-- DONE - (WIP) Missile launch callout
|
-- DONE - (WIP) Missile launch callout
|
||||||
-- DONE - Event detection, Player joining, eject, crash, dead, leaving; AI shot -> DEFEND
|
-- DONE - Event detection, Player joining, eject, crash, dead, leaving; AI shot -> DEFEND
|
||||||
-- DONE - AI Tasking
|
-- DONE - AI Tasking
|
||||||
@ -1699,8 +1701,13 @@ function AWACS:_CreatePicture(AO,Callsign,GID,MaxEntries,IsGeneral)
|
|||||||
textScreen = textScreen .. " "..refBRAA.." miles, "..alt.." thousand." -- Alpha Group, Bullseye 021, 16 miles, 25 thousand,
|
textScreen = textScreen .. " "..refBRAA.." miles, "..alt.." thousand." -- Alpha Group, Bullseye 021, 16 miles, 25 thousand,
|
||||||
else
|
else
|
||||||
-- pilot reference
|
-- pilot reference
|
||||||
refBRAA = coordinate:ToStringBRAANATO(groupcoord,true,true) -- Charlie group, BRAA 045, 105 miles, Angels 41, Flanking, Track North-East, Bogey, Spades.
|
refBRAA = coordinate:ToStringBRAANATO(groupcoord,true,true)
|
||||||
refBRAATTS = coordinate:ToStringBRAANATO(groupcoord,true,true,true)
|
refBRAATTS = string.gsub(refBRAA,"BRAA","brah")
|
||||||
|
refBRAATTS = string.gsub(refBRAATTS,"BRA","brah")
|
||||||
|
-- Charlie group, BRAA 045, 105 miles, Angels 41, Flanking, Track North-East, Bogey, Spades.
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
refBRAATTS = coordinate:ToStringBRAANATO(groupcoord,true,true,true)
|
||||||
|
end
|
||||||
text = text .. " "..refBRAATTS
|
text = text .. " "..refBRAATTS
|
||||||
textScreen = textScreen .." "..refBRAA
|
textScreen = textScreen .." "..refBRAA
|
||||||
end
|
end
|
||||||
@ -2928,8 +2935,13 @@ function AWACS:_ToStringBR(FromCoordinate,ToCoordinate)
|
|||||||
local AngleDegrees = UTILS.Round( UTILS.ToDegree( AngleRadians ), 0 ) -- degrees
|
local AngleDegrees = UTILS.Round( UTILS.ToDegree( AngleRadians ), 0 ) -- degrees
|
||||||
|
|
||||||
local AngleDegText = string.format("%03d",AngleDegrees) -- 051
|
local AngleDegText = string.format("%03d",AngleDegrees) -- 051
|
||||||
local AngleDegTextTTS = string.format("<say-as interpret-as='characters'>%s</say-as>",AngleDegText)
|
local AngleDegTextTTS = ""
|
||||||
|
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
AngleDegTextTTS = string.format("<say-as interpret-as='characters'>%s</say-as>",AngleDegText)
|
||||||
|
else
|
||||||
|
AngleDegTextTTS = string.format("%s",AngleDegText)
|
||||||
|
end
|
||||||
AngleDegText = string.gsub(AngleDegText,"%d","%1 ") -- "0 5 1 "
|
AngleDegText = string.gsub(AngleDegText,"%d","%1 ") -- "0 5 1 "
|
||||||
AngleDegText = string.gsub(AngleDegText," $","") -- "0 5 1"
|
AngleDegText = string.gsub(AngleDegText," $","") -- "0 5 1"
|
||||||
|
|
||||||
@ -3504,7 +3516,11 @@ function AWACS:_AnnounceContact(Contact,IsNew,Group,IsBogeyDope,Tag,IsPopup,Repo
|
|||||||
|
|
||||||
if isGroup then
|
if isGroup then
|
||||||
BRAfromBulls = clustercoordinate:ToStringBRAANATO(Group:GetCoordinate(),true,true)
|
BRAfromBulls = clustercoordinate:ToStringBRAANATO(Group:GetCoordinate(),true,true)
|
||||||
BRAfromBullsTTS = clustercoordinate:ToStringBRAANATO(Group:GetCoordinate(),true,true,true)
|
BRAfromBullsTTS = string.gsub(BRAfromBulls,"BRAA","brah")
|
||||||
|
BRAfromBullsTTS = string.gsub(BRAfromBullsTTS,"BRA","brah")
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
BRAfromBullsTTS = clustercoordinate:ToStringBRAANATO(Group:GetCoordinate(),true,true,true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- "Uzi 1-1, Magic, BRA, 183 for 10 at 2000, hot"
|
-- "Uzi 1-1, Magic, BRA, 183 for 10 at 2000, hot"
|
||||||
@ -3916,7 +3932,12 @@ function AWACS:_MeldRangeCall(GID,Contact)
|
|||||||
if contact and not Contact.MeldCallDone then
|
if contact and not Contact.MeldCallDone then
|
||||||
local position = contact.position -- Core.Point#COORDINATE
|
local position = contact.position -- Core.Point#COORDINATE
|
||||||
if position then
|
if position then
|
||||||
local BRATExt = position:ToStringBRAANATO(flightpos,false,false,true)
|
local BRATExt = ""
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
BRATExt = position:ToStringBRAANATO(flightpos,false,false,true)
|
||||||
|
else
|
||||||
|
BRATExt = position:ToStringBRAANATO(flightpos,false,false)
|
||||||
|
end
|
||||||
local text = string.format("%s. %s. %s group, %s",self.callsigntxt,pilotcallsign,contacttag,BRATExt)
|
local text = string.format("%s. %s. %s group, %s",self.callsigntxt,pilotcallsign,contacttag,BRATExt)
|
||||||
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
|
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
|
||||||
self:_UpdateContactEngagementTag(Contact.CID,Contact.EngagementTag,true,true,AWACS.TaskStatus.EXECUTING)
|
self:_UpdateContactEngagementTag(Contact.CID,Contact.EngagementTag,true,true,AWACS.TaskStatus.EXECUTING)
|
||||||
@ -3939,7 +3960,12 @@ function AWACS:_ThreatRangeCall(GID,Contact)
|
|||||||
if contact then
|
if contact then
|
||||||
local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE
|
local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE
|
||||||
if position then
|
if position then
|
||||||
local BRATExt = position:ToStringBRAANATO(flightpos,false,false,true)
|
local BRATExt = ""
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
BRATExt = position:ToStringBRAANATO(flightpos,false,false,true)
|
||||||
|
else
|
||||||
|
BRATExt = position:ToStringBRAANATO(flightpos,false,false)
|
||||||
|
end
|
||||||
local text = string.format("%s. %s. %s group, Threat. %s",self.callsigntxt,pilotcallsign,contacttag,BRATExt)
|
local text = string.format("%s. %s. %s group, Threat. %s",self.callsigntxt,pilotcallsign,contacttag,BRATExt)
|
||||||
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
|
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -96,6 +96,14 @@
|
|||||||
-- For more information on setting up a cloud account, visit: https://cloud.google.com/text-to-speech
|
-- For more information on setting up a cloud account, visit: https://cloud.google.com/text-to-speech
|
||||||
-- Google's supported SSML reference: https://cloud.google.com/text-to-speech/docs/ssml
|
-- Google's supported SSML reference: https://cloud.google.com/text-to-speech/docs/ssml
|
||||||
--
|
--
|
||||||
|
-- **NOTE on using GOOGLE TTS with SRS:** You need to have the C# library installed in your SRS folder for Google to work.
|
||||||
|
-- You can obtain it e.g. here: [NuGet](https://www.nuget.org/packages/Grpc.Core)
|
||||||
|
--
|
||||||
|
-- **Pro-Tipp** - use the command line with power shell to call DCS-SR-ExternalAudio.exe - it will tell you what is missing.
|
||||||
|
-- and also the Google Console error, in case you have missed a step in setting up your Google TTS.
|
||||||
|
-- E.g. `.\DCS-SR-ExternalAudio.exe -t "Text Message" -f 255 -m AM -c 2 -s 2 -z -G "Path_To_You_Google.Json"`
|
||||||
|
-- Plays a message on 255AM for the blue coalition in-game.
|
||||||
|
--
|
||||||
-- ## Set Voice
|
-- ## Set Voice
|
||||||
--
|
--
|
||||||
-- Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
|
-- Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user