whisperaudio

package
v0.0.0-...-54efdb4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: ISC Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpDeviceInfo

func DumpDeviceInfo()

DumpDeviceInfo dumps the device info.

Types

type WhisperAudio

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

WhisperAudio is a wrapper around the whisper library and portaudio.

func New

func New(opts ...whisperutil.Option) (*WhisperAudio, error)

New creates a new WhisperAudio instance.

func (*WhisperAudio) CollectAudioData

func (wa *WhisperAudio) CollectAudioData(duration time.Duration) ([]float32, error)

CollectAudioData collects audio data for the given duration.

func (*WhisperAudio) Start

func (wa *WhisperAudio) Start() error

Start starts the audio stream.

func (*WhisperAudio) Stop

func (wa *WhisperAudio) Stop() error

Stop stops the audio stream.

func (*WhisperAudio) Transcribe

func (wa *WhisperAudio) Transcribe(buf []float32) (string, error)

Transcribe transcribes the given audio data.

Jump to

Keyboard shortcuts

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