Page 9 of 18

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 460

Posted: Sat Mar 28, 2015 11:53 pm
by Rangoon
I have a few questions about SeaHag/CMANO:

1. What is the function of "Reprocess"? I mean I understand that it sends the text back through the filter, but can someone give me an example of how this would be used?

2. I'd like for the "Weapon: ..." log entries to only say: "Weapon hit" or "Weapon miss" - I know how to get a line to cut off early, but how do I get a line to start wtih only the replacement of the last word with "Weapon hit" or "Weapon miss" accordingly? I'd like it to skip everything, then replace like that. Or, say the first word then skip all the way to the last word. How do you cut out the middle? Could reprocess be used for something like this?

EDIT: solved...RegEx
I replaced hits with "Weapon impact" and misses with just "Weapon" and kept the "MISS" text in tact. For self-destructing weapons, I just replaced with "Weapon" and kept the "self-destructing" in tact.

Code: Select all

\:\s\bWeapon\b\:.*\bHIT\b
 \:\s\bWeapon\b\:.*(?=\bMISS\b)
 \:\s\bWeapon\b\:.*(?=\bself-destructing\b)
3. When it comes to replacing, how is REGEXP different from Replace? I see the latest version of SeaHag comes with many more stock filters than originally, and some of the REGEXP entries are used seemingly in lieu of a Replace entry? Are they different?

EDIT: solved...it's really not different.

4. Is there any way to adjust the text-to-speech volume through Sea Hag? I don't see any way in Windows to set it, and I assume for SeaHag it's just running however it would normally in Windows. I see the volume adjustments in the filters are only for the audio file payback, not TTS. I just want to make sure I'm not missing something. I think in general I'd like the TTS events to be clear, with the sound effects taking lower priority. So the CMANO sounds need to get much quieter so the TTS can compete, then adjust SeaHag audio file playback down some more as well.

5. I have five seconds of repeat prevention. I assume this is the time stamp, right? So it would require a time stamp of at least five seconds after the first event for a second like event to fire a speech action, right? I have set a few find filters this way, but I still get several events with the same time stamp firing speech. Does the repeat prevention apply to the time the last speech action finished "speaking"? So if a speech action takes 4 seconds to execute, despite the time stamp, they would keep sounding?

6. There is a replace filter by default for PH (with asterisk for 'replace all') which should change it to "chance to hit". When TTS outputs a weapon attack event, it just says "PH". Why would it not be replacing? Does it have to do with the sequence of that with another filter that is addressing those weapon events? I mean when it's run through the filter for PH, shouldn't it be replacing those regardless of other filters being applied?

Also just want to reiterate, sluggy: Well done with this! Huge contribution, with so much potential for how it can be used. I'm just slowly dialing in the experience that I want by tinkering with those filters.

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 460

Posted: Mon Mar 30, 2015 8:15 pm
by Rangoon
I believe I found a legit bug. The top row/rule doesn't work properly. It seems that if you put a REGEXP rule there, the rule will run, but it won't process. The debug shows it's recoginzing the rule, that it's enabled, RegEx pattern and replacement, but it returns nothing (nothing between the two colons). The same exact REGEXP rule in row 2 or lower works fine.

I tried a Replace rule in row 1 and it also didn't work - sometimes just wouldn't replace, and other times returned an error message.

I've spent the day teaching myself RegEx and had just the right code for something I was trying to do < (?<=\bContact\b\s).*\d+.*(?=\s\#) > but it wouldn't parse in SeaHag correctly. It was driving me crazy, since I'm new to the RegEx language, and assumed it was something I was doing wrong. But I kept checking it outside SeaHag and it was working fine. My troubleshooting took a long and winding path until I finally discovered the problem.

The extremely good news is that RegEx is amazing in SeaHag and it seems like it should be able to make my wildest CMANO TTS ideas come true. :)

Thanks again, sluggy and devs!

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Tue Mar 31, 2015 8:09 pm
by ziolo
I installed SeaHag 1.0g and have to say, playing CMANO now gets really new dimension! Thanks sluggy for excellent work! [&o]

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Wed Apr 01, 2015 3:42 am
by Marder
Sluggy, it is possible that the program saves the configuration file in its "installation" folder?

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Sat Apr 04, 2015 5:54 pm
by Rangoon
I received a PM asking for more details on how I got my RegEx lines working for Weapon log entries and such. Here is an explanation and some examples which I hope will help.

