Hello!
This is the implementation of local tsa for the game Space Station 14
At the moment, the project has stopped on implementation in the client of the game
At the moment, from this repository, you can find out how to create a server application for TTS and voice it on C#
About libraries and models:
1) as a model for execution, a Silero model that works offline was chosen; supports the creation of new votes and can work with CUDA nuclei
2) To implement the server for voice acting messages, I used Python with the latest libraries: Asyncio, Json, Torch, Io, SoundFile, Pydub, Threading, WebSockets
These libraries allow you to work with existing packs of C# Space Station 14 project
To install Torch and FFMPEG, I advise you to get acquainted with the tutorials. Also, for Torch you need a video card with CUDA nuclei, but on the SILERO GITA there are examples of how to use only CPU
What did you stop at?
At the moment, ChatSystem.cs in Content.server can successfully send requests for voice acting from the Local channel (we call it "nearby"). TTS server will expect who to transfer the file
For the correct work, it is necessary to add the sending of requests from all channels (for example, radio channels), as well as implement the transfer of files to a client for further playback
Why did you abandon the project?
Upon an attempt from Content Client, he will join the project’s socket of the project will issue 0 errors, but when you start the .exe, the game client will immediately close without logs. I couldn’t get around this problem. And without the ability of the client, he will join the TTS server socket to obtain audio for voice acting, it is necessary to transfer audio (possibly) from Content.Server to Content.SHared - which is responsible for the execution of abstract classes, and already through Content.shared to play audio with the player. My decision made it possible to do this is much easier and is not tormented with someone who could hear the voice acting (so that KEP with zero does not hear the voice acting of messages from nuclear operatives). But since the client does not allow this to do this, it will be necessary to implement this with transit from Content.Server to Content.client using the entire functionality of the class of game code
Unfortunately, I am poorly familiar with the sketch code and do not have serious projects in C#, as well as time in order to completely study the structure of the game code. Therefore, I froze my project before the advent of people who could help implement audio reproduction in the game code
If you are ready to implement playing on the client side in C# Games, I can help you with the improvement of the server and processing and transmitting audio
My communication discord: Requiem4soul