Exercise

Processing unstructured audio

You have a lot of .wav files to process, which could take a long time. Fortunately, the functions you just wrote can be used with Dask bags to run the analysis in parallel using all your available cores.

Here are descriptions of the not_silent() function you wrote, plus two extras you can use.

  • not_silent(audio_dict) - Takes an audio dictionary, and checks if the audio isn't silent. Returns True/False.
  • peak_frequency(audio_dict) - Takes a dictionary of audio data, analyzes it to find the peak frequency of the audio, and adds it to the dictionary.
  • delete_dictionary_entry(dict, key_to_drop) - Deletes a given key from the input dictionary.

The audio data loaded_audio_bag is available in your environment.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Use your not_silent() function to filter out empty audio files.