Documentation
¶
Overview ¶
Native libraries speech runs on, loaded at run time without cgo: PortAudio, the speech engine and the wake word engines
Index ¶
- Constants
- Variables
- func At[T any](addr uintptr) *T
- func CString(s string) []byte
- func Chars(held *[][]byte, s string) *byte
- func Find(name string) string
- func Floats(addr uintptr, n int32) []float32
- func GoString(p uintptr) string
- func Lookup(name string) (uintptr, error)
- func NewCallback(fn any) (cb uintptr, err error)
- func PointerAt(array uintptr, i int) uintptr
- func RegisterFunc(fptr any, addr uintptr)
- func Text(p *byte) string
- type Library
- type LoadError
- type SymbolError
Constants ¶
const Supported = true
Whether this build can load shared libraries
Variables ¶
var ErrNoCallback = errors.New("this build of icebath can't take calls from libraries on " + runtime.GOOS + "/" + runtime.GOARCH)
No trampoline through which C can call a Go function in this build
var ErrNotFound = errors.New("the library was not found")
No library turned up for a name, path or search
var ErrUnsupported = errors.New("this build of icebath can't load libraries on " + runtime.GOOS + "/" + runtime.GOARCH)
No dynamic library loader for this platform
Functions ¶
func CString ¶
NUL terminated copy of s for a char pointer argument, kept referenced as long as C reads it
func Find ¶
Soname or path the platform loader resolves for a short library name such as portaudio, empty when none is installed
func NewCallback ¶
C function pointer that calls a Go function, never released; an error once the process has made as many as the platform allows
func RegisterFunc ¶
Types ¶
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
One loaded shared library, kept loaded for the life of the process
func Open ¶
Library opened with every symbol bound at once, its symbols visible to libraries loaded later when global
type SymbolError ¶
A function or variable a library does not export
func (*SymbolError) Error ¶
func (e *SymbolError) Error() string
func (*SymbolError) Unwrap ¶
func (e *SymbolError) Unwrap() error