Add Delete Button to Clear Audio Waveform and Reset Audio State
Issue Title: Add Delete Button to Clear Audio Waveform and Reset Audio State
Description:
Summary
Currently, there is no option to clear the uploaded/recorded audio waveform from the interface. Users should be able to remove the audio waveform and reset the audio state using a dedicated Delete button.
Problem
- Uploaded or recorded audio remains visible in the waveform area.
- Users cannot easily remove the audio and start over without refreshing the page.
- This affects usability when users want to upload or record a different audio file.
Expected Behavior
-
Add a Delete/Clear button near the waveform controls.
-
Clicking the button should:
- Remove the audio waveform from the UI.
- Stop any ongoing audio playback.
- Clear the loaded audio file from WaveSurfer.js.
- Reset audio-related states and controls.
- Return the interface to its initial state, ready for a new upload or recording.
Acceptance Criteria
-
Delete button is visible when an audio file is loaded. -
Clicking Delete removes the waveform immediately. -
Audio playback stops if currently playing. -
WaveSurfer instance is properly cleared/reset. -
Audio-related UI elements return to their default state. -
Users can upload or record a new audio file after deletion without issues.