mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#MSRS
* Docu corrections * Added `AddFrequencies()` and `AddModulations()`
This commit is contained in:
parent
53c6a17ccb
commit
10a9b062b6
@ -94,8 +94,6 @@
|
|||||||
-- 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.
|
-- **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.
|
-- and also the Google Console error, in case you have missed a step in setting up your Google TTS.
|
||||||
@ -104,10 +102,14 @@
|
|||||||
--
|
--
|
||||||
-- ## Set Voice
|
-- ## Set Voice
|
||||||
--
|
--
|
||||||
-- Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
|
-- Use a specific voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
|
||||||
-- Note that this must be installed on your windows system.
|
-- Note that this must be installed on your windows system.
|
||||||
-- If enabling SetGoogle(), you can use voices provided by Google
|
-- If enabling SetGoogle(), you can use voices provided by Google
|
||||||
-- Google's supported voices: https://cloud.google.com/text-to-speech/docs/voices
|
-- Google's supported voices: https://cloud.google.com/text-to-speech/docs/voices
|
||||||
|
-- For voices there are enumerators in this class to help you out on voice names:
|
||||||
|
--
|
||||||
|
-- MSRS.Voices.Microsoft -- e.g. MSRS.Voices.Microsoft.Hedda - the Microsoft enumerator contains all voices known to work with SRS
|
||||||
|
-- MSRS.Voices.Google -- e.g. MSRS.Voices.Google.Standard.en_AU_Standard_A or MSRS.Voices.Google.Wavenet.de_DE_Wavenet_C - The Google enumerator contains voices for EN, DE, IT, FR and ES.
|
||||||
--
|
--
|
||||||
-- ## Set Coordinate
|
-- ## Set Coordinate
|
||||||
--
|
--
|
||||||
@ -141,7 +143,7 @@ MSRS = {
|
|||||||
|
|
||||||
--- MSRS class version.
|
--- MSRS class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
MSRS.version="0.1.0"
|
MSRS.version="0.1.1"
|
||||||
|
|
||||||
--- Voices
|
--- Voices
|
||||||
-- @type Voices
|
-- @type Voices
|
||||||
@ -248,7 +250,7 @@ MSRS.Voices = {
|
|||||||
-- TODO list
|
-- TODO list
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- TODO: Add functions to add/remove freqs and modulations.
|
-- TODO: Add functions to remove freqs and modulations.
|
||||||
-- DONE: Add coordinate.
|
-- DONE: Add coordinate.
|
||||||
-- DONE: Add google.
|
-- DONE: Add google.
|
||||||
|
|
||||||
@ -410,6 +412,24 @@ function MSRS:SetFrequencies(Frequencies)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Add frequencies.
|
||||||
|
-- @param #MSRS self
|
||||||
|
-- @param #table Frequencies Frequencies in MHz. Can also be given as a #number if only one frequency should be used.
|
||||||
|
-- @return #MSRS self
|
||||||
|
function MSRS:AddFrequencies(Frequencies)
|
||||||
|
|
||||||
|
-- Ensure table.
|
||||||
|
if type(Frequencies)~="table" then
|
||||||
|
Frequencies={Frequencies}
|
||||||
|
end
|
||||||
|
|
||||||
|
for _,_freq in pairs(Frequencies) do
|
||||||
|
table.insert(self.frequencies,_freq)
|
||||||
|
end
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Get frequencies.
|
--- Get frequencies.
|
||||||
-- @param #MSRS self
|
-- @param #MSRS self
|
||||||
-- @param #table Frequencies in MHz.
|
-- @param #table Frequencies in MHz.
|
||||||
@ -434,6 +454,24 @@ function MSRS:SetModulations(Modulations)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Add modulations.
|
||||||
|
-- @param #MSRS self
|
||||||
|
-- @param #table Modulations Modulations. Can also be given as a #number if only one modulation should be used.
|
||||||
|
-- @return #MSRS self
|
||||||
|
function MSRS:AddModulations(Modulations)
|
||||||
|
|
||||||
|
-- Ensure table.
|
||||||
|
if type(Modulations)~="table" then
|
||||||
|
Modulations={Modulations}
|
||||||
|
end
|
||||||
|
|
||||||
|
for _,_mod in pairs(Modulations) do
|
||||||
|
table.insert(self.modulations,_mod)
|
||||||
|
end
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Get modulations.
|
--- Get modulations.
|
||||||
-- @param #MSRS self
|
-- @param #MSRS self
|
||||||
-- @param #table Modulations.
|
-- @param #table Modulations.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user