Add optional server frontend pipeline - #330
Open
0xShug0 wants to merge 3 commits into
Open
Conversation
0xShug0
force-pushed
the
server-frontend-module
branch
from
August 28, 2026 22:21
bc7759f to
16b7342
Compare
|
Confirmed that running with That is, once I enabled the right build options. |
Owner
Author
Thanks for testing! The frontend may go into the default build. Check the discussions here #313 |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #313
Resolves #392: Adds opt-in frontend-scoped HTTPS support
Summary
audio_decodefor MP3/FLAC ASR input via miniaudiomp3_encodeforresponse_format=mp3TTS output via libmp3lamehttpsas a frontend capability, not a pre/post module, using the existing vendoredcpp-httplibTLS stackmp3_encodeHigh-Level Design
The core server keeps its stable HTTP API shape: WAV/text in and WAV/text out. Optional frontend modules run in-process around that core handler. Pre-processing modules adapt client requests before core routing, and post-processing modules adapt core responses before returning to the client.
httpsis separate from the pre/post module contract. It is a frontend-owned listener capability that terminates TLS in-process and forwards the request envelope to the same core handler. The existing plain HTTP transport is unchanged.At configure time, users select only the frontend capabilities/modules they need:
Docs
app/server/frontends/README.md: frontend overview, supported frontend table, pipeline, and contractsapp/server/frontends/docs/audio_decode.md: MP3/FLAC ASR input moduleapp/server/frontends/docs/mp3_encode.md: MP3 TTS output module and LAME install/configuration notesapp/server/frontends/docs/https.md: HTTPS frontend listener capabilityapp/server/frontends/docs/adding_modules.md: developer guide for adding new frontend modulesValidation
AUDIOCPP_BUILD_SERVER_FRONTENDS=OFF, buildaudiocpp_server--https-cert-file ... --https-key-file ...HTTPS frontend support is not available in this build; configure with -DAUDIOCPP_BUILD_SERVER_FRONTENDS=ON -DAUDIOCPP_SERVER_FRONTEND_MODULES=httpsAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=OFF,AUDIOCPP_BUILD_SERVER_FRONTENDS=ON,AUDIOCPP_SERVER_FRONTEND_MODULES=httpsaudiocpp_cpp_httplibwithout native model manager--https-cert-file cert.pemonly--https-cert-file and --https-key-file must be set togethercould not initialize HTTPS frontend server from certificate/key files/healthGET https://127.0.0.1:18443/health200 OK,{"status":"ok","backend":"cpu","models":0,"ui":true,"ui_management":false}GET https://127.0.0.1:18443/200 OK,Content-Type: text/html; charset=utf-8, embedded UI returnedGET https://127.0.0.1:18443/v1/models200 OK,{"object":"list","data":[]}GET http://127.0.0.1:18443/health52,Empty reply from serverhttps_cert_file: "cert.pem",https_key_file: "key.pem"in config directoryGET /healthover HTTPS returned200 OK; config-relative path resolution worksGET /v1/modelsreturned one unloaded model entryhttps_cert_filewithouthttps_key_fileserver https_cert_file and https_key_file must be set togethermax_request_body_bytes: 8, POST body larger than 8 bytes413 Payload Too Largebefore core routingGET http://127.0.0.1:18080/health200 OK, normal HTTP path still worksGET https://127.0.0.1:18080/health28, connection timed outmp3_encodedependency lookup without LAMEAUDIOCPP_SERVER_FRONTEND_MODULES=mp3_encodeand no LAME installlame/lame.h,libmp3lame, conda, andAUDIOCPP_LAME_ROOTAUDIOCPP_SERVER_FRONTEND_MODULES=httpsAlso checked:
git diff --checkapp/server/http.cpporapp/server/http.h