Forum

Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145

    Get voice input that ts3 "hears" with a plugin

    Is there a way in the pluginsdk to get the voice data of a user? I don't just want to constantly listen to the mic, but instead only get what teamspeak "hears".
    So only get the voice data when the client is actually talking.
    Basically the recording has to match the voice activation or ptt boundaries from the client.

    Should I use functions that tell me when the client has started / stopped talking?
    Is there a function to get the sound from the users microphone using the pluginsdk or do I have to use other libraries?
    Or is there a better (intended) way?

    It has to be a live transmission, so doing a recording doesnt help, unless I can record into a network stream or socket file

  2. #2
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    There are indeed sound processing functions.

    The sdk documentation is not perfect, but these functions are contained, so just take a look at it.

  3. #3
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Is the sample the raw data or encoded voice data?
    Does the sample need to be freed by me or the client (I assume the client?)
    And can I get access to TS's built in opus encoder somehow?

  4. #4
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    The sample is freed by the client only. If I remember correctly, you can even manipulate the data, so there is no reason to free the memory.

    Quote Originally Posted by the docs
    The TeamSpeak Client Lib allows users to access the raw playback and capture voice data and even modify it, for example to
    add effects to the voice. These callbacks are also used by the TeamSpeak client for the voice recording feature.
    So it seems to be the raw data.

    Looking into the code of CrossTalk, which processes (and manipulate) the sound data might help as well.

    I never worked with the sound data, so I'm no expert on that and I'm out for any further question

  5. #5
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Alright, that already helped a lot, thanks.
    But a couple more things I need:

    When does the function get called?
    Is it when a user starts speaking?
    Or maybe every x milliseconds?
    And what is the sample count in those cases?
    Is it a number that makes for a valid 48 kHz opus encoder frame size?
    And is there ANY decent documentation about the ts3plugin_onEditPlaybackVoiceDataEvent function?
    Last edited by Jhhhj_original; June 13th, 2019 at 09:05 PM.

  6. #6
    Join Date
    September 2012
    Posts
    6,080
    Quote Originally Posted by Jhhhj_original View Post
    Alright, that already helped a lot, thanks.
    But a couple more things I need:

    When does the function get called?
    Is it when a user starts speaking?
    Or maybe every x milliseconds?
    And what is the sample count in those cases?
    Is it a number that makes for a valid 48 kHz opus encoder frame size?
    And is there ANY decent documentation about the ts3plugin_onEditPlaybackVoiceDataEvent function?
    Easy to figure out yourself, through just taking a look at those events when using the client.

    onEditPlaybackVoiceDataEvent / onEditPostProcessVoiceDataEvent: For every client in your channel (other than self) while they are talking, every 10ms.
    onEditCapturedVoiceDataEvent: As long as your capture device is open, every 20ms.
    onEditMixedPlaybackVoiceDataEvent: As long as your playback device is open, every 10ms.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Bot "echoing" everything he hears
    By dzinks2009 in forum Linux
    Replies: 5
    Last Post: January 21st, 2019, 05:17 PM
  2. Replies: 2
    Last Post: July 8th, 2015, 11:39 AM
  3. Please Update this Plugin ""Connection History"" Or Include to Client Version
    By varela1george in forum Suggestions and Feedback
    Replies: 2
    Last Post: October 13th, 2012, 08:28 AM
  4. Replies: 15
    Last Post: June 20th, 2012, 01:51 PM
  5. Hotkey for switch "push to talk" and "voice activated"
    By eternal-blue in forum General Questions
    Replies: 1
    Last Post: January 8th, 2010, 10:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •