Jump to content

[0.23.5][Alpha] Voiced alerts via Windows text to speech 0.0.1 09/05/14


agises

Recommended Posts

Hi, here is another plugin I made for learn and fun, as the title says this is obviously? Windows only (I don't really test it on Linux/Mac, can anyone confirm? :huh:)

Features:

-Voiced flight events (the ones in F3 keybind)

-Alerts for others events like: low altitude, imminent land crash, escape trajectory, warp...

-Needs Toolbar otherwise you can't activate it. Look for icon_off.png icon in the toolbar. (I can make a keybind if requested)

-Just for fun: Public Speech() do you want make speak your plugins?

Install instructions:

Copy both directories in the zip file (GameData and KSP_Data) to the KSP game base directory and merge with the existing ones when asked for.

Uninstall instructions:

Delete plugin directory "warnings" in GameData directory and "Interop.SpeechLib.dll" in "KSP_Data\Mono\" directory.

Download:

https://github.com/hashashin/ksp_warnings/releases/download/0.0.1/voice_warnings-0.0.1.zip

TODO (not in a particular order):

-Custom alerts/events.

-GUI and/or config files.

-Ability to skip time markers in the flight events log.

-Support more voices.

-"play" txt or xml files with custom speeches.

Source/bugs/code suggestions:

https://github.com/hashashin/ksp_warnings

License GPLv3

Salud.

Ps: Sorry for my poor english.

Edited by agises
added todo list
Link to comment
Share on other sites

This sounds like it might be fun, and your English is better than some native speakers but you might want to change 'tittle' to 'title' before someone less mature notices.

Lol, thanks.

Link to comment
Share on other sites

A video would be nice, this sounds very interesting :)

Added some showcase videos in the first post.

That is interesting. I've tried to get a working speech interop library working, but couldn't do it and eventually gave up. I might try importing your lib and play around with it.

The trick for me was putting the interop library side by the mono one in ksp. You can obtain the library in Visual Studio -> References, Add reference, COM, Microsoft Speech Object Library.

This mod great albeit a bit raw, with a bit of refining you can use this to recreate Apollo mission using shoutouts from the crew and capcom.

You mean speech the mission comms transcriptions? This is feasible I can imagine txt files with the transcriptions and a grid of buttons to speech the files. In other hand ability to customize the warnings messages is planned (with some kind of gui to do it), multiple voices support and more voiced alerts, no eta as I do this on my spare time.

Salud.

Edited by agises
Link to comment
Share on other sites

You mean speech the mission comms transcriptions? This is feasible I can imagine txt files with the transcriptions and a grid of buttons to speech the files. In other hand ability to customize the warnings messages is planned (with some kind of gui to do it), multiple voices support and more voiced alerts, no eta as I do this on my spare time.

You could (Or I should say "could you...?") have the ability to set up "alerts" for every state change? Like when you change SOIs, or get within 1000 meters of the ground? Then a config could, say, have:


<SOI="Mun">
<State="LowOrbit">
<From="HighOrbit">
<Say="Low orbit achieved. Prepare for landing.">
</From>
<From="Landed">
<Say="Liftoff!">
</From>
</State>
</SOI>

And then Mission Control would say those two lines as you approached Mun and as you took off.

Link to comment
Share on other sites

You could (Or I should say "could you...?") have the ability to set up "alerts" for every state change? Like when you change SOIs, or get within 1000 meters of the ground? Then a config could, say, have:


<SOI="Mun">
<State="LowOrbit">
<From="HighOrbit">
<Say="Low orbit achieved. Prepare for landing.">
</From>
<From="Landed">
<Say="Liftoff!">
</From>
</State>
</SOI>

And then Mission Control would say those two lines as you approached Mun and as you took off.

It's possible and in fact there's already some hard coded alerts if you look at the source code. For the config files and custom alerts you'll need to wait until I figure how to make that first :rolleyes:, but as I already said is something I want to implement.

Furthermore, I guess someone more skilled can take the idea and make a proper and certainly better implementation in less time (before the Ragnarök I learn how to do it).

Salud.

Link to comment
Share on other sites

I think you shoudl add option to skip this time markers.

I Created a TODO list in the first post and I added this to it. Thanks for the point, it annoys me also sometimes lol.

Salud.

Link to comment
Share on other sites

The trick for me was putting the interop library side by the mono one in ksp. You can obtain the library in Visual Studio -> References, Add reference, COM, Microsoft Speech Object Library.

Yes, I know. Actually what I was trying to do was a little different. You seem to be using the interop library directly, whereas in my case, I've been wanting to use System.Speech or rather System.Speech.Recognition. I have been putting the System.Speech.dll into various places, and couldn't get it to work. In the end, I've decided to create a little standalone application that uses System.Speech, then communicates with a KSP plugin via UDP packets. Works like a charm.

Link to comment
Share on other sites

Yes, I know. Actually what I was trying to do was a little different. You seem to be using the interop library directly, whereas in my case, I've been wanting to use System.Speech or rather System.Speech.Recognition. I have been putting the System.Speech.dll into various places, and couldn't get it to work. In the end, I've decided to create a little standalone application that uses System.Speech, then communicates with a KSP plugin via UDP packets. Works like a charm.

I guess that's because KSP uses an striped version of system.dll but I could be wrong.

Salud.

Link to comment
Share on other sites

Is there a way to control the volume separately from stock KSP's sounds? It's kinda quiet.

I'm not aware of a TTS specific volume control in Windows, correct me if I'm wrong with this. The volume is hardcoded to 100% in the plugin, as I notice was too low by default in my initial tests, for now as workaround you can low the volume of the others KSP sounds ingame and in the windows mixer up the volume of the KSP process. Then play with the game volume sliders and the windows mixer one and find a point where you can heard the voice and ksp sounds at ~ same level.

Salud.

Link to comment
Share on other sites

I'd correct you if you were wrong, but I don't know either. Is the mod's volume separate from the in-game sliders then?

Right, is not affected by the sliders in the game.

Link to comment
Share on other sites

I like this mod, but it is far from complete at this point. Needs more polish. I love the idea of having an AWS. It would make the game seem way more dynamic. But all this mod does is act as a TTS for the flight events. I cant wait until this mod is fleshed out.

What would be amazing would be for this mod to support Ferram Aerospace and for this mod to provide stall warning notifications. Probably not in the form of a TTS voice, but maybe an stall warning noise you would hear in the cockpit of an airplane. Maybe more notifications for specific scenarios such as if your plane is pitched down past a specific angle and your velocity is greater than a specific value and your altitude is below a certain height, it would start shouting PULL UP at you. This would probably be complicated to code, but would make this mod way better.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...