MCPcopy Create free account
hub / github.com/NsLearning/LangHelper / __init__

Method __init__

LangHelper/recoder.py:6–14  ·  view source on GitHub ↗
(self, root_path)

Source from the content-addressed store, hash-verified

4
5class VoiceRecorder:
6 def __init__(self, root_path):
7
8 self.root_path = root_path # path to save cache recording file
9 self.audio = pyaudio.PyAudio()
10 self.stream = None
11 self.chunks = [] #.pcm data byte chunks
12 self.audio_format = pyaudio.paInt16
13 self.rate = 16000
14 self.channels = 1
15
16 def start(self):
17 print("start recording!")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected