How to reduce more delay on Realtime Voice Changer with WASAPI


What does WASAPI do?

WASAPI accesses your audio devices directly, while the driver that you use by default (which is "MME") goes through multiple layers within the Windows audio subsystem, causing more delay.


This will in total cut down 50-80ms delay. Shoutout to Mares & Emojikage


Last update: August 12th, 2024



Information for w-okada


You can not use the noise suppression (sup1,sup2) or echo function using this. If you heavily rely on it, you should think twice about using it. It is worth to try it out and evaluate after.


First step (important)


Before we can get it to work, you have to select the same sample rate of your microphone and the Playback virtual cable.

Go to your sound devices and find out/change the sample rate.

If you don't know how to open your sound devices, then press WIN+R, type "mmsys.cpl" then enter

On the Recording tab, right click on your microphone. Go to properties. Go to the last tab Advanced, and check what sample rate it shows (use 48000 on all steps). Activate the options for exclusive mode.
If you use SteelSeries Sonar or Voicemeeter, make sure to change those aswell.

IF YOU DONT SEE A PICTURE, LET ME KNOW ON DISCORD LINK AT THE BOTTOM


Now go to the Playback tab, right click on Line 1 / CABLE. This depends on which virtual cable you have installed. Go to properties. Go to the tab Advanced, and adjust that sample rate to 48000.

IF YOU DONT SEE A PICTURE, LET ME KNOW ON DISCORD LINK AT THE BOTTOM


Enable WASAPI


on w-okada


Assuming you matched your sample rate of your Playback virtual cable to your Microphone before this step, you can now select the correct inputs and outputs as followed:

  • Select AUDIO: SERVER
  • Match the sample rate on the top to what you chose in the steps above, which should be 48000 (S.R.) screenshot shows 44100, this is wrong. Use 48000
  • Input: [WINDOWS WASAPI] Microphone
  • Output: [WINDOWS WASAPI] Virtual Cable (Either Line 1 or CABLE Input)

IF YOU DONT SEE A PICTURE, LET ME KNOW ON DISCORD LINK AT THE BOTTOM

Then, on your game or discord, you select:

  • Input: Virtual Cable (Line 1 / CABLE Output)
  • Output: Your Headphones/Speakers

on RVC Realtime


Assuming you matched your sample rate of your Playback virtual cable to your Microphone before this step, you can now select the correct inputs and outputs as followed:

  • Select Windows WASAPI on the top.
  • Input: Microphone
  • Output: Virtual Cable (Line 1 / CABLE Input)

Make sure to select the 2nd box underneath the Output as shown in the picture below. The first one will not work if your sample rate does not match the voice models sample rate.

IF YOU DONT SEE A PICTURE, LET ME KNOW ON DISCORD LINK AT THE BOTTOM

Then, on your game or discord, you select:

  • Input: Virtual Cable (Line 1 / CABLE Output)
  • Output: Your Headphones/Speakers

If your program crashes with "Invalid Sample Rate" Error despite having matched all your devices, I suggest you do ASIO instead.

How to set up FlexASIO: https://rentry.co/LessDelayASIO


Common Errors


sounddevice.PortAudioError: Error opening Stream: Unanticipated host error [PaErrorCode -9999]: 'Failed to load ASIO driver' [ASIO error 0]

This is common for RVC realtime. Even if it makes no sense, this is caused by the default index file. If you never changed the index, choose a random custom one - it does not even have to be the same as the voice model you are using. Just any random one will fix this.

sounddevice.PortAudioError: Error opening Stream: Invalid sample rate [PaErrorCode -9997]

  • You did not match the sample rate of your virtual cable to your microphone.
  • If you did match the sample rate but this happens on WASAPI & RVC realtime regardless, you should get the dev version as explained in the guide.

Help


For any questions, join the AI Hub server and go to #help-wokada
https://discord.gg/aihub

Edit
Pub: 01 Aug 2024 09:31 UTC
Edit: 12 Aug 2024 19:45 UTC
Views: 1620