Documentation
¶
Index ¶
- func ChopOneSegment(ctx context.Context, tempDir string, inputFile string, beginTS float64, ...) (string, *log.Status)
- func ComputeDuration(ctx context.Context, directory string, filename string) (float64, *log.Status)
- func ConvertMp3ToWav(ctx context.Context, tempDir string, inputFile string) (string, *log.Status)
- func GetAudioBitrate(ctx context.Context, directory string, filename string) (float64, *log.Status)
- func GetAudioDuration(ctx context.Context, directory string, filename string) (float64, *log.Status)
- func GetAudioSize(ctx context.Context, directory string, filename string) (float64, *log.Status)
- func OldConvertMp3ToWav(ctx context.Context, tempDir string, filePath string) (string, *log.Status)
- type AudioSegment
- type ProbeData
- type ProbeFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChopOneSegment ¶
func ChopOneSegment(ctx context.Context, tempDir string, inputFile string, beginTS float64, endTS float64) (string, *log.Status)
ChopOneSegment uses timestamps extract one segment from an audio file
func ComputeDuration ¶
func ConvertMp3ToWav ¶
func GetAudioBitrate ¶
func GetAudioDuration ¶
func GetAudioSize ¶
Types ¶
type AudioSegment ¶
type AudioSegment struct {
BeginTS float64
EndTS float64
BookId string
ChapterNum int
VerseStr string
AudioVerseWav string
}
AudioSegment holds the timestamp and metadata fields needed by ChopByTimestamp.
func ChopByTimestamp ¶
func ChopByTimestamp(ctx context.Context, tempDir string, inputFile string, timestamps []AudioSegment) ([]AudioSegment, *log.Status)
ChopByTimestamp uses timestamps to chop timestamps into files, and puts the filenames in timestamp record.
type ProbeData ¶
type ProbeData struct {
Format ProbeFormat `json:"format"`
}
type ProbeFormat ¶
type ProbeFormat struct {
Filename string `json:"filename"`
NBStreams int `json:"nb_streams"`
NBProgress int `json:"nb_programs"`
NBStreamGroups int `json:"nb_stream_groups"`
FormatName string `json:"format_name"`
FormatLongName string `json:"format_long_name"`
StartTime string `json:"start_time"`
Duration string `json:"duration"`
Size string `json:"size"`
BitRate string `json:"bit_rate"`
ProbeScore int `json:"probe_score"`
}
Click to show internal directories.
Click to hide internal directories.