LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Parallel Programming with Dask in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Filter out blank audio files
filtered_audio_bag = loaded_audio_bag.____(____)
Code bearbeiten und ausführen