recording in wav format

is it possible to make the recording in .wav format? i am hoping to call some speech to text on this data and most of the apis easily available either in azure or gcp support wav format and recommend against m4a which is what i get by default in android. i can play with the recording options but was wondering if someone has already done something i coudl leverage.