Cannot record audio for Anki flashcards in Windows 10

I am unable to record audio for use with my flashcards on Windows 10. I keep getting the following error:

Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2021-07-06 18:09:13

Caught exception:
Traceback (most recent call last):
  File "aqt\", line 88, in _on_closures_pending
  File "aqt\", line 59, in <lambda>
  File "aqt\", line 498, in _on_done
  File "concurrent\futures\", line 432, in result
  File "concurrent\futures\", line 388, in __get_result
  File "concurrent\futures\", line 57, in run
  File "aqt\", line 501, in <lambda>
  File "aqt\", line 488, in _encode_mp3
Exception: C:\Program Files\Anki\lame.exeError running ⁨ ⁩C:\Users\nicho\AppData\Local\Temp\anki_temp\rec.wavError running ⁨ ⁩C:\Users\nicho\AppData\Local\Temp\anki_temp\rec1625610655.mp3Error running ⁨ ⁩--noreplaygainError running ⁨ ⁩--quiet

What does this mean and how do I fix it? I don’t really understand what the error/exception is, and it doesn’t look like other errors I’ve seen for Anki audio. This looks like some kind of bug with the Anki desktop client.

You could try running lame.exe in Anki’s program folder in cmd.exe to see what it says.