录音机
文章平均质量分 55
LuniqueX
这个作者很懒,什么都没留下…
展开
-
用python编写录音机——GUI控制录音开始与结束(PyQt5)
我们还是先来看看代码:import pyaudioimport timeimport threadingimport waveimport winsoundimport matplotlib.pyplot as plimport numpy as npimport sysfrom PyQt5.Qt import *class Recorder: def __init__(self, chunk=1024, channels=2, rate=64000):原创 2022-07-08 18:31:56 · 1499 阅读 · 0 评论 -
用python编写录音机——GUI控制录音开始与结束(tkinter)
我们先来看代码👇import pyaudioimport threadingimport waveimport tkinterclass Recorder: def __init__(self, chunk=1024, channels=1, rate=64000): self.CHUNK = chunk self.FORMAT = pyaudio.paInt16 self.CHANNELS = channels se原创 2022-04-26 21:01:34 · 2746 阅读 · 1 评论 -
用python编写录音机——记录一定时间的声音
先看代码👇import pyaudioimport wavedef get_wav(event): #创建对象 pa = pyaudio.PyAudio() #创建流:采样位,声道数,采样频率,缓冲区大小,input stream = pa.open(format=pyaudio.paInt16, channels=2, rate=16000,原创 2022-04-26 21:01:20 · 1724 阅读 · 0 评论 -
用python编写录音机——通过输入控制录音的开始和结束
先看代码👇import pyaudioimport timeimport threadingimport wave#定义类class Recorder: def __init__(self, chunk=1024, channels=1, rate=64000): self.CHUNK = chunk self.FORMAT = pyaudio.paInt16 self.CHANNELS = channels sel原创 2022-04-26 21:01:27 · 3965 阅读 · 1 评论