Documentation ¶
Index ¶
- func DetectLanguage(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func LangFromContext(ctx context.Context) string
- func LangWithContext(lang string, ctx context.Context) context.Context
- func NewContext(ctx context.Context, sp Sphinx) context.Context
- type PsInstance
- type Sphinx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectLanguage ¶
Detect Language from accept-language
func LangFromContext ¶
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 (Sphinx) GetSphinxFromLanguage ¶
func (t Sphinx) GetSphinxFromLanguage(lang string) (*PsInstance, error)
Click to show internal directories.
Click to hide internal directories.