Avoid using the first line (top row, first rule) in SeaHag for now; it seems to be broken, at least for me. But you'll likely want to use one of the earlier rules in the list. At any rate, understand that while the debugger ("More Diagnostics" checkbox) will show the input line as matching the original, the actual input line is updated as it goes through the rules. So if a rule replaces numbers with letters, or removes hyphens, etc., then some of my RegEx code examples won't work if they're looking for specific asset types (like MiG-23ML Flogger G) and identifying them by the hyphens or numbers (vs. BOGEY, which has only letters, and in some of my rules I want left in tact). You could code it more cleverly, or just place the RegEx rule higher so that it correctly locates the "MiG-23" in the text and doesn't get thrown off the trail by "MiG two three", for example. I personally created a dummy rule in slot 1, disabled it, and left it empty. My personal RegEx rules begin at rule #5, after the stock "/" Replace rule.

For testing, I'm doing a few things. In SeaHag, I paste the entire single log entry (from past CMANO log files) of whatever I want to test into the handy Parse Line function below the Log Window - with or without More Diagnostics checked (with SeaHag Stopped, then hit Parse Line). I either use or don't use "Voice On". I uncheck "AutoDetect Playerside" and input the Player Side manually. That way I know I'm testing real-sim log events completely in SeaHag. I use Expresso 3.0 for testing the RegEx code (It's free, has a handy tutorial, and plenty of slick functionality) before importing to SeaHag. I just paste the CMANO log entry into Expresso, excluding the Time Stamp and Player Side (since SeaHag will handle those natively). I test the desired voice results in TextAloud because various voices seem to have strengths and weaknesses. I changed "Weapon HIT" to "Weapon engaging" finally to "Weapon impact" because I thought it sounded the best with the voice I'm using. A few other things like that are catering to the specific voice I'm using, which happens to be "Ivona English, British Amy" - of course you can always use SeaHag to test the TTS voice idiosyncrasies, especially when you're using the default Windows voice.

Example 1:
I wanted to change ": Weapon:...HIT" entries to just "Weapon imact" since I don't like TTS reading the entire line. I just want a quick update and perhaps an indication that I should check the log for more information.

Sample entry:
"2/21/1983 5:07:25 PM - : Weapon: AIM-54A Phoenix #303 is attacking MiG-23ML Flogger G with a base PH of 80%. PH adjusted for distance: 66%. PH adjusted for actual target speed (601 kts): 64%. MiG-23ML Flogger G has nominal agility: 3. Agility adjusted for proficiency (Regular): 2.4. High-deflection impact (no effect on agility). Final agility modifier: -24%. Final PH: 40%. Result: 11 - HIT"

Rule:
Verbosity 1-9
Prevent Repeat 0
type is REGEXP
Text to Look for / Regexp: "\:\sWeapon\:.*\bHIT\b" without quotes.
Reduce Char: leave empty (delete the asterisk)
Replacement: "Weapon impact" without quotes.
Continue
Volume 10 (I think this does nothing with TTS, only sounds).

What the code does is searches for the colon which begins these entries in the CMANO log, then a space, followed by the word "Weapon:", followed by any characters other than "new line", followed by the word "HIT". It is selecting the entire match. SeaHag then will replace that entire match with "Weapon impact". I then have a Find rule in SeaHag, toward the bottom, which searches for "Weapon " (with the space at the end) to trigger speach. The line itself was reduced entirely to "Weapon impact" after the Time Stamp and Player Side were removed by SeaHag. I replaced the word ": Weapon:" because it made it easy for me to search and also remove the colons. There is probably a smarter way to do this. I remove the colon after Weapon for TTS reasons (remove the pause).

Example 2:
I wanted to change ": Weapon:...MISS" entries to just "Weapon MISS".

Sample entry:
2/21/1983 5:07:15 PM - : Weapon: AIM-54A Phoenix #300 is attacking MiG-21bis Fishbed N with a base PH of 80%. PH adjusted for distance: 66%. PH adjusted for actual target speed (569 kts): 64%. MiG-21bis Fishbed N has nominal agility: 3.5. Agility adjusted for proficiency (Regular): 2.8. High-deflection impact (no effect on agility). Final agility modifier: -28%. Final PH: 36%. Result: 64 - MISS

