기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Vivox Core SDK

Vivox Core SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
  • Release notes
  • Developer Guide
    • Client SDK basics
    • Channels
      • Channel name criteria
      • Channel types
      • Echo channels
      • Positional channels
      • Volume differences
      • Channel identifiers for large scale games
      • Participant events
      • Channel webhooks
      • Join a channel
      • Leave a channel
      • Kick a user from a channel
      • Manage session groups
      • Audio injection
      • Methods for setting audio levels
      • Derumbler
      • Automatic connection recovery
    • Presence management
    • Messaging
    • Manage audio
    • Couch co-op
    • Android app development
    • iOS app development
    • macOS app development
    • Windows app development
    • Real-time recording
    • Speech-to-text audio transcription
    • Text-to-speech
    • Troubleshooting
  • Reference
  • Privacy overview
  1. Vivox Core SDK documentation

Audio injection

Broadcast audio from a file to all connected channels.
읽는 시간 3분
최근 업데이트: 8달 전

참고
There is a known issue with the Vivox SDK in which the local playback of the injected audio only occurs if the file also has the same sample rate as the negotiated audio codec. Other players always hear the file correctly, regardless of the sample rate. For Windows, this usually is 48kHz.
Audio injection allows you to broadcast audio from a file to all connected sessions in a single session group. Injected audio is treated like a second capture device you are speaking into. This means that muting or disconnecting your input device does not stop others from hearing the file audio. However, muting yourself in a channel, stopping transmission to a channel, or disconnecting a channel's media stream does stop others from hearing the file audio. Because the played file is treated as speech, it will beheard by anyone that would typically hear the user. It also triggers speaking indicators and VU meters like speech does, and is heard by participants in accordance with the player's position and orientation in a 3D channel, or when in a 2D channel, from anywhere on the map.
Use cases for this feature include a player selecting pre-scripted audio clips in their character's voice saying things like "Enemy spotted!" or "Need healing!" to signal their situation, which is especially useful when the player does not have a microphone. Depending on your application, it might also be appropriate to let the user play music into the channel for everyone to listen to. When the file being injected ends, the
vx_evt_media_completion
event will trigger, you can use it to loop an audio track when complete or move to the next track in a playlist.
You can broadcast only one file at a time. Successfully completed
vx_req_sessiongroup_control_audio_injection
requests with a "start" control type will play the specified file from the beginning only if no file is already playing; a "restart" control type always begins playing the specified file from the beginning and replaces any file that was previously playing. You can stop file audio from playing at any time by making the request with a "stop" control type. Note that injecting file audio does not replace or otherwise prevent the user from speaking into their capture device and being heard as normal; it is considered to be an additional audio source.
The file also plays locally for the user while it is being transmitted to others to simulate the experience of file injection as a second spoken audio source. This means that a user playing a file into a non-positional or a positional channel hears the file slightly earlier than other participants, just like their own voice when speaking. The file plays with an echo in an echo channel, just like your own voice.
경고
Audio files broadcast with this feature must have a .wav extension and contain single channel, 16-bit PCM audio. Otherwise, the
vx_resp_sessiongroup_control_audio_injection
response returns VxErrorInvalidFormat, and the file does not play.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.


    이 페이지의 문제 보고