excite

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package excite provides support for excitation generation from fundamental frequency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PulseExcite

type PulseExcite struct {
	SampleRate int
	FrameShift int
	UseGauss   bool
	// contains filtered or unexported fields
}

PulseExcite represents generating excitation signals. if UseGauss is set to true, gaussian random samples are generated for non-voice segments, pseudo random samples otherwise.

func NewPulseExcite

func NewPulseExcite(sampleRate, frameShift int) *PulseExcite

NewPulseExcite returns its instance with sample rate and framshift.

func (*PulseExcite) Generate

func (e *PulseExcite) Generate(f0Sequence []float64) []float64

Gerenate generates an excitation signal from f0 sequence. If the unvoiced segment is detected (segment of zero f0), this generates gaussian or pseudo random samples, f0-dependent excitation otherwise.

func (*PulseExcite) GenerateOneFrame

func (e *PulseExcite) GenerateOneFrame(f01, f02 float64) []float64

GenerateOneFrame generates an excitation signal from successive two f0. If the given f0 have zero value(s), GenerateOneFrame generates random samples, f0-dependent excitation otherwise.

Jump to

Keyboard shortcuts

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