Constructor AudioSegment
AudioSegment(string, string, TimeSpan, TimeSpan, float)
Creates a new AudioSegment with explicit transcript, language, timings, and confidence.
[JsonConstructor]
public AudioSegment(string text, string language, TimeSpan start, TimeSpan end, float confidence)Parameters
- textstring
- The recognized transcript for this segment. 
- languagestring
- The BCP-47 language code of the transcript (e.g., "en", "fr"). 
- startTimeSpan
- Segment start time within the source audio. 
- endTimeSpan
- Segment end time within the source audio. 
- confidencefloat
- Confidence score for the transcription, from 0.0 (lowest) to 1.0 (highest). 
Remarks
This overload is primarily used by JsonConstructorAttribute during
System.Text.Json deserialization. Callers should ensure confidence
is in [0.0, 1.0] and that start ≤ end.
No additional validation is performed here.