Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved How to send direct voice message?

Discussion in 'Vivox (Voice & Text Chat)' started by randomdragon, Mar 9, 2022.

Thread Status:
Not open for further replies.
  1. randomdragon

    randomdragon

    Joined:
    Feb 11, 2020
    Posts:
    31
    upload_2022-3-9_12-46-20.png
    The document says Vivox can send direct text and voice, but I haven't found the API to send a direct voice, just like one user record a piece of audio send to another user and play it locally.
     
  2. Unity_Brandon

    Unity_Brandon

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    18
    Hey randomdragon,

    Direct voice in this sense means that you can send live audio directly to another player who will receive it in real-time. In order for a player to play a piece of audio at a later date, you will need to save the audio to a file and make that file accessible to the receiving user.

    We have an article available on our support portal that goes over how to Access client-side audio buffers, which will let you record audio from capture devices from within Vivox. If you are using the Unity wrapper which currently does not have this functionality, I recommend checking out the built-in Microphone management functions that will help you create an audio clip. From there you can either send and store it in the receiving player's device to play later or host it on a third-party server from which the player can retrieve it.

    If using Vivox core, you can play the file back for just the one user with:
    vx_req_aux_render_audio_start

    Or, to insert into a channel with any number of users:
    vx_req_sessiongroup_control_audio_injection_t
     
    randomdragon likes this.
Thread Status:
Not open for further replies.