* Added MSRSQueue to avoid overlaps
This commit is contained in:
Applevangelist 2022-09-20 17:16:20 +02:00
parent a908e159e2
commit 13d9562bcd

View File

@ -586,7 +586,7 @@ _ATIS = {}
--- ATIS class version. --- ATIS class version.
-- @field #string version -- @field #string version
ATIS.version = "0.9.7" ATIS.version = "0.9.8"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@ -1137,6 +1137,7 @@ function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port)
self.msrs:SetPort(Port) self.msrs:SetPort(Port)
self.msrs:SetCoalition(self:GetCoalition()) self.msrs:SetCoalition(self:GetCoalition())
self.msrs:SetLabel("ATIS") self.msrs:SetLabel("ATIS")
self.msrsQ = MSRSQUEUE:New("ATIS")
if self.dTQueueCheck<=10 then if self.dTQueueCheck<=10 then
self:SetQueueUpdateTime(90) self:SetQueueUpdateTime(90)
end end
@ -2286,7 +2287,9 @@ function ATIS:onafterReport( From, Event, To, Text )
self:T( "SRS TTS: " .. text ) self:T( "SRS TTS: " .. text )
-- Play text-to-speech report. -- Play text-to-speech report.
self.msrs:PlayText( text ) local duration = STTS.getSpeechTime(text,0.95)
self.msrsQ:NewTransmission(text,duration,self.msrs,nil,2)
--self.msrs:PlayText( text )
end end