Rule:
Verbosity 1-9
Prevent Repeat 0
type is REGEXP
Text to Look for / Regexp: "\:\sWeapon\:.*(?=\bMISS\b)" without quotes.
Reduce Char: leave empty (delete the asterisk)
Replacement: "Weapon " without quotes, but with the space
Continue
Volume 10 (I think this does nothing with TTS, only sounds).

What the code does is searches for the colon which begins these entries in the CMANO log, then a space, followed by the word "Weapon:", followed by any characters other than "new line", followed by the word "HIT". It is matching everything *except* for the word "MISS". SeaHag then will replace that entire match with "Weapon " and leave "MISS" in tact. I then have a Find rule in SeaHag, toward the bottom, which searches for "Weapon " (with the space at the end) to trigger speach. The line itself was reduced entirely to "Weapon MISS" after the Time Stamp and Player Side were removed by SeaHag. I replaced the word ": Weapon:" because it made it easy for me to search and also remove the colons. There is probably a smarter way to do this. I remove the colon after Weapon for TTS reasons (remove the pause).

Example 3:
I wanted to change "Weapon:... ... self-destructing" entries to just "Weapon self-destructing".

Sample entry:
2/21/1983 5:08:30 PM - CVW-15: Weapon: AIM-7F Sparrow III #315 is running blind for more than 5 sec... self-destructing.

Rule:
Verbosity 1-9
Prevent Repeat 0
type is REGEXP
Text to Look for / Regexp: "\bWeapon\:.*(?=\bself-destructing)" without quotes.
Reduce Char: leave empty (delete the asterisk)
Replacement: "Weapon " without quotes, but with the space
Continue
Volume 10 (I think this does nothing with TTS, only sounds).

What the code does is searches for the word "Weapon:", followed by any characters other than "new line", followed by the word "self-destructing". It is matching everything *except* for the word "self-destructing". SeaHag then will replace that entire match with "Weapon " and leave "self-destructing" in tact. I then have a Find rule in SeaHag, toward the bottom, which searches for "Weapon " (with the space at the end) to trigger speach. The line itself was reduced entirely to "Weapon self-destructing" after the Time Stamp and Player Side were removed by SeaHag. I replaced the word "Weapon:" because it made it easy for me to search and also remove the colon. There is probably a smarter way to do this. I remove the colon after Weapon for TTS reasons (remove the pause).


Example 4:
I wanted to change "[some kind of specific sim contact like MiG-23ML Flogger G #64] has been lost." entries to just "ID'd contact [number] has been lost". Rather than create rules to try and get TTS to render all of these specific asset names correctly, I just wanted to shorten the whole thing up and have it say something which it could always say correctly (dare I say "naturally"?). I can then just look at the log for more information.

Sample entry:
2/21/1983 5:10:13 PM - CVW-15: Contact MiG-23ML Flogger G #64 has been lost.

Rule:
Verbosity 1-9
Prevent Repeat 0
type is REGEXP
Text to Look for / Regexp: "(?<=\bContact\b\s).*\d+.*(?=\#)" without quotes.
Reduce Char: leave empty (delete the asterisk)
Replacement: "ID'd contact" without quotes
Continue
Volume 10 (I think this does nothing with TTS, only sounds).

What the code does is searches for the word "Contact " (with the space), followed by (or not) any characters other than "new line", followed by at least one number, followed by (or not) any characters other than "new line", followed by the "#" symbol. It is matching everything between, but not including, the word "Contact " and the "#" symbol. SeaHag then will replace that entire match with "ID'd contact". I then have a Find rule in SeaHag, toward the bottom, which searches for "has been lost" to trigger speach. There are default Replace rules to change numerals to words for the numbers. I have a Replace rule which changes "#" symbols to a space. The line itself was reduced entirely to "ID'd contact six four has been lost." after the Time Stamp and Player Side were removed by SeaHag.

Example 5:
I wanted to change "[some kind of specific sim unit designation like VA-105 Gunslingers, NE-401] has been destroyed!" entries to just "Asset has been destroyed!". Rather than create rules to try and get TTS to render all of these specific asset names correctly, I just wanted to shorten the whole thing up and have it say something which it could always say well. I can then just look at the log for more information.

Sample entry:
2/21/1983 5:25:33 PM - CVW-15: VA-105 Gunslingers, NE-401 has been destroyed!

