Spaces:
Running
Running
Ctrl+K
Prompt add‑on to integrate into the current project “Add a Clideo‑style ‘Audio Merger’ section. For each generated or uploaded audio, show a card with filename, size (MB), codec/mime, and duration. Provide a draggable timeline with smooth reorder. Implement merge using Web Audio: fetch→ArrayBuffer→decodeAudioData for each part, create OfflineAudioContext sized to total length, schedule buffers back‑to‑back, and apply 5–10ms fade‑out/fade‑in at boundaries. Render with startRendering, then export by routing the rendered buffer into a live AudioContext→MediaStreamDestination and recording with MediaRecorder. Choose mime at runtime using MediaRecorder.isTypeSupported in this order: ‘audio/webm;codecs=opus’, then ‘audio/mp4’, then ‘audio/webm’; set the file extension accordingly. Show a progress modal with steps (‘Decoding…’, ‘Placing…’, ‘Fades…’, ‘Rendering…’, ‘Packaging…’) and a time estimate computed from total duration and recent device speed. Include a ‘WAV (lossless)’ fallback exporter that writes a WAV header around PCM for guaranteed playback. Optionally offer ‘Export as MP3 (beta)’ via ffmpeg.wasm, lazy‑loaded; warn it may take longer. After export, present a final preview player and a Download button. Revoke object URLs and close contexts to free memory. Respect prefers‑reduced‑motion and keep animations subtle.” - Initial Deployment
e0a8057 verified