Documentation

Support

Vivox Unity SDK

Vivox Unity SDK

Speech-to-text and audio injection

Use speech-to-text with audio injection in Vivox.
Read time 1 minuteLast updated 2 days ago

You can have speech-to-text transcribe injected audio by using the following API methods.

IVivoxService.StartAudioInjection

Use this method to start audio injection inside a channel. Injected audio is played only into the channels you're transmitting into. This method takes the following parameter:
audioFilePath
: The full pathname for the .wav file for audio injection. The file must be single channel, 16-bit PCM, with the same sample rate as the negotiated audio codec. This file is required.

IVivoxService.StopAudioInjection

VivoxService.Instance.StartAudioInjection(path);await Task.Delay(10000);VivoxService.Instance.StopAudioInjection();await Task.Delay(10000);
Use this method to stop audio injection inside a channel.

IVivoxService.IsInjectingAudio

VivoxService.Instance.IsInjectingAudio
Use this getter to check whether audio is being injected.