From e8b422b6863c29d297c80beeec26c16785258746 Mon Sep 17 00:00:00 2001 From: Arcelibs <49543451+Arcelibs@users.noreply.github.com> Date: Tue, 26 Dec 2023 17:15:48 +0800 Subject: [PATCH] Update main.py --- Local-Windows/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Local-Windows/main.py b/Local-Windows/main.py index 462a3e6..0890f4f 100644 --- a/Local-Windows/main.py +++ b/Local-Windows/main.py @@ -49,11 +49,11 @@ def get_stream_url(youtube_url): command = ["yt-dlp", "-g", youtube_url] process = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) if process.returncode != 0: - print(f"错误: 无法获取流地址。详情:{process.stderr}") + print(f"錯誤: 無法取得直播流。詳情:{process.stderr}") return None return process.stdout.strip() -# 录制音频的函数 +# 錄製聲音的函數 def record_audio(stream_url, duration, output_filename): try: command = [ @@ -62,7 +62,7 @@ def record_audio(stream_url, duration, output_filename): ] subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) except subprocess.CalledProcessError as e: - print(f"错误: 无法录制音频。详情:{e.stderr.decode()}") + print(f"錯誤: 無法錄製聲音。詳情:{e.stderr.decode()}") return False return True