speech

package module
v0.0.0-...-2e8801c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AverageScore

func AverageScore(a *Vector, set []*Vector) float64

func EuclideanDistance

func EuclideanDistance(a, b *Vector) float64

func FFT

func FFT(x []float64) []complex128

func FFTMag

func FFTMag(x []float64) []float64

func Hann

func Hann(N int) []float64

func HighScore

func HighScore(a *Vector, set []*Vector) float64

func MinimumEuclideanDistance

func MinimumEuclideanDistance(a *Vector, set []*Vector) float64

func NormalizedFFT

func NormalizedFFT(x []float64) []float64

func Similarity

func Similarity(a, b *Vector) float64

Perform cosine similary between the two vectors

func Triangle

func Triangle(N int) []float64

Return a Bartlett/Fejér window triangle function.

Types

type Vector

type Vector struct {
	// contains filtered or unexported fields
}

func NewVector

func NewVector(x []float64) *Vector

func (*Vector) Len

func (v *Vector) Len() int

type Window

type Window struct {
	Data []float64 // a single channel of samples
}

func MakeWindows

func MakeWindows(w *wav.WAV, width time.Duration) []*Window

Generate windows of the specified width at 50% overlap. Windows have a Hann function applied. Assumes the WAV is valid and single channel.

func (*Window) IsZero

func (w *Window) IsZero() bool

func (*Window) LFCC

func (w *Window) LFCC(n int) []float64

Jump to

Keyboard shortcuts

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