diff --git a/scripts/p3_tools/play_p3.py b/scripts/p3_tools/play_p3.py index dbb5349d..f0be554c 100644 --- a/scripts/p3_tools/play_p3.py +++ b/scripts/p3_tools/play_p3.py @@ -57,10 +57,10 @@ def play_p3_file(input_file): # 等待一帧的时间 time.sleep(60 / 1000) # 60ms - # 播放结束后添加0.5秒静音,避免破音 - silence = np.zeros(int(sample_rate / 2), dtype=np.int16) + # 播放结束后添加1秒静音,避免破音 + silence = np.zeros(int(sample_rate), dtype=np.int16) stream.write(silence) - time.sleep(0.5) # 等待1秒 + time.sleep(1) # 等待1秒 except KeyboardInterrupt: print("\n播放已停止") @@ -77,4 +77,4 @@ def main(): play_p3_file(args.input_file) if __name__ == "__main__": - main() \ No newline at end of file + main()