praudio

package
v0.0.0-...-9ffda5a Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupWAVfile

func BackupWAVfile(filename string) error

func PlayWavFile

func PlayWavFile(filename string) error

PlayWavFile 播放指定的WAV文件

func RecordAndSaveWav

func RecordAndSaveWav(filename string) error

RecordAndSaveWav 从麦克风录制音频并保存为WAV文件

func RecordAndSaveWithChannel

func RecordAndSaveWithChannel(filename string, sig <-chan struct{}) error

func RecordAndSaveWithContext

func RecordAndSaveWithContext(ctx context.Context, filename string) error

func RecordAndSaveWithInterrupt

func RecordAndSaveWithInterrupt(filename string) error

RecordAndSaveWavWithInterrupt 从麦克风录制音频并保存为WAV文件,可以被信号中断

func RecordAndSaveWithInterruptShow

func RecordAndSaveWithInterruptShow(filename string) error

Types

type AudioRecorder

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

func NewAudioRecorder

func NewAudioRecorder() (*AudioRecorder, error)

func (*AudioRecorder) Read

func (ar *AudioRecorder) Read() []int32

func (*AudioRecorder) Stop

func (ar *AudioRecorder) Stop()

Jump to

Keyboard shortcuts

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