Author Topic: Teamspeak Push to talk via VoiceAttack possible?  (Read 9796 times)

BadDan

  • Guest
Teamspeak Push to talk via VoiceAttack possible?
« on: April 15, 2017, 03:15:03 PM »
Hi,
new here in the forum and also new into VoiceAttack. I wonder if it would be possible to emulate the "Push to talk" function in Teamspeak?
For example:
I say "Teamspeak" and then VoiceAttack will "press" my push to talk-button for as long, as I am talking. After a few seconds of silence, VA should stop "pressing" my ptt-button.

Would be nice, if I am anywhere in my room with my rift on, and not close to my mouse or keyboard (where I got my ptt-button on).

If this is possible, I would be very thankful for an easy to understand explanation of how to do it. Like I said, totally new to VA.

Cheers

Dan

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #1 on: April 15, 2017, 04:13:47 PM »
Without a custom plugin to check the input volume of the microphone, I don't see how you would implement this in a usable manner.

You could use dictation, but there's no way to differentiate between processing speech, and waiting for input.
I.E. you'd have to make the delay for disabling the microphone the same as the maximum time you can speak continuously, which isn't very practical.


Could you perhaps map a button on the Rift's controller for PTT?

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #2 on: April 15, 2017, 04:20:58 PM »
I thought it may be possible, to let VA recognize, if there is not voiceinput. I got nothing on the soundlevelindicator of VA, when I´m not talking. Breathing goes unnoticed, so i thought you could set some timeout counter or something. So as long, as there is noise (talking) the button is beeing pushed, and whe I´m silent for lets say 3 seconds, VA will let the button go.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #3 on: April 15, 2017, 04:38:27 PM »
I thought it may be possible, to let VA recognize, if there is not voiceinput. I got nothing on the soundlevelindicator of VA, when I´m not talking. Breathing goes unnoticed, so i thought you could set some timeout counter or something.
VoiceAttack has those values internally, but they're not exposed for use by any of the built-in actions.

You are of course free to make a feature request pertaining to this.

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #4 on: April 16, 2017, 03:50:18 AM »
Thank you, then I´ll send a request to the devs.  :)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #5 on: April 17, 2017, 06:17:35 PM »
Although I haven't added an explicit way to do what has been requested (thank you for the PM, btw), I did add a way for you to test whether or not the speech engine is processing speech via token.  You can loop and check the state and if a certain amount of time passes and then react accordingly.  The token is called, '{STATE_SPEECHACTIVE}' and it will be in the next release.  No ETA on that as I have the code's guts out for other stuff ;)

Alpha-Kilo

  • Newbie
  • *
  • Posts: 37
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #6 on: April 18, 2017, 09:34:27 AM »
BadDan,

Why do you want Voice Attack to switch on your Teamspeak? Isn't it easier to use Teamspeak's own voice activation feature (Teamspeak >> Extras >> Options >> Recording)?   
----------------------------------------------------------------
SPEAKEASY - voice control for Arma 3:
http://voiceattack.com/SMF/index.php?topic=1494.0
----------------------------------------------------------------

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #7 on: April 18, 2017, 09:48:57 AM »
That's what I thought too.  He wants to be able to speak freely to VA without Teamspeak transmitting.  Then, when he's ready to talk to his teammates, he says, 'Teamspeak'.  VA then holds down TS's push to talk button until he stops talking.  After x seconds of no talking, VA releases the push to talk button.

It was a fun idea...  however, I don't really have a clue as to where something like that would fall in as a feature so I made a token that can be checked.

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #8 on: April 19, 2017, 01:13:42 PM »
Actually I hate VoiceActivation, although I never tried it myself. But many guys in my TS have it on and have terrible settings on it. You hear them eating, sneezing, talking to family and so on.  Most of us use push to talk, because the others only hear, what they should hear.
And like Gary already wrote, I want to use VoiceAttack in Elite Dangerous to command my ship, but I don´t want all that stuff go to my Teamspeak.
And the other scenario is, when I´m out of reach of my push to talk button (got it on mouse, wheel, and pad) while having fun with my rift and the touch controllers in the middle of my playarea. But there is no way, to set any of the buttons of the touchcontroller for push to talk.

But I´ll try that token, when it will be out. Many thanks so far.  :)
« Last Edit: April 19, 2017, 01:20:07 PM by BadDan »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #9 on: April 19, 2017, 01:54:17 PM »
Hoping tonight ;)

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #10 on: April 25, 2017, 09:41:19 AM »
So how do I use this token? I got not the slightes clue, where to begin. Would someone be so kind and show me, what I have to do, and where I have to do it?
My VoiceAttack skills are very basic, barely managed to make some commanads using the makrorecorder.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #11 on: April 25, 2017, 01:55:59 PM »
Here's a working solution:
Code: [Select]
Set Boolean [speechcomplete] to False
Set decimal [speechendtime] value to [Not Set]
Stop VoiceAttack listening
Press down Left Alt key
Start Loop While : [speechcomplete] Equals False
    Begin Text Compare : [{STATE_SPEECHACTIVE}] Equals '1'
        Set decimal [speechendtime] value to [Not Set]
    Else If Decimal Compare : [speechendtime] Has Not Been Set
        Set decimal [speechendtime] value to the converted value of {DATETICKS}
    Else If Text Compare : [{EXP: {DATETICKS} - {DEC:speechendtime} >= 50000000}] Equals '1'
        Set Boolean [speechcomplete] to True
    End Condition
End Loop
Release Left Alt key
Start VoiceAttack listening
50000000 ticks equates to 5 seconds, I.E. if the speech engine doesn't hear anything for 5 seconds, the TTS key will be released. You can of course change this timeout to your preferred value.

Note that VoiceAttack will stop listening while you speak to prevent commands triggering unintentionally, this includes during the timeout.


I've attached the command so you can import it into your profile.
« Last Edit: April 25, 2017, 02:02:00 PM by Pfeil »

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #12 on: April 26, 2017, 11:12:17 AM »
Wow, awesome. Thank you so much. Will try it imediatley.  8)

BadDan

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #13 on: April 26, 2017, 11:32:58 AM »
Works like a charm. Fantastic work. I could never figure that out by myself.

jlbprof

  • Guest
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #14 on: April 05, 2018, 07:36:45 PM »
I realize this is old, I could not get the above code to work.   Here is a modified version of the code that works in my environment.

Code: [Select]
Set Boolean [speechcomplete] to False
Stop VoiceAttack listening
Press down Insert key
Set decimal [speechendtime] value to the converted value of {DATETICKS}
Start Loop While : [speechcomplete] Equals False
    Set decimal [tickdiff] value to the converted value of {EXP:{DATETICKS} - {DEC:speechendtime}}
    Begin Text Compare : [{STATE_SPEECHACTIVE}] Equals '1'
        Set decimal [speechendtime] value to the converted value of {DATETICKS}
    Else If Text Compare : [{EXP:{DEC:tickdiff} > 50000000}] Equals '1'
        Set Boolean [speechcomplete] to True
    End Condition
End Loop
Write '[Blue] speech out' to log
Release Insert key
Start VoiceAttack listening

blueknight

  • Newbie
  • *
  • Posts: 14
Re: Teamspeak Push to talk via VoiceAttack possible?
« Reply #15 on: April 21, 2018, 09:30:10 AM »
You know this might be easier to use the mute microphone button for teamspeak. It will just announce microphone muted or enabled and it can be keyed to a keystrokes