mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2025-05-17 23:28:09 +08:00
add ja-JP sounds
This commit is contained in:
BIN
main/assets/ja-JP/0.p3
Normal file
BIN
main/assets/ja-JP/0.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/1.p3
Normal file
BIN
main/assets/ja-JP/1.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/2.p3
Normal file
BIN
main/assets/ja-JP/2.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/3.p3
Normal file
BIN
main/assets/ja-JP/3.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/4.p3
Normal file
BIN
main/assets/ja-JP/4.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/5.p3
Normal file
BIN
main/assets/ja-JP/5.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/6.p3
Normal file
BIN
main/assets/ja-JP/6.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/7.p3
Normal file
BIN
main/assets/ja-JP/7.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/8.p3
Normal file
BIN
main/assets/ja-JP/8.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/9.p3
Normal file
BIN
main/assets/ja-JP/9.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/activation.p3
Normal file
BIN
main/assets/ja-JP/activation.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/err_pin.p3
Normal file
BIN
main/assets/ja-JP/err_pin.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/err_reg.p3
Normal file
BIN
main/assets/ja-JP/err_reg.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/welcome.p3
Normal file
BIN
main/assets/ja-JP/welcome.p3
Normal file
Binary file not shown.
BIN
main/assets/ja-JP/wificonfig.p3
Normal file
BIN
main/assets/ja-JP/wificonfig.p3
Normal file
Binary file not shown.
@ -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:
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user