David Kimura PRO said almost 3 years ago on Record Audio to Active Storage :
  Yes, and you would likely not use any of the Stimulus controller parts since the file is already generated. For audio files (and likewise with images), you should probably have some front end validation with the mime types that you would accept in a comma separated string. For example, in this case, you would accept MP3 (or similar).

<%= form.file_field :media, direct_upload: true, accept: 'audio/mpeg' %>