Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Line ¶
Line is a line of spoken text by a singular speaker.
func LinesFromFile ¶
LinesFromFile can be used to read all transcription lines from an input file. The Word.StartTime will just be arbitrarily increased by 0.2 for each word.
func ToLines ¶
ToLines converts all of the given words to lines of text. A line of text will always be spoken by one speaker, so if speakers switch there will be a new line. There will also be a new line if no speaker is speaking for more than 5 seconds.
func (*Line) WordsString ¶
WordsString returns all words joined by a space.
type WhisperxResult ¶
type WhisperxResult struct {
Segments []struct {
Start float64 `json:"start"`
End float64 `json:"end"`
Text string `json:"text"`
Words []struct {
Word string `json:"word"`
Start float64 `json:"start"`
End float64 `json:"end"`
Score float64 `json:"score"`
} `json:"words"`
} `json:"segments"`
WordSegments []struct {
Word string `json:"word"`
Start float64 `json:"start"`
End float64 `json:"end"`
Score float64 `json:"score"`
} `json:"word_segments"`
}
type Word ¶
type Word struct {
// Nickname of the speaker.
Nickname string
// Text that was spoken including puctuation.
Text string
// StartTime relative to the beginning of the recording in second floating-point precision.
StartTime float64
}
Word is a singular transcribed word.
Click to show internal directories.
Click to hide internal directories.