Can't record audio on ubuntu

When I try to save audio I recorded I get this error message on Ubuntu.

My microphone is working fine otherwise.

An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.40 (cf446733) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2021-02-17 15:21:54

Caught exception:
Traceback (most recent call last):
File “aqt/”, line 475, in _encode_mp3
File “”, line 854, in init
File “”, line 1702, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: ‘lame’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “aqt/”, line 87, in _on_closures_pending
File “aqt/”, line 59, in
File “aqt/”, line 489, 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 492, in
File “aqt/”, line 477, in _encode_mp3
Exception: lameError running ⁨ ⁩/tmp/anki_temp/rec.wavError running ⁨ ⁩/tmp/anki_temp/rec1613572447.mp3Error running ⁨ ⁩–noreplaygainError running ⁨ ⁩–quiet

Try installing lame:

sudo apt-get install lame

thanks it worked