优化。
This commit is contained in:
@@ -40,12 +40,6 @@ def init_i2s():
|
||||
|
||||
|
||||
class InterphoneHandler:
|
||||
def new_voice(self, data):
|
||||
print(f"[Interphone] 接收到新数据: {data}")
|
||||
i2s = init_i2s()
|
||||
url = "http://iot.julecn.com/interphone/get_voice?name=" + data['name'] # 替换为音频文件的URL
|
||||
print(url)
|
||||
self.play_audio_stream(i2s, url)
|
||||
|
||||
def play_wav_file(self, data):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user