Raw ASR output is often a dense wall of text, making it difficult to read and understand the flow of a conversation. The Automatic Formatting feature solves this by intelligently inserting newlines and double newlines into your transcript based on the duration of pauses between spoken words. This transforms a hard-to-read block of text into a well-structured, easy-to-scan document.

How It Works

The feature is controlled by a single formatting parameter, which accepts a JSON string containing one or both of the following keys:
newline_pause_threshold
float
The pause duration (in seconds) required to insert a single newline (\n). This is ideal for shorter, conversational breaks.
double_newline_pause_threshold
float
The pause duration (in seconds) required to insert a double newline (\n\n), effectively creating a new paragraph. This is useful for marking a change in topic or speaker.
The formatting parameter must be sent as a JSON-formatted string within your multipart/form-data request, not as a raw JSON object. We’ll show you how to do this below.

How to Use It

To use this feature, you’ll add the formatting field to your request.

SDK Example

quickstart_format.py
from fennec_asr import FennecASRClient

asr_client = FennecASRClient(api_key="YOUR_API_KEY")

formatting_options = {
    "newline_pause_threshold": 0.8,
    "double_newline_pause_threshold": 1.5
}

transcription = asr_client.transcribe_file(
    file_path="sample.mp3",
    formatting=formatting_options,
)

print(transcription)

Example Result

Applying formatting makes a huge difference in readability.

Before Formatting

Alright team let's sync up on the Q3 project deliverables for Fennec aural. The primary goal is to finalize the user interface mockups by Wednesday. I've finished the preliminary analysis for the core features and have the numbers ready. We need to ensure that the new design is both intuitive and accessible. I'm reviewing the data on the acting ink report now. Great, pull them up. We need to finalize the presentation by tomorrow. The client expects a full walkthrough.

After Formatting

Alright team let's sync up on the Q3 project deliverables for Fennec aural. The primary goal is to finalize the user interface mockups by Wednesday.

I've finished the preliminary analysis for the core features and have the numbers ready. We need to ensure that the new design is both intuitive and accessible.

I'm reviewing the data on the acting ink report now.

Great, pull them up. We need to finalize the presentation by tomorrow. The client expects a full walkthrough.