Audio not saving in google colab
You are only defining the record function but never actually running it. Adding record() to the end of the code works for me in Google Colab and saves the audio to the audio.wav file.