I am trying to parse a wav file, to find clip to match my text.
firstly I call transcribe to get WhisperResult
then call result.segments to get all segments
tranverse segments to get the segment which text match my text
but the segment.start and segment.end I cannot understand,
I want to find the start-end timestamps , so I can cut the wav by calling "ffmpeg -i src.wav -ss start_timestamp -to end_timestamp -c copy tar.wav" but failed, the rootcause is segment.star and segment.end is not the timestamp,
Can you please tell me how to get a segment's timestamp pair?
Thank you for your efforts to look into my issue.
I am trying to parse a wav file, to find clip to match my text. firstly I call transcribe to get WhisperResult then call result.segments to get all segments tranverse segments to get the segment which text match my text but the segment.start and segment.end I cannot understand, I want to find the start-end timestamps , so I can cut the wav by calling "ffmpeg -i src.wav -ss start_timestamp -to end_timestamp -c copy tar.wav" but failed, the rootcause is segment.star and segment.end is not the timestamp, Can you please tell me how to get a segment's timestamp pair?