Jump to content

Introducing DCS Simple Text To Speech (DCS-STTS)


Recommended Posts

On 3/21/2021 at 6:09 AM, exil said:

Sadly, it's on a closed server from my squadron. But to give you an idea of how I used it. 

 

The missions task is to provide CAS and CasEvac for an ambushed convoy. With STTS I was able to completely generate a JTAC which you could interact with via the F10 Menu. He would call you, and then you are able to answer him just like with DCSs JTAC but with the great advantage, that the JTAC calls were specified for that mission. He would give you information about priotized targets like "hey, I need you to take out this target first because it is close to us". 

Then some arty would provide fires inside the ROZ. The JTAC would give restrictions for all aircraft and call you when you don't adhere to those (e. g. "avoid roz sector 180 to 230"). If you don't adhere, he will call you like "hey, leave the sector immediatelly!". 

I also simulated an awacs which would give you a task once you checked in via F10 menu. E. g. the helos would get a task and after completion the were told to check in with the jtac on a given frequency for casevac. 

 

A lot of text, but I hope you'll get the point. Before STTS I used to do it with sound files, but now I can specify them for different groups and different frequencies. The great thing is now: if someone misses a call or is not tuning in the right frequency, the whole mission could be busted! I really love that! 

 

Hello
Any advice to get this excellent job working on a dedicated server?
I have tried everything they have indicated:

Change UAC permissions
Sanitize
And check the paths many times

If I use my PC as a server it works perfect; but if I upload it to a dedicated one, I don't get a result with text or mp3 audio.

Any help I would really appreciate

Thanks

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

Link to comment
Share on other sites

7 hours ago, Colmillo said:

Hello
Any advice to get this excellent job working on a dedicated server?
I have tried everything they have indicated:

Change UAC permissions
Sanitize
And check the paths many times

If I use my PC as a server it works perfect; but if I upload it to a dedicated one, I don't get a result with text or mp3 audio.

Any help I would really appreciate

Thanks

You likely need to enable sound on the dedicated server and install the media pack for Windows

 

Try playing an MP3 on a server  with windows media player as a test

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

That was the solution!!
Thank you Ciribob
PD.
Are you planning to add a LOOP option?

 

Thanks again

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

Link to comment
Share on other sites

  • 1 month later...
On 8/27/2021 at 7:12 PM, Dafs1 said:

I put the right path but it didnt recognize it. what else can I do

ERROR.png

The path is incorrect - as the error is telling you it cant it it at that path

 

Post your LUA file file that you edited here and a screenshot of the folder containing the DCS-SR-ExternalAudio.exe

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

  • 5 weeks later...

i do have the same problem. 

 

STTS = {}
-- FULL Path to the FOLDER containing DCS-SR-ExternalAudio.exe - EDIT TO CORRECT FOLDER
STTS.DIRECTORY = "E:\\Program Files\\DCS-SimpleRadio-Standalone"
STTS.SRS_PORT = 5002 -- LOCAL SRS PORT - DEFAULT IS 5002
--STTS.GOOGLE_CREDENTIALS = "C:\\Users\\Ciaran\\Downloads\\googletts.json"

-- DONT CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING
STTS.EXECUTABLE = "DCS-SR-ExternalAudio.exe"

local random = math.random
function STTS.uuid()
    local template ='yxxx-xxxxxxxxxxxx'
    return string.gsub(template, '[xy]', function (c)
        local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
        return string.format('%x', v)
    end)
end

function STTS.round(x, n)
    n = math.pow(10, n or 0)
    x = x * n
    if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end
    return x / n
end

image.png


Edited by spacemishka
Link to comment
Share on other sites

  • 2 weeks later...

Hello, thank you for this program that worked well but I can't run it anymore, I have a popup that tells me that Windows can't find DCS-SR-ExternalAudio.exe I can't figure out where the error comes from.
Please help me

E1.jpg

E2.jpg

E3.jpg

I just realised that I am not the only one, what surprises me is that yesterday everything was working fine and today I have this message!

