Skip to content

fix: preserve TTS audio content type#6012

Merged
timothycarambat merged 2 commits into
Mintplex-Labs:masterfrom
ivan-digital:fix/tts-audio-content-type
Jul 17, 2026
Merged

fix: preserve TTS audio content type#6012
timothycarambat merged 2 commits into
Mintplex-Labs:masterfrom
ivan-digital:fix/tts-audio-content-type

Conversation

@ivan-digital

Copy link
Copy Markdown

Summary

  • detect WAV, Ogg, FLAC, M4A, WebM, and MP3 containers from TTS response bytes
  • return the matching Content-Type from workspace TTS responses
  • send Telegram audio with the matching MIME type and filename extension
  • retain MP3 as the fallback for unknown data to preserve existing behavior

Testing

  • npx --yes jest@29.7.0 server/__tests__/utils/TextToSpeech/audioFormat.test.js --runInBand
  • Prettier check for all changed files
  • Node syntax checks for changed runtime files

Fixes #6011

@timothycarambat

Copy link
Copy Markdown
Member

@ivan-digital this is beautiful and a very welcome change. Thanks for taking the time to make this + following contrib guidelines. Personally appreciate the PR.

@timothycarambat
timothycarambat merged commit 28fbff4 into Mintplex-Labs:master Jul 17, 2026
3 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.

[BUG]: TTS responses are always labeled as MP3

2 participants