Use the NReco.VideoConverter package.
you first import the NReco.VideoConverter namespace. Then, you define a method ConvertMp4ToMp3 that takes the file paths of the input MP4 file and the output MP3 file as parameters. Inside the method, you create an instance of FFMpegConverter from the NReco.VideoConverter package. Finally, you call the ConvertMedia method of the FFMpegConverter object and pass in the input MP4 file path, the output MP3 file path, and the desired output format (in this case, MP3).
Note that you will need to install the NReco.VideoConverter package via NuGet in your project in order to use this code.