LLM+
这个提交包含在:
5
LLM.py
5
LLM.py
@ -47,3 +47,8 @@ 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():
|
def Record2Text():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with sd.InputStream(callback=audio_callback,
|
with sd.InputStream(callback=audio_callback,
|
||||||
channels=1,
|
channels=1,
|
||||||
samplerate=sample_rate,
|
samplerate=sample_rate,
|
||||||
blocksize=block_size,
|
blocksize=block_size,
|
||||||
dtype='float32'):
|
dtype='float32'):
|
||||||
print("Recording started. Press Enter to stop.")
|
print("Recording started. Press Enter to stop.")
|
||||||
input() # 阻塞,等待用户输入以停止
|
input() # 阻塞,等待用户输入以停止
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("用户输入中断")
|
print("用户输入中断")
|
||||||
|
|
||||||
print("Recording stopped.")
|
print("Recording stopped.")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Record2Text()
|
Record2Text()
|
||||||
在新工单中引用
屏蔽一个用户