pub struct TranscriptionSegment {
pub id: u64,
pub seek: u64,
pub start: f64,
pub end: f64,
pub text: String,
pub tokens: Vec<u64>,
pub temperature: f64,
pub avg_logprob: f64,
pub compression_ratio: f64,
pub no_speech_prob: f64,
}
Fields§
§id: u64
Unique identifier of the segment.
seek: u64
Seek offset of the segment.
start: f64
Start time of the segment in seconds.
end: f64
End time of the segment in seconds.
text: String
Text content of the segment.
tokens: Vec<u64>
Array of token IDs for the text content.
temperature: f64
Temperature parameter used for generating the segment.
avg_logprob: f64
Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
compression_ratio: f64
Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.
no_speech_prob: f64
Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob
is below -1, consider this segment silent.
Implementations§
Source§impl TranscriptionSegment
impl TranscriptionSegment
Sourcepub fn builder() -> TranscriptionSegmentBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TranscriptionSegmentBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building TranscriptionSegment
.
On the builder, call .id(...)
, .seek(...)
, .start(...)
, .end(...)
, .text(...)
, .tokens(...)
, .temperature(...)
, .avg_logprob(...)
, .compression_ratio(...)
, .no_speech_prob(...)
to set the values of the fields.
Finally, call .build()
to create the instance of TranscriptionSegment
.
Trait Implementations§
Source§impl Clone for TranscriptionSegment
impl Clone for TranscriptionSegment
Source§fn clone(&self) -> TranscriptionSegment
fn clone(&self) -> TranscriptionSegment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more