CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Parallel Programming with Dask in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Filter out blank audio files
filtered_audio_bag = loaded_audio_bag.____(____)
Modifier et exécuter le code