Link to comment
Share on other sites

  • 2 weeks later...

For all those having issues with Windows saying that it cannot find 'DCS-SR-ExternalAudio.exe', it is because it is not in the directory in 'path' you have provided. I'm guessing that you simply don't understand what a 'path' is and/or that you must edit the 'ctld.lua' file to reflect your installation.

The 'path' is the string of characters telling Windows where to find the executable file you wish it to run. I this case the file is 'DCS-SR-ExternalAudio.exe' and the path to the exe file is exactly to where you installed Simple Radio Standalone, because 'DCS-SR-ExternalAudio.exe' is a part of the SRS installation. You ought to know to where you installed SRS, but to be sure, find the SRS desktop icon and right-click on it to open the context menu, and select the bottommost line: 'Properties'. A small window with many tabs at the top will open, and the 'Shortcut' tab should be opened. Toward the middle of the window you will see 'Target:' and a wide rectangle behind it with text inside the rectangle. This is the 'path' and executable for running SRS, eg in my installation it is 'C:\sbin2\DCS-SimpleRadio-Standalone\SR-ClientRadio.exe' without the apostrophes.

Let's look closer at this string of characters. Everything to the right of the furthest-right '\' (backslash) is the targeted executable, which when run by Windows provides the Simple Radio Standalone functionality to DCS. Everything to the left of the furthest-right backslash is the 'path'. This is how you tell Windows where to find the executable. It is literally the path to the executable.

I'm sure that none of you have SRS installed in the same location as I have, so go to the desktop icon and look in the properties to find the target of that desktop icon and thus the 'path' to where your SRS is installed. Copy the Target' entry (left-click inside the rectangle and press <Ctrl><A> <Ctrl><C> to copy the contents to the Window Clipboard). Open your ctld.lua file with your favorite text editor and look for the line beginning with 'STTS.DIRECTORY = "E:\\Program Files\\DCS-SimpleRadio-Standalone"'. Mark everything between the two quote characters with your mouse and press <Ctrl><V> to replace everything between the quotes with what you have on your clipboard. Now delete everything starting with and including the furthest-right backslash, upto but not including the furthest-right quote character. Now you should have only the path between the quotes. Go back through what you have just copied in and everywhere you find a backslash, add a second backslash right next to it so that all backslashes are paired together with exactly one other backslash, but not more or less that two next to each other. It should look something like this: "C:\\sbin2\\DCS-SimpleRadio-Standalone", but with your path to your installation of SRS in it.

Save what you have edited in your text editor, go into DCS - MissionEditor - open your mission, find the load script file trigger and go through the selection of your newley edited ctld.lua file. Run your mission and enjoy.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

  • 1 month later...

