LLM+
这个提交包含在:
7
LLM.py
7
LLM.py
@ -46,4 +46,9 @@ def LLMTokenizer(str):
|
||||
# start: 用于开始本次主要交互请求
|
||||
.start()
|
||||
)
|
||||
return result
|
||||
return result
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_str = "请帮我把桌子上的杯子拿过来,然后放到书架上"
|
||||
response = LLMTokenizer(test_str)
|
||||
print(response)
|
||||
22
R2T.py
22
R2T.py
@ -71,18 +71,18 @@ def audio_callback(indata, frames, time, status):
|
||||
def Record2Text():
|
||||
pass
|
||||
|
||||
try:
|
||||
with sd.InputStream(callback=audio_callback,
|
||||
channels=1,
|
||||
samplerate=sample_rate,
|
||||
blocksize=block_size,
|
||||
dtype='float32'):
|
||||
print("Recording started. Press Enter to stop.")
|
||||
input() # 阻塞,等待用户输入以停止
|
||||
except KeyboardInterrupt:
|
||||
print("用户输入中断")
|
||||
try:
|
||||
with sd.InputStream(callback=audio_callback,
|
||||
channels=1,
|
||||
samplerate=sample_rate,
|
||||
blocksize=block_size,
|
||||
dtype='float32'):
|
||||
print("Recording started. Press Enter to stop.")
|
||||
input() # 阻塞,等待用户输入以停止
|
||||
except KeyboardInterrupt:
|
||||
print("用户输入中断")
|
||||
|
||||
print("Recording stopped.")
|
||||
print("Recording stopped.")
|
||||
|
||||
if __name__ == '__main__':
|
||||
Record2Text()
|
||||
在新工单中引用
屏蔽一个用户