Smart formatting
Understand how smart formatting behaves across Deepgram models and languages in self-hosted deployments, and how to enable NER formatting.
Understand how smart formatting behaves across Deepgram models and languages in self-hosted deployments, and how to enable NER formatting.
Smart Format applies automatic formatting to transcripts to improve human readability. In a self-hosted deployment, smart formatting behavior depends on the model type, language, TOML file configuration, and which models are present on the deployment.
Nova-3 is only comprised of non-formatted models. To produce smart-formatted transcripts, you must deploy the entity-detector model alongside your Nova-3 model. The entity-detector model provides NER (named entity recognition) formatting, which detects and formats entities such as dates, times, currency amounts, phone numbers, emails, and URLs.
When processing multilingual audio, Nova-3 applies formatting based on the detected language of each transcript segment:
This means a single multilingual stream can produce both NER-formatted English segments and punctuation-only non-English segments, depending on the language detected in each portion of the audio.
Nova-2 provides both formatted and non-formatted English models. You can achieve smart formatting in either of two ways:
NER formatting is optional for Nova-2 English because the formatted model already includes entity formatting. Choose whichever approach best fits your deployment constraints. NER is recommended for highest-quality formatting.
For non-English languages, Deepgram applies punctuation and paragraphs when smart formatting is enabled. Neither formatted models nor NER formatting applies to non-English transcription. This is the same behavior for both Nova-3 and Nova-2.
Flux does not support smart formatting. Flux transcripts are always returned without formatting, regardless of whether smart_format=true is set in the request. The entity-detector model is not compatible with Flux.
See Deploy Flux Model (STT) for Flux deployment details.
Enabling NER formatting requires the entity-detector model files and configuration changes in your TOML files. For full details, see How can I enable NER formatting in my self-hosted deployment?.
Add the appropriate entity-detector model files to your Engine’s models directory. Your Deepgram account representative can provide these files.
entity-detector.en.streaming.********.dg) and non-formatted streaming transcription models.entity-detector.batch.********.dg) and non-formatted batch transcription models.For streaming STT, add the following to engine.toml:
For pre-recorded (batch) STT, add the following to api.toml:
You can enable both flags if your deployments handle both streaming and batch requests. There is no downside to enabling NER on both batch and streaming when a deployment only handles one or the other. It is expected that each deployment serves one mode of STT, not both.
Restart your containers so that the configuration changes and new models take effect:
Contact your Deepgram account representative if you need assistance obtaining the entity-detector model files or verifying that NER formatting is active in your deployment.
When NER formatting is enabled (streaming_ner = true and/or format_entity_tags = true), not all model types are compatible. NER formatting operates on non-formatted model output only. The following table shows which combinations produce valid smart-formatted results.
If you enable NER formatting and deploy Nova-2 formatted models, smart formatting requests will raise 400 Bad Request errors, since no model exists to serve the requests. NER formatting expects non-formatted model output as input. When using NER, replace any Nova-2 formatted models with their non-formatted equivalents.