Skip to content

Fix COVER mode MP3 failure: AUDIO_DIR path mismatch breaks file resolution for dit-vae#15

Merged
lmangani merged 4 commits intomainfrom
copilot/fix-mp3-decoding-issue
Mar 8, 2026
Merged

Fix COVER mode MP3 failure: AUDIO_DIR path mismatch breaks file resolution for dit-vae#15
lmangani merged 4 commits intomainfrom
copilot/fix-mp3-decoding-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 8, 2026

.env.example set AUDIO_DIR=./public/audio, which resolveFromRoot expands against APP_ROOT (project root) → <root>/public/audio. But LocalStorageProvider hardcoded its path three levels up from server/src/services/storage/<root>/server/public/audio. Files were written to one place, binary told to read from another — drmp3_open_file_and_read_pcm_frames_f32 opened nothing and returned NULL.

Changes

  • .env.example: AUDIO_DIR=./public/audio./server/public/audio (correct relative path from APP_ROOT)
  • storage/local.ts: Replaced hardcoded path.join(__dirname, '../../../public/audio') with config.storage.audioDir — storage provider now always writes where the rest of the system reads
  • server/src/index.ts: Express /audio static mount now uses config.storage.audioDir instead of hardcoded path.join(__dirname, '../public/audio') — all three consumers share one value
  • config/index.ts: Comment updated to reflect single-source-of-truth design
  • acestep.ts: Reverted incorrect ensureWavFormat FFmpeg shim — audiohacking/acestep.cpp@copilot/add-wav-mp3-conversion decodes MP3 natively via dr_mp3.h

Copilot AI and others added 2 commits March 8, 2026 12:54
… WAV before passing to dit-vae

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
…ry across storage, serving, and spawn

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MP3 decoding issue in COVER mode Fix COVER mode MP3 failure: AUDIO_DIR path mismatch breaks file resolution for dit-vae Mar 8, 2026
@lmangani lmangani marked this pull request as ready for review March 8, 2026 13:13
@lmangani lmangani merged commit dc0f39f into main Mar 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants