audio_input

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 11 Imported by: 2

Documentation

Overview

Generated by cmd/operatable DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calibration

type Calibration struct {
	Chart                    astichartjs.Chart `json:"chart"`
	CurrentMaxSilenceLevel   float64           `json:"current_max_silence_level"`
	MaxLevel                 float64           `json:"max_level"`
	SuggestedMaxSilenceLevel float64           `json:"suggested_max_silence_level"`
}

type Listenable

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

func NewListenable

func NewListenable(o ListenableOptions) *Listenable

func (*Listenable) MessageNames

func (l *Listenable) MessageNames() (ns []string)

func (*Listenable) OnMessage

func (l *Listenable) OnMessage(m *astibob.Message) (err error)

type ListenableOptions

type ListenableOptions struct {
	OnSamples func(from astibob.Identifier, samples []int, bitDepth, numChannels, sampleRate int, maxSilenceLevel float64) error
}

type Runnable

type Runnable struct {
	*astibob.BaseOperatable
	*astibob.BaseRunnable
	// contains filtered or unexported fields
}

func NewRunnable

func NewRunnable(name string, s Stream, l astikit.StdLogger) *Runnable

func (*Runnable) MessageNames

func (r *Runnable) MessageNames() []string

type Samples

type Samples struct {
	BitDepth        int     `json:"bit_depth"`
	MaxSilenceLevel float64 `json:"max_silence_level"`
	NumChannels     int     `json:"num_channels"`
	SampleRate      int     `json:"sample_rate"`
	Samples         []int   `json:"samples"`
}

type Stream

type Stream interface {
	BitDepth() int
	MaxSilenceLevel() float64
	NumChannels() int
	Read() ([]int, error)
	SampleRate() int
	Start() error
	Stop() error
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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