The provided source text is a Python script snippet intended to capture audio from a Discord voice channel and process it for Speech-to-Text (STT). The code includes logic for connecting to a core service, handling Opus decoding, and converting PCM audio data.

Key components visible in the code include:

  • Audio capture using `discord.ext.voice_recv` and local PyAudio modules.
  • A `safe_decode` function patching `discord.opus.Decoder.decode` to handle potential errors.
  • Data processing steps that convert Discord's 48kHz stereo PCM to 16kHz mono float32 arrays suitable for STT models.
  • Network communication logic sending audio samples to a local `vtuber_core` service via TCP sockets.

The source content consists entirely of code and lacks any explanatory text, error logs, or discussion regarding specific failures or fixes.