Documentation ¶
Index ¶
- func BackupWAVfile(filename string) error
- func PlayWavFile(filename string) error
- func RecordAndSaveWav(filename string) error
- func RecordAndSaveWithChannel(filename string, sig <-chan struct{}) error
- func RecordAndSaveWithContext(ctx context.Context, filename string) error
- func RecordAndSaveWithInterrupt(filename string) error
- func RecordAndSaveWithInterruptShow(filename string) error
- type AudioRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupWAVfile ¶
func RecordAndSaveWav ¶
RecordAndSaveWav 从麦克风录制音频并保存为WAV文件
func RecordAndSaveWithInterrupt ¶
RecordAndSaveWavWithInterrupt 从麦克风录制音频并保存为WAV文件,可以被信号中断
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()
Click to show internal directories.
Click to hide internal directories.