FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(audio): handle uppercase extensions in split_audio_chunk and mime lookup by dembrane-sam-bot · Pull Request #1092 · Dembrane/echo · GitHub

Repository navigation

fix(audio): handle uppercase extensions in split_audio_chunk and mime lookup - #1092

Closed
dembrane-sam-bot wants to merge 2 commits into
mainfrom
sam/echo-987-uppercase-audio-extensions
Closed

dembrane-sam-bot wants to merge 2 commits into
mainfrom
sam/echo-987-uppercase-audio-extensions

Conversation

Copy link
Copy Markdown
Contributor

What changes in the system

  • Audio uploads with uppercase extensions (such as Windows 8.3 alias IN685F~1.M4A or .WAV) convert and split cleanly instead of raising ValueError: Output file format mp3 does not match requested output file format m4a and freezing transcription in the UI — echo/server/dembrane/audio_utils.py
  • Extension swapping in split_audio_chunk uses os.path.splitext instead of .replace(chunk_file_format, output_format), preventing corruption of file or directory paths that contain format substrings (e.g. m4a_records/) — echo/server/dembrane/audio_utils.py
  • MIME type lookup normalizes file extensions via get_file_format_from_file_path, making it case-insensitive and query-string-safe — echo/server/dembrane/audio_utils.py
  • Unit tests verify case-insensitivity across audio formats, MIME lookups, and split_audio_chunk output path construction — echo/server/tests/test_audio_extension_handling.py

Hotfix Candidate Note

This change touches only audio_utils.py and applies cleanly to v2.4.2 (the current production tag) without merge conflicts.

Closes: ECHO-987

Confidence

High. The reproduction was isolated to split_audio_chunk doing a case-sensitive .replace() on normalized format strings against raw S3 paths. Unit tests cover case variations and path preservation.

… lookup

Replace chunk_file_format string replacement with os.path.splitext when
constructing the converted output audio path. When audio files are
uploaded with uppercase extensions (e.g. Windows 8.3 alias IN685F~1.M4A),
case-sensitive .replace() left the extension unchanged, causing
convert_and_save_to_s3 to raise a format mismatch ValueError. Also
normalize mime type lookup via get_file_format_from_file_path.

Closes: ECHO-987

linear Bot commented Sep 23, 2026

Copy link
Copy Markdown

ECHO-987

spashii closed this Oct 10, 2026
auto-merge was automatically disabled October 10, 2026 09:18

Pull request was closed

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL