jina-ai / executors

internal-only
Apache License 2.0
31 stars 12 forks source link

feat: add resample step to AudioCLIPEncoder #139

Closed winstonww closed 3 years ago

winstonww commented 3 years ago

This PR:

  1. adds a _resample step so that AudioCLIPEncoder encodes the audio at the correct sample rate
  2. fixes the issue where recent changes in Document.get_attributes method that cause some tests here to break
  3. fixes the issue where librosa.load expects str not PosixPath in some tests
  4. adds some style reformatting

Thanks.

winstonww commented 3 years ago

@tadejsv It is necessary. Accuracy suffers when AudioCLIPEncoder encodes audio with sample rate different from target sample rate.