An Azure service that integrates speech processing into apps and services.
Hello @tomoe ,
Welcome to Microsoft Q&A .Thank you for reaching out to us.
The observed behavior is expected and by design within the Azure Speech-to-Text container architecture. The ProfanityFilterMode setting is not supported as part of the container configuration, and therefore cannot influence runtime behavior when passed through Docker environment variables. Instead, profanity filtering is controlled exclusively at the request level through the Speech SDK or REST API. As a result, no container-level override or workaround exists for this behavior, and any required change must be implemented at the request or integration layer.
Reason the profanity setting not taking effect
The container is functioning as expected. Profanity filtering is not configurable at the container level, therefore:
- Environment variables such as
-e ProfanityFilterMode=RaworNoneare not supported - These parameters are ignored during container startup
- The container does not provide any global switch to control profanity behavior
The logs:
-
"profanityType": 1 - Successful profanity processing
confirm that default masking behavior remains active, which is expected.
Scope of control for profanity filtering
Profanity handling is applied during the speech recognition output processing stage and is controlled strictly at the request level.
Supported options include:
Speech SDK
speechConfig.SetProfanity(ProfanityOption.Raw); // Raw / Masked / Removed
``
REST API
profanity=raw | masked | removed
Client / invocation layer
- Profanity settings must be explicitly passed with each request
This behavior is part of the display formatting pipeline and the not container configuration.
Please note the important limitation - For disconnected deployments, the following limitation applies:
There is no supported or documented mechanism to configure profanity filtering at the container level. No container‑level workaround exists.
Therefore:
- Docker environment variables cannot modify profanity behavior
- Default masking will always apply unless overridden per request
- This is a design limitation, not a failure or misconfiguration
To achieve the required outcome:
- Identify request flow - SDK, REST API or intermediate service
- Apply request-level configuration - Explicitly pass - raw, masked, or removed
- Handle the integration constraints
- If direct modification is restricted:
- Introduce middleware/proxy to inject parameters
- If modification is not feasible:
- Consider post-processing of transcription output
- If direct modification is restricted:
The following references might be helpful , please check them out
- Display text formatting with speech to text - Speech service - Foundry Tools | Microsoft Learn
- Configure Speech containers - Foundry Tools | Microsoft Learn
Thank you
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the response was helpful. This will be benefitting other community members who face the same issue.