add ja-JP sounds

This commit is contained in:
Xiaoxia
2025-03-18 21:21:30 +08:00
parent 61cc1a236b
commit d0ae468fac
17 changed files with 0 additions and 17 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-8
View File
@@ -64,14 +64,6 @@ def play_p3_file(input_file, stop_event=None, pause_event=None):
# 播放音频
stream.write(audio_array)
# 等待一帧的时间
time.sleep(60 / 1000) # 60ms
# 播放结束后添加0.5秒静音,避免破音
silence = np.zeros(int(sample_rate / 2), dtype=np.int16)
stream.write(silence)
time.sleep(0.5) # 等待1秒
except KeyboardInterrupt:
print("\n播放已停止")
finally:
-9
View File
@@ -3,7 +3,6 @@ import opuslib
import struct
import numpy as np
import sounddevice as sd
import time
import argparse
def play_p3_file(input_file):
@@ -54,14 +53,6 @@ def play_p3_file(input_file):
# 播放音频
stream.write(audio_array)
# 等待一帧的时间
time.sleep(60 / 1000) # 60ms
# 播放结束后添加1秒静音,避免破音
silence = np.zeros(int(sample_rate), dtype=np.int16)
stream.write(silence)
time.sleep(1) # 等待1秒
except KeyboardInterrupt:
print("\n播放已停止")
finally: