mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-18 21:25:58 +00:00
Update SRS.lua
- fixed bug if no frequencies and/or modulations are specified (UTILS.EnsureTable returned an empty table not nil. therefore, self.frequencies and self.modulations was not used)
This commit is contained in:
@@ -1620,7 +1620,7 @@ function MSRS:PlayText(Text, Delay, Coordinate, Speed, Speaker)
|
|||||||
else
|
else
|
||||||
|
|
||||||
local speaker = Speaker or self.Speaker
|
local speaker = Speaker or self.Speaker
|
||||||
|
|
||||||
if self.backend==MSRS.Backend.GRPC then
|
if self.backend==MSRS.Backend.GRPC then
|
||||||
self:T(self.lid.."Transmitting")
|
self:T(self.lid.."Transmitting")
|
||||||
self:_DCSgRPCtts(Text, nil, nil , nil, nil, nil, nil, Coordinate)
|
self:_DCSgRPCtts(Text, nil, nil , nil, nil, nil, nil, Coordinate)
|
||||||
@@ -2103,19 +2103,16 @@ function MSRS:_HoundTextToSpeech(Message,Frequencies,Modulations,Volume,Label,Co
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
Frequencies = UTILS.EnsureTable(Frequencies)
|
Frequencies = UTILS.EnsureTable(Frequencies or self.frequencies)
|
||||||
Modulations = UTILS.EnsureTable(Modulations)
|
Modulations = UTILS.EnsureTable(Modulations or self.modulations)
|
||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies or self.frequencies) do
|
for _,_f in pairs(Frequencies) do
|
||||||
table.insert(ffs,string.format("%.1f",_f))
|
table.insert(ffs,string.format("%.1f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
|
local modus = table.concat(Modulations, ",")
|
||||||
|
|
||||||
|
|
||||||
local modus = table.concat(Modulations or self.modulations, ",")
|
|
||||||
|
|
||||||
local coal=Coalition or self.coalition
|
local coal=Coalition or self.coalition
|
||||||
local gender=Gender or self.gender
|
local gender=Gender or self.gender
|
||||||
@@ -2159,7 +2156,7 @@ function MSRS:_HoundTextToSpeech(Message,Frequencies,Modulations,Volume,Label,Co
|
|||||||
gender = gender,
|
gender = gender,
|
||||||
speaker = Speaker or self.Speaker,
|
speaker = Speaker or self.Speaker,
|
||||||
}
|
}
|
||||||
|
|
||||||
local speechtime = HoundTTS.Transmit(Message, TransmissionP, ProviderP)
|
local speechtime = HoundTTS.Transmit(Message, TransmissionP, ProviderP)
|
||||||
|
|
||||||
return speechtime
|
return speechtime
|
||||||
|
|||||||
Reference in New Issue
Block a user