Objective-C

Using a custom audio driver

By default, the iOS SDK uses the device microphone to capture audio to transmit to a published stream. And it uses the speakers (or headphones) to play back audio from a subscribed stream. Call the [OTAudioDeviceManager setAudioDevice:] method to set up a custom audio driver for capturing and rendering audio samples:

Call [OTAudioDeviceManager setAudioDevice:] before you initialize an OTSession object. Call the [OTAudioDevice setAudioBus:] method to set an audio bus object. This object, defined by the OTAudioBus protocol, has a [OTAudioBus writeCaptureData:numberOfSamples:] method and a [OTAudioBus readRenderData:numberOfSamples:] method. These methods are called when audio samples are made available for writing to the publisher's audio stream or for reading from the subscribed streams.

Applying audio and video transformations to published streams

You can use pre-built transformers from the Vonage Media Processor library or create your own custom audio or video transformer to apply to published video. See this topic

Applying audio and video transformations to published streams

You can use pre-built transformers from the Vonage Media Processor library or create your own custom audio or video transformer to apply to published video. See this topic.

Tuning audio quality

To fine tune audio quality for a publisher stream the following approaches can be used:

Audio bitrate as a publisher settings

The desired bitrate for the published audio, in bits per second. The supported range of values is 6,000 - 510,000. (Invalid values are ignored.) Set this value to enable high-quality audio (or to reduce bandwidth usage with lower-quality audio). If you do not set this option, Vonage automatically assigns an audio bitrate for the stream.

The following are recommended settings:

  • 8,000 - 12,000 for narrowband (NB) speech
  • 16,000 - 20,000 for wideband (WB) speech
  • 28,000 - 40,000 for full-band (FB) speech
  • 48,000 - 64,000 for full-band (FB) music

Reducing audio bandwidth with Opus DTX

Opus DTX (Discontinuous Transmission) is an audio codec that can reduce the bandwidth usage when a participant is not speaking. This can be useful in large sessions with many audio participants.

You enable Opus DTX by setting the enableOpusDtx property of the OTPublisherKitSettings object you pass into the [OTPublisherKit initWithDelegate:settings:] method (when creating a Publisher).

For more information, see this Vonage Video API knowledge base article.

Setting the audio volume for a subscriber

You can individually set the audio volume for each subscriber by setting the OTSubscriberKit.audioVolume property.

Adjusting audio and video

Learn more about manipulating audio and video of Vonage Video API streams for your application. Publish only video or audio, adjust the frame rate, and more.

Steps
1
Introduction
2
Prerequisites
3
Adjusting audio and video
4
Adjusting video settings
5
Adjusting audio settings
6
Subscribing to audio or video only
7
Detecting audio or video - iOS
8
What's next?