Rule:
Verbosity 1-9
Prevent Repeat 0
type is REGEXP
Text to Look for / Regexp: "^.*(?=has\sbeen\sdestroyed)" without quotes.
Reduce Char: leave empty (delete the asterisk)
Replacement: "Asset " without quotes, including the space
Continue
Volume 10 (I think this does nothing with TTS, only sounds).

What the code does is searches for the the start of a string beginning with any characters other than "new line", followed by the words "has been destroyed". It is matching everything before the words "has been destroyed". SeaHag then will replace that entire match with "Asset ". I then have a Find rule in SeaHag, toward the bottom, which searches for "has been destroyed" to trigger speach. The line itself was reduced entirely to "Asset has been destroyed!" after the Time Stamp and Player Side were removed by SeaHag.

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Sun Apr 05, 2015 6:48 am
by chrisol
That's fantastic - and far more than I was expecting (I was the pm-er)... should enable me to tweak things exactly how I want now.

Also thanks for Seahag itself which really transforms the Command experience - not least by reducing the number of pop-ups without me missing anything (such as new or lost contacts)

Many thanks
Chris

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Tue Apr 07, 2015 8:36 am
by sluggy2010
Hi Rangoon,

Thanks for the heads-up I'll check out the line processing skipping the 1st line, will revert in a day or two.

( And thanks for putting up the ref info for everyone else )

Regards

Sluggy

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 09, 2015 10:25 am
by sluggy2010
Hi chaps,

I've checked the first line processing but mine is working.

Test Case : Insert a new first line - search for nm and set it to change to Nautical Miles and it worked.

So can you post the following somewhere and I'll download and run some tests with your files.

Can you include -

i) The log file you used
ii) The saved parameter file for your SeaHag - ( Check page one for how to find the config file )
iii) A quick description of the line processing that is not working

Cheers

Sluggy

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 09, 2015 10:26 am
by sluggy2010

Whats the problem we're trying to solve ?


RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 09, 2015 6:19 pm
by Rangoon
ORIGINAL: sluggy

Hi chaps,

I've checked the first line processing but mine is working.

Test Case : Insert a new first line - search for nm and set it to change to Nautical Miles and it worked.

So can you post the following somewhere and I'll download and run some tests with your files.

Can you include -

i) The log file you used
ii) The saved parameter file for your SeaHag - ( Check page one for how to find the config file )
iii) A quick description of the line processing that is not working

Cheers

Sluggy

Thanks for looking into this. I will try to tackle a test of this and report back in with files - probably tomorrow afternoon (US CDT).

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 09, 2015 7:07 pm
by Rangoon
ORIGINAL: sluggy


Whats the problem we're trying to solve ?


Is this in relation to life in general? Because if so, I would also like to know. Or...what are you zeroing in on?

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Fri Apr 10, 2015 12:44 am
by Rangoon
ORIGINAL: sluggy

Hi chaps,

I've checked the first line processing but mine is working.

Test Case : Insert a new first line - search for nm and set it to change to Nautical Miles and it worked.

So can you post the following somewhere and I'll download and run some tests with your files.

Can you include -

i) The log file you used
ii) The saved parameter file for your SeaHag - ( Check page one for how to find the config file )
iii) A quick description of the line processing that is not working

Cheers

Sluggy


Hi Sluggy,

I am attaching the files you've requested. I found a very small log file which has <20 entries. I inserted a new rule above the top rule, to be the new Rule #1. I tried two versions, otherwise identical. One works, the other doesn't. I created basic Replace rule, which works, and a REGEXP rule which doesn't. The RegEx code is very simple and simply looks for the word BOGEY and replaces it with TEST. Replace works correctly and you'll hear/see the results accordingly. Make the same rule with RegEx code and it no longer works. I ran the same log entry minus the time stamp and player side in Expresso and it properly matches the word BOGEY.

So here is the rule I'm using, as you'll see in my user config.

Enabled: Y
Min Verb: 1
Max Verb: 9
Prevent Repeat: 0
Rule Type: REGEXP
...
Rexexp: \bBOGEY\b
Reduce Char: blank
Replacement: TEST
...Continue/Vol.10

For the replace version, simply used
Type: Replace
Text to Look for: BOGEY
Reduce Char: *
and all else the same.

