sphinx

package
v0.0.0-...-5084783 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2015 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectLanguage

func DetectLanguage(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context

Detect Language from accept-language

func LangFromContext

func LangFromContext(ctx context.Context) string

func LangWithContext

func LangWithContext(lang string, ctx context.Context) context.Context

func NewContext

func NewContext(ctx context.Context, sp Sphinx) context.Context

Types

type PsInstance

type PsInstance struct {
	*ps.PocketSphinx
	// contains filtered or unexported fields
}

func (*PsInstance) Lock

func (p *PsInstance) Lock()

func (*PsInstance) Unlock

func (p *PsInstance) Unlock()

type Sphinx

type Sphinx map[string][]*PsInstance

func FromContext

func FromContext(ctx context.Context) (Sphinx, bool)

func NewSphinx

func NewSphinx(cfgMap map[string]ps.Config, cpunum int) Sphinx

func (Sphinx) GetSphinxFromLanguage

func (t Sphinx) GetSphinxFromLanguage(lang string) (*PsInstance, error)

Jump to

Keyboard shortcuts

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