mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
New SRS fixes
This commit is contained in:
parent
c43e6f44fe
commit
d010c3a9fa
@ -498,7 +498,6 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
|
|||||||
_MESSAGESRS.Gender = Gender or "female"
|
_MESSAGESRS.Gender = Gender or "female"
|
||||||
|
|
||||||
_MESSAGESRS.MSRS:SetGoogle(PathToCredentials)
|
_MESSAGESRS.MSRS:SetGoogle(PathToCredentials)
|
||||||
_MESSAGESRS.google = PathToCredentials
|
|
||||||
|
|
||||||
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE")
|
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE")
|
||||||
_MESSAGESRS.label = Label or "MESSAGE"
|
_MESSAGESRS.label = Label or "MESSAGE"
|
||||||
@ -512,8 +511,6 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
|
|||||||
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end
|
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end
|
||||||
|
|
||||||
_MESSAGESRS.voice = Voice --or MSRS.Voices.Microsoft.Hedda
|
_MESSAGESRS.voice = Voice --or MSRS.Voices.Microsoft.Hedda
|
||||||
--if _MESSAGESRS.google and not Voice then _MESSAGESRS.Voice = MSRS.Voices.Google.Standard.en_GB_Standard_A end
|
|
||||||
--_MESSAGESRS.MSRS:SetVoice(Voice or _MESSAGESRS.voice)
|
|
||||||
|
|
||||||
_MESSAGESRS.SRSQ = MSRSQUEUE:New(Label or "MESSAGE")
|
_MESSAGESRS.SRSQ = MSRSQUEUE:New(Label or "MESSAGE")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -606,8 +606,10 @@ function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender)
|
|||||||
self.SRSPilot:SetCulture(Culture or "en-US")
|
self.SRSPilot:SetCulture(Culture or "en-US")
|
||||||
self.SRSPilot:SetGender(Gender or "male")
|
self.SRSPilot:SetGender(Gender or "male")
|
||||||
self.SRSPilot:SetLabel("PILOT")
|
self.SRSPilot:SetLabel("PILOT")
|
||||||
if self.SRS.google then
|
if self.SRSGoogle then
|
||||||
self.SRSPilot:SetGoogle(self.SRS.google)
|
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
||||||
|
self.SRSOperator:SetGoogle(poptions.credentials)
|
||||||
|
self.SRSOperator:SetGoogleAPIKey(poptions.key)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -628,8 +630,10 @@ function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender)
|
|||||||
self.SRSOperator:SetCulture(Culture or "en-GB")
|
self.SRSOperator:SetCulture(Culture or "en-GB")
|
||||||
self.SRSOperator:SetGender(Gender or "female")
|
self.SRSOperator:SetGender(Gender or "female")
|
||||||
self.SRSPilot:SetLabel("RESCUE")
|
self.SRSPilot:SetLabel("RESCUE")
|
||||||
if self.SRS.google then
|
if self.SRSGoogle then
|
||||||
self.SRSOperator:SetGoogle(self.SRS.google)
|
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
||||||
|
self.SRSOperator:SetGoogle(poptions.credentials)
|
||||||
|
self.SRSOperator:SetGoogleAPIKey(poptions.key)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@ -14957,7 +14957,7 @@ function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture )
|
|||||||
self.PilotRadio.gender = Gender or "male"
|
self.PilotRadio.gender = Gender or "male"
|
||||||
self.PilotRadio.culture = Culture or "en-US"
|
self.PilotRadio.culture = Culture or "en-US"
|
||||||
|
|
||||||
if (not Voice) and self.SRS and self.SRS.google then
|
if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
|
||||||
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
|
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1923,7 +1923,7 @@ function CSAR:_DisplayToAllSAR(_message, _side, _messagetime)
|
|||||||
local messagetime = _messagetime or self.messageTime
|
local messagetime = _messagetime or self.messageTime
|
||||||
if self.msrs then
|
if self.msrs then
|
||||||
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
||||||
if self.msrs.google == nil then
|
if self.msrs:GetProvider() == MSRS.Provider.WINDOWS then
|
||||||
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
||||||
end
|
end
|
||||||
self:I("Voice = "..voice)
|
self:I("Voice = "..voice)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user