Now, if you take my user config, and then insert a new line above my top line, leave it default/blank, suddenly Rule #2 (my former broken Rule #1) starts working (as the REGEXP version).

The first line that fires in this log is:

2/21/1983 5:03:46 PM - CVW-15: New contact! Designated BOGEY #58 - Detected by VF-51 Screaming Eagles, NE-100 [Sensors: AN/AWG-9] at 118deg - 104.8nm

You can of course plug that into the line parser and see the same results. In my user config, you'll get "...Designated TEST five eight" with a Replace rule and "...Designated BOGEY five eight" with a REGEXP rule.

Please let me know if there is anything else I can provide. This utility is so excellent; I'd love to see it get ever more popular with the community so we can all find more and more clever ways to bend it to our will...er, I mean...customize it.

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Fri Apr 10, 2015 8:17 am
by sluggy2010
Thanks chap - I'll check it out tomorrow - I didn't realize it was regex only that failed I'll track it down and get it updated.

Ta for the heads up

Sluggy

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 16, 2015 9:58 pm
by Sigma8510
Ok. I'm over thinking this, but I cannot come up with a rule to do the following:

NOT speak any line with the phrase "is dropping". I still want to have the log entry display, just not have SeaHag speak it.

I'm sure I am missing some obvious way to do this.

Any help here is appreciated!!

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 16, 2015 10:25 pm
by sluggy2010
I was just tidying the code up from above - good timing......

You should use a STOP in the Reprocess / Stop / Continue it will (should) then NOT speak the line.

HOWEVER - I just noticed that STOP's were not working - so I've just fixed it.

When I upload v1.0h ( later today / tomorrow ) get that one and add a rule that does the following

FIND "is dropping" and set Reprocess / Continue / Stop to STOP

Then any line with "is dropping" will not be spoken. Sorry about the bug - but fixed straight away.


Sluggy


RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Thu Apr 16, 2015 11:05 pm
by Sigma8510
Cool!!

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Fri Apr 17, 2015 1:24 am
by sluggy2010

OK Here you go

V1.0h

Bugfix - RegEXP not processing the first RegEXP expression fixed. ( Thanks Rangoon )

Bugfix - A STOP flag in the Reprocess / Continue / Stop column will prevent that line from being spoken at all.
( Thanks jbaxter1964 )

And some small tweaks/tidy ups that should not change functionality

If you guys can check your issues are fixed I'll update the front page afterwards.


Regards

Sluggy



RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Fri Apr 17, 2015 5:06 am
by VegasOZ
ORIGINAL: sluggy


OK Here you go

V1.0h

Bugfix - RegEXP not processing the first RegEXP expression fixed. ( Thanks Rangoon )

Bugfix - A STOP flag in the Reprocess / Continue / Stop column will prevent that line from being spoken at all.
( Thanks jbaxter1964 )

And some small tweaks/tidy ups that should not change functionality

If you guys can check your issues are fixed I'll update the front page afterwards.


Regards

Sluggy



I just found this MOD. I have to tell you that this really enhances my enjoyment of CMANO. Fantastic addition to the game. BTW, I would love to see an ambient "ships engines" sound backdrop added, just for more fun. Also, how about a klaxon or two when a bogey is confirmed as hostile, add some drama.

Thanks for this MOD...awesome job.

RE: [RELEASED] Speech and Ambient Sound Module - Updated CMANO 624

Posted: Fri Apr 17, 2015 6:29 am
by Dide
Thanks again sluggy!

RE: [RELEASED] Speech and Ambient Sound Module - files attached

Posted: Sun Apr 19, 2015 4:56 pm
by jptheronmd
Hi everyone, I am new to the forums and need some help with Seahag. I am running version 1.0g together with CMANO v1.07 B678. I ran Seahag as the instructions explained and used the Default Speech Grid and Sound Grid buttons first. I also manually entered the Steam version of CMANOs dir D:\Steam Games\steamapps\common\Command Modern Air Naval Operations\Logs. AutoDetect Player side is on. I then exit and restart Seahag. Start it and can hear the initialization and start up speech. I then load CMANO and start a scenario. Seahag detects a new log file and I can hear the speech confirming this. From then on all I hear is the ambient sound and no speech.

I have also tried disabling side detection and manually entering the side. Any ideas?

Regards
JP

PS I am using Windows 8.1 64 bit.