[GH-ISSUE #1057] [Feature]: TTS format option #518

Closed
opened 2026-10-20 17:29:42 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @BahamutRU on GitHub (May 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1057

What problem does this solve?

I use omnivoice.cpp it does not support mp3, and explicitly states this, and Marinara does not give a choice.
TTS provider returned 400: unsupported response_format 'mp3'; supported formats are 'wav' and 'pcm'
With mp3, wav, pcm options it will be solved and worked.

Proposed solution

In Text to Speed, OpenAI-compatible add option Format: mp3, wav.

Additional context

https://github.com/bluryar/omnivoice.cpp

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • [] I DID NOT read this template and provide the requested details.
Originally created by @BahamutRU on GitHub (May 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1057 ## What problem does this solve? I use omnivoice.cpp it does not support mp3, and explicitly states this, and Marinara does not give a choice. ```TTS provider returned 400: unsupported response_format 'mp3'; supported formats are 'wav' and 'pcm'``` With mp3, wav, pcm options it will be solved and worked. ## Proposed solution In Text to Speed, OpenAI-compatible add option Format: mp3, wav. ## Additional context https://github.com/bluryar/omnivoice.cpp ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [] I DID NOT read this template and provide the requested details.
Author
Owner

@BahamutRU commented on GitHub (May 21, 2026):

I think it's very easy, when I get back from work, I'll do it and make PR if no one else does it before.

<!-- gh-comment-id:4506841838 --> @BahamutRU commented on GitHub (May 21, 2026): I think it's very easy, when I get back from work, I'll do it and make PR if no one else does it before.
Author
Owner

@BahamutRU commented on GitHub (May 21, 2026):

Awaiting merge to staging.

<!-- gh-comment-id:4509699682 --> @BahamutRU commented on GitHub (May 21, 2026): Awaiting merge to staging.
Author
Owner

@cha1latte commented on GitHub (May 21, 2026):

Triage note: labeling this as normal-scope because it is a focused compatibility option for the existing OpenAI-compatible TTS path, and PR #1061 already implements the mp3/wav format selection without creating a new provider workflow.

The least risky next step is to keep it tied to PR #1061 and verify the format option against providers that reject mp3, such as omnivoice.cpp.

<!-- gh-comment-id:4510350912 --> @cha1latte commented on GitHub (May 21, 2026): Triage note: labeling this as `normal-scope` because it is a focused compatibility option for the existing OpenAI-compatible TTS path, and PR #1061 already implements the mp3/wav format selection without creating a new provider workflow. The least risky next step is to keep it tied to PR #1061 and verify the format option against providers that reject mp3, such as omnivoice.cpp.
Author
Owner

@bluryar commented on GitHub (May 27, 2026):

Cross-posting an update from omnivoice.cpp because the MP3 response-format issue has been addressed upstream.

omnivoice.cpp main now includes MP3 output support: github.com/bluryar/omnivoice.cpp@fa784a0

Summary of the implementation:

  • The OpenAI-compatible POST /v1/audio/speech endpoint now accepts response_format: "mp3".
  • Responses use Content-Type: audio/mpeg.
  • The CLI has an explicit --response-format mp3 / --format mp3 option as well.
  • MP3 encoding is implemented in-process by vendoring the Shine encoder source, converting OmniVoice's generated 24 kHz mono audio to 64 kbps CBR MP3. It does not require calling ffmpeg.

Example request body:

{
  "input": "Hello from OmniVoice",
  "voice": "female, young adult",
  "response_format": "mp3"
}

Validation performed locally: rebuilt the CLI/server, generated MP3 from a GGUF model, and confirmed with ffmpeg -i that the output is detected as MP3 (Audio: mp3, 24000 Hz, mono, 64 kb/s).

One caveat: Shine is licensed under GNU Library GPL v2 (LGPL-style). Source distribution is OK with the license/notice included, but binary distributors should preserve LGPL obligations, for example by keeping the MP3 backend replaceable/relinkable or making it optional/dynamically linked for release builds.

<!-- gh-comment-id:4550747525 --> @bluryar commented on GitHub (May 27, 2026): Cross-posting an update from `omnivoice.cpp` because the MP3 response-format issue has been addressed upstream. `omnivoice.cpp` main now includes MP3 output support: https://github.com/bluryar/omnivoice.cpp/commit/fa784a0 Summary of the implementation: - The OpenAI-compatible `POST /v1/audio/speech` endpoint now accepts `response_format: "mp3"`. - Responses use `Content-Type: audio/mpeg`. - The CLI has an explicit `--response-format mp3` / `--format mp3` option as well. - MP3 encoding is implemented in-process by vendoring the Shine encoder source, converting OmniVoice's generated 24 kHz mono audio to 64 kbps CBR MP3. It does not require calling `ffmpeg`. Example request body: ```json { "input": "Hello from OmniVoice", "voice": "female, young adult", "response_format": "mp3" } ``` Validation performed locally: rebuilt the CLI/server, generated MP3 from a GGUF model, and confirmed with `ffmpeg -i` that the output is detected as MP3 (`Audio: mp3, 24000 Hz, mono, 64 kb/s`). One caveat: Shine is licensed under GNU Library GPL v2 (LGPL-style). Source distribution is OK with the license/notice included, but binary distributors should preserve LGPL obligations, for example by keeping the MP3 backend replaceable/relinkable or making it optional/dynamically linked for release builds.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#518
No description provided.