python录制音频

python录制、保存音频

1、导入pyaudio库

pip install pyaudio

2、录制、保存音频

# !/usr/bin/python
# -*- coding: utf-8 -*-

"""
@contact: 微信 1257309054
@file: 录制声音.py
@time: 2022/1/6 17:04
@author: LDC
"""
import wave
import pyaudio as pyaudio


def audio_record(out_file, rec_time):
    '''
    用Pyaudio库录制音频
    :param o
上一篇:python-使用PyAudio作为振荡器删除/控制点击声音


下一篇:mac上的pyaudio安装(python 3)