class ActiveStorage::Blob

def audio?

Returns true if the content_type of this blob is in the audio range, like audio/mpeg.
def audio?
  content_type.start_with?("audio")
end