Author Topic: VoiceAttack running on 2 PCs - any way to keep them from talking over eachother?  (Read 1065 times)

Robertsmania

  • Newbie
  • *
  • Posts: 46
I know this is pretty far out there, but I'll ask anyway just in case there is a clever solution or someone has ideas on how to solve this.

In my system there are two instances of VoiceAttack - each one running on a different computer.  One is running the Digital Race Engineer plugin and interacting with iRacing.  The other runs on my stream PC and is responding to commands and using a plugin that I've written to handle replays and other stuff for a spectator view.

In the past, the Digital Race Engineer was the most verbose in terms of how much TTS there was and the systems seldom spoke over each other.  But now that I'm doing new things with the stream PC system, its talking a lot more and the two systems do end up talking at the same time quite a bit.

I'm wondering if there isnt some way I could run a routine in a plugin on one system that detects when that VoiceAttack is speaking.  If it can detect when the TTS is active, it could write something to a file or message a websocket, or some other mechanism to let the other computer know.

I cant change anything about how the Digital Race Engineer works, but I do have control over the other system and would be happy to make it be the one that defers and waits/queues commands until the other one is quiet.

Reading through the documentation, I do find SpeechActive() - but that only indicates if the speech recognition system is active, not TTS.  The audio commands like AudioCount() sound like they only report on audio files that may be playing, not TTS.

Is there a way to detect when TTS is active?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
The "{STATE_TTSCOUNT}" token should return that information.

It was added much later than "{STATE_AUDIOCOUNT}", and does not appear to have a direct method equivalent, but you can use the ParseTokens() method.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Splendid, I'll see what I can do with that.  Thank you as always for the prompt reply!