mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
refac
This commit is contained in:
parent
b6b271b70c
commit
fcb209c5aa
1 changed files with 3 additions and 3 deletions
|
@ -69,10 +69,10 @@ class Voice:
|
||||||
|
|
||||||
self.start_time = time.time()
|
self.start_time = time.time()
|
||||||
|
|
||||||
with sf.SoundFile(filename, mode="x", samplerate=sample_rate, channels=1) as file:
|
with sd.InputStream(samplerate=sample_rate, channels=1, callback=self.callback):
|
||||||
with sd.InputStream(samplerate=sample_rate, channels=1, callback=self.callback):
|
prompt(self.get_prompt, refresh_interval=0.1)
|
||||||
prompt(self.get_prompt, refresh_interval=0.1)
|
|
||||||
|
|
||||||
|
with sf.SoundFile(filename, mode="x", samplerate=sample_rate, channels=1) as file:
|
||||||
while not self.q.empty():
|
while not self.q.empty():
|
||||||
file.write(self.q.get())
|
file.write(self.q.get())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue