MCPcopy Create free account
hub / github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI / soundinput

Method soundinput

gui_v1.py:648–665  ·  view source on GitHub ↗

接受音频输入

(self)

Source from the content-addressed store, hash-verified

646 thread_vc.start()
647
648 def soundinput(self):
649 """
650 接受音频输入
651 """
652 channels = 1 if sys.platform == "darwin" else 2
653 with sd.Stream(
654 channels=channels,
655 callback=self.audio_callback,
656 blocksize=self.block_frame,
657 samplerate=self.gui_config.samplerate,
658 dtype="float32",
659 ) as stream:
660 global stream_latency
661 stream_latency = stream.latency[-1]
662 while self.flag_vc:
663 time.sleep(self.gui_config.block_time)
664 printt("Audio block passed.")
665 printt("ENDing VC")
666
667 def audio_callback(
668 self, indata: np.ndarray, outdata: np.ndarray, frames, times, status

Callers

nothing calls this directly

Calls 1

printtFunction · 0.70

Tested by

no test coverage detected