Hello everyone, I'm looking for some help making this work. What's weird, is that everything worked perfectly the first day I tried it (I've been using SRS's both client and server on the same machine in a single player -> client mission environment), though now it's not working anymore (I haven't made any change to the script or windows or dcs). Basically it seems to me that the STTS script manages to instruct DCS-SR-ExternalAudio.exe (I see the cmd window popping out when the mission trigger switches on) yet no sounds makes its way to SRS. I also added an env.info in the STTS main script in order to check the syntax of the variable cmd and it looks correct (unsurprisingly, since I haven't meddled with any STTS function). Thus apparently it's a SRS related issue, yet I'm writing on this thread rather than some SRS troubleshooting thread just because SRS uses to work fine whenever I use it in multiplayer servers.

Here's the checklist I've been following to try to detemine the source of the issue.

- sanitise off in MissionScripting.lua --> DONE

- correct STTS.DIRECTORY -> DONE

- 5002 and 5003 port open -> 5002 appears open on portchecker although 5003 does not. I have no explanation for this. Both the ports are set open on windows firewall (and share the same set of rules both inbound and outbound) . This is obviously the main suspect although, again , this wouldn't explain why I was able to get the STTS voice messages from SRS yesterday.

Screenshot-2021-12-22-145611.png
 
- SRS host and client configuration (port and options) -> DONE
- STTS's command to DCS-SR-ExternalAudio.exe syntax -> DONE
- DCS's log to check whether there's any error notification re: SRS or STTS -> DONE
- banging my head against the desktop while crying like a toddler who lost his teddy -> DONE
 
I really really hope someone will help me fixing this as I was planning to implement STTS to the next campaign mission I'm designing :((
 
Thank you in advance ladies and gentlemen!
 
 
  • Thanks 1
Link to comment
Share on other sites

If you are pulling your hair out because your path is correct and you still get the "Windows cannot find..." error:

 

Make extra double sure you have a TIME MORE (1) condition for the loading of your related LUA files, as shown in the documentation:

 

hound_setup.jpg

 

Adding that delay condition made it work for me!

 

Link to comment
Share on other sites

Hello !

i'd like to add to my mission some real Radio sample, like Radio Damascus for example, to my mission. Your script might be the good one ! 😄

I'm trying to make it working on my dedicated server. I've mad a test mission, here are the two triggers :

image.png

image.png

i've edited the DCS-STTS.lua with the path of the Server SRSExternal-ardio

 

image.png

 

And here's the Getluck.lua file, for playing Get Luck.mp3, i've tried both    'STTS.TextToSpeech (...'      and     'STTS.Play Mp3(...'   :

image.png

 

So I should here the music on 255 in my blue F16 ?  but it doesnt.

No Mission Script Error on the .log

 

I'm not sure about "remove the sanitisation" step, i've removed stuff it but it get corrupted i had to reinstall it.

 

Any clue ?


Edited by Tomy10
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
On 12/23/2021 at 2:25 AM, Coupon4Coffin said:

Hello everyone, I'm looking for some help making this work. What's weird, is that everything worked perfectly the first day I tried it (I've been using SRS's both client and server on the same machine in a single player -> client mission environment), though now it's not working anymore (I haven't made any change to the script or windows or dcs). Basically it seems to me that the STTS script manages to instruct DCS-SR-ExternalAudio.exe (I see the cmd window popping out when the mission trigger switches on) yet no sounds makes its way to SRS. I also added an env.info in the STTS main script in order to check the syntax of the variable cmd and it looks correct (unsurprisingly, since I haven't meddled with any STTS function). Thus apparently it's a SRS related issue, yet I'm writing on this thread rather than some SRS troubleshooting thread just because SRS uses to work fine whenever I use it in multiplayer servers.

Here's the checklist I've been following to try to detemine the source of the issue.

- sanitise off in MissionScripting.lua --> DONE

- correct STTS.DIRECTORY -> DONE

- 5002 and 5003 port open -> 5002 appears open on portchecker although 5003 does not. I have no explanation for this. Both the ports are set open on windows firewall (and share the same set of rules both inbound and outbound) . This is obviously the main suspect although, again , this wouldn't explain why I was able to get the STTS voice messages from SRS yesterday.

Screenshot-2021-12-22-145611.png
 
- SRS host and client configuration (port and options) -> DONE
- STTS's command to DCS-SR-ExternalAudio.exe syntax -> DONE
- DCS's log to check whether there's any error notification re: SRS or STTS -> DONE
- banging my head against the desktop while crying like a toddler who lost his teddy -> DONE
 
I really really hope someone will help me fixing this as I was planning to implement STTS to the next campaign mission I'm designing :((
 
Thank you in advance ladies and gentlemen!
 
 

 

On 12/28/2021 at 4:45 AM, Lowlyslows said:

Hey all!

I have followed the instructions and video to the letter and can not get any voice to play.

 

Anyone that got it to work able to help me out?

 

On 1/8/2022 at 4:03 AM, Tomy10 said:

Hello !

i'd like to add to my mission some real Radio sample, like Radio Damascus for example, to my mission. Your script might be the good one ! 😄

I'm trying to make it working on my dedicated server. I've mad a test mission, here are the two triggers :

image.png

image.png

i've edited the DCS-STTS.lua with the path of the Server SRSExternal-ardio

 

image.png

 

And here's the Getluck.lua file, for playing Get Luck.mp3, i've tried both    'STTS.TextToSpeech (...'      and     'STTS.Play Mp3(...'   :

image.png

 

So I should here the music on 255 in my blue F16 ?  but it doesnt.

No Mission Script Error on the .log

 

I'm not sure about "remove the sanitisation" step, i've removed stuff it but it get corrupted i had to reinstall it.

 

Any clue ?

 

If you're testing this out on local/single player - make sure that you have your SRS Server set so that secure communications between sides (or whatever the function is called) is turned OFF.  (Because the 'player' detected on a single player mission will not match either 1 or 2 in the coalition side from what I've observed - meaning that all will appear to work correctly but no audio will come through). 

If this fails, turn off DCS and connect to SRS through EAM mode instead and see if you can get audio to come through by using command line executions completely outside of DCS. This may help to narrow down if the issue is with SRS (firewall, etc) or whether it's specific solely to your mission or DCS.

Link to comment
Share on other sites

8 hours ago, Elphaba said:

Any chance of using this without srs? My sqn won’t use srs

I don't believe so. This is specifically tied in to SRS because it's part of SRS. . DCS's own radio doesn't allow for external API's to connect so if you're using that, this is one of the functions that you're not going to be able to implement (in addition to overlordbot, music radio stations, etc)...

The only option without SRS that I can think of is for you to pre-record all possible available conversations and embed them into your mission as .ogg/mp3 files and have a trigger that plays those specific files. As far as Text-To-Speech is concerned though, you're going to be out of luck unless you can reason with your squadron that SRS is worth reconsidering.

Link to comment
Share on other sites

17 hours ago, Dangerzone said:

I don't believe so. This is specifically tied in to SRS because it's part of SRS. . DCS's own radio doesn't allow for external API's to connect so if you're using that, this is one of the functions that you're not going to be able to implement (in addition to overlordbot, music radio stations, etc)...

The only option without SRS that I can think of is for you to pre-record all possible available conversations and embed them into your mission as .ogg/mp3 files and have a trigger that plays those specific files. As far as Text-To-Speech is concerned though, you're going to be out of luck unless you can reason with your squadron that SRS is worth reconsidering.

 

17 hours ago, Dangerzone said:

I don't believe so. This is specifically tied in to SRS because it's part of SRS. . DCS's own radio doesn't allow for external API's to connect so if you're using that, this is one of the functions that you're not going to be able to implement (in addition to overlordbot, music radio stations, etc)...

The only option without SRS that I can think of is for you to pre-record all possible available conversations and embed them into your mission as .ogg/mp3 files and have a trigger that plays those specific files. As far as Text-To-Speech is concerned though, you're going to be out of luck unless you can reason with your squadron that SRS is worth reconsidering.

Darn.

I have been embedding but it take so long to make each one, boost the levels and export as ogg. I can’t even get it to play MP3’s it only wants wavs or oggs. 

Link to comment
Share on other sites

2 hours ago, Elphaba said:

 

Darn.

I have been embedding but it take so long to make each one, boost the levels and export as ogg. I can’t even get it to play MP3’s it only wants wavs or oggs. 

Is there any reason your squadron won't consider SRS? I think it would be a better option in this instance, and if your squadron appreciates the time and effort you put into making the missions, hopefully they'd be willing to accommodate having SRS running for your missions. (And if you're going to do that - check out OverlordBot - there's some real cool stuff you can do with SRS!)

Link to comment
Share on other sites

  • 3 months later...
On 10/3/2022 at 5:16 AM, Dangerzone said:

Is there any reason your squadron won't consider SRS? I think it would be a better option in this instance, and if your squadron appreciates the time and effort you put into making the missions, hopefully they'd be willing to accommodate having SRS running for your missions. (And if you're going to do that - check out OverlordBot - there's some real cool stuff you can do with SRS!)

They won't. It's a definite no. 

Link to comment
Share on other sites

They won't. It's a definite no. 
That's a shame. Any features missing from SRS or reasons why not?

Did I piss them off in some way?

Always open to feature requests on the SRS Discord

Sent from my Pixel 7 Pro using Tapatalk

  • Like 1

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

9 minutes ago, Ciribob said:

That's a shame. Any features missing from SRS or reasons why not?

Did I piss them off in some way? emoji2.png

Always open to feature requests on the SRS Discord

Sent from my Pixel 7 Pro using Tapatalk
 

No, nothing personal.

A) Any crash, disconnect during a mission where their mission/game/system has ANY 3rd party apps or mods - those are instantly the first to blame.
B) There have been many issues with setting it up / bindings and not enough buttons / switches (depending on hardware) for using in-game radio menus and SRS and trying to walk some of them through it is like herding cats. Esp when to do so is holding everyone else up.
C) If someone is out of date and it causes a problem then things 'kick off'. Trying to get everyone on the same software, with the correct bindings / setup / config, and without anyone crashing / lagging / disconnecting is virtually impossible. So then every cries 'Vanilla!' and everything non-vanilla has to go.
D) Uninstalling SRS often has left behind things that screws stuff up e.g. When the F14 Radio Menu stops responding to mouse clicks because the uninstaller didn't delete a file and folder. That bug took two months to track down. 
E) Most don't want to use the in-game radios because they were real pilots and just like we don't want to do cold starts - we only have a short time to play together and we've all started real aircraft with real checklists, the 'attraction' to that is pointless after a while. We don't see the need to mess around with on-screen buttons to change freqs, when in a real cockpit you can just reach out and quickly tweak a knob, in a 'game' it's a PITA. So TS or Discord suit everyone fine and we don't have to worry about needless comms channels. We want to get to the meat and leave the decorative parsley off the plate. 

 


Edited by Elphaba
Link to comment
Share on other sites

20 hours ago, Elphaba said:

No, nothing personal.

A) Any crash, disconnect during a mission where their mission/game/system has ANY 3rd party apps or mods - those are instantly the first to blame.
B) There have been many issues with setting it up / bindings and not enough buttons / switches (depending on hardware) for using in-game radio menus and SRS and trying to walk some of them through it is like herding cats. Esp when to do so is holding everyone else up.
C) If someone is out of date and it causes a problem then things 'kick off'. Trying to get everyone on the same software, with the correct bindings / setup / config, and without anyone crashing / lagging / disconnecting is virtually impossible. So then every cries 'Vanilla!' and everything non-vanilla has to go.
D) Uninstalling SRS often has left behind things that screws stuff up e.g. When the F14 Radio Menu stops responding to mouse clicks because the uninstaller didn't delete a file and folder. That bug took two months to track down. 
E) Most don't want to use the in-game radios because they were real pilots and just like we don't want to do cold starts - we only have a short time to play together and we've all started real aircraft with real checklists, the 'attraction' to that is pointless after a while. We don't see the need to mess around with on-screen buttons to change freqs, when in a real cockpit you can just reach out and quickly tweak a knob, in a 'game' it's a PITA. So TS or Discord suit everyone fine and we don't have to worry about needless comms channels. We want to get to the meat and leave the decorative parsley off the plate. 

 

 

Fair enough!

 

Quote

Uninstalling SRS often has left behind things that screws stuff up e.g. When the F14 Radio Menu stops responding to mouse clicks because the uninstaller didn't delete a file and folder. That bug took two months to track down. 

^ this though, there's no way SRS can conflict with any module.

The installer leaves behind the SRS config file in program files, but nothing in any DCS folder and SRS specifically uses the saved games folder so as not to conflict. It's why it's not flagged by DCS IC so you can cross off one reason off the list 😃

For SRS though you can also use it with just two buttons. Next radio and PTT 

Just enable always allow SRS hotkeys and disable allow DCS PTT and it'll work for every module in the same way with just next radio to switch and PTT to talk

The rest, not much I can help with I'm afraid

 


Edited by Ciribob
  • Like 2

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...