First check whether your Chromebook is supported.
There is a audio-script repository for Chromebooks, which works for Ubuntu 24.04 and later versions. Note that Ubuntu 22.04 is not well-supported by the audio script.
Ubuntu 24.04
You have to download an older version of the audio script
wget https://github.com/WeirdTreeThing/chromebook-linux-audio/archive/e45a2d0ad56df260b4c9a5a76dfc6d180ceb8e00.zip
unzip e45a2d0ad56df260b4c9a5a76dfc6d180ceb8e00.zip
cd chromebook-linux-audio-e45a2d0ad56df260b4c9a5a76dfc6d180ceb8e00
Then, run the script with ./setup-audio.
Ubuntu 25.04+
Download the latest version of the script with git, and open the repository in terminal.
sudo apt install git
git clone https://github.com/WeirdTreeThing/chromebook-linux-audio
cd chromebook-linux-audio
Then, run the script with ./setup-audio.
Speakers and mic should work after a reboot.