Configure microphone
Select the active microphone device and configure platform-specific permissions for Android, iOS, and WebGL builds.
Microphone device selection
using Convai.Runtime.Settings;
// Get the microphone device service from the SDK
if (ConvaiManager.ActiveManager.TryGetMicrophoneDeviceService(out IMicrophoneDeviceService micService))
{
// List all available devices
IReadOnlyList<ConvaiMicrophoneDevice> devices = micService.GetAvailableDevices();
foreach (var device in devices)
{
Debug.Log($"{device.Name} (ID: {device.Id}, Index: {device.Index})");
}
// Start listening with a specific device index
await ConvaiManager.ActiveManager.Audio.StartListeningAsync(microphoneIndex: device.Index);
}Platform-specific setup
Android
iOS
WebGL
Next steps
Add chat UILast updated
Was this helpful?