audiosegment

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const SECONDSATEND = 0.1

Variables

This section is empty.

Functions

func Convert

func Convert(fnameIn, fnameOut string) (err error)

Convert will convert a file to

func DrawSegments

func DrawSegments(segments []AudioSegment) (err error)

DrawSegments will take a segment and draw it. audiowaveform -i creeley-0.000-12.000.wav -o lifeb.png --background-color ffffff00 --waveform-color 000000 --amplitude-scale 2 --no-axis-labels --pixels-per-second 100 --height 160 --width 1200 convert -size 600x160 canvas:khaki canvas_khaki.gif convert -size 600x160 canvas:green canvas_green.gif convert canvas_khaki.gif canvas_green.gif +append canvas.gif composite lifeb.png canvas.gif -compose Dst_In 3.png convert 3.png -fuzz 1% -transparent black 4.png eog 4.png

func SplitEqual

func SplitEqual(fname string, secondsMax float64, secondsOverlap float64) (allSegments [][]AudioSegment, err error)

func Truncate

func Truncate(fnameIn, fnameOut, from, to string) (err error)

Truncate will truncate a file, while converting it to 44100

Types

type AudioSegment

type AudioSegment struct {
	Filename string
	Start    float64
	End      float64
	Duration float64
	StartAbs float64
	EndAbs   float64
}

func SplitOnSilence

func SplitOnSilence(fname string, silenceDB int, silenceMinimumSeconds float64) (segments []AudioSegment, err error)

SplitOnSilence splits any audio file based on its silence

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL