gossp: github.com/r9y9/gossp/vocoder Index | Files

package vocoder

import "github.com/r9y9/gossp/vocoder"

Package vocoder provides support for vocoding.

Index

Package Files

b2mc.go mcep2mlsadf_coef.go mgcep2mglsadf_coef.go mglsadf.go mglsadf_synthesizer.go mlsadf.go mlsadf_synthesizer.go vocoder.go

func B2MC Uses

func B2MC(b []float64, alpha float64) []float64

B2MC performs conversion from MLSA filter coefficients to Mel-cepstrum.

func MC2B Uses

func MC2B(mcep []float64, alpha float64) []float64

Alias to SPTK will be removed

func MCep2MLSAFilterCoef Uses

func MCep2MLSAFilterCoef(mcep []float64, alpha float64) []float64

MCep2MLSAFilterCoef performs a conversion from mel-cepstrum to MLSA filter coefficients given mel-cepstrum and all-pass constant(alpha).

func MGCep2MGLSAFilterCoef Uses

func MGCep2MGLSAFilterCoef(melgcep []float64, alpha, gamma float64) []float64

MGCep2MGLSAFilterCoef performs a conversion from mel-generalized cepstrum to MGLSA filter coefficients.

type MGLSABaseFilter Uses

type MGLSABaseFilter struct {
    Order int // Order of mel-cepstrum
    // all-pass constant (alpha) that determines how frequency axis is warped.
    Alpha float64
    // contains filtered or unexported fields
}

MGLSABaseFilter represents a base filter of MGLSAFilter.

func NewMGLSABaseFilter Uses

func NewMGLSABaseFilter(order int, alpha float64) *MGLSABaseFilter

func (*MGLSABaseFilter) Filter Uses

func (bf *MGLSABaseFilter) Filter(sample float64, filterCoef []float64) float64

type MGLSAFilter Uses

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

MGLSAFilter represents a Mel-generalized log-spectral approximation filter.

func NewMGLSAFilter Uses

func NewMGLSAFilter(order int, alpha float64, numStage int) *MGLSAFilter

func (*MGLSAFilter) Filter Uses

func (mf *MGLSAFilter) Filter(sample float64, filterCoef []float64) float64

type MGLSASpeechSynthesizer Uses

type MGLSASpeechSynthesizer struct {
    FrameShift int
    Alpha      float64 // all-pass constant
    Gamma      float64 // parameter of generalized logarithmic function
    NumStage   int
    // contains filtered or unexported fields
}

MGLSASpeechSynthesizer represents a speech synthesizer based on the MGLSA Filter.

func NewMGLSASpeechSynthesizer Uses

func NewMGLSASpeechSynthesizer(order int, alpha float64, numStage int,
    frameShift int) *MGLSASpeechSynthesizer

NewMGLSASpeechSynthesizer returns its instance given parameters.

func (*MGLSASpeechSynthesizer) Synthesis Uses

func (s *MGLSASpeechSynthesizer) Synthesis(excite []float64,
    mgcepSequence [][]float64) []float64

Synthesis synthesizes a speech signal from an excitation signal and corresponding mel-ceptrum sequence.

func (*MGLSASpeechSynthesizer) SynthesisOneFrame Uses

func (s *MGLSASpeechSynthesizer) SynthesisOneFrame(excite []float64,
    previousMgcep, currentMgcep []float64) []float64

SynthesisOneFrame synthesizes a part of speech signal from an excitation signal and succesive two mel-cepstrum sequence. It requires all-pass constant (alpha). Mel-cepstral coefficients between two succesive mel-cepstrum are linearly interpolated.

type MLSABaseFilter Uses

type MLSABaseFilter struct {
    Order int // Order of mel-cepstrum
    // all-pass constant (alpha) that determines how frequency axis is warped.
    Alpha float64
    // contains filtered or unexported fields
}

MLSABaseFilter represents a base filter of the MLSA digital filter.

func NewMLSABaseFilter Uses

func NewMLSABaseFilter(order int, alpha float64) *MLSABaseFilter

NewMLSABaseFilter returns its instance. It requires the order of mel-cepstrum and all-pass constant (alpha).

func (*MLSABaseFilter) Filter Uses

func (bf *MLSABaseFilter) Filter(sample float64, filterCoef []float64) float64

Filter returns filtered sample given the inpuy sample and filter coeffficients.

type MLSACascadeFilter Uses

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

MLSACascadeFilter represents a cascade filter which contains MLSA base filters.

func NewMLSACascadeFilter Uses

func NewMLSACascadeFilter(order int, alpha float64, orderOfPade int) *MLSACascadeFilter

NewMLSABaseFilter returns its instance and error with the order of mel-cepstrum, all-pass constant (alpha) and the order of pade approximation. Order of pade approximation 4 or 5 is only supported. If other one is specified, it returns non-nil error.

func (*MLSACascadeFilter) Filter Uses

func (cf *MLSACascadeFilter) Filter(sample float64, filterCoef []float64) float64

Filter returns filtered sample given the inpuy sample and filter coeffficients.

type MLSAFilter Uses

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

MLSAFilter represents a Mel-Log Spectrum Approximation (MLSA) filter, which is composed of two cascade filters.

func NewMLSAFilter Uses

func NewMLSAFilter(order int, alpha float64, orderOfPade int) *MLSAFilter

NewMLSAFilter returns its instance and error. It requires the order of mel-cepstrum, all-pass constant (alpha) and the order of pade approximation.

func (*MLSAFilter) Filter Uses

func (f *MLSAFilter) Filter(sample float64, filterCoef []float64) float64

Filter returns filtered sample given the input and MLSA filter coefficients. The MLSA filter is composed of two stage cascade filter.

type MLSASpeechSynthesizer Uses

type MLSASpeechSynthesizer struct {
    CoreFilter *MLSAFilter // used in sample by sample speech generation
    FrameShift int
    Alpha      float64 // all-pass constant
}

MLSASpeechSynthesizer represents a speech synthesizer based on MLSA Filter.

func NewMLSASpeechSynthesizer Uses

func NewMLSASpeechSynthesizer(numMceps int, alpha float64, orderOfPade int,
    frameShift int) *MLSASpeechSynthesizer

NewMLSASpeechSynthesizer returns its instance given parameters.

func (*MLSASpeechSynthesizer) Synthesis Uses

func (s *MLSASpeechSynthesizer) Synthesis(excite []float64,
    mcepSequence [][]float64) []float64

Synthesis synthesizes a speech signal from an excitation signal and corresponding mel-ceptrum sequence.

func (*MLSASpeechSynthesizer) SynthesisOneFrame Uses

func (s *MLSASpeechSynthesizer) SynthesisOneFrame(excite []float64,
    previousMcep, currentMcep []float64) []float64

SynthesisOneFrame synthesizes a part of speech signal from an excitation signal and succesive two mel-cepstrum sequence. It requires all-pass constant (alpha). Mel-cepstral coefficients between two succesive mel-cepstrum are linearly interpolated.

Package vocoder imports 2 packages (graph). Updated 2016-07-22. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).