From storagefetchI am making an application that reverbs and comps the recorded audio file on the browser.
I want to create a function that allows you to download the edited audio as a wav or mp3 format file.

The problem i am having

I searched for words such as "audio context export" and "web audio api save file" to find the page with the code example, but many pages showed how to download the recorded audio.

  • createMediaStreamDestination () demo
    (AudioContext.createMediaStreamDestination () --Web API | MDN)
  • Record with browser and save as wav --Qiita
  • Record audio on your browser using Recorder.js --Qiita

To see the methodology on the above page,

  1. Press the audio file save button
  2. Play the edited sound from start to finish
  3. Save the recorded voice

It seems that you can save the edited file, but I would like to be able to download it immediately after pressing the save button or after a short encoding time.

  • Answer # 1

    I think it is impossible for the questioner to do what he wants to do.

    "Web Auido API"
    It ’s just the process of applying what effect at what point
    (Effect is executed for a certain period according to the timing)
    No changes have been made to the original sound source. (Just put an effect on it)
    Therefore, it is necessary to create a new sound source file by the process of recording.

    What is encoding in this case?
    "Play at super high speed, apply effects, record and save in normal playback state"
    Unfortunately, there is no such function in the "Web Auido API".

    It may exist other than "Web Auido API", so
    We recommend that you consider another method.