Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // FrameLength Number of audio samples per frame. FrameLength int // SampleRate Audio sample rate accepted by Picovoice. SampleRate int // Version Cheetah version Version string )
Functions ¶
This section is empty.
Types ¶
type Cheetah ¶
type Cheetah struct { // AccessKey obtained from Picovoice Console (https://console.picovoice.ai/). AccessKey string // Absolute path to the file containing model parameters. ModelPath string // Absolute path to Cheetah's dynamic library. LibraryPath string // Duration of endpoint in seconds. A speech endpoint is detected when there is a // chunk of audio (with a duration specified herein) after an utterance without any speech in it. Set to 0 // to disable endpoint detection. EndpointDuration float32 // Flag to enable automatic punctuation insertion. EnableAutomaticPunctuation bool // contains filtered or unexported fields }
Cheetah struct
func NewCheetah ¶
NewCheetah returns a Cheetah struct with default parameters
func (*Cheetah) Flush ¶
Flush marks the end of the audio stream, flushes internal state of the object, and returns any remaining transcribed text. Return any remaining transcribed text. If none is available then an empty string is returned.
func (*Cheetah) Process ¶
Processes a frame of audio and returns newly-transcribed text and a flag indicating if an endpoint has been detected. Upon detection of an endpoint, the client may invoke `.Flush()` to retrieve any remaining transcription. Returns Any newly-transcribed speech (if none is available then an empty string is returned) and a flag indicating if an endpoint has been detected.
type CheetahError ¶
func (*CheetahError) Error ¶
func (e *CheetahError) Error() string
type PvStatus ¶
type PvStatus int
PvStatus type
const ( SUCCESS PvStatus = 0 OUT_OF_MEMORY PvStatus = 1 IO_ERROR PvStatus = 2 INVALID_ARGUMENT PvStatus = 3 STOP_ITERATION PvStatus = 4 KEY_ERROR PvStatus = 5 INVALID_STATE PvStatus = 6 RUNTIME_ERROR PvStatus = 7 ACTIVATION_ERROR PvStatus = 8 ACTIVATION_LIMIT_REACHED PvStatus = 9 ACTIVATION_THROTTLED PvStatus = 10 ACTIVATION_REFUSED PvStatus = 11 )
Possible status return codes from the Cheetah library