Fix Audacity Sample Rate Mismatch Error

Sample rate mismatch errors in Audacity typically occur when the sample rate configured in your operating system does not align with the project sample rate inside the software. This conflict can lead to recording failures, playback errors (such as error code -9997), or distorted audio. Resolving this issue requires identifying a standard sample rate—commonly 44,100 Hz or 48,000 Hz—and synchronizing both your operating system sound settings and Audacity to that same value.

Step 1: Choose a Standard Sample Rate

Before changing settings, choose one rate for your entire workflow:

Step 2: Configure Operating System Settings

Windows

  1. Press Windows Key + R, type mmsys.cpl, and press Enter to open the Sound Control Panel.
  2. In the Playback tab, right-click your default output device (speakers or headphones) and select Properties.
  3. Go to the Advanced tab.
  4. Under Default Format, select your chosen sample rate (e.g., 2 channel, 24 bit, 48000 Hz).
  5. Click Apply, then OK.
  6. Switch to the Recording tab, right-click your active microphone, and select Properties.
  7. Go to the Advanced tab, select the identical sample rate, and click Apply and OK.

macOS

  1. Open Finder, go to Applications > Utilities, and open Audio MIDI Setup.
  2. Select your output device from the left panel.
  3. In the right panel, use the Format dropdown menu to select your desired rate (e.g., 44,100 Hz or 48,000 Hz).
  4. Select your input device (microphone) from the left panel and set the Format dropdown to the exact same frequency.
  5. Close Audio MIDI Setup.

Step 3: Configure Audacity Settings

  1. Open Audacity.
  2. Go to Edit > Preferences (or Audacity > Preferences on macOS).
  3. Select the Audio Settings tab from the left sidebar.
  4. Locate Project Sample Rate (or Default Sample Rate) and change it to match the frequency set in your operating system.
  5. Ensure the Default Sample Format is set to 32-bit float (Audacity's internal standard) or matches your device bit depth.
  6. Click OK to save the changes.

Step 4: Verify the Audio Host (Windows Only)

If the error persists on Windows:

  1. In Audacity, click the Audio Setup button on the top toolbar.
  2. Select Host.
  3. Switch between MME, Windows DirectSound, and Windows WASAPI.
    • MME provides the highest compatibility with mismatched rates via internal emulation.
    • WASAPI requires an exact hardware match and will generate an error if there is any discrepancy.

Restart Audacity after making these changes to ensure the audio engine initializes with the updated device configurations.